mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 14:10:34 +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->Initialize();
|
||||||
myGrid->Allocate();
|
myGrid->Allocate();
|
||||||
vtkPoints* points = vtkPoints::New();
|
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);
|
points->SetNumberOfPoints(SMDS_Mesh::chunkSize);
|
||||||
myGrid->SetPoints( points );
|
myGrid->SetPoints( points );
|
||||||
points->Delete();
|
points->Delete();
|
||||||
@ -2503,6 +2506,9 @@ void SMDS_Mesh::Clear()
|
|||||||
myGrid->Initialize();
|
myGrid->Initialize();
|
||||||
myGrid->Allocate();
|
myGrid->Allocate();
|
||||||
vtkPoints* points = vtkPoints::New();
|
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);
|
points->SetNumberOfPoints(SMDS_Mesh::chunkSize);
|
||||||
myGrid->SetPoints( points );
|
myGrid->SetPoints( points );
|
||||||
points->Delete();
|
points->Delete();
|
||||||
|
@ -160,6 +160,9 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
|||||||
{
|
{
|
||||||
MESSAGE("-------------- compactGrid, newNodeSize " << newNodeSize);
|
MESSAGE("-------------- compactGrid, newNodeSize " << newNodeSize);
|
||||||
newPoints = vtkPoints::New();
|
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->Initialize();
|
||||||
newPoints->Allocate(newNodeSize);
|
newPoints->Allocate(newNodeSize);
|
||||||
newPoints->SetNumberOfPoints(newNodeSize);
|
newPoints->SetNumberOfPoints(newNodeSize);
|
||||||
@ -371,7 +374,7 @@ void SMDS_UnstructuredGrid::copyNodes(vtkPoints *newPoints, std::vector<int>& id
|
|||||||
int nbPoints = end - start;
|
int nbPoints = end - start;
|
||||||
if (nbPoints > 0)
|
if (nbPoints > 0)
|
||||||
{
|
{
|
||||||
memcpy(target, source, 3 * sizeof(float) * nbPoints);
|
memcpy(target, source, 3 * sizeof(double) * nbPoints);
|
||||||
for (int j = start; j < end; j++)
|
for (int j = start; j < end; j++)
|
||||||
idNodesOldToNew[j] = alreadyCopied++; // old vtkId --> new vtkId
|
idNodesOldToNew[j] = alreadyCopied++; // old vtkId --> new vtkId
|
||||||
//idNodesOldToNew[alreadyCopied++] = idNodesOldToNew[j]; // new vtkId --> old SMDS id
|
//idNodesOldToNew[alreadyCopied++] = idNodesOldToNew[j]; // new vtkId --> old SMDS id
|
||||||
|
Loading…
Reference in New Issue
Block a user