1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 \*---------------------------------------------------------------------------*/
29 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
33 inline Foam::label Foam::treeNode<Type>::getVolType(const label octant) const
35 return (volType_ >> 2*octant) & 0x3;
40 inline const Foam::point& Foam::treeNode<Type>::midpoint() const
47 inline Foam::treeElem<Type>* const* Foam::treeNode<Type>::subNodes() const
53 // octant contains pointer to treeNode(1) or treeLeaf(0)
55 inline Foam::label Foam::treeNode<Type>::isNode(const label octant) const
57 return subNodeTypes_ & (0x1 << octant);
61 // Get pointer to sub node
63 inline Foam::treeNode<Type>* Foam::treeNode<Type>::getNodePtr
71 FatalErrorIn("treeNode::getNodePtr(const label)")
77 return static_cast<treeNode<Type>*>(subNodes_[octant]);
81 // Get pointer to sub leaf
83 inline Foam::treeLeaf<Type>* Foam::treeNode<Type>::getLeafPtr
91 FatalErrorIn("treeNode::getLeafPtr(const label)")
97 return static_cast<treeLeaf<Type>*>(subNodes_[octant]);
101 // ************************************************************************* //