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/)
-   -   IndexedOctree: how to access get the bounding box value of a node (http://www.cfd-online.com/Forums/openfoam-programming-development/118245-indexedoctree-how-access-get-bounding-box-value-node.html)

seher May 23, 2013 10:31

IndexedOctree: how to access get the bounding box value of a node
 
Dear All,

i'm working on a tool to do some mesh morphing. I know there are already some tools doing this but my emphasis lies on a tool that can keep some structus (e.g. protecting the boundary layer) of the grid and do not violate the gridquality.

In this regard i'm asking myself how to access the bounding box variable of a node in the indexedOctree.

For initialization if used:

Code:

treeBoundBox meshBb(mesh.bounds());
 
    scalar typDim = meshBb.avgDim()/(2.0*Foam::cbrt(scalar(mesh.nCells())));
 
        treeBoundBox shiftedBb
        (
            meshBb.min(),
            meshBb.max() + vector(typDim, typDim, typDim)
        );
 
 
        indexedOctree<treeDataCell> ioc
        (
            treeDataCell(true, mesh, polyMesh::FACEDIAGTETS),
            shiftedBb,
            100,
            1,
            10.0
        );

Next let's say i've got a point:

Code:

const point sample = mesh.points()[10];
Know the question is how can i get the bounding box values of something like this:

Code:

ioc.getNode(ioc.findNode(0,sample))
Any suggestions are welcome.

P.S.: if there is a "better" possibility to achieve this i would lso appreciate any suggestions =)

Best regards,
Sebastian


All times are GMT -4. The time now is 02:11.