CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Creating a pointMesh with pointField and faceList (

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:


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


All times are GMT -4. The time now is 18:12.