mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 11:40:33 +05:00
Fix for the 21125: EDF 1233 SMESH: Degrardation of precision in a test case for quadratic conversion.
This commit is contained in:
parent
07808b26b0
commit
96cbac2048
@ -154,6 +154,9 @@ SMDS_Mesh::SMDS_Mesh()
|
||||
myGrid->Initialize();
|
||||
myGrid->Allocate();
|
||||
vtkPoints* points = vtkPoints::New();
|
||||
// rnv: to fix bug "21125: EDF 1233 SMESH: Degrardation of precision in a test case for quadratic conversion"
|
||||
// using double type for storing coordinates of nodes instead float.
|
||||
points->SetDataType(VTK_DOUBLE);
|
||||
points->SetNumberOfPoints(SMDS_Mesh::chunkSize);
|
||||
myGrid->SetPoints( points );
|
||||
points->Delete();
|
||||
@ -2503,6 +2506,9 @@ void SMDS_Mesh::Clear()
|
||||
myGrid->Initialize();
|
||||
myGrid->Allocate();
|
||||
vtkPoints* points = vtkPoints::New();
|
||||
// rnv: to fix bug "21125: EDF 1233 SMESH: Degrardation of precision in a test case for quadratic conversion"
|
||||
// using double type for storing coordinates of nodes instead float.
|
||||
points->SetDataType(VTK_DOUBLE);
|
||||
points->SetNumberOfPoints(SMDS_Mesh::chunkSize);
|
||||
myGrid->SetPoints( points );
|
||||
points->Delete();
|
||||
|
@ -160,6 +160,9 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
||||
{
|
||||
MESSAGE("-------------- compactGrid, newNodeSize " << newNodeSize);
|
||||
newPoints = vtkPoints::New();
|
||||
// rnv: to fix bug "21125: EDF 1233 SMESH: Degrardation of precision in a test case for quadratic conversion"
|
||||
// using double type for storing coordinates of nodes instead float.
|
||||
newPoints->SetDataType(VTK_DOUBLE);
|
||||
newPoints->Initialize();
|
||||
newPoints->Allocate(newNodeSize);
|
||||
newPoints->SetNumberOfPoints(newNodeSize);
|
||||
@ -371,7 +374,7 @@ void SMDS_UnstructuredGrid::copyNodes(vtkPoints *newPoints, std::vector<int>& id
|
||||
int nbPoints = end - start;
|
||||
if (nbPoints > 0)
|
||||
{
|
||||
memcpy(target, source, 3 * sizeof(float) * nbPoints);
|
||||
memcpy(target, source, 3 * sizeof(double) * nbPoints);
|
||||
for (int j = start; j < end; j++)
|
||||
idNodesOldToNew[j] = alreadyCopied++; // old vtkId --> new vtkId
|
||||
//idNodesOldToNew[alreadyCopied++] = idNodesOldToNew[j]; // new vtkId --> old SMDS id
|
||||
|
Loading…
Reference in New Issue
Block a user