Chombo + EB  3.2
STLBox.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _STLBOX_H_
12 #define _STLBOX_H_
13 
14 #include "ProblemDomain.H"
15 #include "RealVect.H"
16 #include "IntVect.H"
17 #include "Box.H"
18 #include "RefCountedPtr.H"
19 
20 #include "STLMesh.H"
21 #include "STLUtil.H"
22 
23 #include "NamespaceHeader.H"
24 
25 using namespace STLUtil;
26 
27 /*
28  * This is just a class to hold data that associates
29  * a Chombo Box with an STL mesh. It has, e.g., maps
30  * between Chombo cells and the STL vertices that lie
31  * within them. The class also includes some get
32  * functions and print functions for its members
33  */
34 
35 class STLBox
36 {
37 public:
38 
40  const Box& a_region,
41  const ProblemDomain& a_domain,
42  const RealVect& a_origin,
43  const RealVect& a_dx);
44 
45  void SetMeshBox(RefCountedPtr<STLMesh> a_stlmesh,
46  const Box& a_region,
47  const ProblemDomain& a_domain,
48  const RealVect& a_origin,
49  const RealVect& a_dx);
50 
51  RefCountedPtr<STLMesh> m_msh; // pointer to mesh
52 
53  // box that we're exploring
58 
59  // for each cell, a Vector of the vertices and a Vector of the triangles
60  // that wholly or partially are contained by the cell
61  // vertices and triangles are specified by index (see STLStruct.H for TriInCell)
63 
64  // for each Chombo node, whether it is 'inside' or 'outside'
65  // according to the normal vectors specified in the STL file and mesh.triangles.normal
67 
68  // for each Chombo edge that intersects the boundary, store the
69  // intersection point (since we already compute it, this just makes
70  // it faster to retrieve for queries)
72 
73  // get maps
74  void GetCellMap(CellMap** a_cellmap);
75  void GetNodeMap(NodeMap** a_nodemap);
76  void GetEdgeMap(EdgeMap** a_edgemap);
77 };
78 
79 #include "NamespaceFooter.H"
80 #endif
81 
RefCountedPtr< STLMesh > m_msh
Definition: STLBox.H:51
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
NodeMap m_nodemap
Definition: STLBox.H:66
ProblemDomain m_domain
Definition: STLBox.H:55
Box m_region
Definition: STLBox.H:54
Definition: STLBox.H:35
map< IntVect, TriInCell, IVCompareSWO > CellMap
Definition: STLUtil.H:149
CellMap m_cellmap
Definition: STLBox.H:62
RealVect m_dx
Definition: STLBox.H:57
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
map< IntVect, bool, IVCompareSWO > NodeMap
Definition: STLUtil.H:150
map< CellEdge, RealVect, EdgeCompareSWO > EdgeMap
Definition: STLUtil.H:151
RealVect m_origin
Definition: STLBox.H:56
EdgeMap m_edgemap
Definition: STLBox.H:71