Reading the mesh file
To post-process the output file you need the node and element data from the corresponding mesh file.
The following C++ code reads the binary mesh file which has the suffix meb (refer to the file locations post).
Previously there was an ascii text file output of the mesh as well as the binary file but it is far more efficient to read the binary file instead. Likely we should do the same for the output file in the near future. Apologies to C++ purists for the use of global variables - but sensible people detest C++ anyway. Femdesigner started life in 1993 in Power Basic on the Atari, which even then had automatic garbage collection. It should be easy to convert this code to Python, Excel-type Basic etc. as the structure is very simple.
int *m_pElements;
double *m_pNodeVertices;
int *facet_element;
int *facet_bface;
int *facet_face;
CString strmebfile;
BOOL MeshReady=FALSE;
int nNodes,nElements,nFacets,nodesperelement,nodesperfacet,ndim;
double scale;
void Elements_MeshClear(void){
MeshReady = FALSE;
if (m_pElements) delete[] m_pElements;
if (m_pNodeVertices) delete[] m_pNodeVertices;
m_pElements = NULL; m_pNodeVertices = NULL;
if (facet_element) delete[] facet_element;
if (facet_face) delete[] facet_face;
if (facet_bface) delete[] facet_bface;
facet_element = NULL; facet_face = NULL; facet_bface = NULL;
m_pElements = NULL; m_pNodeVertices = NULL;
facet_element = NULL; facet_bface = NULL; facet_face = NULL;
}//end
void Elements_sizemesharrays(void){
Elements_MeshClear();//remove old mesh
int i, k;//create space for new mesh
k=nodesperelement*nElements;
m_pElements = new int[k+1];
for (i=0; i<k; i++) m_pElements[i]=0;
k=3*nNodes;
m_pNodeVertices = new double[k+1];
for (i=0; i<k; i++) m_pNodeVertices[i]=0.0;
elist = new char[nElements+1];
nlist = new char[nNodes+1];
for (i=0; i<=nElements; i++) elist[i]='v';
for (i=0; i<=nNodes; i++) nlist[i]='v';
facet_element = new int[nFacets];
facet_face = new int[nFacets];
facet_bface = new int[nFacets];
for (i = 0; i < nFacets; i++) {
facet_element[i] = 0;
facet_face[i] = 0;
facet_bface[i] = 0;
}//next
}//end
bool ReadBinaryMesh(void){
if (MeshReady) return true;
int ik,ndim;
fstream myFile ((char *)strmebfile.GetString(), ios::in | ios::binary);
if (myFile){
myFile.read ((char*)&nNodes, sizeof (int));
myFile.read ((char*)&nElements, sizeof (int));
myFile.read ((char*)&nFacets, sizeof (int));
myFile.read ((char*)&nodesperelement, sizeof (int));
myFile.read ((char*)&ndim, sizeof (int));//assumed =3 anyway
myFile.read ((char*)&scale, sizeof (double));
if (nodesperelement==4) nodesperfacet=3; else nodesperfacet=6;
if (nElements>0 && nNodes>0) {
Elements_sizemesharrays();
myFile.read ((char*)m_pNodeVertices, nNodes*3*sizeof (double));
myFile.read ((char*)m_pElements, nElements*nodesperelement*sizeof (int));
int faces[3];
for (ik=0; ik<nFacets; ik++) {
myFile.read ((char*)faces, 3*sizeof (int));
facet_bface[ik]=faces[0];
facet_element[ik]=faces[1];
facet_face[ik]=faces[2];
}//next
}//endif
myFile.close();
}//endif
else return FALSE;
MeshReady=TRUE;
return TRUE;
}//end