3030CPrimalGridFEM::CPrimalGridFEM (unsigned long val_elemGlobalID, unsigned short val_VTK_Type,
3131 unsigned short val_nPolyGrid, unsigned short val_nPolySol,
3232 unsigned short val_nDOFsGrid, unsigned short val_nDOFsSol,
33- unsigned long val_offDOfsSol, istringstream &elem_line) : CPrimalGrid(true )
33+ unsigned long val_offDOfsSol, istringstream &elem_line) : CPrimalGrid(true , val_nDOFsGrid )
3434{
3535 /* --- Store the integer data in the member variables of this object. ---*/
3636 VTK_Type = val_VTK_Type;
@@ -44,9 +44,8 @@ CPrimalGridFEM::CPrimalGridFEM(unsigned long val_elemGlobalID, unsigned short v
4444 elemIDGlobal = val_elemGlobalID;
4545 offsetDOFsSolGlobal = val_offDOfsSol;
4646
47- /* --- Allocate the memory for the global nodes of the element to define
48- the geometry and read them from elem_line. ---*/
49- Nodes.resize (nDOFsGrid);
47+ /* --- Read face structure of the element from elem_line. ---*/
48+
5049 for (unsigned short i=0 ; i<nDOFsGrid; i++)
5150 elem_line >> Nodes[i];
5251
@@ -76,7 +75,7 @@ CPrimalGridFEM::CPrimalGridFEM(unsigned long val_elemGlobalID, unsigned short v
7675CPrimalGridFEM::CPrimalGridFEM (unsigned long val_elemGlobalID, unsigned short val_VTK_Type,
7776 unsigned short val_nPolyGrid, unsigned short val_nPolySol,
7877 unsigned short val_nDOFsGrid, unsigned short val_nDOFsSol,
79- unsigned long val_offDOfsSol, const unsigned long *connGrid): CPrimalGrid(true )
78+ unsigned long val_offDOfsSol, const unsigned long *connGrid): CPrimalGrid(true , val_nDOFsGrid )
8079{
8180 /* --- Store the integer data in the member variables of this object. ---*/
8281 VTK_Type = val_VTK_Type;
@@ -90,9 +89,7 @@ CPrimalGridFEM::CPrimalGridFEM(unsigned long val_elemGlobalID, unsigned short v
9089 elemIDGlobal = val_elemGlobalID;
9190 offsetDOFsSolGlobal = val_offDOfsSol;
9291
93- /* --- Allocate the memory for the global nodes of the element to define
94- the geometry and copy the data from connGrid. ---*/
95- Nodes.resize (nDOFsGrid);
92+ /* --- Copy face structure of the element from connGrid. ---*/
9693 for (unsigned short i=0 ; i<nDOFsGrid; i++)
9794 Nodes[i] = connGrid[i];
9895}
0 commit comments