Chombo + EB
3.2
src
Workshop
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
39
STLBox
(
RefCountedPtr<STLMesh>
a_stlmesh,
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
54
Box
m_region
;
55
ProblemDomain
m_domain
;
56
RealVect
m_origin
;
57
RealVect
m_dx
;
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)
62
CellMap
m_cellmap
;
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
66
NodeMap
m_nodemap
;
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)
71
EdgeMap
m_edgemap
;
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
IntVect.H
STLBox::m_msh
RefCountedPtr< STLMesh > m_msh
Definition:
STLBox.H:51
RefCountedPtr< STLMesh >
ProblemDomain
A class to facilitate interaction with physical boundary conditions.
Definition:
ProblemDomain.H:141
STLUtil
Definition:
STLUtil.H:36
STLBox::m_nodemap
NodeMap m_nodemap
Definition:
STLBox.H:66
RealVect.H
STLBox::m_domain
ProblemDomain m_domain
Definition:
STLBox.H:55
STLMesh.H
STLBox::m_region
Box m_region
Definition:
STLBox.H:54
STLBox
Definition:
STLBox.H:35
ProblemDomain.H
STLUtil::CellMap
map< IntVect, TriInCell, IVCompareSWO > CellMap
Definition:
STLUtil.H:149
STLBox::m_cellmap
CellMap m_cellmap
Definition:
STLBox.H:62
STLUtil.H
STLBox::m_dx
RealVect m_dx
Definition:
STLBox.H:57
RefCountedPtr.H
Box
A Rectangular Domain on an Integer Lattice.
Definition:
Box.H:465
RealVect
A Real vector in SpaceDim-dimensional space.
Definition:
RealVect.H:41
STLUtil::NodeMap
map< IntVect, bool, IVCompareSWO > NodeMap
Definition:
STLUtil.H:150
STLUtil::EdgeMap
map< CellEdge, RealVect, EdgeCompareSWO > EdgeMap
Definition:
STLUtil.H:151
Box.H
STLBox::m_origin
RealVect m_origin
Definition:
STLBox.H:56
STLBox::m_edgemap
EdgeMap m_edgemap
Definition:
STLBox.H:71
Generated by
1.8.13