I have solved a simple problem on Openfoam, which is a 3D rectangular parallelopiped, filled with rectangular hexahedrons as mesh elements. The structured, mapped mesh was made in ICEM and solved in OF. But the mesh and data, are in unstructured format i.e. they are represented with connectivity. I now want to convert the unstructured data to a structured data w/o connectivity i.e. the mesh should be represented with loop like
for(k=0;k<znocells;k++)
for(j=0;j<ynocells;j++)
for(i=0;i<xnocells;i++)
{
//access elements...
}
I have tried to write a code for the same, but have failed. A simple workaround involved involved sorting the array of elements, but that won't work for geometries like bifurcation and stuff. Is there a code available, or a software to import the OF mesh and spit out a structured mesh?