CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Creating a pointMesh with pointField and faceList (http://www.cfd-online.com/Forums/openfoam-programming-development/104945-creating-pointmesh-pointfield-facelist.html)

Thilo July 19, 2012 06:36

Creating a pointMesh with pointField and faceList
 
Hi Everyone,

is there a possibility to create a pointMesh with a previous defined pointField and faceList?

So far my code looks like:

Code:

pointField points(_numNodes, point(0,0,0));

for(int iP=0; iP<_numNodes; iP++){
          points[iP] = vector(_coo[iP].x, _coo[iP].y, _coo[iP].z);
 }         

faceList faces(_numFaces);     

for(int iF=0; iF<_numFaces; iF++) {
          labelList myLittleFaceLabels (_face[iF]._numNodes,0);       
    for(int iN=0; iN<_face[iF].numNodes; iN++){
      myLittleFaceLabels[iN] =  _face[iF]._nodes[iN]._index;
    }
    faces[iF] = face(myLittleFaceLabels);   
}

// Does not work:
pointMesh pSolidMesh(pointField);

Best regards

Thilo


All times are GMT -4. The time now is 09:43.