Memosa-FVM  0.2
Mesh Class Reference

#include <Mesh.h>

Inheritance diagram for Mesh:
Collaboration diagram for Mesh:

Public Types

enum  {
  CELL_BAR2, CELL_TRI3, CELL_QUAD4, CELL_TETRA4,
  CELL_HEX8, CELL_PYRAMID, CELL_PRISM, CELL_TYPE_MAX
}
 
enum  {
  IBTYPE_FLUID =-1, IBTYPE_BOUNDARY =-2, IBTYPE_SOLID =-3, IBTYPE_REALBOUNDARY =-4,
  IBTYPE_UNKNOWN =-5
}
 
typedef Vector< double, 3 > VecD3
 
typedef Array< int > IntArray
 
typedef vector< int > vecList
 
typedef multimap< int, int > multiMap
 
typedef map< int, int > mapInt
 
typedef pair< const
StorageSite *, const
StorageSite * > 
SSPair
 
typedef map< SSPair,
shared_ptr< CRConnectivity > > 
ConnectivityMap
 
typedef pair< int, int > PartIDMeshIDPair
 
typedef map< PartIDMeshIDPair,
shared_ptr< StorageSite > > 
GhostCellSiteMap
 
typedef pair< const
StorageSite *, const
StorageSite * > 
EntryIndex
 
typedef map< EntryIndex,
shared_ptr< ArrayBase > > 
GhostArrayMap
 
typedef map< int, int > PeriodicFacePairs
 

Public Member Functions

 Mesh (const int dimension)
 
 Mesh (const int dimension, const Array< VecD3 > &faceNodesCoord)
 
 Mesh (const int dimension, const int nCells, const Array< VecD3 > &nodesCoord, const Array< int > &faceCellIndices, const Array< int > &faceNodeIndices, const Array< int > &faceNodeCount, const Array< int > &faceGroupSize)
 
 ~Mesh ()
 
 DEFINE_TYPENAME ("Mesh")
 
int getDimension () const
 
int getID () const
 
const StorageSitegetFaces () const
 
const StorageSitegetCells () const
 
const StorageSitegetNodes () const
 
const StorageSitegetIBFaces () const
 
const StorageSitegetGhostCellSiteScatter (const PartIDMeshIDPair &id) const
 
const GhostCellSiteMapgetGhostCellSiteScatterMap () const
 
GhostCellSiteMapgetGhostCellSiteScatterMap ()
 
const StorageSitegetGhostCellSiteGather (const PartIDMeshIDPair &id) const
 
GhostCellSiteMapgetGhostCellSiteGatherMap ()
 
const GhostCellSiteMapgetGhostCellSiteGatherMap () const
 
const StorageSitegetGhostCellSiteScatterLevel1 (const PartIDMeshIDPair &id) const
 
const GhostCellSiteMapgetGhostCellSiteScatterMapLevel1 () const
 
GhostCellSiteMapgetGhostCellSiteScatterMapLevel1 ()
 
const StorageSitegetGhostCellSiteGatherLevel1 (const PartIDMeshIDPair &id) const
 
GhostCellSiteMapgetGhostCellSiteGatherMapLevel1 ()
 
const GhostCellSiteMapgetGhostCellSiteGatherMapLevel1 () const
 
StorageSitegetFaces ()
 
StorageSitegetCells ()
 
StorageSitegetNodes ()
 
StorageSitegetIBFaces ()
 
const CRConnectivitygetConnectivity (const StorageSite &from, const StorageSite &to) const
 
const CRConnectivitygetAllFaceNodes () const
 
const CRConnectivitygetAllFaceCells () const
 
const CRConnectivitygetCellNodes () const
 
const CRConnectivitygetFaceCells (const StorageSite &site) const
 
const CRConnectivitygetFaceNodes (const StorageSite &site) const
 
const CRConnectivitygetCellFaces () const
 
const CRConnectivitygetCellCells () const
 
const CRConnectivitygetCellCells2 () const
 
const CRConnectivitygetFaceCells2 () const
 
CRConnectivitygetAllFaceCells ()
 
const FaceGroupgetInteriorFaceGroup () const
 
int getFaceGroupCount () const
 
int getBoundaryGroupCount () const
 
int getInterfaceGroupCount () const
 
const FaceGroupListgetBoundaryFaceGroups () const
 
const FaceGroupListgetInterfaceGroups () const
 
const FaceGroupListgetAllFaceGroups () const
 
const FaceGroupgetFaceGroup (const int fgId) const
 
const StorageSitecreateInteriorFaceGroup (const int size)
 
const StorageSitecreateInterfaceGroup (const int size, const int offset, const int id)
 
const StorageSitecreateBoundaryFaceGroup (const int size, const int offset, const int id, const string &boundaryType)
 
void setCoordinates (shared_ptr< Array< VecD3 > > x)
 
void setFaceNodes (shared_ptr< CRConnectivity > faceNodes)
 
void setFaceCells (shared_ptr< CRConnectivity > faceCells)
 
void setConnectivity (const StorageSite &rowSite, const StorageSite &colSite, shared_ptr< CRConnectivity > conn)
 
void eraseConnectivity (const StorageSite &rowSite, const StorageSite &colSite) const
 
shared_ptr< Array< int > > createAndGetBNglobalToLocal () const
 
const ArrayBasegetBNglobalToLocal () const
 
const StorageSitegetBoundaryNodes () const
 
const Array< VecD3 > & getNodeCoordinates () const
 
Array< VecD3 > & getNodeCoordinates ()
 
shared_ptr< ArrayBasegetNodeCoordinatesPtr ()
 
void setNumOfAssembleMesh (int nmesh)
 
const Array< int > & getIBFaceList () const
 
Array< int > & getCellColors ()
 
const Array< int > & getCellColors () const
 
Array< int > & getCellColorsOther ()
 
const Array< int > & getCellColorsOther () const
 
shared_ptr< Array< int > > getLocalToGlobalNodesPtr ()
 
const map< int, int > getGlobalToLocalNodes () const
 
map< int, int > getGlobalToLocalNodes ()
 
shared_ptr< ArrayBasegetLocalToGlobalPtr ()
 
Array< int > & getLocalToGlobal ()
 
const Array< int > & getLocalToGlobal () const
 
map< int, int > & getGlobalToLocal ()
 
const map< int, int > & getGlobalToLocal () const
 
multiMapgetCellCellsGlobal ()
 
const multiMapgetCellCellsGlobal () const
 
bool isMergedMesh () const
 
int getNumOfAssembleMesh () const
 
const set< int > & getBoundaryNodesSet () const
 
set< int > & getBoundaryNodesSet ()
 
const map< int, int > & getCommonFacesMap () const
 
const map< int, int > & getCommonFacesMapOther () const
 
void createScatterGatherCountsBuffer ()
 
void recvScatterGatherCountsBufferLocal ()
 
void syncCounts ()
 
void createScatterGatherIndicesBuffer ()
 
void recvScatterGatherIndicesBufferLocal ()
 
void syncIndices ()
 
const CRConnectivitygetCellCellsGhostExt () const
 
const ArrayBasegetSendCounts (const EntryIndex &e) const
 
const ArrayBasegetSendIndices (const EntryIndex &e) const
 
const ArrayBasegetRecvCounts (const EntryIndex &e) const
 
const ArrayBasegetRecvIndices (const EntryIndex &e) const
 
void createCellCellsGhostExt ()
 
void uniqueFaceCells ()
 
void setIBFaces (shared_ptr< Array< int > > faceList)
 
void createGhostCellSiteScatter (const PartIDMeshIDPair &id, shared_ptr< StorageSite > site)
 
void createGhostCellSiteGather (const PartIDMeshIDPair &id, shared_ptr< StorageSite > site)
 
void createGhostCellSiteScatterLevel1 (const PartIDMeshIDPair &id, shared_ptr< StorageSite > site)
 
void createGhostCellSiteGatherLevel1 (const PartIDMeshIDPair &id, shared_ptr< StorageSite > site)
 
void createCellColor ()
 
void createLocalGlobalArray ()
 
void createLocalToGlobalNodesArray ()
 
void setNodeRepeationArrayCoupling (const Mesh &bMesh)
 
shared_ptr< ArrayBasegetUpdatedNodesCoordCoupling (const GeomFields &geomField, const Mesh &bMesh)
 
void setCommonFacesMap (const Mesh &bMesh)
 
void findCommonNodes (Mesh &other)
 
void findCommonFaces (StorageSite &faces, StorageSite &otherFaces, const GeomFields &geomFields)
 
bool COMETfindCommonFaces (StorageSite &faces, StorageSite &otherFaces, const GeomFields &geomFields)
 
MeshextractBoundaryMesh ()
 
Meshextrude (int nz, double zmax, bool boundaryOnly=false)
 
MeshcreateShell (const int fgId, Mesh &otherMesh, const int otherFgId)
 
MeshcreateDoubleShell (const int fgId, Mesh &otherMesh, const int otherFgId, const bool connectedShell)
 
int getCellZoneID () const
 
void setCellZoneID (const int id)
 
void setID (const int id)
 
bool isShell () const
 
bool isDoubleShell () const
 
bool isConnectedShell () const
 
int getParentMeshID () const
 
int getOtherMeshID () const
 
const StorageSitegetParentFaceGroupSite () const
 
const StorageSitegetOtherFaceGroupSite () const
 
ConnectivityMapgetConnectivityMap ()
 
PeriodicFacePairsgetPeriodicFacePairs ()
 
const PeriodicFacePairsgetPeriodicFacePairs () const
 
void CRConnectivityPrint (const CRConnectivity &conn, int procID, const string &name)
 
void CRConnectivityPrintFile (const CRConnectivity &conn, const string &name, const int procID) const
 
void InterfaceToBoundary ()
 

Public Attributes

enum Mesh:: { ... }  CellType
 

Protected Attributes

const int _dimension
 
int _id
 
int _cellZoneID
 
StorageSite _cells
 
StorageSite _faces
 
StorageSite _nodes
 
StorageSite _ibFaces
 
StorageSite_boundaryNodes
 
shared_ptr< FaceGroup_interiorFaceGroup
 
FaceGroupList _faceGroups
 
FaceGroupList _boundaryGroups
 
FaceGroupList _interfaceGroups
 
ConnectivityMap _connectivityMap
 
shared_ptr< Array< VecD3 > > _coordinates
 
shared_ptr< Array< int > > _boundaryNodeGlobalToLocalPtr
 
shared_ptr< Array< int > > _ibFaceList
 
shared_ptr< Array< int > > _cellColor
 
shared_ptr< Array< int > > _cellColorOther
 
int _numOfAssembleMesh
 
bool _isAssembleMesh
 
GhostCellSiteMap _ghostCellSiteScatterMap
 
GhostCellSiteMap _ghostCellSiteGatherMap
 
GhostCellSiteMap _ghostCellSiteScatterMapLevel1
 
GhostCellSiteMap _ghostCellSiteGatherMapLevel1
 
GhostArrayMap _sendCounts
 
GhostArrayMap _recvCounts
 
GhostArrayMap _sendIndices
 
GhostArrayMap _recvIndices
 
shared_ptr< StorageSite_cellSiteGhostExt
 
shared_ptr< CRConnectivity_cellCellsGhostExt
 
map< int, int > _commonFacesMap
 
map< int, int > _commonFacesMapOther
 
set< int > _boundaryNodesSet
 
shared_ptr< Array< int > > _repeatNodes
 
shared_ptr< Array< int > > _localToGlobalNodes
 
shared_ptr< Array< int > > _localToGlobal
 
map< int, int > _globalToLocal
 
map< int, int > _globalToLocalNodes
 
multiMap _cellCellsGlobal
 
shared_ptr< CRConnectivity_cellCells2
 
shared_ptr< CRConnectivity_faceCells2
 
bool _isShell
 
bool _isDoubleShell
 
bool _isConnectedShell
 
const StorageSite_parentFaceGroupSite
 
const StorageSite_otherFaceGroupSite
 
int _parentMeshID
 
int _otherMeshID
 
PeriodicFacePairs _periodicFacePairs
 

Static Protected Attributes

static int _lastID = 0
 

Private Member Functions

void createRowColSiteCRConn ()
 
void countCRConn ()
 
void addCRConn ()
 
int getNumBounCells ()
 
int get_request_size ()
 

Detailed Description

Definition at line 49 of file Mesh.h.

Member Typedef Documentation

typedef map<SSPair,shared_ptr<CRConnectivity> > Mesh::ConnectivityMap

Definition at line 61 of file Mesh.h.

typedef pair<const StorageSite*, const StorageSite*> Mesh::EntryIndex

Definition at line 64 of file Mesh.h.

typedef map<EntryIndex, shared_ptr<ArrayBase> > Mesh::GhostArrayMap

Definition at line 65 of file Mesh.h.

Definition at line 63 of file Mesh.h.

typedef Array<int> Mesh::IntArray

Definition at line 54 of file Mesh.h.

typedef map<int,int> Mesh::mapInt

Definition at line 58 of file Mesh.h.

typedef multimap<int,int> Mesh::multiMap

Definition at line 57 of file Mesh.h.

typedef pair<int,int> Mesh::PartIDMeshIDPair

Definition at line 62 of file Mesh.h.

typedef map<int,int> Mesh::PeriodicFacePairs

Definition at line 67 of file Mesh.h.

typedef pair<const StorageSite*, const StorageSite*> Mesh::SSPair

Definition at line 60 of file Mesh.h.

typedef Vector<double,3> Mesh::VecD3

Definition at line 53 of file Mesh.h.

typedef vector<int> Mesh::vecList

Definition at line 56 of file Mesh.h.

Member Enumeration Documentation

anonymous enum
Enumerator
CELL_BAR2 
CELL_TRI3 
CELL_QUAD4 
CELL_TETRA4 
CELL_HEX8 
CELL_PYRAMID 
CELL_PRISM 
CELL_TYPE_MAX 

Definition at line 69 of file Mesh.h.

anonymous enum
Enumerator
IBTYPE_FLUID 
IBTYPE_BOUNDARY 
IBTYPE_SOLID 
IBTYPE_REALBOUNDARY 
IBTYPE_UNKNOWN 

Definition at line 82 of file Mesh.h.

Constructor & Destructor Documentation

Mesh::Mesh ( const int  dimension)

Definition at line 21 of file Mesh.cpp.

References _cells, logCtor, and StorageSite::setMesh().

Referenced by createDoubleShell(), createShell(), extractBoundaryMesh(), and extrude().

21  :
22  _dimension(dimension),
23  _id(_lastID++),
24  _cellZoneID(-1),
25  _cells(0),
26  _faces(0),
27  _nodes(0),
28  _ibFaces(0),
29  _boundaryNodes(0),
31  _faceGroups(),
35  _coordinates(),
37  _ibFaceList(),
39  _isAssembleMesh(false),
40  _isShell(false),
41  _isDoubleShell(false),
42  _isConnectedShell(false),
45  _parentMeshID(0),
46  _otherMeshID(0)
47 {
48  _cells.setMesh(this);
49  logCtor();
50 }
StorageSite _ibFaces
Definition: Mesh.h:358
bool _isShell
Definition: Mesh.h:408
const int _dimension
Definition: Mesh.h:346
shared_ptr< Array< int > > _ibFaceList
Definition: Mesh.h:369
StorageSite _faces
Definition: Mesh.h:355
FaceGroupList _interfaceGroups
Definition: Mesh.h:364
int _id
Definition: Mesh.h:349
bool _isConnectedShell
Definition: Mesh.h:410
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
#define logCtor()
Definition: RLogInterface.h:26
void setMesh(const Mesh *mesh)
Definition: StorageSite.h:55
bool _isDoubleShell
Definition: Mesh.h:409
const StorageSite * _otherFaceGroupSite
Definition: Mesh.h:417
int _otherMeshID
Definition: Mesh.h:419
shared_ptr< Array< int > > _boundaryNodeGlobalToLocalPtr
Definition: Mesh.h:367
static int _lastID
Definition: Mesh.h:421
shared_ptr< FaceGroup > _interiorFaceGroup
Definition: Mesh.h:361
FaceGroupList _boundaryGroups
Definition: Mesh.h:363
StorageSite _nodes
Definition: Mesh.h:356
int _numOfAssembleMesh
Definition: Mesh.h:373
StorageSite _cells
Definition: Mesh.h:354
int _cellZoneID
Definition: Mesh.h:352
int _parentMeshID
Definition: Mesh.h:418
bool _isAssembleMesh
Definition: Mesh.h:374
shared_ptr< Array< VecD3 > > _coordinates
Definition: Mesh.h:366
StorageSite * _boundaryNodes
Definition: Mesh.h:359
const StorageSite * _parentFaceGroupSite
Definition: Mesh.h:416
FaceGroupList _faceGroups
Definition: Mesh.h:362
Mesh::Mesh ( const int  dimension,
const Array< VecD3 > &  faceNodesCoord 
)

Definition at line 52 of file Mesh.cpp.

References _connectivityMap, _dimension, createBoundaryFaceGroup(), getFaces(), Array< T >::getLength(), getNodes(), logCtor, setCoordinates(), and StorageSite::setCount().

53  :
54  _dimension(dimension),
55  _id(_lastID++),
56  _cellZoneID(-1),
57  _cells(0),
58  _faces(0),
59  _nodes(0),
60  _ibFaces(0),
61  _boundaryNodes(0),
63  _faceGroups(),
67  _coordinates(),
69  _ibFaceList(),
71  _isAssembleMesh(false),
72  _isShell(false),
73  _isDoubleShell(false),
74  _isConnectedShell(false),
77  _parentMeshID(0),
78  _otherMeshID(0)
79 {
80  int faceNodeCount = _dimension == 2 ? 2 :4;
81  int totNodes = faceNodesCoord.getLength();
82 
83  // counting duplicate nodes as well for 3d
84  int totFaces = totNodes / faceNodeCount;
85 
86  //check if this is corect integer division
87  assert( (faceNodeCount*totFaces) == totNodes );
88  //set sites
89  StorageSite& faceSite = getFaces();
90  StorageSite& nodeSite = getNodes();
91  faceSite.setCount( totFaces );
92  nodeSite.setCount( totNodes );
93  //interior face group (we have only one interface for this
94  createBoundaryFaceGroup(totFaces,0,0,"wall");
95 
96  //setting coordinates
97  shared_ptr< Array<VecD3> > coord( new Array< VecD3 > ( totNodes ) );
98  *coord = faceNodesCoord;
99  setCoordinates( coord );
100 
101  //faceNodes constructor
102  shared_ptr<CRConnectivity> faceNodes( new CRConnectivity(faceSite,
103  nodeSite) );
104 
105  faceNodes->initCount();
106  //addCount
107  for ( int i = 0; i < totFaces; i++ )
108  faceNodes->addCount(i, faceNodeCount);
109  //finish count
110  faceNodes->finishCount();
111  //add operation
112  int face = 0;
113  int nodeIndx = 0;
114  for( int i = 0; i < totFaces; i++ )
115  {
116  for( int j =0; j < faceNodeCount; j++ )
117  {
118  faceNodes->add(face, nodeIndx++);
119  }
120  face++;
121  }
122  //finish add
123  faceNodes->finishAdd();
124 
125  //setting faceNodes
126  SSPair key(&faceSite,&nodeSite);
127  _connectivityMap[key] = faceNodes;
128 
129  logCtor();
130 }
StorageSite _ibFaces
Definition: Mesh.h:358
bool _isShell
Definition: Mesh.h:408
const int _dimension
Definition: Mesh.h:346
shared_ptr< Array< int > > _ibFaceList
Definition: Mesh.h:369
StorageSite _faces
Definition: Mesh.h:355
const StorageSite & getNodes() const
Definition: Mesh.h:110
FaceGroupList _interfaceGroups
Definition: Mesh.h:364
int _id
Definition: Mesh.h:349
void setCoordinates(shared_ptr< Array< VecD3 > > x)
Definition: Mesh.h:204
bool _isConnectedShell
Definition: Mesh.h:410
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
void setCount(const int selfCount, const int nGhost=0)
Definition: StorageSite.h:42
#define logCtor()
Definition: RLogInterface.h:26
const StorageSite & createBoundaryFaceGroup(const int size, const int offset, const int id, const string &boundaryType)
Definition: Mesh.cpp:278
bool _isDoubleShell
Definition: Mesh.h:409
const StorageSite * _otherFaceGroupSite
Definition: Mesh.h:417
int _otherMeshID
Definition: Mesh.h:419
shared_ptr< Array< int > > _boundaryNodeGlobalToLocalPtr
Definition: Mesh.h:367
static int _lastID
Definition: Mesh.h:421
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
const StorageSite & getFaces() const
Definition: Mesh.h:108
shared_ptr< FaceGroup > _interiorFaceGroup
Definition: Mesh.h:361
FaceGroupList _boundaryGroups
Definition: Mesh.h:363
StorageSite _nodes
Definition: Mesh.h:356
int _numOfAssembleMesh
Definition: Mesh.h:373
Definition: Array.h:14
StorageSite _cells
Definition: Mesh.h:354
int _cellZoneID
Definition: Mesh.h:352
int _parentMeshID
Definition: Mesh.h:418
bool _isAssembleMesh
Definition: Mesh.h:374
shared_ptr< Array< VecD3 > > _coordinates
Definition: Mesh.h:366
StorageSite * _boundaryNodes
Definition: Mesh.h:359
const StorageSite * _parentFaceGroupSite
Definition: Mesh.h:416
FaceGroupList _faceGroups
Definition: Mesh.h:362
int getLength() const
Definition: Array.h:87
Mesh::Mesh ( const int  dimension,
const int  nCells,
const Array< VecD3 > &  nodesCoord,
const Array< int > &  faceCellIndices,
const Array< int > &  faceNodeIndices,
const Array< int > &  faceNodeCount,
const Array< int > &  faceGroupSize 
)

Definition at line 132 of file Mesh.cpp.

References _connectivityMap, createBoundaryFaceGroup(), createInteriorFaceGroup(), getCells(), getFaces(), Array< T >::getLength(), getNodes(), logCtor, setCoordinates(), and StorageSite::setCount().

139  :
140  _dimension(dimension),
141  _id(_lastID++),
142  _cellZoneID(-1),
143  _cells(0),
144  _faces(0),
145  _nodes(0),
146  _ibFaces(0),
147  _boundaryNodes(0),
149  _faceGroups(),
150  _boundaryGroups(),
153  _coordinates(),
155  _ibFaceList(),
157  _isAssembleMesh(false),
158  _isShell(false),
159  _isDoubleShell(false),
160  _isConnectedShell(false),
163  _parentMeshID(0),
164  _otherMeshID(0)
165 {
166  int nFaces = faceNodeCount.getLength();
167  int nNodes = nodesCoord.getLength();
168 
169  StorageSite& faceSite = getFaces();
170  StorageSite& nodeSite = getNodes();
171  StorageSite& cellSite = getCells();
172  faceSite.setCount( nFaces );
173  nodeSite.setCount( nNodes );
174 
175  //interior face group (we have only one interface for this
176  createInteriorFaceGroup(faceGroupSize[0]);
177 
178  int nFaceGroups = faceGroupSize.getLength();
179 
180  int offset = faceGroupSize[0];
181  int nBoundaryFaces =0;
182  for(int nfg=1; nfg<nFaceGroups; nfg++)
183  {
184  createBoundaryFaceGroup(faceGroupSize[nfg], offset, nfg, "wall");
185  offset += faceGroupSize[nfg];
186  nBoundaryFaces += faceGroupSize[nfg];
187  }
188 
189  cellSite.setCount( nCells, nBoundaryFaces );
190 
191  //setting coordinates
192  shared_ptr< Array<VecD3> > coord( new Array< VecD3 > ( nNodes ) );
193  *coord = nodesCoord;
194  setCoordinates( coord );
195 
196 
197  //faceNodes constructor
198  shared_ptr<CRConnectivity> faceNodes( new CRConnectivity(faceSite,
199  nodeSite) );
200 
201  faceNodes->initCount();
202 
203  shared_ptr<CRConnectivity> faceCells( new CRConnectivity(faceSite,
204  cellSite) );
205 
206  faceCells->initCount();
207 
208 
209  //addCount
210  for ( int f = 0; f < nFaces; f++ )
211  {
212  faceNodes->addCount(f, faceNodeCount[f]);
213  faceCells->addCount(f, 2);
214  }
215 
216  //finish count
217  faceNodes->finishCount();
218  faceCells->finishCount();
219 
220  //add operation
221  int nfn=0;
222  int nfc=0;
223 
224  for( int f = 0; f < nFaces; f++ )
225  {
226  for( int j =0; j < faceNodeCount[f]; j++ )
227  {
228  faceNodes->add(f, faceNodeIndices[nfn++]);
229  }
230  faceCells->add(f,faceCellIndices[nfc++]);
231  faceCells->add(f,faceCellIndices[nfc++]);
232  }
233  //finish add
234  faceNodes->finishAdd();
235  faceCells->finishAdd();
236 
237  //setting faceNodes
238  SSPair key(&faceSite,&nodeSite);
239  _connectivityMap[key] = faceNodes;
240 
241  SSPair key2(&faceSite,&cellSite);
242  _connectivityMap[key2] = faceCells;
243 
244 
245 
246  logCtor();
247 }
StorageSite _ibFaces
Definition: Mesh.h:358
bool _isShell
Definition: Mesh.h:408
const int _dimension
Definition: Mesh.h:346
shared_ptr< Array< int > > _ibFaceList
Definition: Mesh.h:369
StorageSite _faces
Definition: Mesh.h:355
const StorageSite & getNodes() const
Definition: Mesh.h:110
FaceGroupList _interfaceGroups
Definition: Mesh.h:364
int _id
Definition: Mesh.h:349
const StorageSite & createInteriorFaceGroup(const int size)
Definition: Mesh.cpp:259
void setCoordinates(shared_ptr< Array< VecD3 > > x)
Definition: Mesh.h:204
bool _isConnectedShell
Definition: Mesh.h:410
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
void setCount(const int selfCount, const int nGhost=0)
Definition: StorageSite.h:42
#define logCtor()
Definition: RLogInterface.h:26
const StorageSite & createBoundaryFaceGroup(const int size, const int offset, const int id, const string &boundaryType)
Definition: Mesh.cpp:278
bool _isDoubleShell
Definition: Mesh.h:409
const StorageSite * _otherFaceGroupSite
Definition: Mesh.h:417
int _otherMeshID
Definition: Mesh.h:419
shared_ptr< Array< int > > _boundaryNodeGlobalToLocalPtr
Definition: Mesh.h:367
static int _lastID
Definition: Mesh.h:421
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
const StorageSite & getFaces() const
Definition: Mesh.h:108
shared_ptr< FaceGroup > _interiorFaceGroup
Definition: Mesh.h:361
FaceGroupList _boundaryGroups
Definition: Mesh.h:363
const StorageSite & getCells() const
Definition: Mesh.h:109
StorageSite _nodes
Definition: Mesh.h:356
int _numOfAssembleMesh
Definition: Mesh.h:373
Definition: Array.h:14
StorageSite _cells
Definition: Mesh.h:354
int _cellZoneID
Definition: Mesh.h:352
int _parentMeshID
Definition: Mesh.h:418
bool _isAssembleMesh
Definition: Mesh.h:374
shared_ptr< Array< VecD3 > > _coordinates
Definition: Mesh.h:366
StorageSite * _boundaryNodes
Definition: Mesh.h:359
const StorageSite * _parentFaceGroupSite
Definition: Mesh.h:416
FaceGroupList _faceGroups
Definition: Mesh.h:362
int getLength() const
Definition: Array.h:87
Mesh::~Mesh ( )

Definition at line 250 of file Mesh.cpp.

References logDtor.

251 {
252  logDtor();
253 }
#define logDtor()
Definition: RLogInterface.h:33

Member Function Documentation

void Mesh::addCRConn ( )
private

Definition at line 2309 of file Mesh.cpp.

References _cellCellsGhostExt, _recvCounts, _recvIndices, CRConnectivity::add(), CRConnectivity::finishAdd(), getCellCells(), getCells(), CRConnectivity::getCount(), StorageSite::getGatherMap(), getGlobalToLocal(), Array< T >::getLength(), getNumBounCells(), and StorageSite::getSelfCount().

Referenced by createCellCellsGhostExt().

2310 {
2312  const StorageSite& site = this->getCells();
2313  const CRConnectivity& cellCells =this->getCellCells();
2314  int ncount = site.getSelfCount() + getNumBounCells();
2315  //first inner
2316  //loop over olde connectivity (inner + boundary)
2317  for ( int i = 0; i < ncount; i++ ){
2318  for ( int j = 0; j < cellCells.getCount(i); j++ ){
2319  conn.add(i, cellCells(i,j));
2320  }
2321  }
2322 
2323  //CRConnectivityPrint( cellCells, 0, "cellCellsBeforeGhostExt");
2324 
2325  // now interfaces
2326  const map<int,int>& globalToLocal = this->getGlobalToLocal();
2327  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2328  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2329  const StorageSite& oSite = *mpos.first;
2330  const Array<int>& gatherArray = dynamic_cast< const Array<int>& > (*mpos.second);
2331  EntryIndex e(&oSite,&site);
2332  const Array<int>& recv_counts = dynamic_cast< const Array<int>& > (*_recvCounts [e]);
2333  const Array<int>& recv_indices = dynamic_cast< const Array<int>& > (*_recvIndices[e]);
2334  //loop over gatherArray
2335  int indx = 0;
2336  for ( int i = 0; i < gatherArray.getLength(); i++ ){
2337  const int ncount = recv_counts[i];
2338  for ( int j = 0; j < ncount; j++ ){
2339  const int addCell = globalToLocal.find( recv_indices[indx] )->second;
2340  conn.add(gatherArray[i], addCell);
2341  indx++;
2342  }
2343  }
2344  }
2345  //finish add
2346  conn.finishAdd();
2347 }
int getCount(const int i) const
int getSelfCount() const
Definition: StorageSite.h:40
shared_ptr< CRConnectivity > _cellCellsGhostExt
Definition: Mesh.h:389
map< int, int > & getGlobalToLocal()
Definition: Mesh.h:243
GhostArrayMap _recvIndices
Definition: Mesh.h:386
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
GhostArrayMap _recvCounts
Definition: Mesh.h:384
const CRConnectivity & getCellCells() const
Definition: Mesh.cpp:480
const StorageSite & getCells() const
Definition: Mesh.h:109
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
int add(const int index, const int val)
int getNumBounCells()
Definition: Mesh.cpp:2350
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
int getLength() const
Definition: Array.h:87
bool Mesh::COMETfindCommonFaces ( StorageSite faces,
StorageSite otherFaces,
const GeomFields geomFields 
)

Definition at line 1053 of file Mesh.cpp.

References GeomFields::area, GeomFields::coordinate, cross(), epsilon, StorageSite::getCommonMap(), StorageSite::getCount(), Array< T >::getLength(), mag(), mag2(), and sqrt().

Referenced by COMETModel< T >::init(), and COMETModel< T >::initFromOld().

1055 {
1056  const int count(faces.getCount());
1057  if (count != otherFaces.getCount())
1058  return false;
1059 
1060  const Array<VecD3>& coords =
1061  dynamic_cast<const Array<VecD3>& >(geomFields.coordinate[faces]);
1062 
1063  const Array<VecD3>& otherCoords =
1064  dynamic_cast<const Array<VecD3>& >(geomFields.coordinate[otherFaces]);
1065 
1066  const Array<VecD3>& area =
1067  dynamic_cast<const Array<VecD3>& >(geomFields.area[faces]);
1068 
1069  const Array<VecD3>& otherArea =
1070  dynamic_cast<const Array<VecD3>& >(geomFields.area[otherFaces]);
1071 
1072  KSearchTree thisFacesTree(coords);
1073 
1074  int neibs;
1075  if(otherCoords.getLength()>1)
1076  neibs=2;
1077  else
1078  neibs=1;
1079 
1080  Array<int> closest(neibs);
1081 
1082  shared_ptr<IntArray> myCommonFaces(new IntArray(count));
1083  shared_ptr<IntArray> otherCommonFaces(new IntArray(count));
1084 
1085  for(int f=0; f<count; f++)
1086  {
1087  thisFacesTree.findNeighbors(otherCoords[f],neibs,closest);
1088 
1089  const int closestFace = closest[0];
1090  double dist0 = mag(otherCoords[f] - coords[closestFace]);
1091 
1092  // distance between the two closest point used as scale
1093 
1094  double distScale;
1095  if(neibs==2)
1096  distScale=mag(coords[closest[0]] - coords[closest[1]])*epsilon;
1097  else
1098  distScale=sqrt(sqrt((area[f].mag2())))*0.00001;
1099 
1100  if (dist0 < distScale)
1101  {
1102  double crossProductMag(mag2(cross(otherArea[f],area[closestFace])));
1103  if (crossProductMag > mag2(otherArea[f])*epsilon)
1104  return false;
1105 
1106  (*otherCommonFaces)[f] = closestFace;
1107  (*myCommonFaces)[closestFace] = f;
1108  }
1109  else
1110  return false;
1111 
1112  }
1113 
1114  faces.getCommonMap()[&otherFaces] = myCommonFaces;
1115  otherFaces.getCommonMap()[&faces] = otherCommonFaces;
1116 
1117  return true;
1118 
1119 }
#define epsilon
Definition: Mesh.cpp:17
Field coordinate
Definition: GeomFields.h:19
Array< int > IntArray
Definition: Mesh.h:54
const CommonMap & getCommonMap() const
Definition: StorageSite.h:60
T mag(const Vector< T, 3 > &a)
Definition: Vector.h:260
Tangent sqrt(const Tangent &a)
Definition: Tangent.h:317
Vector< T, 3 > cross(const Vector< T, 3 > &a, const Vector< T, 3 > &b)
Definition: Vector.h:242
Definition: Array.h:14
int getCount() const
Definition: StorageSite.h:39
Field area
Definition: GeomFields.h:23
int getLength() const
Definition: Array.h:87
T mag2(const Vector< T, 3 > &a)
Definition: Vector.h:267
void Mesh::countCRConn ( )
private

Definition at line 2281 of file Mesh.cpp.

References _cellCellsGhostExt, _recvCounts, CRConnectivity::addCount(), CRConnectivity::finishCount(), getCellCells(), getCells(), CRConnectivity::getCount(), StorageSite::getGatherMap(), Array< T >::getLength(), getNumBounCells(), StorageSite::getSelfCount(), and CRConnectivity::initCount().

Referenced by createCellCellsGhostExt().

2282 {
2284  conn.initCount();
2285  const StorageSite& site = this->getCells();
2286  const CRConnectivity& cellCells = this->getCellCells();
2287  int ncount = site.getSelfCount() + getNumBounCells();
2288  //loop over old connectivity (inner + boundary)
2289  for ( int i = 0; i < ncount; i++ ){
2290  conn.addCount(i, cellCells.getCount(i) );
2291  }
2292  // now interfaces
2293  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2294  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2295  const StorageSite& oSite = *mpos.first;
2296  const Array<int>& gatherArray = dynamic_cast< const Array<int>& > (*mpos.second);
2297  EntryIndex e(&oSite,&site);
2298  const Array<int>& recv_counts = dynamic_cast< const Array<int>& > (*_recvCounts [e]);
2299  //loop over gatherArray
2300  for ( int i = 0; i < gatherArray.getLength(); i++ ){
2301  conn.addCount(gatherArray[i], recv_counts[i] );
2302  }
2303  }
2304  //finishCount
2305  conn.finishCount();
2306 }
int getCount(const int i) const
int getSelfCount() const
Definition: StorageSite.h:40
shared_ptr< CRConnectivity > _cellCellsGhostExt
Definition: Mesh.h:389
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
GhostArrayMap _recvCounts
Definition: Mesh.h:384
const CRConnectivity & getCellCells() const
Definition: Mesh.cpp:480
const StorageSite & getCells() const
Definition: Mesh.h:109
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
int getNumBounCells()
Definition: Mesh.cpp:2350
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
void addCount(const int index, const int count)
int getLength() const
Definition: Array.h:87
void Mesh::CRConnectivityPrint ( const CRConnectivity conn,
int  procID,
const string &  name 
)

Definition at line 2379 of file Mesh.cpp.

References CRConnectivity::getCol(), Array< T >::getLength(), and CRConnectivity::getRow().

2380 {
2381 #ifdef FVM_PARALLEL
2382  if ( MPI::COMM_WORLD.Get_rank() == procID ){
2383  cout << name << " :" << endl;
2384  const Array<int>& row = conn.getRow();
2385  const Array<int>& col = conn.getCol();
2386  for ( int i = 0; i < row.getLength()-1; i++ ){
2387  cout << " i = " << i << ", ";
2388  for ( int j = row[i]; j < row[i+1]; j++ )
2389  cout << col[j] << " ";
2390  cout << endl;
2391  }
2392  }
2393 #endif
2394 }
const Array< int > & getCol() const
const Array< int > & getRow() const
int getLength() const
Definition: Array.h:87
void Mesh::CRConnectivityPrintFile ( const CRConnectivity conn,
const string &  name,
const int  procID 
) const

Definition at line 2397 of file Mesh.cpp.

References CRConnectivity::getCol(), Array< T >::getLength(), and CRConnectivity::getRow().

2398 {
2399 #ifdef FVM_PARALLEL
2400  if ( MPI::COMM_WORLD.Get_rank() == procID ){
2401  ofstream debugFile;
2402  stringstream ss(stringstream::in | stringstream::out);
2403  ss << procID;
2404  string fname = name + ss.str() + ".dat";
2405  debugFile.open( fname.c_str() );
2406  ss.str("");
2407 
2408  debugFile << name << " :" << endl;
2409  debugFile << endl;
2410  const Array<int>& row = conn.getRow();
2411  const Array<int>& col = conn.getCol();
2412  for ( int i = 0; i < row.getLength()-1; i++ ){
2413  debugFile << " i = " << i << ", ";
2414  for ( int j = row[i]; j < row[i+1]; j++ )
2415  debugFile << col[j] << " ";
2416  debugFile << endl;
2417  }
2418  debugFile << endl;
2419  debugFile.close();
2420  }
2421 #endif
2422 }
const Array< int > & getCol() const
const Array< int > & getRow() const
int getLength() const
Definition: Array.h:87
shared_ptr< Array< int > > Mesh::createAndGetBNglobalToLocal ( ) const

Definition at line 288 of file Mesh.cpp.

References _boundaryNodeGlobalToLocalPtr, _nodes, getAllFaceGroups(), CRConnectivity::getCol(), StorageSite::getCount(), getFaceNodes(), CRConnectivity::getRow(), CRConnectivity::getRowDim(), FaceGroup::groupType, and FaceGroup::site.

Referenced by MovingMeshModel< T >::advance(), MeshMetricsCalculator< T >::calculateBoundaryNodeNormal(), getBNglobalToLocal(), and getBoundaryNodes().

289 {
291  {
292  const int nNodes = _nodes.getCount();
293  _boundaryNodeGlobalToLocalPtr = shared_ptr<Array<int> >(new Array<int>(nNodes));
294  Array<int>& globalToLocal = *_boundaryNodeGlobalToLocalPtr;
295  globalToLocal = -1;
296  int BoundaryNodeCount=0;
297  int nLocal=0;
298  foreach(const FaceGroupPtr fgPtr, getAllFaceGroups())
299  {
300  const FaceGroup& fg = *fgPtr;
301  if (fg.groupType != "interior")
302  {
303  const StorageSite& BoundaryFaces = fg.site;
304  const CRConnectivity& BoundaryFaceNodes = getFaceNodes(BoundaryFaces);
305  const Array<int>& BFArray = BoundaryFaceNodes.getRow();
306  const Array<int>& BNArray = BoundaryFaceNodes.getCol();
307  const int nBFaces = BoundaryFaceNodes.getRowDim();
308  for(int i=0;i<nBFaces;i++)
309  {
310  for(int ip=BFArray[i];ip<BFArray[i+1];ip++)
311  {
312  const int j = BNArray[ip];
313  if (globalToLocal[j] == -1)
314  globalToLocal[j] = nLocal++;
315  }
316  }
317  }
318  }
319  BoundaryNodeCount = nLocal;
320  }
322 }
const Array< int > & getCol() const
const Array< int > & getRow() const
shared_ptr< FaceGroup > FaceGroupPtr
Definition: Mesh.h:46
Definition: Mesh.h:28
const FaceGroupList & getAllFaceGroups() const
Definition: Mesh.h:193
const CRConnectivity & getFaceNodes(const StorageSite &site) const
Definition: Mesh.cpp:402
string groupType
Definition: Mesh.h:42
shared_ptr< Array< int > > _boundaryNodeGlobalToLocalPtr
Definition: Mesh.h:367
StorageSite _nodes
Definition: Mesh.h:356
int getCount() const
Definition: StorageSite.h:39
int getRowDim() const
StorageSite site
Definition: Mesh.h:40
const StorageSite & Mesh::createBoundaryFaceGroup ( const int  size,
const int  offset,
const int  id,
const string &  boundaryType 
)

Definition at line 278 of file Mesh.cpp.

References _boundaryGroups, _faceGroups, and _faces.

Referenced by FluentReader::createMesh(), MeshPartitioner::extractBoundaryMesh(), extractBoundaryMesh(), extrude(), COMETModel< T >::FinishCoarseMesh(), COMETModel< T >::MakeCoarseMesh2(), and Mesh().

279 {
280  shared_ptr<FaceGroup> fg(new FaceGroup(size,offset,_faces,id,boundaryType));
281  _faceGroups.push_back(fg);
282  _boundaryGroups.push_back(fg);
283  return fg->site;
284 }
Definition: Mesh.h:28
StorageSite _faces
Definition: Mesh.h:355
FaceGroupList _boundaryGroups
Definition: Mesh.h:363
FaceGroupList _faceGroups
Definition: Mesh.h:362
void Mesh::createCellCellsGhostExt ( )

Definition at line 1999 of file Mesh.cpp.

References addCRConn(), countCRConn(), and createRowColSiteCRConn().

Referenced by MeshDismantler::setCellCellsGhostExt().

2000 {
2001 #ifdef FVM_PARALLEL
2003  countCRConn();
2004  addCRConn();
2005  //CRConnectivityPrint(this->getCellCellsGhostExt(), 0, "cellCells");
2006 #endif
2007 }
void createRowColSiteCRConn()
Definition: Mesh.cpp:2239
void countCRConn()
Definition: Mesh.cpp:2281
void addCRConn()
Definition: Mesh.cpp:2309
void Mesh::createCellColor ( )

Definition at line 724 of file Mesh.cpp.

References _cellColor, _cellColorOther, _cells, _isAssembleMesh, and StorageSite::getCount().

725 {
726  //cellColor color ghost cells respect to self-inner cells
727  _cellColor = shared_ptr< Array<int> > ( new Array<int>( _cells.getCount() ) );
728  //cellColorOther color ghost cells in respect to other partition,
729  //if partition interface has aligned with mesh interface this will be different than _cellColor
730  _cellColorOther = shared_ptr< Array<int> > ( new Array<int>( _cells.getCount() ) );
731 
732  *_cellColor = -1;
733  *_cellColorOther = -1;
734  _isAssembleMesh = true;
735 }
shared_ptr< Array< int > > _cellColorOther
Definition: Mesh.h:372
shared_ptr< Array< int > > _cellColor
Definition: Mesh.h:371
int getCount() const
Definition: StorageSite.h:39
StorageSite _cells
Definition: Mesh.h:354
bool _isAssembleMesh
Definition: Mesh.h:374
Mesh * Mesh::createDoubleShell ( const int  fgId,
Mesh otherMesh,
const int  otherFgId,
const bool  connectedShell 
)

Definition at line 1772 of file Mesh.cpp.

References _connectivityMap, _dimension, _isConnectedShell, _isDoubleShell, _isShell, _otherFaceGroupSite, _otherMeshID, _parentFaceGroupSite, _parentMeshID, arrayFromVector(), getCells(), getFaceCells(), getFaceGroup(), StorageSite::getGatherMap(), getID(), StorageSite::getScatterMap(), StorageSite::getSelfCount(), Mesh(), StorageSite::setCount(), and FaceGroup::site.

1773 {
1774  typedef Array<int> IntArray;
1775 
1776  const FaceGroup& fg = getFaceGroup(fgId);
1777  const StorageSite& fgSite = fg.site;
1778  StorageSite& cells = getCells();
1779 
1780  const FaceGroup& fgOther = otherMesh.getFaceGroup(otherFgId);
1781  const StorageSite& fgSiteOther = fgOther.site;
1782 
1783  StorageSite& otherCells = otherMesh.getCells();
1784 
1785  const CRConnectivity& faceCells = getFaceCells(fgSite);
1786  const CRConnectivity& otherFaceCells = otherMesh.getFaceCells(fgSiteOther);
1787 
1788  const int count = fgSite.getSelfCount();
1789 
1790  Mesh* shellMesh = new Mesh(_dimension);
1791 
1792  shellMesh->_isShell = true;
1793  shellMesh->_isDoubleShell = true;
1794  shellMesh->_parentFaceGroupSite = &fgSite;
1795  shellMesh->_parentMeshID = getID();
1796  shellMesh->_otherMeshID = otherMesh.getID();
1797  shellMesh->_otherFaceGroupSite = &fgSiteOther;
1798 
1799  if (connectedShell)
1800  shellMesh->_isConnectedShell = true;
1801 
1802  StorageSite& sMeshCells = shellMesh->getCells();
1803 
1804  // twice as many cells as there are faces, plus twice the number of ghost cells
1805  sMeshCells.setCount( 2*count, 2*count);
1806 
1807 
1808  // we will number the left cells in the shell mesh in the same order as
1809  // the faces on the left mesh
1810 
1811  // create a mapping from the cells in the left mesh to the smesh
1812  // cells using the faceCell connectivity
1813  map<int, int> leftCellsToSCells;
1814  map<int, int> rightCellsToSCells;
1815 
1816  // If we are splitting an interior face, one mesh will have correct
1817  // (f,0) and (f,1) orientations and one will not, meaning that
1818  // faceCells(f,1) will return the interior cell instead of the
1819  // ghost cell. Here we check for orientation and switch if needed.
1820  int lDirection = 1;
1821  int rDirection = 1;
1822  if (faceCells(0,1) < cells.getSelfCount())
1823  {
1824  lDirection = 0;
1825  }
1826  if (otherFaceCells(0,1) < otherCells.getSelfCount())
1827  {
1828  rDirection = 0;
1829  }
1830 
1831  for(int f=0; f<count; f++)
1832  {
1833  // add ghost(gather) cells to map
1834  const int lc1 = faceCells(f,lDirection);
1835  const int rc1 = otherFaceCells(f,rDirection);
1836  leftCellsToSCells[lc1] = f;
1837  rightCellsToSCells[rc1] = f;
1838  }
1839 
1840  // since there can be more than one face group in common between the
1841  // two meshes, we need to split up the existing gather scatter index
1842  // arrays into two sets, one for the cells that are connected
1843  // through the faces in the current face group and one for the rest.
1844 
1845  if (connectedShell)
1846  {
1847  StorageSite::ScatterMap& lScatterMap = cells.getScatterMap();
1848  StorageSite::ScatterMap& rScatterMap = otherCells.getScatterMap();
1849 
1850  shared_ptr<IntArray> L2RScatterOrigPtr = lScatterMap[&otherCells];
1851  shared_ptr<IntArray> R2LScatterOrigPtr = rScatterMap[&cells];
1852 
1853 
1854  StorageSite::GatherMap& lGatherMap = cells.getGatherMap();
1855  StorageSite::GatherMap& rGatherMap = otherCells.getGatherMap();
1856 
1857  shared_ptr<IntArray> R2LGatherOrigPtr = lGatherMap[&otherCells];
1858  shared_ptr<IntArray> L2RGatherOrigPtr = rGatherMap[&cells];
1859 
1860 
1861  vector<int> L2SScatterVector;
1862  vector<int> R2SScatterVector;
1863  vector<int> S2LScatterVector;
1864  vector<int> S2RScatterVector;
1865 
1866  vector<int> L2SGatherVector;
1867  vector<int> R2SGatherVector;
1868  vector<int> S2LGatherVector;
1869  vector<int> S2RGatherVector;
1870 
1871  vector<int> L2RScatterNewVector;
1872  vector<int> R2LScatterNewVector;
1873  vector<int> L2RGatherNewVector;
1874  vector<int> R2LGatherNewVector;
1875 
1876  for(int i=0; i<L2RScatterOrigPtr->getLength(); i++)
1877  {
1878  const int lcs = (*L2RScatterOrigPtr)[i];
1879  const int rcg = (*L2RGatherOrigPtr)[i];
1880 
1881  if (rightCellsToSCells.find(rcg) != rightCellsToSCells.end())
1882  {
1883  //left shell cell is sCell
1884  const int sCell = rightCellsToSCells[rcg];
1885 
1886  L2SScatterVector.push_back(lcs);
1887  L2SGatherVector.push_back(sCell+3*count);
1888 
1889  S2RScatterVector.push_back(sCell+count);
1890  S2RGatherVector.push_back(rcg);
1891  }
1892  else
1893  {
1894  L2RScatterNewVector.push_back(lcs);
1895  L2RGatherNewVector.push_back(rcg);
1896  }
1897  }
1898 
1899  for(int i=0; i<R2LGatherOrigPtr->getLength(); i++)
1900  {
1901  const int lcg = (*R2LGatherOrigPtr)[i];
1902  const int rcs = (*R2LScatterOrigPtr)[i];
1903  // if the left cell is in the current face groups neighbours it goes into the new1
1904  if (leftCellsToSCells.find(lcg) != leftCellsToSCells.end())
1905  {
1906  const int sCell = leftCellsToSCells[lcg];
1907 
1908  S2LGatherVector.push_back(lcg);
1909  S2LScatterVector.push_back(sCell);
1910 
1911  R2SGatherVector.push_back(sCell+2*count);
1912  R2SScatterVector.push_back(rcs);
1913 
1914  }
1915  else
1916  {
1917  R2LGatherNewVector.push_back(lcg);
1918  R2LScatterNewVector.push_back(rcs);
1919  }
1920  }
1921 
1922 
1923  // set the gather scatter arrays in the smesh cells
1924  sMeshCells.getScatterMap()[&cells] = arrayFromVector(S2LScatterVector);
1925  sMeshCells.getScatterMap()[&otherCells] = arrayFromVector(S2RScatterVector);
1926  sMeshCells.getGatherMap()[&cells] = arrayFromVector(L2SGatherVector);
1927  sMeshCells.getGatherMap()[&otherCells] = arrayFromVector(R2SGatherVector);
1928 
1929  // replace the existing arrays in left and right maps and add the
1930  // new ones
1931 
1932  lScatterMap.erase(&otherCells);
1933  if (L2RScatterNewVector.size() > 0)
1934  lScatterMap[&otherCells] = arrayFromVector(L2RScatterNewVector);
1935  lScatterMap[&sMeshCells] = arrayFromVector(L2SScatterVector);
1936 
1937  lGatherMap.erase(&otherCells);
1938  if (R2LGatherNewVector.size() > 0)
1939  lGatherMap[&otherCells] = arrayFromVector(R2LGatherNewVector);
1940  lGatherMap[&sMeshCells] = arrayFromVector(S2LGatherVector);
1941 
1942  rScatterMap.erase(&cells);
1943  if (R2LScatterNewVector.size() > 0)
1944  rScatterMap[&cells] = arrayFromVector(R2LScatterNewVector);
1945  rScatterMap[&sMeshCells] = arrayFromVector(R2SScatterVector);
1946 
1947  rGatherMap.erase(&cells);
1948  if (L2RGatherNewVector.size() > 0)
1949  rGatherMap[&cells] = arrayFromVector(L2RGatherNewVector);
1950  rGatherMap[&sMeshCells] = arrayFromVector(S2RGatherVector);
1951  }
1952  // create the cell cell connectivity for the shell mesh
1953  shared_ptr<CRConnectivity> sCellCells(new CRConnectivity(sMeshCells,sMeshCells));
1954  sCellCells->initCount();
1955 
1956  // three neighbours for interior cells, two for ghost, due to
1957  // potentially abnormal interface conditions
1958  for(int i=0; i<count; i++)
1959  {
1960  sCellCells->addCount(i,3);
1961  sCellCells->addCount(i+count,3);
1962  sCellCells->addCount(i+2*count,2);
1963  sCellCells->addCount(i+3*count,2);
1964  }
1965 
1966  sCellCells->finishCount();
1967 
1968  for(int i=0; i<count; i++)
1969  {
1970  // left shell cells
1971  sCellCells->add(i,i+count);
1972  sCellCells->add(i,i+2*count);
1973  sCellCells->add(i,i+3*count);
1974 
1975  // right shell cells
1976  sCellCells->add(i+count,i);
1977  sCellCells->add(i+count,i+2*count);
1978  sCellCells->add(i+count,i+3*count);
1979 
1980  // right ghost cells
1981  sCellCells->add(i+2*count,i);
1982  sCellCells->add(i+2*count,i+count);
1983 
1984  // left ghost cells
1985  sCellCells->add(i+3*count,i);
1986  sCellCells->add(i+3*count,i+count);
1987  }
1988 
1989  sCellCells->finishAdd();
1990 
1991  SSPair key(&sMeshCells,&sMeshCells);
1992 
1993  shellMesh->_connectivityMap[key] = sCellCells;
1994 
1995  return shellMesh;
1996 }
int getSelfCount() const
Definition: StorageSite.h:40
bool _isShell
Definition: Mesh.h:408
const int _dimension
Definition: Mesh.h:346
Definition: Mesh.h:28
Array< int > IntArray
Definition: Mesh.h:54
bool _isConnectedShell
Definition: Mesh.h:410
const FaceGroup & getFaceGroup(const int fgId) const
Definition: Mesh.cpp:1570
Definition: Mesh.h:49
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
void setCount(const int selfCount, const int nGhost=0)
Definition: StorageSite.h:42
bool _isDoubleShell
Definition: Mesh.h:409
const StorageSite * _otherFaceGroupSite
Definition: Mesh.h:417
Mesh(const int dimension)
Definition: Mesh.cpp:21
int _otherMeshID
Definition: Mesh.h:419
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
const StorageSite & getCells() const
Definition: Mesh.h:109
const ScatterMap & getScatterMap() const
Definition: StorageSite.h:58
const CRConnectivity & getFaceCells(const StorageSite &site) const
Definition: Mesh.cpp:388
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
Definition: StorageSite.h:23
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
int _parentMeshID
Definition: Mesh.h:418
const StorageSite * _parentFaceGroupSite
Definition: Mesh.h:416
int getID() const
Definition: Mesh.h:106
shared_ptr< Array< T > > arrayFromVector(const vector< T > &v)
Definition: Array.h:523
StorageSite site
Definition: Mesh.h:40
void Mesh::createGhostCellSiteGather ( const PartIDMeshIDPair id,
shared_ptr< StorageSite site 
)

Definition at line 701 of file Mesh.cpp.

References _ghostCellSiteGatherMap.

702 {
703  _ghostCellSiteGatherMap.insert( pair<PartIDMeshIDPair, shared_ptr<StorageSite> >( id, site ) );
704 
705 }
GhostCellSiteMap _ghostCellSiteGatherMap
Definition: Mesh.h:378
pair< int, int > PartIDMeshIDPair
Definition: Mesh.h:62
void Mesh::createGhostCellSiteGatherLevel1 ( const PartIDMeshIDPair id,
shared_ptr< StorageSite site 
)

Definition at line 715 of file Mesh.cpp.

References _ghostCellSiteGatherMapLevel1.

716 {
717  _ghostCellSiteGatherMapLevel1.insert( pair<PartIDMeshIDPair, shared_ptr<StorageSite> >( id, site ) );
718 
719 }
GhostCellSiteMap _ghostCellSiteGatherMapLevel1
Definition: Mesh.h:381
pair< int, int > PartIDMeshIDPair
Definition: Mesh.h:62
void Mesh::createGhostCellSiteScatter ( const PartIDMeshIDPair id,
shared_ptr< StorageSite site 
)

Definition at line 694 of file Mesh.cpp.

References _ghostCellSiteScatterMap.

695 {
696  _ghostCellSiteScatterMap.insert( pair<PartIDMeshIDPair, shared_ptr<StorageSite> >( id, site ) );
697 
698 }
GhostCellSiteMap _ghostCellSiteScatterMap
Definition: Mesh.h:377
pair< int, int > PartIDMeshIDPair
Definition: Mesh.h:62
void Mesh::createGhostCellSiteScatterLevel1 ( const PartIDMeshIDPair id,
shared_ptr< StorageSite site 
)

Definition at line 708 of file Mesh.cpp.

References _ghostCellSiteScatterMapLevel1.

709 {
710  _ghostCellSiteScatterMapLevel1.insert( pair<PartIDMeshIDPair, shared_ptr<StorageSite> >( id, site ) );
711 
712 }
GhostCellSiteMap _ghostCellSiteScatterMapLevel1
Definition: Mesh.h:380
pair< int, int > PartIDMeshIDPair
Definition: Mesh.h:62
const StorageSite & Mesh::createInterfaceGroup ( const int  size,
const int  offset,
const int  id 
)

Definition at line 268 of file Mesh.cpp.

References _faceGroups, _faces, and _interfaceGroups.

Referenced by FluentReader::createMesh(), COMETModel< T >::FinishCoarseMesh(), and COMETModel< T >::MakeCoarseMesh2().

269 {
270  shared_ptr<FaceGroup> fg(new FaceGroup(size,offset,_faces,id,"interface"));
271  _faceGroups.push_back(fg);
272  _interfaceGroups.push_back(fg);
273  return fg->site;
274 }
Definition: Mesh.h:28
StorageSite _faces
Definition: Mesh.h:355
FaceGroupList _interfaceGroups
Definition: Mesh.h:364
FaceGroupList _faceGroups
Definition: Mesh.h:362
const StorageSite & Mesh::createInteriorFaceGroup ( const int  size)

Definition at line 259 of file Mesh.cpp.

References _faceGroups, _faces, and _interiorFaceGroup.

Referenced by FluentReader::createMesh(), extrude(), COMETModel< T >::FinishCoarseMesh(), COMETModel< T >::MakeCoarseMesh2(), and Mesh().

260 {
261  _interiorFaceGroup = shared_ptr<FaceGroup>(new FaceGroup(size,0,_faces,0,"interior"));
262  _faceGroups.push_back(_interiorFaceGroup);
263  return _interiorFaceGroup->site;
264 }
Definition: Mesh.h:28
StorageSite _faces
Definition: Mesh.h:355
shared_ptr< FaceGroup > _interiorFaceGroup
Definition: Mesh.h:361
FaceGroupList _faceGroups
Definition: Mesh.h:362
void Mesh::createLocalGlobalArray ( )

Definition at line 738 of file Mesh.cpp.

References _cells, _localToGlobal, and StorageSite::getCountLevel1().

Referenced by MeshDismantler::set_local_global(), and MeshPartitioner::set_local_global().

739 {
740  _localToGlobal = shared_ptr< Array<int> > ( new Array<int>( _cells.getCountLevel1() ) );
741  *_localToGlobal = -1;
742 }
int getCountLevel1() const
Definition: StorageSite.h:72
shared_ptr< Array< int > > _localToGlobal
Definition: Mesh.h:397
StorageSite _cells
Definition: Mesh.h:354
void Mesh::createLocalToGlobalNodesArray ( )

Definition at line 745 of file Mesh.cpp.

References _localToGlobalNodes, _nodes, and StorageSite::getCount().

746 {
747  _localToGlobalNodes = shared_ptr< Array<int> > ( new Array<int>( _nodes.getCount() ) );
748  *_localToGlobalNodes = -1;
749 }
StorageSite _nodes
Definition: Mesh.h:356
int getCount() const
Definition: StorageSite.h:39
shared_ptr< Array< int > > _localToGlobalNodes
Definition: Mesh.h:396
void Mesh::createRowColSiteCRConn ( )
private

Definition at line 2239 of file Mesh.cpp.

References _cellCellsGhostExt, _cellSiteGhostExt, _recvCounts, _recvIndices, getCells(), StorageSite::getCount(), StorageSite::getGatherMap(), getGlobalToLocal(), Array< T >::getLength(), getNumBounCells(), and StorageSite::getSelfCount().

Referenced by createCellCellsGhostExt().

2240 {
2241  //counting interface counts
2242  //counting interfaces
2243  set<int> interfaceCells;
2244  //const Array<int>& localToGlobal = this->getLocalToGlobal();
2245  const map<int,int>& globalToLocal = this->getGlobalToLocal();
2246  const StorageSite& site = this->getCells();
2247  const int originalCount = site.getCount();
2248  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2249  int countLevel0 = 0;
2250  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2251  const StorageSite& oSite = *mpos.first;
2252  const Array<int>& gatherArray = dynamic_cast< const Array<int>& > (*mpos.second);
2253  countLevel0 += gatherArray.getLength();
2254  EntryIndex e(&oSite,&site);
2255  const Array<int> & recv_indices = dynamic_cast< const Array<int>& > (*_recvIndices[e]);
2256  const Array<int> & recv_counts = dynamic_cast< const Array<int>& > (*_recvCounts [e]);
2257  //loop over gatherArray
2258  int indx = 0;
2259  for ( int i = 0; i < gatherArray.getLength(); i++ ){
2260  const int nnb = recv_counts[i]; //give getCount()
2261  for ( int nb = 0; nb < nnb; nb++ ){
2262  const int localID = globalToLocal.find( recv_indices[indx] )->second;
2263  if ( localID >= originalCount ){
2264  interfaceCells.insert( recv_indices[indx] );
2265  }
2266  indx++;
2267  }
2268  }
2269  }
2270  const int selfCount = site.getSelfCount();
2271  const int countLevel1 = int(interfaceCells.size());
2272  //ghost cells = sum of boundary and interfaces
2273  const int nghost = getNumBounCells() + countLevel0 + countLevel1;
2274  _cellSiteGhostExt = shared_ptr<StorageSite> ( new StorageSite(selfCount, nghost) );
2275  //constructing new CRConnecitvity;
2276  _cellCellsGhostExt = shared_ptr< CRConnectivity> ( new CRConnectivity( *_cellSiteGhostExt, *_cellSiteGhostExt) );
2277 }
int getSelfCount() const
Definition: StorageSite.h:40
shared_ptr< CRConnectivity > _cellCellsGhostExt
Definition: Mesh.h:389
map< int, int > & getGlobalToLocal()
Definition: Mesh.h:243
GhostArrayMap _recvIndices
Definition: Mesh.h:386
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
GhostArrayMap _recvCounts
Definition: Mesh.h:384
shared_ptr< StorageSite > _cellSiteGhostExt
Definition: Mesh.h:388
const StorageSite & getCells() const
Definition: Mesh.h:109
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
int getCount() const
Definition: StorageSite.h:39
int getNumBounCells()
Definition: Mesh.cpp:2350
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
int getLength() const
Definition: Array.h:87
void Mesh::createScatterGatherCountsBuffer ( )

Definition at line 2011 of file Mesh.cpp.

References _recvCounts, _sendCounts, getCellCells(), getCells(), CRConnectivity::getCount(), StorageSite::getGatherMap(), Array< T >::getLength(), and StorageSite::getScatterMap().

Referenced by MeshDismantler::setCellCellsGhostExt().

2012 {
2013 #ifdef FVM_PARALLEL
2014  //SENDING allocation and filling
2015  const StorageSite& site = this->getCells();
2016  const CRConnectivity& cellCells = this->getCellCells();
2017  const StorageSite::ScatterMap& scatterMap = site.getScatterMap();
2018  foreach(const StorageSite::ScatterMap::value_type& mpos, scatterMap){
2019  const StorageSite& oSite = *mpos.first;
2020  //checking if storage site is only site or ghost site, we only communicate ghost site ( oSite.getCount() == -1 )
2021  const Array<int>& scatterArray = *mpos.second;
2022  //key site
2023  EntryIndex e(&site,&oSite);
2024  //allocate array
2025  _sendCounts[e] = shared_ptr< Array<int> > ( new Array<int> (scatterArray.getLength()) );
2026  //fill send array
2027  Array<int>& sendArray = dynamic_cast< Array<int>& > ( *_sendCounts[e] );
2028  for( int i = 0; i < scatterArray.getLength(); i++ ){
2029  const int cellID = scatterArray[i];
2030  sendArray[i] = cellCells.getCount(cellID);
2031  }
2032  }
2033 
2034 
2035  //RECIEVING allocation (filling will be done by MPI Communication)
2036  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2037  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2038  const StorageSite& oSite = *mpos.first;
2039  const Array<int>& gatherArray = *mpos.second;
2040  //checking if storage site is only site or ghost site, we only communicate ghost site ( oSite.getCount() == -1 )
2041  EntryIndex e(&oSite,&site);
2042  //allocate array
2043  _recvCounts[e] = shared_ptr< Array<int> > ( new Array<int> (gatherArray.getLength()) );
2044  }
2045 #endif
2046  }
int getCount(const int i) const
GhostArrayMap _sendCounts
Definition: Mesh.h:383
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
GhostArrayMap _recvCounts
Definition: Mesh.h:384
const CRConnectivity & getCellCells() const
Definition: Mesh.cpp:480
const StorageSite & getCells() const
Definition: Mesh.h:109
const ScatterMap & getScatterMap() const
Definition: StorageSite.h:58
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
Definition: StorageSite.h:23
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
int getLength() const
Definition: Array.h:87
void Mesh::createScatterGatherIndicesBuffer ( )

Definition at line 2124 of file Mesh.cpp.

References _recvCounts, _recvIndices, _sendIndices, getCellCells(), getCells(), CRConnectivity::getCount(), StorageSite::getGatherMap(), Array< T >::getLength(), getLocalToGlobal(), and StorageSite::getScatterMap().

Referenced by MeshDismantler::setCellCellsGhostExt().

2125 {
2126 #ifdef FVM_PARALLEL
2127  //SENDING allocation and filling
2128  const StorageSite& site = this->getCells();
2129  const CRConnectivity& cellCells = this->getCellCells();
2130  const Array<int>& localToGlobal = this->getLocalToGlobal();
2131  const StorageSite::ScatterMap& scatterMap = site.getScatterMap();
2132  foreach(const StorageSite::ScatterMap::value_type& mpos, scatterMap){
2133  const StorageSite& oSite = *mpos.first;
2134  const Array<int>& scatterArray = *mpos.second;
2135  //loop over surround indices and itself for sizing
2136  EntryIndex e(&site,&oSite);
2137  //allocate array
2138  int sendSize = 0;
2139  for ( int i = 0; i < scatterArray.getLength(); i++ ){
2140  sendSize += cellCells.getCount( scatterArray[i] );
2141  }
2142  _sendIndices[e] = shared_ptr< Array<int> > ( new Array<int> (sendSize) );
2143  //fill send array
2144  Array<int>& sendArray = dynamic_cast< Array<int>& > ( *_sendIndices[e] );
2145  int indx = 0;
2146  for( int i = 0; i < scatterArray.getLength(); i++ ){
2147  const int cellID = scatterArray[i];
2148  for ( int j = 0; j < cellCells.getCount(cellID); j++ ){
2149  sendArray[indx] = localToGlobal[ cellCells(cellID,j) ];
2150  indx++;
2151  }
2152  }
2153  }
2154  //RECIEVING allocation (filling will be done by MPI Communication)
2155  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2156  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2157  const StorageSite& oSite = *mpos.first;
2158  EntryIndex e(&oSite,&site);
2159  const Array<int>& recvCounts = dynamic_cast< const Array<int>& > (*_recvCounts[e]);
2160  int recvSize = 0;
2161  for ( int i = 0; i < recvCounts.getLength(); i++ ){
2162  recvSize += recvCounts[i];
2163  }
2164  //allocate array
2165  _recvIndices[e] = shared_ptr< Array<int> > ( new Array<int> (recvSize) );
2166  }
2167 #endif
2168 }
int getCount(const int i) const
GhostArrayMap _recvIndices
Definition: Mesh.h:386
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
Array< int > & getLocalToGlobal()
Definition: Mesh.h:240
GhostArrayMap _recvCounts
Definition: Mesh.h:384
const CRConnectivity & getCellCells() const
Definition: Mesh.cpp:480
const StorageSite & getCells() const
Definition: Mesh.h:109
const ScatterMap & getScatterMap() const
Definition: StorageSite.h:58
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
Definition: StorageSite.h:23
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
GhostArrayMap _sendIndices
Definition: Mesh.h:385
int getLength() const
Definition: Array.h:87
Mesh * Mesh::createShell ( const int  fgId,
Mesh otherMesh,
const int  otherFgId 
)

Definition at line 1582 of file Mesh.cpp.

References _connectivityMap, _dimension, _isShell, _parentFaceGroupSite, arrayFromVector(), getCells(), getFaceCells(), getFaceGroup(), StorageSite::getGatherMap(), StorageSite::getScatterMap(), StorageSite::getSelfCount(), Mesh(), StorageSite::setCount(), and FaceGroup::site.

1583 {
1584  typedef Array<int> IntArray;
1585 
1586  const FaceGroup& fg = getFaceGroup(fgId);
1587  const StorageSite& fgSite = fg.site;
1588 
1589  const FaceGroup& otherfg = otherMesh.getFaceGroup(otherFgId);
1590  const StorageSite& otherfgSite = otherfg.site;
1591 
1592  StorageSite& cells = getCells();
1593 
1594 
1595  StorageSite& otherCells = otherMesh.getCells();
1596 
1597  const CRConnectivity& faceCells = getFaceCells(fgSite);
1598  const CRConnectivity& otherFaceCells = otherMesh.getFaceCells(otherfgSite);
1599 
1600  const int count = fgSite.getSelfCount();
1601 
1602  Mesh* shellMesh = new Mesh(_dimension);
1603 
1604  shellMesh->_isShell = true;
1605  shellMesh->_parentFaceGroupSite = &fgSite;
1606 
1607  StorageSite& sMeshCells = shellMesh->getCells();
1608 
1609  // as many cells as there are faces, plus twice the number of ghost cells
1610  sMeshCells.setCount( count, 2*count);
1611 
1612 
1613  // we will number the cells in the shell mesh in the same order as
1614  // the faces on the left mesh
1615 
1616  // create a mapping from the cells in the left mesh to the smesh
1617  // cells using the faceCell connectivity
1618  map<int, int> leftCellsToSCells;
1619  map<int, int> rightCellsToSCells;
1620  for(int f=0; f<count; f++)
1621  {
1622  const int lc1 = faceCells(f,1);
1623  const int rc1 = otherFaceCells(f,1);
1624  leftCellsToSCells[lc1] = f;
1625  rightCellsToSCells[rc1] = f;
1626  }
1627 
1628  // since there can be more than one face group in common between the
1629  // two meshes, we need to split up the existing gather scatter index
1630  // arrays into two sets, one for the cells that are connected
1631  // through the faces in the current face group and one for the rest.
1632 
1633 
1634  StorageSite::ScatterMap& lScatterMap = cells.getScatterMap();
1635  StorageSite::ScatterMap& rScatterMap = otherCells.getScatterMap();
1636 
1637  shared_ptr<IntArray> L2RScatterOrigPtr = lScatterMap[&otherCells];
1638  shared_ptr<IntArray> R2LScatterOrigPtr = rScatterMap[&cells];
1639 
1640 
1641  StorageSite::GatherMap& lGatherMap = cells.getGatherMap();
1642  StorageSite::GatherMap& rGatherMap = otherCells.getGatherMap();
1643 
1644  shared_ptr<IntArray> R2LGatherOrigPtr = lGatherMap[&otherCells];
1645  shared_ptr<IntArray> L2RGatherOrigPtr = rGatherMap[&cells];
1646 
1647 
1648  vector<int> L2SScatterVector;
1649  vector<int> R2SScatterVector;
1650  vector<int> S2LScatterVector;
1651  vector<int> S2RScatterVector;
1652 
1653  vector<int> L2SGatherVector;
1654  vector<int> R2SGatherVector;
1655  vector<int> S2LGatherVector;
1656  vector<int> S2RGatherVector;
1657 
1658  vector<int> L2RScatterNewVector;
1659  vector<int> R2LScatterNewVector;
1660  vector<int> L2RGatherNewVector;
1661  vector<int> R2LGatherNewVector;
1662 
1663  for(int i=0; i<L2RScatterOrigPtr->getLength(); i++)
1664  {
1665  const int lcs = (*L2RScatterOrigPtr)[i];
1666  const int rcg = (*L2RGatherOrigPtr)[i];
1667  // if the left cell is in the current face groups neighbours it goes into the new1
1668  if (rightCellsToSCells.find(rcg) != rightCellsToSCells.end())
1669  {
1670 
1671  const int sCell = rightCellsToSCells[rcg];
1672 
1673  L2SScatterVector.push_back(lcs);
1674  L2SGatherVector.push_back(sCell+count);
1675 
1676  S2RScatterVector.push_back(sCell);
1677  S2RGatherVector.push_back(rcg);
1678  }
1679  else
1680  {
1681  L2RScatterNewVector.push_back(lcs);
1682  L2RGatherNewVector.push_back(rcg);
1683  }
1684  }
1685 
1686  for(int i=0; i<R2LGatherOrigPtr->getLength(); i++)
1687  {
1688  const int lcg = (*R2LGatherOrigPtr)[i];
1689  const int rcs = (*R2LScatterOrigPtr)[i];
1690  // if the left cell is in the current face groups neighbours it goes into the new1
1691  if (leftCellsToSCells.find(lcg) != leftCellsToSCells.end())
1692  {
1693  const int sCell = leftCellsToSCells[lcg];
1694 
1695  S2LGatherVector.push_back(lcg);
1696  S2LScatterVector.push_back(sCell);
1697 
1698  R2SGatherVector.push_back(sCell+2*count);
1699  R2SScatterVector.push_back(rcs);
1700 
1701  }
1702  else
1703  {
1704  R2LGatherNewVector.push_back(lcg);
1705  R2LScatterNewVector.push_back(rcs);
1706  }
1707  }
1708 
1709 
1710  // set the gather scatter arrays in the smesh cells
1711  sMeshCells.getScatterMap()[&cells] = arrayFromVector(S2LScatterVector);
1712  sMeshCells.getScatterMap()[&otherCells] = arrayFromVector(S2RScatterVector);
1713  sMeshCells.getGatherMap()[&cells] = arrayFromVector(L2SGatherVector);
1714  sMeshCells.getGatherMap()[&otherCells] = arrayFromVector(R2SGatherVector);
1715 
1716  // replace the existing arrays in left and right maps and add the
1717  // new ones
1718 
1719  lScatterMap.erase(&otherCells);
1720  if (L2RScatterNewVector.size() > 0)
1721  lScatterMap[&otherCells] = arrayFromVector(L2RScatterNewVector);
1722  lScatterMap[&sMeshCells] = arrayFromVector(L2SScatterVector);
1723 
1724  lGatherMap.erase(&otherCells);
1725  if (R2LGatherNewVector.size() > 0)
1726  lGatherMap[&otherCells] = arrayFromVector(R2LGatherNewVector);
1727  lGatherMap[&sMeshCells] = arrayFromVector(S2LGatherVector);
1728 
1729  rScatterMap.erase(&cells);
1730  if (R2LScatterNewVector.size() > 0)
1731  rScatterMap[&cells] = arrayFromVector(R2LScatterNewVector);
1732  rScatterMap[&sMeshCells] = arrayFromVector(R2SScatterVector);
1733 
1734  rGatherMap.erase(&cells);
1735  if (L2RGatherNewVector.size() > 0)
1736  rGatherMap[&cells] = arrayFromVector(L2RGatherNewVector);
1737  rGatherMap[&sMeshCells] = arrayFromVector(S2RGatherVector);
1738 
1739  // create the cell cell connectivity for the shell mesh
1740  shared_ptr<CRConnectivity> sCellCells(new CRConnectivity(sMeshCells,sMeshCells));
1741  sCellCells->initCount();
1742 
1743  // two neighbours for the first count cells, one for the rest
1744  for(int i=0; i<count; i++)
1745  {
1746  sCellCells->addCount(i,2);
1747  sCellCells->addCount(i+count,1);
1748  sCellCells->addCount(i+2*count,1);
1749  }
1750 
1751  sCellCells->finishCount();
1752 
1753  for(int i=0; i<count; i++)
1754  {
1755  sCellCells->add(i,i+count);
1756  sCellCells->add(i,i+2*count);
1757 
1758  sCellCells->add(i+count,i);
1759  sCellCells->add(i+2*count,i);
1760  }
1761 
1762  sCellCells->finishAdd();
1763 
1764  SSPair key(&sMeshCells,&sMeshCells);
1765 
1766  shellMesh->_connectivityMap[key] = sCellCells;
1767 
1768  return shellMesh;
1769 }
int getSelfCount() const
Definition: StorageSite.h:40
bool _isShell
Definition: Mesh.h:408
const int _dimension
Definition: Mesh.h:346
Definition: Mesh.h:28
Array< int > IntArray
Definition: Mesh.h:54
const FaceGroup & getFaceGroup(const int fgId) const
Definition: Mesh.cpp:1570
Definition: Mesh.h:49
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
void setCount(const int selfCount, const int nGhost=0)
Definition: StorageSite.h:42
Mesh(const int dimension)
Definition: Mesh.cpp:21
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
const StorageSite & getCells() const
Definition: Mesh.h:109
const ScatterMap & getScatterMap() const
Definition: StorageSite.h:58
const CRConnectivity & getFaceCells(const StorageSite &site) const
Definition: Mesh.cpp:388
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
Definition: StorageSite.h:23
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
const StorageSite * _parentFaceGroupSite
Definition: Mesh.h:416
shared_ptr< Array< T > > arrayFromVector(const vector< T > &v)
Definition: Array.h:523
StorageSite site
Definition: Mesh.h:40
Mesh::DEFINE_TYPENAME ( "Mesh"  )
void Mesh::eraseConnectivity ( const StorageSite rowSite,
const StorageSite colSite 
) const

Definition at line 359 of file Mesh.cpp.

References _connectivityMap.

Referenced by MeshMetricsCalculator< T >::eraseIBInterpolationMatrices(), getCellCells2(), and uniqueFaceCells().

361 {
362  SSPair key(&rowSite,&colSite);
363  _connectivityMap.erase(key);
364 }
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
Mesh * Mesh::extractBoundaryMesh ( )

Definition at line 1122 of file Mesh.cpp.

References _connectivityMap, _dimension, _nodes, createBoundaryFaceGroup(), getAllFaceGroups(), StorageSite::getCommonMap(), StorageSite::getCount(), CRConnectivity::getCount(), getFaceNodes(), getFaces(), getNodeCoordinates(), getNodes(), FaceGroup::groupType, Mesh(), setCoordinates(), StorageSite::setCount(), and FaceGroup::site.

1123 {
1124  StorageSite& nodes = _nodes;
1125  const Array<VecD3>& coords = getNodeCoordinates();
1126 
1127  const int nodeCount = nodes.getCount();
1128  Array<int> globalToLocalNodes(nodeCount);
1129 
1130  globalToLocalNodes = -1;
1131  int bMeshNodeCount=0;
1132  int bMeshFaceCount=0;
1133  foreach(const FaceGroupPtr fgPtr, getAllFaceGroups())
1134  {
1135  const FaceGroup& fg = *fgPtr;
1136  const StorageSite& faces = fg.site;
1137  if (fg.groupType!="interior")
1138  {
1139  const int nFaces = faces.getCount();
1140  const CRConnectivity& faceNodes = getFaceNodes(faces);
1141  for(int f=0; f<nFaces; f++)
1142  {
1143  const int nFaceNodes = faceNodes.getCount(f);
1144  for(int nn=0; nn<nFaceNodes; nn++)
1145  {
1146  const int n=faceNodes(f,nn);
1147  if (globalToLocalNodes[n] == -1)
1148  {
1149  globalToLocalNodes[n] = bMeshNodeCount++;
1150  }
1151  }
1152  }
1153  bMeshFaceCount += nFaces;
1154  }
1155  }
1156 
1157 
1158  Mesh *bMesh = new Mesh(_dimension);
1159 
1160 
1161  StorageSite& bMeshFaces = bMesh->getFaces();
1162  StorageSite& bMeshNodes = bMesh->getNodes();
1163  bMeshFaces.setCount( bMeshFaceCount );
1164  bMeshNodes.setCount( bMeshNodeCount );
1165 
1166  bMesh->createBoundaryFaceGroup(bMeshFaceCount,0,0,"wall");
1167 
1168  //setting coordinates
1169  shared_ptr< Array<VecD3> > bMeshCoordPtr( new Array< VecD3 > ( bMeshNodeCount ) );
1170 
1171  shared_ptr<IntArray> myCommonNodes(new IntArray(bMeshNodeCount));
1172  shared_ptr<IntArray> otherCommonNodes(new IntArray(bMeshNodeCount));
1173 
1174  for(int n=0; n<nodeCount; n++)
1175  {
1176  const int nLocal = globalToLocalNodes[n];
1177  if (nLocal >=0)
1178  {
1179  (*bMeshCoordPtr)[nLocal] = coords[n];
1180  (*myCommonNodes)[nLocal] = nLocal;
1181  (*otherCommonNodes)[nLocal] = n;
1182  }
1183  }
1184  nodes.getCommonMap()[&bMeshNodes] = myCommonNodes;
1185  bMeshNodes.getCommonMap()[&nodes] = otherCommonNodes;
1186 
1187  bMesh->setCoordinates( bMeshCoordPtr );
1188 
1189  //faceNodes constructor
1190  shared_ptr<CRConnectivity> bFaceNodes( new CRConnectivity(bMeshFaces,
1191  bMeshNodes) );
1192 
1193  bFaceNodes->initCount();
1194 
1195  bMeshFaceCount=0;
1196 
1197  foreach(FaceGroupPtr fgPtr, getAllFaceGroups())
1198  {
1199  FaceGroup& fg = *fgPtr;
1200  StorageSite& faces = const_cast<StorageSite&>(fg.site);
1201  if (fg.groupType!="interior")
1202  {
1203  const int nFaces = faces.getCount();
1204  const CRConnectivity& faceNodes = getFaceNodes(faces);
1205 
1206  shared_ptr<IntArray> myCommonFaces(new IntArray(nFaces));
1207  shared_ptr<IntArray> otherCommonFaces(new IntArray(nFaces));
1208 
1209  for(int f=0; f<nFaces; f++)
1210  {
1211  const int nFaceNodes = faceNodes.getCount(f);
1212  bFaceNodes->addCount(bMeshFaceCount,nFaceNodes);
1213  (*myCommonFaces)[f] = bMeshFaceCount;
1214  (*otherCommonFaces)[f] = f;
1215  bMeshFaceCount++;
1216  }
1217 
1218  faces.getCommonMap()[&bMeshFaces] = myCommonFaces;
1219  bMeshFaces.getCommonMap()[&faces] = otherCommonFaces;
1220  }
1221  }
1222 
1223  bFaceNodes->finishCount();
1224  bMeshFaceCount=0;
1225 
1226  foreach(const FaceGroupPtr fgPtr, getAllFaceGroups())
1227  {
1228  const FaceGroup& fg = *fgPtr;
1229  const StorageSite& faces = fg.site;
1230  if (fg.groupType!="interior")
1231  {
1232  const int nFaces = faces.getCount();
1233  const CRConnectivity& faceNodes = getFaceNodes(faces);
1234  for(int f=0; f<nFaces; f++)
1235  {
1236  const int nFaceNodes = faceNodes.getCount(f);
1237  for(int nn=0; nn<nFaceNodes; nn++)
1238  {
1239  const int n=faceNodes(f,nn);
1240  const int nLocal = globalToLocalNodes[n];
1241  bFaceNodes->add(bMeshFaceCount,nLocal);
1242  }
1243  bMeshFaceCount++;
1244  }
1245  }
1246  }
1247 
1248  bFaceNodes->finishAdd();
1249  //setting faceNodes
1250  SSPair key(&bMeshFaces,&bMeshNodes);
1251  bMesh->_connectivityMap[key] = bFaceNodes;
1252 
1253  return bMesh;
1254 
1255 }
int getCount(const int i) const
shared_ptr< FaceGroup > FaceGroupPtr
Definition: Mesh.h:46
const int _dimension
Definition: Mesh.h:346
Definition: Mesh.h:28
const FaceGroupList & getAllFaceGroups() const
Definition: Mesh.h:193
const StorageSite & getNodes() const
Definition: Mesh.h:110
Array< int > IntArray
Definition: Mesh.h:54
void setCoordinates(shared_ptr< Array< VecD3 > > x)
Definition: Mesh.h:204
Definition: Mesh.h:49
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
const CRConnectivity & getFaceNodes(const StorageSite &site) const
Definition: Mesh.cpp:402
const CommonMap & getCommonMap() const
Definition: StorageSite.h:60
void setCount(const int selfCount, const int nGhost=0)
Definition: StorageSite.h:42
const StorageSite & createBoundaryFaceGroup(const int size, const int offset, const int id, const string &boundaryType)
Definition: Mesh.cpp:278
string groupType
Definition: Mesh.h:42
Mesh(const int dimension)
Definition: Mesh.cpp:21
const Array< VecD3 > & getNodeCoordinates() const
Definition: Mesh.h:218
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
const StorageSite & getFaces() const
Definition: Mesh.h:108
StorageSite _nodes
Definition: Mesh.h:356
Definition: Array.h:14
int getCount() const
Definition: StorageSite.h:39
StorageSite site
Definition: Mesh.h:40
Mesh * Mesh::extrude ( int  nz,
double  zmax,
bool  boundaryOnly = false 
)

Definition at line 1258 of file Mesh.cpp.

References _cells, _connectivityMap, _dimension, _faces, _interiorFaceGroup, _nodes, createBoundaryFaceGroup(), createInteriorFaceGroup(), getAllFaceCells(), getAllFaceGroups(), getAllFaceNodes(), getCellNodes(), getCells(), StorageSite::getCount(), CRConnectivity::getCount(), getFaceCells(), getFaceNodes(), getFaces(), getNodeCoordinates(), getNodes(), StorageSite::getSelfCount(), FaceGroup::groupType, FaceGroup::id, Mesh(), setCoordinates(), StorageSite::setCount(), and FaceGroup::site.

1259 {
1260  if (boundaryOnly)
1261  nz = 1;
1262 
1263  if (_dimension != 2)
1264  throw CException("can only extrude two dimensional mesh");
1265 
1266  const int myNCells = _cells.getSelfCount();
1267  const int myNFaces = _faces.getSelfCount();
1268  const int myNInteriorFaces = _interiorFaceGroup->site.getCount();
1269  const int myNBoundaryFaces = myNFaces - myNInteriorFaces;
1270  const int myNNodes = _nodes.getSelfCount();
1271  const CRConnectivity& myCellNodes = getCellNodes();
1272 
1273  const int eNInteriorFaces_rib = boundaryOnly ? 0 : nz*myNInteriorFaces;
1274  const int eNInteriorFaces_cap = (nz-1)*myNCells;
1275 
1276  const int eNInteriorFaces = eNInteriorFaces_rib + eNInteriorFaces_cap;
1277  const int eNBoundaryFaces = nz*myNBoundaryFaces + 2*myNCells;
1278  const int eNFaces = eNInteriorFaces + eNBoundaryFaces;
1279  const int eNInteriorCells = boundaryOnly ? 0 : nz*myNCells;
1280  const int eNBoundaryCells = boundaryOnly ? 0 : eNBoundaryFaces;
1281 
1282  const int eNNodes = (nz+1)*myNNodes;
1283 
1284  Mesh *eMesh = new Mesh(3);
1285 
1286  // set nodes
1287  StorageSite& eMeshNodes = eMesh->getNodes();
1288  eMeshNodes.setCount( eNNodes );
1289 
1290  const Array<VecD3>& myCoords = getNodeCoordinates();
1291  shared_ptr< Array<VecD3> > eMeshCoordPtr( new Array< VecD3 > ( eNNodes ) );
1292  Array<VecD3>& eCoords = *eMeshCoordPtr;
1293  const double dz = zmax/nz;
1294 
1295  const double z0 = -zmax/2.0;
1296  for(int k=0, en=0; k<=nz; k++)
1297  {
1298  const double z = z0 + dz*k;
1299  for(int n=0; n<myNNodes; n++)
1300  {
1301  eCoords[en][0] = myCoords[n][0];
1302  eCoords[en][1] = myCoords[n][1];
1303  eCoords[en][2] = z;
1304  en++;
1305  }
1306  }
1307 
1308  eMesh->setCoordinates( eMeshCoordPtr );
1309 
1310 
1311  // set cells
1312 
1313  StorageSite& eMeshCells = eMesh->getCells();
1314  eMeshCells.setCount( eNInteriorCells, eNBoundaryCells);
1315 
1316 
1317  // set faces
1318 
1319  StorageSite& eMeshFaces = eMesh->getFaces();
1320  eMeshFaces.setCount(eNFaces);
1321 
1322 
1323  shared_ptr<CRConnectivity> eFaceNodes( new CRConnectivity(eMeshFaces,
1324  eMeshNodes) );
1325 
1326  shared_ptr<CRConnectivity> eFaceCells( new CRConnectivity(eMeshFaces,
1327  eMeshCells) );
1328 
1329  // set counts for face cells and face nodes
1330 
1331 
1332  eFaceNodes->initCount();
1333  eFaceCells->initCount();
1334 
1335  int f = 0;
1336 
1337  if (!boundaryOnly)
1338  {
1339  // rib faces first
1340  for(; f<eNInteriorFaces_rib; f++)
1341  {
1342  eFaceNodes->addCount(f,4);
1343  eFaceCells->addCount(f,2);
1344  }
1345 
1346  // interior cap faces
1347  for(int k=1; k<nz; k++)
1348  {
1349  for(int c=0; c<myNCells; c++)
1350  {
1351  eFaceNodes->addCount(f, myCellNodes.getCount(c));
1352  eFaceCells->addCount(f, 2);
1353  f++;
1354  }
1355  }
1356 
1357  eMesh->createInteriorFaceGroup(eNInteriorFaces);
1358  }
1359 
1360 
1361  // z = 0 faces
1362  eMesh->createBoundaryFaceGroup(myNCells, f, 10000, "wall");
1363  for(int c=0; c<myNCells; c++)
1364  {
1365  eFaceNodes->addCount(f, myCellNodes.getCount(c));
1366  eFaceCells->addCount(f, 2);
1367  f++;
1368  }
1369 
1370  // z = zmax faces
1371  eMesh->createBoundaryFaceGroup(myNCells, f, 10001, "wall");
1372  for(int c=0; c<myNCells; c++)
1373  {
1374  eFaceNodes->addCount(f, myCellNodes.getCount(c));
1375  eFaceCells->addCount(f, 2);
1376  f++;
1377  }
1378 
1379  foreach(const FaceGroupPtr fgPtr, getAllFaceGroups())
1380  {
1381  const FaceGroup& fg = *fgPtr;
1382  const StorageSite& faces = fg.site;
1383  if (fg.groupType!="interior")
1384  {
1385  const int nBFaces = faces.getCount();
1386 
1387  eMesh->createBoundaryFaceGroup(nBFaces*nz, f, fg.id, fg.groupType);
1388 
1389  for(int k=0; k<nz; k++)
1390  for(int bf=0; bf<nBFaces; bf++)
1391  {
1392  eFaceNodes->addCount(f,4);
1393  eFaceCells->addCount(f,2);
1394  f++;
1395  }
1396  }
1397  }
1398 
1399  eFaceNodes->finishCount();
1400  eFaceCells->finishCount();
1401 
1402 
1403  // now set the indices of face cells and nodes
1404 
1405 
1406  f = 0;
1407 
1408 
1409  // rib faces first
1410 
1411  const CRConnectivity& myFaceNodes = getAllFaceNodes();
1412  const CRConnectivity& myFaceCells = getAllFaceCells();
1413 
1414  if (!boundaryOnly)
1415  {
1416  for(int k=0; k<nz; k++)
1417  {
1418  const int eCellOffset = k*myNCells;
1419  const int eNodeOffset = k*myNNodes;
1420 
1421  for(int myf=0; myf<myNInteriorFaces; myf++)
1422  {
1423  const int myNode0 = myFaceNodes(myf,0);
1424  const int myNode1 = myFaceNodes(myf,1);
1425 
1426  const int myCell0 = myFaceCells(myf,0);
1427  const int myCell1 = myFaceCells(myf,1);
1428 
1429 
1430  eFaceNodes->add(f, myNode0 + eNodeOffset);
1431  eFaceNodes->add(f, myNode1 + eNodeOffset );
1432  eFaceNodes->add(f, myNode1 + eNodeOffset + myNNodes);
1433  eFaceNodes->add(f, myNode0 + eNodeOffset + myNNodes);
1434 
1435  eFaceCells->add(f, myCell0 + eCellOffset);
1436  eFaceCells->add(f, myCell1 + eCellOffset);
1437 
1438  f++;
1439  }
1440  }
1441 
1442  // interior cap faces
1443  for(int k=1; k<nz; k++)
1444  {
1445  const int eCellOffset = k*myNCells;
1446  const int eNodeOffset = k*myNNodes;
1447 
1448  for(int c=0; c<myNCells; c++)
1449  {
1450  const int nCellNodes = myCellNodes.getCount(c);
1451  for(int nnc=0; nnc<nCellNodes; nnc++)
1452  {
1453  eFaceNodes->add(f, myCellNodes(c,nnc) + eNodeOffset);
1454  }
1455 
1456  eFaceCells->add(f, c + eCellOffset - myNCells);
1457  eFaceCells->add(f, c + eCellOffset);
1458  f++;
1459  }
1460  }
1461  }
1462 
1463  // counter for boundary faces
1464  int ebf = 0;
1465 
1466 
1467  // z = 0 faces
1468  {
1469  const int eCellOffset = 0;
1470  const int eNodeOffset = 0;
1471 
1472  for(int c=0; c<myNCells; c++)
1473  {
1474  const int nCellNodes = myCellNodes.getCount(c);
1475 
1476  // reverse order of face nodes
1477  for(int nnc=nCellNodes-1; nnc>=0; nnc--)
1478  {
1479  eFaceNodes->add(f, myCellNodes(c,nnc) + eNodeOffset);
1480  }
1481 
1482  eFaceCells->add(f, c + eCellOffset);
1483  eFaceCells->add(f, ebf + eNInteriorCells);
1484  f++;
1485  ebf++;
1486  }
1487 
1488  }
1489 
1490  // z = zmax faces
1491  {
1492  const int eCellOffset = (nz-1)*myNCells;
1493  const int eNodeOffset = nz*myNNodes;
1494 
1495  for(int c=0; c<myNCells; c++)
1496  {
1497  const int nCellNodes = myCellNodes.getCount(c);
1498 
1499  // reverse order of face nodes
1500  for(int nnc=0; nnc<nCellNodes; nnc++)
1501  {
1502  eFaceNodes->add(f, myCellNodes(c,nnc) + eNodeOffset);
1503  }
1504 
1505  eFaceCells->add(f, c + eCellOffset);
1506  eFaceCells->add(f, ebf + eNInteriorCells);
1507  f++;
1508  ebf++;
1509  }
1510  }
1511 
1512 
1513  // rib boundary faces
1514  foreach(const FaceGroupPtr fgPtr, getAllFaceGroups())
1515  {
1516  const FaceGroup& fg = *fgPtr;
1517  const StorageSite& faces = fg.site;
1518  if (fg.groupType!="interior")
1519  {
1520  const int nBFaces = faces.getCount();
1521 
1522  const CRConnectivity& bFaceNodes = getFaceNodes(faces);
1523  const CRConnectivity& bFaceCells = getFaceCells(faces);
1524 
1525  for(int k=0; k<nz; k++)
1526  {
1527  const int eCellOffset = k*myNCells;
1528  const int eNodeOffset = k*myNNodes;
1529  for(int bf=0; bf<nBFaces; bf++)
1530  {
1531  const int myNode0 = bFaceNodes(bf,0);
1532  const int myNode1 = bFaceNodes(bf,1);
1533 
1534  const int myCell0 = bFaceCells(bf,0);
1535 
1536 
1537  eFaceNodes->add(f, myNode0 + eNodeOffset);
1538  eFaceNodes->add(f, myNode1 + eNodeOffset);
1539  eFaceNodes->add(f, myNode1 + eNodeOffset + myNNodes);
1540  eFaceNodes->add(f, myNode0 + eNodeOffset + myNNodes);
1541 
1542  eFaceCells->add(f, myCell0 + eCellOffset);
1543  eFaceCells->add(f, ebf + eNInteriorCells);
1544 
1545  f++;
1546  ebf++;
1547  }
1548  }
1549  }
1550 
1551  }
1552 
1553  eFaceNodes->finishAdd();
1554  eFaceCells->finishAdd();
1555 
1556  //setting faceNodes
1557  SSPair key1(&eMeshFaces,&eMeshNodes);
1558  eMesh->_connectivityMap[key1] = eFaceNodes;
1559 
1560  if (!boundaryOnly)
1561  {
1562  SSPair key2(&eMeshFaces,&eMeshCells);
1563  eMesh->_connectivityMap[key2] = eFaceCells;
1564  }
1565 
1566  return eMesh;
1567 }
const CRConnectivity & getAllFaceNodes() const
Definition: Mesh.cpp:368
int getCount(const int i) const
shared_ptr< FaceGroup > FaceGroupPtr
Definition: Mesh.h:46
int getSelfCount() const
Definition: StorageSite.h:40
const int _dimension
Definition: Mesh.h:346
Definition: Mesh.h:28
const FaceGroupList & getAllFaceGroups() const
Definition: Mesh.h:193
StorageSite _faces
Definition: Mesh.h:355
const StorageSite & getNodes() const
Definition: Mesh.h:110
const StorageSite & createInteriorFaceGroup(const int size)
Definition: Mesh.cpp:259
void setCoordinates(shared_ptr< Array< VecD3 > > x)
Definition: Mesh.h:204
Definition: Mesh.h:49
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
const CRConnectivity & getFaceNodes(const StorageSite &site) const
Definition: Mesh.cpp:402
void setCount(const int selfCount, const int nGhost=0)
Definition: StorageSite.h:42
const StorageSite & createBoundaryFaceGroup(const int size, const int offset, const int id, const string &boundaryType)
Definition: Mesh.cpp:278
string groupType
Definition: Mesh.h:42
Mesh(const int dimension)
Definition: Mesh.cpp:21
const CRConnectivity & getAllFaceCells() const
Definition: Mesh.cpp:378
const int id
Definition: Mesh.h:41
const Array< VecD3 > & getNodeCoordinates() const
Definition: Mesh.h:218
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
const StorageSite & getFaces() const
Definition: Mesh.h:108
shared_ptr< FaceGroup > _interiorFaceGroup
Definition: Mesh.h:361
const StorageSite & getCells() const
Definition: Mesh.h:109
StorageSite _nodes
Definition: Mesh.h:356
const CRConnectivity & getFaceCells(const StorageSite &site) const
Definition: Mesh.cpp:388
Definition: Array.h:14
int getCount() const
Definition: StorageSite.h:39
StorageSite _cells
Definition: Mesh.h:354
const CRConnectivity & getCellNodes() const
Definition: Mesh.cpp:426
StorageSite site
Definition: Mesh.h:40
void Mesh::findCommonFaces ( StorageSite faces,
StorageSite otherFaces,
const GeomFields geomFields 
)

Definition at line 996 of file Mesh.cpp.

References GeomFields::area, GeomFields::coordinate, cross(), epsilon, StorageSite::getCommonMap(), StorageSite::getCount(), mag(), and mag2().

998 {
999  const int count(faces.getCount());
1000  if (count != otherFaces.getCount())
1001  throw CException("face groups are not of the same length");
1002 
1003  const Array<VecD3>& coords =
1004  dynamic_cast<const Array<VecD3>& >(geomFields.coordinate[faces]);
1005 
1006  const Array<VecD3>& otherCoords =
1007  dynamic_cast<const Array<VecD3>& >(geomFields.coordinate[otherFaces]);
1008 
1009  const Array<VecD3>& area =
1010  dynamic_cast<const Array<VecD3>& >(geomFields.area[faces]);
1011 
1012  const Array<VecD3>& otherArea =
1013  dynamic_cast<const Array<VecD3>& >(geomFields.area[otherFaces]);
1014 
1015  KSearchTree thisFacesTree(coords);
1016 
1017  Array<int> closest(2);
1018 
1019  shared_ptr<IntArray> myCommonFaces(new IntArray(count));
1020  shared_ptr<IntArray> otherCommonFaces(new IntArray(count));
1021 
1022  for(int f=0; f<count; f++)
1023  {
1024  thisFacesTree.findNeighbors(otherCoords[f],2,closest);
1025 
1026  const int closestFace = closest[0];
1027  double dist0 = mag(otherCoords[f] - coords[closestFace]);
1028 
1029  // distance between the two closest point used as scale
1030 
1031  double distScale = mag(coords[closest[0]] - coords[closest[1]]);
1032 
1033  if (dist0 < distScale*epsilon)
1034  {
1035  double crossProductMag(mag2(cross(otherArea[f],area[closestFace])));
1036  if (crossProductMag > mag2(otherArea[f])*epsilon)
1037  throw CException("cross product is not small");
1038 
1039  (*otherCommonFaces)[f] = closestFace;
1040  (*myCommonFaces)[closestFace] = f;
1041  }
1042  else
1043  throw CException("Not a match");
1044 
1045  }
1046 
1047  faces.getCommonMap()[&otherFaces] = myCommonFaces;
1048  otherFaces.getCommonMap()[&faces] = otherCommonFaces;
1049 
1050 }
#define epsilon
Definition: Mesh.cpp:17
Field coordinate
Definition: GeomFields.h:19
Array< int > IntArray
Definition: Mesh.h:54
const CommonMap & getCommonMap() const
Definition: StorageSite.h:60
T mag(const Vector< T, 3 > &a)
Definition: Vector.h:260
Vector< T, 3 > cross(const Vector< T, 3 > &a, const Vector< T, 3 > &b)
Definition: Vector.h:242
Definition: Array.h:14
int getCount() const
Definition: StorageSite.h:39
Field area
Definition: GeomFields.h:23
T mag2(const Vector< T, 3 > &a)
Definition: Vector.h:267
void Mesh::findCommonNodes ( Mesh other)

Definition at line 877 of file Mesh.cpp.

References _nodes, epsilon, KSearchTree::findNeighbors(), getAllFaceGroups(), StorageSite::getCommonMap(), StorageSite::getCount(), CRConnectivity::getCount(), getFaceNodes(), getNodeCoordinates(), FaceGroup::groupType, KSearchTree::insert(), mag(), and FaceGroup::site.

878 {
879  StorageSite& nodes = _nodes;
880  StorageSite& otherNodes = other._nodes;
881  const int nNodes = nodes.getCount();
882  const int nOtherNodes = otherNodes.getCount();
883 
884  const Array<VecD3>& coords = getNodeCoordinates();
885  const Array<VecD3>& otherCoords = other.getNodeCoordinates();
886 
887 
888  KSearchTree bNodeTree;
889 
890  // add all boundary nodes of this mesh to the tree
891  {
892  Array<bool> nodeMark(nNodes);
893  nodeMark = false;
894  foreach(const FaceGroupPtr fgPtr, getAllFaceGroups())
895  {
896  const FaceGroup& fg = *fgPtr;
897  const StorageSite& faces = fg.site;
898  if (fg.groupType!="interior")
899  {
900  const int nFaces = faces.getCount();
901  const CRConnectivity& faceNodes = getFaceNodes(faces);
902  for(int f=0; f<nFaces; f++)
903  {
904  const int nFaceNodes = faceNodes.getCount(f);
905  for(int nn=0; nn<nFaceNodes; nn++)
906  {
907  const int n=faceNodes(f,nn);
908  if (!nodeMark[n])
909  {
910  nodeMark[n] = true;
911  bNodeTree.insert(coords[n],n);
912  }
913  }
914  }
915  }
916  }
917  }
918 
919 
920  // loop over all the boundary nodes of the other mesh to find possible common ones
921  Array<bool> nodeMark(nOtherNodes);
922 
923  typedef map<int,int> CommonNodesMap;
924  CommonNodesMap commonNodesMap;
925 
926  Array<int> closest(2);
927 
928  nodeMark = false;
929 
930 
931  foreach(const FaceGroupPtr fgPtr, other.getAllFaceGroups())
932  {
933  const FaceGroup& fg = *fgPtr;
934  const StorageSite& faces = fg.site;
935  if (fg.groupType!="interior")
936  {
937  const int nFaces = faces.getCount();
938  const CRConnectivity& faceNodes = other.getFaceNodes(faces);
939 
940  for(int f=0; f<nFaces; f++)
941  {
942  const int nFaceNodes = faceNodes.getCount(f);
943  for(int nn=0; nn<nFaceNodes; nn++)
944  {
945  const int n=faceNodes(f,nn);
946  if (!nodeMark[n])
947  {
948  bNodeTree.findNeighbors(otherCoords[n],2,closest);
949 
950  double dist0 = mag(otherCoords[n] - coords[closest[0]]);
951 
952  // distance between the two closest point used as scale
953 
954  double distScale = mag(coords[closest[0]] - coords[closest[1]]);
955 
956  if (dist0 < distScale*epsilon)
957  {
958  // if another node has already been found as the
959  // closest for this one we have something wrong
960  if (commonNodesMap.find(closest[0]) != commonNodesMap.end())
961  {
962  throw CException("duplicate nodes on the mesh ?");
963  }
964  commonNodesMap.insert(make_pair(closest[0], n));
965  }
966  nodeMark[n] = true;
967  }
968  }
969  }
970  }
971  }
972 
973  const int nCommon = commonNodesMap.size();
974 
975  if (nCommon == 0)
976  return;
977  cout << "found " << nCommon << " common nodes " << endl;
978 
979  shared_ptr<IntArray> myCommonNodes(new IntArray(nCommon));
980  shared_ptr<IntArray> otherCommonNodes(new IntArray(nCommon));
981 
982  int nc=0;
983  foreach(CommonNodesMap::value_type& pos, commonNodesMap)
984  {
985  (*myCommonNodes)[nc] = pos.first;
986  (*otherCommonNodes)[nc] = pos.second;
987  nc++;
988  }
989 
990  nodes.getCommonMap()[&otherNodes] = myCommonNodes;
991  otherNodes.getCommonMap()[&nodes] = otherCommonNodes;
992 
993 }
#define epsilon
Definition: Mesh.cpp:17
int getCount(const int i) const
shared_ptr< FaceGroup > FaceGroupPtr
Definition: Mesh.h:46
Definition: Mesh.h:28
const FaceGroupList & getAllFaceGroups() const
Definition: Mesh.h:193
Array< int > IntArray
Definition: Mesh.h:54
const CRConnectivity & getFaceNodes(const StorageSite &site) const
Definition: Mesh.cpp:402
const CommonMap & getCommonMap() const
Definition: StorageSite.h:60
T mag(const Vector< T, 3 > &a)
Definition: Vector.h:260
string groupType
Definition: Mesh.h:42
const Array< VecD3 > & getNodeCoordinates() const
Definition: Mesh.h:218
void findNeighbors(const Vec3D &p, const int k, Array< int > &neighbors)
Definition: KSearchTree.cpp:30
StorageSite _nodes
Definition: Mesh.h:356
Definition: Array.h:14
int getCount() const
Definition: StorageSite.h:39
StorageSite site
Definition: Mesh.h:40
void insert(const Vec3D &v, const int n)
Definition: KSearchTree.cpp:23
int Mesh::get_request_size ( )
private

Definition at line 2363 of file Mesh.cpp.

References getCells(), StorageSite::getGatherProcID(), and StorageSite::getScatterMap().

Referenced by syncCounts(), and syncIndices().

2364 {
2365  int indx = 0;
2366  const StorageSite& site = this->getCells();
2367  const StorageSite::ScatterMap& scatterMap = site.getScatterMap();
2368  foreach(const StorageSite::ScatterMap::value_type& mpos, scatterMap){
2369  const StorageSite& oSite = *mpos.first;
2370  //checking if storage site is only site or ghost site, we only communicate ghost site ( oSite.getCount() == -1 )
2371  if ( oSite.getGatherProcID() != -1 )
2372  indx++;
2373  }
2374  return indx;
2375 }
int getGatherProcID() const
Definition: StorageSite.h:83
const StorageSite & getCells() const
Definition: Mesh.h:109
const ScatterMap & getScatterMap() const
Definition: StorageSite.h:58
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
Definition: StorageSite.h:23
const CRConnectivity & Mesh::getAllFaceCells ( ) const

Definition at line 378 of file Mesh.cpp.

References _cells, _connectivityMap, and _faces.

Referenced by MeshMetricsCalculator< T >::calculateCellCentroids(), MeshMetricsCalculator< T >::calculateCellVolumes(), MeshPartitioner::cellcells_global_extension(), CellMark_Impl(), COMETModel< T >::coarsenInterfaceCells(), GradientModel< Vector< T, 3 > >::compute(), FlowModel< T >::Impl::computeContinuityResidual(), KineticModel< T >::computeIBFaceDsf(), COMETModel< T >::computeIBFaceDsf(), MeshMetricsCalculator< T >::computeIBInterpolationMatrices(), MeshMetricsCalculator< T >::computeIBInterpolationMatricesCells(), NcDataWriter::connectivities(), KineticModel< T >::ConservationofMassCheck(), COMETModel< T >::ConservationofMassCheck(), KineticModel< T >::correctMassDeficit(), COMETModel< T >::correctMassDeficit(), IBManager::createIBFaces(), FluentReader::createMesh(), DriftDiscretization< X, Diag, OffDiag >::discretize(), GenericIBDiscretization< X, Diag, OffDiag >::discretize(), PhononConvectionDiscretization< X, Diag, OffDiag >::discretize(), ConvectionDiscretization< X, Diag, OffDiag >::discretize(), GenericKineticIBDiscretization< X, Diag, OffDiag >::discretize(), ConvectionDiscretization_Kmodel< X, Diag, OffDiag >::discretize(), MomentumPressureGradientDiscretization< X >::discretize(), ElecDiffusionDiscretization< X, Diag, OffDiag >::discretize(), extrude(), MeshDismantler::faceCellsAddBoundaryInterfaces(), MeshDismantler::faceCellsAddInteriorFaces(), MeshDismantler::faceCellsAddMeshInterfaces(), MeshDismantler::faceCellsAddPartitionInterfaces(), MeshDismantler::faceNodesAddBoundaryInterfaces(), MeshDismantler::faceNodesAddInteriorFaces(), MeshDismantler::faceNodesAddMeshInterfaces(), MeshDismantler::faceNodesAddPartitionInterfaces(), MeshDismantler::faceNodesInit(), MeshPartitioner::gatherCellsLevel1_partID_map(), getCellCells(), getCellFaces(), getCellNodes(), getFaceCells(), getFaceCells2(), MeshDismantler::getGatherArrays(), GradientModel< Vector< T, 3 > >::getLeastSquaresGradientMatrix2D(), GradientModel< Vector< T, 3 > >::getLeastSquaresGradientMatrix3D(), MeshDismantler::getScatterArrays(), MeshMetricsCalculator< T >::init(), MeshDismantler::init(), KineticModel< T >::MacroparameterIBCell(), IBManager::markIntersections(), MeshDismantler::set_local_global(), MeshPartitioner::set_local_global(), MeshDismantler::setCellsSite(), MeshAssembler::setFaceCells(), MeshDismantler::setFacesSite(), MeshAssembler::setMeshCellColor(), ElectricModel< T >::Impl::updateConvectionFlux(), and MovingMeshModel< T >::volChange().

379 {
380  SSPair key(&_faces,&_cells);
381  ConnectivityMap::const_iterator pos = _connectivityMap.find(key);
382  if (pos != _connectivityMap.end())
383  return *pos->second;
384  throw CException("face cells not defined");
385 }
StorageSite _faces
Definition: Mesh.h:355
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
StorageSite _cells
Definition: Mesh.h:354
CRConnectivity & Mesh::getAllFaceCells ( )

Definition at line 469 of file Mesh.cpp.

References _cells, _connectivityMap, and _faces.

470 {
471  SSPair key(&_faces,&_cells);
472  ConnectivityMap::const_iterator pos = _connectivityMap.find(key);
473  if (pos != _connectivityMap.end())
474  return *pos->second;
475  throw CException("face cells not defined");
476 }
StorageSite _faces
Definition: Mesh.h:355
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
StorageSite _cells
Definition: Mesh.h:354
const FaceGroupList& Mesh::getAllFaceGroups ( ) const
inline

Definition at line 193 of file Mesh.h.

References _faceGroups.

Referenced by StructureModel< T >::Impl::applyBC(), MeshMetricsCalculator< T >::calculateBoundaryNodeNormal(), MeshMetricsCalculator< T >::calculateCellCentroids(), MeshMetricsCalculator< T >::calculateCellVolumes(), GradientModel< Vector< T, 3 > >::compute(), createAndGetBNglobalToLocal(), BatteryElectricDiffusionDiscretization< X, Diag, OffDiag >::discretize(), BatteryPCBinaryElectrolyteDiscretization< X, Diag, OffDiag >::discretize(), BatteryBinaryElectrolyteDiscretization< X, Diag, OffDiag >::discretize(), DiffusionDiscretization< X, Diag, OffDiag >::discretize(), StructureSourceDiscretization< T, Diag, OffDiag >::discretize(), BatteryPCDiffusionDiscretization< X, Diag, OffDiag >::discretize(), WallDiscretization< X, Diag, OffDiag >::discretize(), StructurePlasticDiscretization< T, Diag, OffDiag >::discretize(), PlateSourceDiscretization< T, Diag, OffDiag >::discretize(), extractBoundaryMesh(), extrude(), findCommonNodes(), getFaceGroup(), BatteryModel< T >::Impl::getFaceGroupArea(), BatteryModel< T >::Impl::getFaceGroupVoltage(), StructureModel< T >::Impl::Impl(), PlateModel< T >::Impl::Impl(), StructureModel< T >::Impl::init(), PlateModel< T >::Impl::init(), PlateModel< T >::Impl::linearizeDeformation(), StructureDeformationModel< T >::updateBoundaryMesh(), MovingMeshModel< T >::volChange(), VTKWriter< T >::VTKWriter(), VTKWriter< T >::writeScalarField(), and VTKWriter< T >::writeVectorField().

194  {return _faceGroups;}
FaceGroupList _faceGroups
Definition: Mesh.h:362
const ArrayBase & Mesh::getBNglobalToLocal ( ) const

Definition at line 346 of file Mesh.cpp.

References createAndGetBNglobalToLocal().

347 {
348  return *(createAndGetBNglobalToLocal());
349 }
shared_ptr< Array< int > > createAndGetBNglobalToLocal() const
Definition: Mesh.cpp:288
const FaceGroupList& Mesh::getBoundaryFaceGroups ( ) const
inline

Definition at line 187 of file Mesh.h.

References _boundaryGroups.

Referenced by AABB::AABB(), COMETModel< T >::applyTemperatureBoundaries(), COMETModel< T >::binwiseHeatFluxIntegral(), COMETModel< T >::calcDomainStats(), PhononModel< T >::callBoundaryConditions(), KineticModel< T >::callBoundaryConditions(), COMETModel< T >::callCOMETBoundaryConditions(), COMETModel< T >::COMETModel(), BatteryModel< T >::Impl::copyCoupledToSeparate(), BatteryModel< T >::Impl::copySeparateToCoupled(), COMETModel< T >::correctSingleNeighbor(), FlowModel< T >::Impl::correctVelocityExplicit(), Octree::Create(), debug_mesh(), MomentumPressureGradientDiscretization< X >::discretize(), InjectionDiscretization< X, Diag, OffDiag >::discretize(), TunnelingDiscretization< X, Diag, OffDiag >::discretize(), MeshPartitioner::extractBoundaryMesh(), MeshDismantler::faceCellsAddBoundaryInterfaces(), MeshDismantler::faceNodesAddBoundaryInterfaces(), MeshDismantler::faceNodesInit(), COMETModel< T >::FinishCoarseMesh(), ThermalModel< T >::Impl::getHeatFluxIntegral(), BatteryModel< T >::Impl::getHeatFluxIntegral(), SpeciesModel< T >::Impl::getMassFluxIntegral(), BatteryModel< T >::Impl::getMassFluxIntegral(), FlowModel< T >::Impl::getMomentumFluxIntegral(), getNumBounCells(), ElectricModel< T >::Impl::getPotentialFluxIntegral(), BatteryModel< T >::Impl::getPotentialFluxIntegral(), FlowModel< T >::Impl::getPressureIntegral(), VacancyModel< T >::Impl::getVacaFluxIntegral(), COMETModel< T >::getWallArea(), COMETModel< T >::getWallAreaVector(), MeshDismantler::global_offset(), MeshPartitioner::global_offset(), MeshPartitioner::globalCellID_procID_map(), PhononModel< T >::HeatFluxIntegral(), COMETModel< T >::HeatFluxIntegral(), ThermalModel< T >::Impl::Impl(), VacancyModel< T >::Impl::Impl(), SpeciesModel< T >::Impl::Impl(), FractureModel< T >::Impl::Impl(), KeModel< T >::Impl::Impl(), BatteryModel< T >::Impl::Impl(), ElectricModel< T >::Impl::Impl(), FlowModel< T >::Impl::Impl(), ThermalModel< T >::Impl::init(), FractureModel< T >::Impl::init(), VacancyModel< T >::Impl::init(), SpeciesModel< T >::Impl::init(), KeModel< T >::Impl::init(), PhononModel< T >::init(), KineticModel< T >::init(), ElectricModel< T >::Impl::init(), BatteryModel< T >::Impl::init(), COMETModel< T >::init(), ElectricModel< T >::Impl::initChargeTransportLinearization(), COMETModel< T >::initCoarse(), FlowModel< T >::Impl::initContinuityLinearization(), ElectricModel< T >::Impl::initElectroStaticsLinearization(), COMETModel< T >::initFromOld(), COMETModel< T >::initializeTemperatureBoundaries(), ThermalModel< T >::Impl::initLinearization(), FractureModel< T >::Impl::initLinearization(), VacancyModel< T >::Impl::initLinearization(), SpeciesModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearizationk(), FlowModel< T >::Impl::initMomentumLinearization(), BatteryModel< T >::Impl::initPCLinearization(), BatteryModel< T >::Impl::initPotentialLinearization(), BatteryModel< T >::Impl::initSpeciesLinearization(), BatteryModel< T >::Impl::initThermalLinearization(), ThermalModel< T >::Impl::linearize(), FractureModel< T >::Impl::linearize(), VacancyModel< T >::Impl::linearize(), SpeciesModel< T >::Impl::linearize(), ElectricModel< T >::Impl::linearizeChargeTransport(), FlowModel< T >::Impl::linearizeContinuity(), KeModel< T >::Impl::linearizedissipation(), ElectricModel< T >::Impl::linearizeElectroStatics(), KeModel< T >::Impl::linearizeenergy(), KineticModel< T >::linearizeKineticModel(), FlowModel< T >::Impl::linearizeMomentum(), BatteryModel< T >::Impl::linearizePC(), BatteryModel< T >::Impl::linearizePC_Thermal(), PhononModel< T >::linearizePhononModel(), BatteryModel< T >::Impl::linearizePotential(), BatteryModel< T >::Impl::linearizeSpecies(), BatteryModel< T >::Impl::linearizeThermal(), COMETModel< T >::MakeCoarseMesh1(), COMETModel< T >::MakeCoarseMesh2(), COMETModel< T >::MakeInteriorCoarseMesh(), IBManager::markIntersections(), COMETModel< T >::modewiseHeatFluxIntegral(), PhononModel< T >::PhononModel(), FlowModel< T >::Impl::postContinuitySolve(), FlowModel< T >::Impl::printMassFluxIntegrals(), FlowModel< T >::Impl::printMomentumFluxIntegrals(), FlowModel< T >::Impl::printPressureIntegrals(), COMETModel< T >::sameFaceGroup(), MeshDismantler::set_local_global(), MeshPartitioner::set_local_global(), KineticModel< T >::SetBoundaryConditions(), COMETModel< T >::SetBoundaryConditions(), MeshAssembler::setBoundaryFaceGroup(), setCommonFacesMap(), MeshAssembler::setFaceCells(), MeshAssembler::setFaceNodes(), COMETDiscretizer< T >::setfgFinder(), COMETESBGKDiscretizer< T >::setfgFinder(), MeshAssembler::setMeshCellColor(), COMETModel< T >::syncGhostCoarsening(), StructureDeformationModel< T >::updateBoundaryMesh(), ElectricModel< T >::Impl::updateConvectionFlux(), FluentDataExporter< T >::writeScalarField(), and FluentDataExporter< T >::writeVectorField().

188  {return _boundaryGroups;}
FaceGroupList _boundaryGroups
Definition: Mesh.h:363
const StorageSite & Mesh::getBoundaryNodes ( ) const

Definition at line 325 of file Mesh.cpp.

References _boundaryNodes, _nodes, createAndGetBNglobalToLocal(), and StorageSite::getCount().

Referenced by MovingMeshModel< T >::advance(), and MeshMetricsCalculator< T >::calculateBoundaryNodeNormal().

326 {
327  if(!_boundaryNodes)
328  {
329  const int nNodes = _nodes.getCount();
330  shared_ptr<Array<int> > GlobalToLocalPtr = createAndGetBNglobalToLocal();
331  Array<int>& GlobalToLocal = *GlobalToLocalPtr;
332  int BoundaryNodeCount = 0;
333  int nLocal = 0;
334  for(int i=0;i<nNodes;i++)
335  {
336  if(GlobalToLocal[i] != -1)
337  nLocal++;
338  }
339  BoundaryNodeCount = nLocal;
340  _boundaryNodes = new StorageSite(BoundaryNodeCount,0,0,0);
341  }
342  return *_boundaryNodes;
343 }
StorageSite _nodes
Definition: Mesh.h:356
shared_ptr< Array< int > > createAndGetBNglobalToLocal() const
Definition: Mesh.cpp:288
int getCount() const
Definition: StorageSite.h:39
StorageSite * _boundaryNodes
Definition: Mesh.h:359
const set<int>& Mesh::getBoundaryNodesSet ( ) const
inline

Definition at line 253 of file Mesh.h.

References _boundaryNodesSet.

253 { return _boundaryNodesSet;}
set< int > _boundaryNodesSet
Definition: Mesh.h:394
set<int>& Mesh::getBoundaryNodesSet ( )
inline

Definition at line 254 of file Mesh.h.

References _boundaryNodesSet.

254 { return _boundaryNodesSet;}
set< int > _boundaryNodesSet
Definition: Mesh.h:394
const CRConnectivity & Mesh::getCellCells ( ) const

Definition at line 480 of file Mesh.cpp.

References _cells, _connectivityMap, getAllFaceCells(), getCellFaces(), and CRConnectivity::multiply().

Referenced by addCRConn(), MeshPartitioner::cellcells_global_extension(), CellMark_Impl(), COMETModel< T >::coarsenInterfaceCells(), countCRConn(), createScatterGatherCountsBuffer(), createScatterGatherIndicesBuffer(), GradientMatrix< T_Scalar >::createScatterGatherValuesBuffer(), TrapBandTunnelingDiscretization< X, Diag, OffDiag >::discretize(), LinearizeInterfaceJump< X, Diag, OffDiag >::discretize(), LinearizeInterfaceJumpUnconnected< X, Diag, OffDiag >::discretize(), LinearizeDielectric< X, Diag, OffDiag >::discretize(), BatteryLinearizeThermalInterface< X, Diag, OffDiag >::discretize(), BatteryLinearizePotentialInterface< X, Diag, OffDiag >::discretize(), LinearizePotentialInterface< X, Diag, OffDiag >::discretize(), BatteryPCLinearizeInterface_BV< X, Diag, OffDiag, otherMeshDiag >::discretize(), BatteryLinearizeSpeciesInterface< X, Diag, OffDiag >::discretize(), LinearizeSpeciesInterface< X, Diag, OffDiag >::discretize(), InjectionDiscretization< X, Diag, OffDiag >::discretize(), TunnelingDiscretization< X, Diag, OffDiag >::discretize(), PlateSourceDiscretization< T, Diag, OffDiag >::discretizeFaces(), BatteryFixInterfaceGhost< X, Diag, OffDiag >::fixInterfaces(), getCellCells2(), getCellCellsGhostExt(), getFaceCells2(), MeshPartitioner::globalCellID_procID_map(), ElectricModel< T >::Impl::initChargeTransportLinearization(), FlowModel< T >::Impl::initContinuityLinearization(), ElectricModel< T >::Impl::initElectroStaticsLinearization(), KineticModel< T >::initKineticModelLinearization(), ThermalModel< T >::Impl::initLinearization(), FractureModel< T >::Impl::initLinearization(), VacancyModel< T >::Impl::initLinearization(), SpeciesModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearizationk(), FlowModel< T >::Impl::initMomentumLinearization(), BatteryModel< T >::Impl::initPCLinearization(), PhononModel< T >::initPhononModelLinearization(), BatteryModel< T >::Impl::initPotentialLinearization(), BatteryModel< T >::Impl::initSpeciesLinearization(), BatteryModel< T >::Impl::initThermalLinearization(), COMETModel< T >::makeCellColors(), COMETInterface< T >::makeDMMcoeffs(), IBManager::markFluid(), MeshPartitioner::set_cellcells_global(), and BatteryModel< T >::Impl::updateShellGhosts().

481 {
482  SSPair key(&_cells,&_cells);
483  ConnectivityMap::const_iterator pos = _connectivityMap.find(key);
484  if (pos != _connectivityMap.end())
485  return *pos->second;
486 
487  const CRConnectivity& faceCells = getAllFaceCells();
488  const CRConnectivity& cellFaces = getCellFaces();
489  shared_ptr<CRConnectivity> cellCells = cellFaces.multiply(faceCells,true);
490  _connectivityMap[key] = cellCells;
491  return *cellCells;
492 }
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
const CRConnectivity & getAllFaceCells() const
Definition: Mesh.cpp:378
const CRConnectivity & getCellFaces() const
Definition: Mesh.cpp:454
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
shared_ptr< CRConnectivity > multiply(const CRConnectivity &b, const bool implicitDiagonal) const
StorageSite _cells
Definition: Mesh.h:354
const CRConnectivity & Mesh::getCellCells2 ( ) const

Definition at line 495 of file Mesh.cpp.

References _cellCells2, _cellCellsGlobal, _globalToLocal, CRConnectivity::CELLCELL2, eraseConnectivity(), getCellCells(), getCells(), CRConnectivity::getCol(), StorageSite::getCount(), CRConnectivity::getCount(), StorageSite::getCountLevel1(), Array< T >::getLength(), CRConnectivity::getRow(), CRConnectivity::getRowSite(), StorageSite::getSelfCount(), and CRConnectivity::multiply().

Referenced by IBManager::createIBInterpolationStencil(), IBManager::createSolidInterpolationStencil(), PlateModel< T >::Impl::initDeformationLinearization(), and StructureModel< T >::Impl::initDeformationLinearization().

496 {
497  if (!_cellCells2)
498  {
499 #ifdef FVM_PARALLEL
500  if ( MPI::COMM_WORLD.Get_size() > 1 ) {
501  //CRConnectivity constructor
502  _cellCells2 = shared_ptr<CRConnectivity> ( new CRConnectivity(this->getCells(), this->getCells()) );
503  //initCount
504  _cellCells2->initCount();
505 
506  const int ncells = this->getCells().getCountLevel1();
507  const int selfCount = this->getCells().getSelfCount();
508 
509  const CRConnectivity& cellCells = this->getCellCells();
510  multimap<int,int>::const_iterator it0;
511  multimap<int,int>::const_iterator it1;
512  //loop over cells
513  for ( int n = 0; n < ncells; n++ ){
514  set<int> setCells;
515  for ( int k = 0; k < cellCells.getCount(n); k++ ){
516  const int cellID1 = cellCells(n,k);
517  setCells.insert( cellID1 );
518  if ( cellID1 < selfCount ){ //it means inner cells use cellCells
519  for ( int i = 0; i < cellCells.getCount(cellID1); i++ ){
520  const int cellID2 = cellCells(cellID1,i);
521  setCells.insert(cellID2);
522  }
523  } else {
524  for ( it1 = _cellCellsGlobal.equal_range(cellID1).first; it1 != _cellCellsGlobal.equal_range(cellID1).second; it1++ ){
525  const int globalCellID2 = it1->second;
526  const int localID2 = _globalToLocal.find(globalCellID2)->second;
527  if ( _globalToLocal.count(globalCellID2) > 0 )
528  setCells.insert(localID2);
529  }
530  }
531  }
532  //erase itself
533  setCells.erase(n);
534  _cellCells2->addCount(n,setCells.size());
535  }
536  //finish count
537  _cellCells2->finishCount();
538  //add cellcells2
539  //loop over cells
540  for ( int n = 0; n < ncells; n++ ){
541  set<int> setCells;
542  for ( int k = 0; k < cellCells.getCount(n); k++ ){
543  const int cellID1 = cellCells(n,k);
544  setCells.insert( cellID1 );
545  if ( cellID1 < selfCount ){ //it means inner cells use cellCells
546  for ( int i = 0; i < cellCells.getCount(cellID1); i++ ){
547  const int cellID2 = cellCells(cellID1,i);
548  setCells.insert(cellID2);
549  }
550  } else {
551  for ( it1 = _cellCellsGlobal.equal_range(cellID1).first; it1 != _cellCellsGlobal.equal_range(cellID1).second; it1++ ){
552  const int globalCellID2 = it1->second;
553  const int localID2 = _globalToLocal.find(globalCellID2)->second;
554  if ( _globalToLocal.count(globalCellID2) > 0 )
555  setCells.insert(localID2);
556  }
557  }
558  }
559  //erase itself
560  setCells.erase(n);
561  foreach ( const set<int>::value_type cellID, setCells ){
562  _cellCells2->add(n, cellID);
563  }
564  }
565  //finish add
566  _cellCells2->finishAdd();
567 
568  //unique numbering for cells to
569  {
570  const int ncount = _cellCells2->getRowSite().getCountLevel1();
571  const Array<int>& row = _cellCells2->getRow();
572  Array<int>& col = _cellCells2->getCol();
573  for( int i = 0; i < ncount; i++ ){
574  for ( int j = row[i]; j < row[i+1]; j++ ){
575  const int globalID = (*_localToGlobal)[ col[j] ];
576  col[j] = _globalToLocal[globalID];
577  }
578  }
579  }
580  //uniqing numberinf for face cells
581  {
582  CRConnectivity& faceCells = (const_cast<Mesh *>(this))->getAllFaceCells();
583  const int nfaces = faceCells.getRowSite().getCount();
584  const Array<int>& row = faceCells.getRow();
585  Array<int>& col = faceCells.getCol();
586  for( int i = 0; i < nfaces; i++ ){
587  for ( int j = row[i]; j < row[i+1]; j++ ){
588  const int globalID = (*_localToGlobal)[ col[j] ];
589  col[j] = _globalToLocal[globalID];
590  }
591  }
592  const StorageSite& cellSite = this->getCells();
593  this->eraseConnectivity(cellSite,cellSite);
594  }
595 
596 
597  //get mappers to update cellCell2 localToGlobalMap and globalToLocalMapper
598  map<int,int>& globalToLocalMapper = _cellCells2->getGlobalToLocalMapper();
599  foreach( const mapInt::value_type& mpos, _globalToLocal ){
600  globalToLocalMapper[mpos.first] = mpos.second;
601  }
602 
603  //localToGlobal need to be first created
604  _cellCells2->resizeLocalToGlobalMap( this->getCells().getCountLevel1() );
605  Array<int>& localToGlobal = *(_cellCells2->getLocalToGlobalMapPtr());
606  for ( int i = 0; i < localToGlobal.getLength(); i++ ){
607  localToGlobal[i] = (*_localToGlobal)[i];
608  }
609 
610  } else { //if it is a one processor, we want to call this version, otherwise, couplingplate has trouble
611  const CRConnectivity& cellCells = getCellCells();
612  _cellCells2 = cellCells.multiply(cellCells, true);
613  }
614 
615  //set enum as CELLCELL2
617 
618 #endif
619 
620 #ifndef FVM_PARALLEL
621  const CRConnectivity& cellCells = getCellCells();
622  _cellCells2 = cellCells.multiply(cellCells, true);
623 #endif
624 
625 
626 
627  }
628 
629  return *_cellCells2;
630 }
const Array< int > & getCol() const
int getCount(const int i) const
const Array< int > & getRow() const
int getSelfCount() const
Definition: StorageSite.h:40
map< int, int > _globalToLocal
Definition: Mesh.h:398
void eraseConnectivity(const StorageSite &rowSite, const StorageSite &colSite) const
Definition: Mesh.cpp:359
Definition: Mesh.h:49
shared_ptr< CRConnectivity > _cellCells2
Definition: Mesh.h:405
multiMap _cellCellsGlobal
Definition: Mesh.h:400
const CRConnectivity & getCellCells() const
Definition: Mesh.cpp:480
const StorageSite & getCells() const
Definition: Mesh.h:109
int getCountLevel1() const
Definition: StorageSite.h:72
shared_ptr< CRConnectivity > multiply(const CRConnectivity &b, const bool implicitDiagonal) const
int getCount() const
Definition: StorageSite.h:39
const StorageSite & getRowSite() const
int getLength() const
Definition: Array.h:87
const CRConnectivity& Mesh::getCellCellsGhostExt ( ) const
inline

Definition at line 267 of file Mesh.h.

References _cellCellsGhostExt, and getCellCells().

267  {
268 #ifdef FVM_PARALLEL
269  int numProcs = MPI::COMM_WORLD.Get_size();
270  if ( numProcs > 1 )
271  return *_cellCellsGhostExt;
272  else
273 #endif
274  return this->getCellCells();
275  }
shared_ptr< CRConnectivity > _cellCellsGhostExt
Definition: Mesh.h:389
const CRConnectivity & getCellCells() const
Definition: Mesh.cpp:480
const multiMap& Mesh::getCellCellsGlobal ( ) const
inline

Definition at line 248 of file Mesh.h.

References _cellCellsGlobal.

248 { return _cellCellsGlobal;}
multiMap _cellCellsGlobal
Definition: Mesh.h:400
const Array<int>& Mesh::getCellColors ( ) const
inline

Definition at line 229 of file Mesh.h.

References _cellColor.

229 { return *_cellColor;}
shared_ptr< Array< int > > _cellColor
Definition: Mesh.h:371
Array<int>& Mesh::getCellColorsOther ( )
inline

Definition at line 231 of file Mesh.h.

References _cellColorOther.

Referenced by MeshDismantler::getGatherArrays(), and MeshDismantler::getScatterArrays().

231 { return *_cellColorOther;}
shared_ptr< Array< int > > _cellColorOther
Definition: Mesh.h:372
const Array<int>& Mesh::getCellColorsOther ( ) const
inline

Definition at line 232 of file Mesh.h.

References _cellColorOther.

232 { return *_cellColorOther;}
shared_ptr< Array< int > > _cellColorOther
Definition: Mesh.h:372
const CRConnectivity & Mesh::getCellFaces ( ) const

Definition at line 454 of file Mesh.cpp.

References _cells, _connectivityMap, _faces, getAllFaceCells(), and CRConnectivity::getTranspose().

Referenced by COMETBoundary< T >::applyTemperatureWallFine(), CellMark_Impl(), COMETModel< T >::coarsenInterfaceCells(), COMETModel< T >::coarsenInterior(), COMETModel< T >::correctSolution(), MeshAssembler::countInterfaceNodes(), getCellCells(), COMETModel< T >::MakeCoarseMesh1(), COMETModel< T >::MakeCoarseMesh2(), and COMETInterface< T >::makeDMMcoeffs().

455 {
456  SSPair key(&_cells,&_faces);
457  ConnectivityMap::const_iterator pos = _connectivityMap.find(key);
458  if (pos != _connectivityMap.end())
459  return *pos->second;
460 
461  const CRConnectivity& faceCells = getAllFaceCells();
462  shared_ptr<CRConnectivity> cellFaces = faceCells.getTranspose();
463 
464  _connectivityMap[key] = cellFaces;
465  return *cellFaces;
466 }
StorageSite _faces
Definition: Mesh.h:355
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
const CRConnectivity & getAllFaceCells() const
Definition: Mesh.cpp:378
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
shared_ptr< CRConnectivity > getTranspose() const
StorageSite _cells
Definition: Mesh.h:354
const CRConnectivity & Mesh::getCellNodes ( ) const

Definition at line 426 of file Mesh.cpp.

References _cells, _connectivityMap, _coordinates, _faces, _nodes, getAllFaceCells(), getAllFaceNodes(), and orderCellFacesAndNodes().

Referenced by MovingMeshModel< T >::advance(), StructureDeformationModel< T >::calculateNodeDisplacement(), PlateDeformationModel< T >::calculateNodeDisplacement(), debug_mesh(), extrude(), MeshPartitioner::get_local_nodes(), PartMesh::local_nodes(), IBManager::markIntersections(), AABB::meshIntersections(), PartMesh::set_eptr_eind(), MeshPartitioner::set_eptr_eind(), MeshDismantler::setNodesMapper(), MeshDismantler::setNodesSite(), PlateDeformationModel< T >::updateBoundaryMesh(), and VTKWriter< T >::VTKWriter().

427 {
428  SSPair key(&_cells,&_nodes);
429 
430 
431 
432  ConnectivityMap::const_iterator pos = _connectivityMap.find(key);
433 
434  if (pos != _connectivityMap.end())
435  return *pos->second;
436 
437 
438  const CRConnectivity& faceCells = getAllFaceCells();
439  const CRConnectivity& faceNodes = getAllFaceNodes();
440 
441  SSPair keycf(&_cells,&_faces);
442  shared_ptr<CRConnectivity> cellFaces = faceCells.getTranspose();
443  shared_ptr<CRConnectivity> cellNodes = cellFaces->multiply(faceNodes,false);
444 
445  _connectivityMap[keycf] = cellFaces;
446  _connectivityMap[key] = cellNodes;
447 
448  orderCellFacesAndNodes(*cellFaces, *cellNodes, faceNodes,
449  faceCells, *_coordinates);
450  return *cellNodes;
451 }
const CRConnectivity & getAllFaceNodes() const
Definition: Mesh.cpp:368
StorageSite _faces
Definition: Mesh.h:355
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
void orderCellFacesAndNodes(CRConnectivity &cellFaces, CRConnectivity &cellNodes, const CRConnectivity &faceNodes, const CRConnectivity &faceCells, const Array< Vector< double, 3 > > &nodeCoordinates)
Definition: Cell.cpp:241
const CRConnectivity & getAllFaceCells() const
Definition: Mesh.cpp:378
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
StorageSite _nodes
Definition: Mesh.h:356
StorageSite _cells
Definition: Mesh.h:354
shared_ptr< Array< VecD3 > > _coordinates
Definition: Mesh.h:366
const StorageSite& Mesh::getCells ( ) const
inline

Definition at line 109 of file Mesh.h.

References _cells.

Referenced by addCRConn(), COMETInterface< T >::addFAS(), IdealGasDensityModel< T >::Impl::advance(), RosselandModel< T >::Impl::advance(), StructureModel< T >::Impl::applyBC(), COMETModel< T >::calcBandFlux(), COMETModel< T >::calcBandRelEnergy(), COMETModel< T >::calcBandTemps(), COMETModel< T >::calcDomainStats(), COMETModel< T >::calcModeFlux(), COMETModel< T >::calcModeTemps(), MeshMetricsCalculator< T >::calculateCellCentroids(), MeshMetricsCalculator< T >::calculateCellVolumes(), ElectricModel< T >::Impl::calculateEquilibriumParameters(), StructureDeformationModel< T >::calculateNodeDisplacement(), PlateDeformationModel< T >::calculateNodeDisplacement(), PlateModel< T >::Impl::calculatePlateAcceleration(), PlateModel< T >::Impl::calculatePlateVelocity(), MeshPartitioner::cellcells_global_extension(), CellMark_Impl(), COMETModel< T >::coarsenInterfaceCells(), COMETModel< T >::coarsenInterior(), COMETModel< T >::COMETModel(), PhononModel< T >::COMETupdateTL(), GradientModel< Vector< T, 3 > >::compute(), COMETModel< T >::ComputeCoarseMacroparameters(), KineticModel< T >::ComputeCollisionfrequency(), COMETModel< T >::ComputeCollisionfrequency(), COMETModel< T >::ComputeCOMETMacroparameters(), FlowModel< T >::Impl::computeContinuityResidual(), COMETModel< T >::ComputeFineMacroparameters(), MeshMetricsCalculator< T >::computeIBandSolidInterpolationMatrices(), VacancyModel< T >::Impl::computeIBFaceConcentration(), KineticModel< T >::computeIBFaceDsf(), COMETModel< T >::computeIBFaceDsf(), ElectricModel< T >::Impl::computeIBFacePotential(), ThermalModel< T >::Impl::computeIBFaceTemperature(), FlowModel< T >::Impl::computeIBFaceVelocity(), MeshMetricsCalculator< T >::computeIBInterpolationMatrices(), MeshMetricsCalculator< T >::computeIBInterpolationMatricesCells(), KineticModel< T >::ComputeMacroparameters(), COMETModel< T >::ComputeMacroparameters(), KineticModel< T >::ComputeMacroparametersESBGK(), COMETModel< T >::ComputeMacroparametersESBGK(), VacancyModel< T >::Impl::computePlasticStrainRate(), KineticModel< T >::computeSolidFaceDsf(), COMETModel< T >::computeSolidFaceDsf(), KineticModel< T >::computeSolidFacePressure(), COMETModel< T >::computeSolidFacePressure(), MeshMetricsCalculator< T >::computeSolidInterpolationMatrices(), ElectricModel< T >::Impl::computeSolidSurfaceForce(), FlowModel< T >::Impl::computeSolidSurfaceForce(), FlowModel< T >::Impl::ComputeStressTensorES(), KineticModel< T >::computeSurfaceForce(), COMETModel< T >::computeSurfaceForce(), StructureModel< T >::Impl::computeVMStress(), KineticModel< T >::ConservationofMassCheck(), COMETModel< T >::ConservationofMassCheck(), BatteryModel< T >::Impl::copyCoupledToSeparate(), BatteryModel< T >::Impl::copyPCDiffusivity(), BatteryModel< T >::Impl::copySeparateToCoupled(), KineticModel< T >::correctMassDeficit(), COMETModel< T >::correctMassDeficit(), KineticModel< T >::correctMassDeficit2(), COMETModel< T >::correctMassDeficit2(), correctMassFluxInterior(), FlowModel< T >::Impl::correctPressure(), COMETModel< T >::correctSingleNeighbor(), COMETModel< T >::correctSolution(), FlowModel< T >::Impl::correctVelocityBoundary(), FlowModel< T >::Impl::correctVelocityExplicit(), correctVelocityInterior(), countCRConn(), createDoubleShell(), IBManager::createIBFaces(), IBManager::createIBInterpolationStencil(), NcDataReader::createMappers(), FluentReader::createMesh(), createRowColSiteCRConn(), createScatterGatherCountsBuffer(), createScatterGatherIndicesBuffer(), GradientMatrix< T_Scalar >::createScatterGatherValuesBuffer(), createShell(), IBManager::createSolidInterpolationStencil(), StructureModel< T >::Impl::creepInit(), MeshPartitioner::DEBUG_cellcells_global(), MeshPartitioner::DEBUG_level1_scatter_gather_cells(), debug_mesh(), SourceDiscretization< X >::discretize(), Underrelaxer< X, Diag, OffDiag >::discretize(), BatteryPCHeatSourceDiscretization< X >::discretize(), PhononCollisionDiscretization< X, Diag, OffDiag >::discretize(), CollisionTermDiscretization< X, Diag, OffDiag >::discretize(), TrapBandTunnelingDiscretization< X, Diag, OffDiag >::discretize(), LinearizeInterfaceJump< X, Diag, OffDiag >::discretize(), LinearizeInterfaceJumpUnconnected< X, Diag, OffDiag >::discretize(), TimeDerivativeDiscretization< X, Diag, OffDiag >::discretize(), DriftDiscretization< X, Diag, OffDiag >::discretize(), SourceDiscretizationforFracture< T, Diag, OffDiag >::discretize(), GenericIBDiscretization< X, Diag, OffDiag >::discretize(), LinearizeDielectric< X, Diag, OffDiag >::discretize(), BatteryPCTimeDerivativeDiscretization< X, Diag, OffDiag >::discretize(), PhononConvectionDiscretization< X, Diag, OffDiag >::discretize(), TimeDerivativeDiscretization_Kmodel< X, Diag, OffDiag >::discretize(), IbmDiscretization< X, Diag, OffDiag >::discretize(), BatteryLinearizeThermalInterface< X, Diag, OffDiag >::discretize(), BatteryLinearizePotentialInterface< X, Diag, OffDiag >::discretize(), ConvectionDiscretization< X, Diag, OffDiag >::discretize(), LinearizePotentialInterface< X, Diag, OffDiag >::discretize(), SourceDiscretizationene< X >::discretize(), BatteryPCLinearizeInterface_BV< X, Diag, OffDiag, otherMeshDiag >::discretize(), TimeDerivativeStructureDiscretization< X, Diag, OffDiag >::discretize(), GenericKineticIBDiscretization< X, Diag, OffDiag >::discretize(), BatteryLinearizeSpeciesInterface< X, Diag, OffDiag >::discretize(), ConvectionDiscretization_Kmodel< X, Diag, OffDiag >::discretize(), LinearizeSpeciesInterface< X, Diag, OffDiag >::discretize(), MomentumPressureGradientDiscretization< X >::discretize(), TimeDerivativePlateDiscretization< X, Diag, OffDiag >::discretize(), BatteryElectricDiffusionDiscretization< X, Diag, OffDiag >::discretize(), ElecDiffusionDiscretization< X, Diag, OffDiag >::discretize(), BatteryPCBinaryElectrolyteDiscretization< X, Diag, OffDiag >::discretize(), CaptureDiscretization< X, Diag, OffDiag >::discretize(), BatteryBinaryElectrolyteDiscretization< X, Diag, OffDiag >::discretize(), DiffusionDiscretization< X, Diag, OffDiag >::discretize(), EmissionDiscretization< X, Diag, OffDiag >::discretize(), SourceDiscretizationdissi< X, Diag, OffDiag >::discretize(), InjectionDiscretization< X, Diag, OffDiag >::discretize(), TunnelingDiscretization< X, Diag, OffDiag >::discretize(), BatteryPCDiffusionDiscretization< X, Diag, OffDiag >::discretize(), WallDiscretization< X, Diag, OffDiag >::discretize(), StructurePlasticDiscretization< T, Diag, OffDiag >::discretize(), PlateSourceDiscretization< T, Diag, OffDiag >::discretize(), StructureSourceDiscretization< T, Diag, OffDiag >::discretizeFaces(), StructurePlasticDiscretization< T, Diag, OffDiag >::discretizeFaces(), PlateSourceDiscretization< T, Diag, OffDiag >::discretizeFaces(), discretizeMassFluxInterior(), DistFunctFields< X >::DistFunctFields(), COMETInterface< T >::Distribute(), FlowModel< T >::Impl::dumpContinuityMatrix(), ThermalModel< T >::Impl::dumpMatrix(), VacancyModel< T >::Impl::dumpMatrix(), PlateModel< T >::Impl::dumpMatrix(), KineticModel< T >::EntropyGeneration(), COMETModel< T >::EntropyGeneration(), COMETModel< T >::equilibrate(), KineticModel< T >::EquilibriumDistributionBGK(), COMETModel< T >::EquilibriumDistributionBGK(), KineticModel< T >::EquilibriumDistributionESBGK(), COMETModel< T >::EquilibriumDistributionESBGK(), MeshMetricsCalculator< T >::eraseIBInterpolationMatrices(), TimeDerivativeStructureDiscretization< X, Diag, OffDiag >::explicitAdvance(), extrude(), MeshDismantler::faceCellsAddBoundaryInterfaces(), MeshDismantler::faceCellsAddPartitionInterfaces(), IBManager::findNearestCellForSolidFaces(), COMETInterface< T >::findWallTemp(), COMETModel< T >::FinishCoarseMesh(), fixedFluxContinuityBC(), fixedPressureContinuityBC(), fixedPressureMomentumBC(), BatteryFixInterfaceGhost< X, Diag, OffDiag >::fixInterfaces(), ElectricModel< T >::Impl::generateBandDiagram(), GradientMatrix< T_Scalar >::get_request_size(), get_request_size(), BatteryModel< T >::Impl::getAverageConcentration(), SpeciesModel< T >::Impl::getAverageMassFraction(), COMETModel< T >::getAverageTemperature(), getCellCells2(), BatteryModel< T >::Impl::getFaceGroupVoltage(), COMETModel< T >::getLatticeTemp(), GradientModel< Vector< T, 3 > >::getLeastSquaresGradientMatrix2D(), GradientModel< Vector< T, 3 > >::getLeastSquaresGradientMatrix3D(), FluentReader::getMeshList(), BatteryModel< T >::Impl::getMeshVolume(), PlateModel< T >::Impl::getMoment(), FlowModel< T >::Impl::getMomentumDerivativeIntegral(), StructureModel< T >::Impl::getPlasticDiagStrain(), FlowModel< T >::Impl::getPressureIntegralonIBFaces(), StructureModel< T >::Impl::getStrain(), FlowModel< T >::Impl::getStressTensor(), StructureModel< T >::Impl::getTraction(), FlowModel< T >::Impl::getTraction(), COMETModel< T >::getValueArray(), KeModel< T >::Impl::getViscosity(), MeshDismantler::global_offset(), MeshPartitioner::global_offset(), MeshPartitioner::globalCellID_procID_map(), PhononModel< T >::HeatFluxIntegral(), Octree::Impl(), MeshMetricsCalculator< T >::init(), ThermalModel< T >::Impl::init(), FractureModel< T >::Impl::init(), VacancyModel< T >::Impl::init(), SpeciesModel< T >::Impl::init(), KeModel< T >::Impl::init(), PhononModel< T >::init(), KineticModel< T >::init(), ElectricModel< T >::Impl::init(), FlowModel< T >::Impl::init(), BatteryModel< T >::Impl::init(), COMETModel< T >::init(), StructureModel< T >::Impl::init(), PlateModel< T >::Impl::init(), MovingMeshModel< T >::init(), ElectricModel< T >::Impl::initChargeTransportLinearization(), COMETModel< T >::initCoarse(), FlowModel< T >::Impl::initContinuityLinearization(), PlateModel< T >::Impl::initDeformationLinearization(), StructureModel< T >::Impl::initDeformationLinearization(), ElectricModel< T >::Impl::initElectroStaticsLinearization(), COMETModel< T >::initializeCoarseMaxwellian(), KineticModel< T >::InitializeFgammaCoefficients(), COMETModel< T >::InitializeFgammaCoefficients(), COMETModel< T >::initializeFineMaxwellian(), KineticModel< T >::InitializeMacroparameters(), COMETModel< T >::InitializeMacroparameters(), DistFunctFields< X >::initializeMaxwellian(), KineticModel< T >::initializeMaxwellian(), COMETModel< T >::initializeMaxwellian(), KineticModel< T >::initializeMaxwellianEq(), COMETModel< T >::initializeMaxwellianEq(), KineticModel< T >::initKineticModelLinearization(), ThermalModel< T >::Impl::initLinearization(), FractureModel< T >::Impl::initLinearization(), VacancyModel< T >::Impl::initLinearization(), SpeciesModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearizationk(), FlowModel< T >::Impl::initMomentumLinearization(), BatteryModel< T >::Impl::initPCLinearization(), PhononModel< T >::initPhononModelLinearization(), BatteryModel< T >::Impl::initPotentialLinearization(), BatteryModel< T >::Impl::initSpeciesLinearization(), BatteryModel< T >::Impl::initThermalLinearization(), COMETModel< T >::injectResid(), FlowModel< T >::Impl::interfaceContinuityBC(), FlowModel< T >::Impl::linearizeContinuity(), PlateModel< T >::Impl::linearizeDeformation(), KeModel< T >::Impl::linearizedissipation(), ElectricModel< T >::Impl::linearizeElectroStatics(), KineticModel< T >::linearizeKineticModel(), BatteryModel< T >::Impl::linearizePC(), BatteryModel< T >::Impl::linearizePC_Thermal(), PhononModel< T >::linearizePhononModel(), BatteryModel< T >::Impl::linearizePotential(), BatteryModel< T >::Impl::linearizeThermal(), KineticModel< T >::MacroparameterIBCell(), COMETModel< T >::makeCellColors(), COMETModel< T >::MakeCoarseIndex(), COMETModel< T >::MakeCoarseMesh1(), COMETModel< T >::MakeCoarseMesh2(), COMETModel< T >::MakeCoarseModel(), COMETModel< T >::makeCoarseScatGath(), COMETInterface< T >::makeDMMcoeffs(), COMETModel< T >::makeFAS(), COMETModel< T >::makeFinestToCoarseConn(), COMETModel< T >::MakeIBCoarseModel(), COMETModel< T >::MakeInteriorCoarseMesh(), COMETModel< T >::makeNonEqTemp(), COMETModel< T >::makePlotColors(), IBManager::markFluid(), IBManager::markIBTypePlus(), IBManager::markIntersections(), IBManager::markSolid(), Mesh(), AABB::meshIntersections(), KineticModel< T >::MomentHierarchy(), COMETModel< T >::MomentHierarchy(), KineticModel< T >::NewtonsMethodBGK(), COMETModel< T >::NewtonsMethodBGK(), KineticModel< T >::NewtonsMethodESBGK(), COMETModel< T >::NewtonsMethodESBGK(), DistFunctFields< X >::OutputDistributionFunction(), COMETModel< T >::OutputDsfBLOCK(), KineticModel< T >::OutputDsfBLOCK(), KineticModel< T >::OutputDsfPOINT(), COMETModel< T >::OutputDsfPOINT(), MeshDismantler::partitionInterfaceMappers(), PhononModel< T >::PhononModel(), FlowModel< T >::Impl::postContinuitySolve(), PlateModel< T >::Impl::postPlateSolve(), pressureBoundaryPostContinuitySolve(), BatteryModel< T >::Impl::printMatrixElementsOnFace(), PhononModel< T >::printTemp(), BatteryModel< T >::Impl::recoverLastTimestep(), recvScatterGatherCountsBufferLocal(), recvScatterGatherIndicesBufferLocal(), GradientMatrix< T_Scalar >::recvScatterGatherValuesBufferLocal(), MeshPartitioner::set_cellcells_global(), MeshDismantler::setCellsMapper(), MeshDismantler::setCellsSite(), FlowModel< T >::Impl::setDirichlet(), COMETModel< T >::sete0(), MeshAssembler::setFaceCells(), MeshDismantler::setNodesMapper(), MeshDismantler::setNodesSite(), FlowModel< T >::Impl::setReferencePP(), COMETModel< T >::setStraightLine(), slipJumpMomentumBC(), FlowModel< T >::Impl::solveMomentum(), COMETModel< T >::swapGhostInfo(), syncCounts(), COMETModel< T >::syncGhostCoarsening(), syncIndices(), GradientMatrix< T_Scalar >::syncValues(), uniqueFaceCells(), IBManager::update(), PlateDeformationModel< T >::updateBoundaryMesh(), ElectricModel< T >::Impl::updateConvectionFlux(), PhononModel< T >::updatee0(), ElectricModel< T >::Impl::updateElectricField(), ElectricModel< T >::Impl::updateElectronVelocity(), updateFacePressureBoundary(), updateFacePressureInterior(), PhononModel< T >::updateHeatFlux(), BatteryModel< T >::Impl::updateShellGhosts(), MeshMetricsCalculator< T >::updateTime(), ElectricModel< T >::Impl::updateTime(), SpeciesModel< T >::Impl::updateTime(), FlowModel< T >::Impl::updateTime(), MovingMeshModel< T >::updateTime(), FractureModel< T >::Impl::updateTime(), StructureModel< T >::Impl::updateTime(), ThermalModel< T >::Impl::updateTime(), VacancyModel< T >::Impl::updateTime(), PlateModel< T >::Impl::updateTime(), BatteryModel< T >::Impl::updateTime(), COMETModel< T >::updateTime(), KineticModel< T >::updateTime(), KeModel< T >::Impl::updateTimee(), KeModel< T >::Impl::updateTimek(), PhononModel< T >::updateTL(), COMETModel< T >::updateTL(), MovingMeshModel< T >::volChange(), VTKWriter< T >::VTKWriter(), DistFunctFields< X >::weightedMaxwellian(), KineticModel< T >::weightedMaxwellian(), COMETModel< T >::weightedMaxwellian(), FluentDataExporter< T >::writeScalarField(), VTKWriter< T >::writeScalarField(), FluentDataExporter< T >::writeVectorField(), VTKWriter< T >::writeVectorField(), and COMETInterface< T >::ZeroGhost().

109 {return _cells;}
StorageSite _cells
Definition: Mesh.h:354
StorageSite& Mesh::getCells ( )
inline

Definition at line 157 of file Mesh.h.

References _cells.

157 {return _cells;}
StorageSite _cells
Definition: Mesh.h:354
int Mesh::getCellZoneID ( ) const
inline

Definition at line 319 of file Mesh.h.

References _cellZoneID.

319 { return _cellZoneID;}
int _cellZoneID
Definition: Mesh.h:352
const map<int,int>& Mesh::getCommonFacesMap ( ) const
inline

Definition at line 255 of file Mesh.h.

References _commonFacesMap.

255 { return _commonFacesMap;}
map< int, int > _commonFacesMap
Definition: Mesh.h:392
const map<int,int>& Mesh::getCommonFacesMapOther ( ) const
inline

Definition at line 256 of file Mesh.h.

References _commonFacesMapOther.

256 { return _commonFacesMapOther;}
map< int, int > _commonFacesMapOther
Definition: Mesh.h:393
ConnectivityMap& Mesh::getConnectivityMap ( )
inline

Definition at line 335 of file Mesh.h.

References _connectivityMap.

Referenced by MeshPartitioner::extractBoundaryMesh().

335 {return _connectivityMap;}
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
const CRConnectivity & Mesh::getFaceCells ( const StorageSite site) const

Definition at line 388 of file Mesh.cpp.

References _cells, _connectivityMap, CRConnectivity::createOffset(), getAllFaceCells(), StorageSite::getCount(), and StorageSite::getOffset().

Referenced by COMETModel< T >::binwiseHeatFluxIntegral(), MeshMetricsCalculator< T >::calculateCellCentroids(), MeshMetricsCalculator< T >::calculateCellVolumes(), COMETModel< T >::coarsenInterfaceCells(), COMETModel< T >::coarsenInterior(), GradientModel< Vector< T, 3 > >::compute(), FlowModel< T >::Impl::ComputeStressTensorES(), correctMassFluxInterior(), COMETModel< T >::correctSingleNeighbor(), FlowModel< T >::Impl::correctVelocityBoundary(), correctVelocityInterior(), createDoubleShell(), createShell(), LinearizeInterfaceJump< X, Diag, OffDiag >::discretize(), LinearizeInterfaceJumpUnconnected< X, Diag, OffDiag >::discretize(), BatteryLinearizePotentialInterface< X, Diag, OffDiag >::discretize(), BatteryLinearizeThermalInterface< X, Diag, OffDiag >::discretize(), LinearizePotentialInterface< X, Diag, OffDiag >::discretize(), BatteryPCLinearizeInterface_BV< X, Diag, OffDiag, otherMeshDiag >::discretize(), BatteryLinearizeSpeciesInterface< X, Diag, OffDiag >::discretize(), LinearizeSpeciesInterface< X, Diag, OffDiag >::discretize(), MomentumPressureGradientDiscretization< X >::discretize(), BatteryElectricDiffusionDiscretization< X, Diag, OffDiag >::discretize(), BatteryPCBinaryElectrolyteDiscretization< X, Diag, OffDiag >::discretize(), BatteryBinaryElectrolyteDiscretization< X, Diag, OffDiag >::discretize(), DiffusionDiscretization< X, Diag, OffDiag >::discretize(), InjectionDiscretization< X, Diag, OffDiag >::discretize(), TunnelingDiscretization< X, Diag, OffDiag >::discretize(), BatteryPCDiffusionDiscretization< X, Diag, OffDiag >::discretize(), WallDiscretization< X, Diag, OffDiag >::discretize(), StructureSourceDiscretization< T, Diag, OffDiag >::discretizeFaces(), StructurePlasticDiscretization< T, Diag, OffDiag >::discretizeFaces(), PlateSourceDiscretization< T, Diag, OffDiag >::discretizeFaces(), discretizeMassFluxInterior(), extrude(), COMETModel< T >::FinishCoarseMesh(), fixedFluxContinuityBC(), fixedPressureContinuityBC(), fixedPressureMomentumBC(), BatteryFixInterfaceGhost< X, Diag, OffDiag >::fixInterfaces(), BatteryModel< T >::Impl::getFaceGroupVoltage(), FlowModel< T >::Impl::getPressureIntegralonIBFaces(), PhononModel< T >::HeatFluxIntegral(), COMETModel< T >::HeatFluxIntegral(), COMETModel< T >::HeatFluxIntegralFace(), PhononModel< T >::init(), COMETModel< T >::init(), ElectricModel< T >::Impl::initChargeTransportLinearization(), COMETModel< T >::initCoarse(), FlowModel< T >::Impl::initContinuityLinearization(), ElectricModel< T >::Impl::initElectroStaticsLinearization(), COMETModel< T >::initFromOld(), ThermalModel< T >::Impl::initLinearization(), FractureModel< T >::Impl::initLinearization(), VacancyModel< T >::Impl::initLinearization(), SpeciesModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearizationk(), FlowModel< T >::Impl::initMomentumLinearization(), BatteryModel< T >::Impl::initPCLinearization(), BatteryModel< T >::Impl::initPotentialLinearization(), BatteryModel< T >::Impl::initSpeciesLinearization(), BatteryModel< T >::Impl::initThermalLinearization(), FlowModel< T >::Impl::interfaceContinuityBC(), FlowModel< T >::Impl::linearizeContinuity(), KeModel< T >::Impl::linearizedissipation(), KineticModel< T >::linearizeKineticModel(), PhononModel< T >::linearizePhononModel(), COMETModel< T >::MakeCoarseMesh1(), COMETModel< T >::MakeCoarseMesh2(), COMETInterface< T >::makeDMMcoeffs(), COMETModel< T >::MakeInteriorCoarseMesh(), IBManager::markIntersections(), COMETModel< T >::modewiseHeatFluxIntegral(), pressureBoundaryPostContinuitySolve(), BatteryModel< T >::Impl::printMatrixElementsOnFace(), COMETModel< T >::setLocalScatterMaps(), slipJumpMomentumBC(), COMETModel< T >::syncGhostCoarsening(), updateFacePressureBoundary(), updateFacePressureInterior(), COMETInterface< T >::updateOtherGhost(), COMETInterface< T >::updateResid(), BatteryModel< T >::Impl::updateShellGhosts(), MovingMeshModel< T >::volChange(), FluentDataExporter< T >::writeScalarField(), and FluentDataExporter< T >::writeVectorField().

389 {
390  SSPair key(&faces,&_cells);
391  ConnectivityMap::const_iterator pos = _connectivityMap.find(key);
392  if (pos != _connectivityMap.end())
393  return *pos->second;
394 
395  shared_ptr<CRConnectivity> thisFaceCells =
396  getAllFaceCells().createOffset(faces,faces.getOffset(),faces.getCount());
397  _connectivityMap[key] = thisFaceCells;
398  return *thisFaceCells;
399 }
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
const CRConnectivity & getAllFaceCells() const
Definition: Mesh.cpp:378
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
shared_ptr< CRConnectivity > createOffset(const StorageSite &newRowSite, const int offset, const int size) const
StorageSite _cells
Definition: Mesh.h:354
const CRConnectivity & Mesh::getFaceCells2 ( ) const

Definition at line 633 of file Mesh.cpp.

References _faceCells2, getAllFaceCells(), getCellCells(), and CRConnectivity::multiply().

634 {
635  if (!_faceCells2)
636  {
637  const CRConnectivity& cellCells = getCellCells();
638  const CRConnectivity& faceCells = getAllFaceCells();
639  _faceCells2 = faceCells.multiply(cellCells, false);
640  }
641  return *_faceCells2;
642 }
const CRConnectivity & getAllFaceCells() const
Definition: Mesh.cpp:378
const CRConnectivity & getCellCells() const
Definition: Mesh.cpp:480
shared_ptr< CRConnectivity > _faceCells2
Definition: Mesh.h:406
shared_ptr< CRConnectivity > multiply(const CRConnectivity &b, const bool implicitDiagonal) const
const FaceGroup & Mesh::getFaceGroup ( const int  fgId) const
int Mesh::getFaceGroupCount ( ) const
inline

Definition at line 183 of file Mesh.h.

References _faceGroups.

Referenced by debug_mesh().

183 {return _faceGroups.size();}
FaceGroupList _faceGroups
Definition: Mesh.h:362
const CRConnectivity & Mesh::getFaceNodes ( const StorageSite site) const

Definition at line 402 of file Mesh.cpp.

References _connectivityMap, _nodes, CRConnectivity::createOffset(), getAllFaceNodes(), StorageSite::getCount(), and StorageSite::getOffset().

Referenced by AABB::AABB(), MeshMetricsCalculator< T >::calculateBoundaryNodeNormal(), createAndGetBNglobalToLocal(), MeshPartitioner::extractBoundaryMesh(), extractBoundaryMesh(), extrude(), findCommonNodes(), StructureDeformationModel< T >::updateBoundaryMesh(), and VTKWriter< T >::VTKWriter().

403 {
404  SSPair key(&faces,&_nodes);
405  ConnectivityMap::const_iterator pos = _connectivityMap.find(key);
406  if (pos != _connectivityMap.end())
407  return *pos->second;
408 
409  shared_ptr<CRConnectivity> thisFaceNodes =
410  getAllFaceNodes().createOffset(faces,faces.getOffset(),faces.getCount());
411  _connectivityMap[key] = thisFaceNodes;
412  return *thisFaceNodes;
413 }
const CRConnectivity & getAllFaceNodes() const
Definition: Mesh.cpp:368
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
StorageSite _nodes
Definition: Mesh.h:356
shared_ptr< CRConnectivity > createOffset(const StorageSite &newRowSite, const int offset, const int size) const
const StorageSite& Mesh::getFaces ( ) const
inline

Definition at line 108 of file Mesh.h.

References _faces.

Referenced by COMETBoundary< T >::applyTemperatureWallFine(), MeshMetricsCalculator< T >::calculateCellCentroids(), MeshMetricsCalculator< T >::calculateCellVolumes(), MeshMetricsCalculator< T >::calculateFaceAreaMag(), MeshMetricsCalculator< T >::calculateFaceAreas(), MeshMetricsCalculator< T >::calculateFaceCentroids(), CellMark_Impl(), COMETModel< T >::coarsenInterfaceCells(), COMETModel< T >::coarsenInterior(), COMETModel< T >::COMETModel(), FlowModel< T >::Impl::computeContinuityResidual(), KineticModel< T >::computeIBFaceDsf(), COMETModel< T >::computeIBFaceDsf(), FlowModel< T >::Impl::computeIBFaceVelocity(), MeshMetricsCalculator< T >::computeIBInterpolationMatrices(), MeshMetricsCalculator< T >::computeIBInterpolationMatricesCells(), KineticModel< T >::computeSolidFaceDsf(), COMETModel< T >::computeSolidFaceDsf(), KineticModel< T >::ConservationofMassCheck(), COMETModel< T >::ConservationofMassCheck(), KineticModel< T >::correctMassDeficit(), COMETModel< T >::correctMassDeficit(), COMETModel< T >::correctSingleNeighbor(), MeshAssembler::countInterfaceNodes(), IBManager::createIBFaces(), IBManager::createIBInterpolationStencil(), FluentReader::createMesh(), IBManager::createSolidInterpolationStencil(), debug_mesh(), DriftDiscretization< X, Diag, OffDiag >::discretize(), GenericIBDiscretization< X, Diag, OffDiag >::discretize(), PhononConvectionDiscretization< X, Diag, OffDiag >::discretize(), ConvectionDiscretization< X, Diag, OffDiag >::discretize(), GenericKineticIBDiscretization< X, Diag, OffDiag >::discretize(), ConvectionDiscretization_Kmodel< X, Diag, OffDiag >::discretize(), MomentumPressureGradientDiscretization< X >::discretize(), ElecDiffusionDiscretization< X, Diag, OffDiag >::discretize(), MeshPartitioner::extractBoundaryMesh(), extractBoundaryMesh(), extrude(), IBManager::findNearestCellForSolidFaces(), COMETModel< T >::FinishCoarseMesh(), MeshAssembler::getInnerNodesCount(), GradientModel< Vector< T, 3 > >::getLeastSquaresGradientMatrix2D(), GradientModel< Vector< T, 3 > >::getLeastSquaresGradientMatrix3D(), FlowModel< T >::Impl::getMomentumFluxIntegralonIBFaces(), FlowModel< T >::Impl::getPressureIntegralonIBFaces(), MeshMetricsCalculator< T >::init(), ThermalModel< T >::Impl::init(), VacancyModel< T >::Impl::init(), SpeciesModel< T >::Impl::init(), ElectricModel< T >::Impl::init(), FlowModel< T >::Impl::init(), BatteryModel< T >::Impl::init(), COMETModel< T >::init(), MovingMeshModel< T >::init(), KineticModel< T >::MacroparameterIBCell(), COMETModel< T >::MakeCoarseMesh1(), COMETModel< T >::MakeCoarseMesh2(), COMETModel< T >::MakeInteriorCoarseMesh(), IBManager::markIntersections(), Mesh(), AABB::meshIntersections(), PhononModel< T >::PhononModel(), MeshDismantler::setFacesSite(), IBManager::update(), StructureDeformationModel< T >::updateBoundaryMesh(), PlateDeformationModel< T >::updateBoundaryMesh(), ElectricModel< T >::Impl::updateConvectionFlux(), MovingMeshModel< T >::updateTime(), MovingMeshModel< T >::volChange(), FluentDataExporter< T >::writeScalarField(), VTKWriter< T >::writeScalarField(), and VTKWriter< T >::writeVectorField().

108 {return _faces;}
StorageSite _faces
Definition: Mesh.h:355
StorageSite& Mesh::getFaces ( )
inline

Definition at line 156 of file Mesh.h.

References _faces.

156 {return _faces;}
StorageSite _faces
Definition: Mesh.h:355
const StorageSite* Mesh::getGhostCellSiteGather ( const PartIDMeshIDPair id) const
inline

Definition at line 122 of file Mesh.h.

References _ghostCellSiteGatherMap.

Referenced by NcDataReader::createMappers().

123  { return _ghostCellSiteGatherMap.find(id)->second.get(); }
GhostCellSiteMap _ghostCellSiteGatherMap
Definition: Mesh.h:378
const StorageSite* Mesh::getGhostCellSiteGatherLevel1 ( const PartIDMeshIDPair id) const
inline

Definition at line 145 of file Mesh.h.

References _ghostCellSiteGatherMapLevel1.

146  { return _ghostCellSiteGatherMapLevel1.find(id)->second.get(); }
GhostCellSiteMap _ghostCellSiteGatherMapLevel1
Definition: Mesh.h:381
GhostCellSiteMap& Mesh::getGhostCellSiteGatherMap ( )
inline

Definition at line 125 of file Mesh.h.

References _ghostCellSiteGatherMap.

126  { return _ghostCellSiteGatherMap; }
GhostCellSiteMap _ghostCellSiteGatherMap
Definition: Mesh.h:378
const GhostCellSiteMap& Mesh::getGhostCellSiteGatherMap ( ) const
inline

Definition at line 128 of file Mesh.h.

References _ghostCellSiteGatherMap.

129  { return _ghostCellSiteGatherMap; }
GhostCellSiteMap _ghostCellSiteGatherMap
Definition: Mesh.h:378
GhostCellSiteMap& Mesh::getGhostCellSiteGatherMapLevel1 ( )
inline

Definition at line 148 of file Mesh.h.

References _ghostCellSiteGatherMapLevel1.

Referenced by MeshPartitioner::DEBUG_level1_scatter_gather_cells().

GhostCellSiteMap _ghostCellSiteGatherMapLevel1
Definition: Mesh.h:381
const GhostCellSiteMap& Mesh::getGhostCellSiteGatherMapLevel1 ( ) const
inline

Definition at line 151 of file Mesh.h.

References _ghostCellSiteGatherMapLevel1.

GhostCellSiteMap _ghostCellSiteGatherMapLevel1
Definition: Mesh.h:381
const StorageSite* Mesh::getGhostCellSiteScatter ( const PartIDMeshIDPair id) const
inline

Definition at line 113 of file Mesh.h.

References _ghostCellSiteScatterMap.

Referenced by NcDataReader::createMappers(), and MeshDismantler::partitionInterfaceMappers().

114  { return _ghostCellSiteScatterMap.find(id)->second.get(); }
GhostCellSiteMap _ghostCellSiteScatterMap
Definition: Mesh.h:377
const StorageSite* Mesh::getGhostCellSiteScatterLevel1 ( const PartIDMeshIDPair id) const
inline

Definition at line 136 of file Mesh.h.

References _ghostCellSiteScatterMapLevel1.

137  { return _ghostCellSiteScatterMapLevel1.find(id)->second.get(); }
GhostCellSiteMap _ghostCellSiteScatterMapLevel1
Definition: Mesh.h:380
const GhostCellSiteMap& Mesh::getGhostCellSiteScatterMap ( ) const
inline

Definition at line 116 of file Mesh.h.

References _ghostCellSiteScatterMap.

Referenced by MeshPartitioner::globalCellID_procID_map().

117  { return _ghostCellSiteScatterMap; }
GhostCellSiteMap _ghostCellSiteScatterMap
Definition: Mesh.h:377
GhostCellSiteMap& Mesh::getGhostCellSiteScatterMap ( )
inline

Definition at line 119 of file Mesh.h.

References _ghostCellSiteScatterMap.

120  { return _ghostCellSiteScatterMap; }
GhostCellSiteMap _ghostCellSiteScatterMap
Definition: Mesh.h:377
const GhostCellSiteMap& Mesh::getGhostCellSiteScatterMapLevel1 ( ) const
inline

Definition at line 139 of file Mesh.h.

References _ghostCellSiteScatterMapLevel1.

Referenced by MeshPartitioner::DEBUG_level1_scatter_gather_cells().

GhostCellSiteMap _ghostCellSiteScatterMapLevel1
Definition: Mesh.h:380
GhostCellSiteMap& Mesh::getGhostCellSiteScatterMapLevel1 ( )
inline

Definition at line 142 of file Mesh.h.

References _ghostCellSiteScatterMapLevel1.

GhostCellSiteMap _ghostCellSiteScatterMapLevel1
Definition: Mesh.h:380
const map<int,int>& Mesh::getGlobalToLocal ( ) const
inline

Definition at line 244 of file Mesh.h.

References _globalToLocal.

244 { return _globalToLocal;}
map< int, int > _globalToLocal
Definition: Mesh.h:398
const map<int,int> Mesh::getGlobalToLocalNodes ( ) const
inline

Definition at line 235 of file Mesh.h.

References _globalToLocalNodes.

235 { return _globalToLocalNodes;}
map< int, int > _globalToLocalNodes
Definition: Mesh.h:399
map<int,int> Mesh::getGlobalToLocalNodes ( )
inline

Definition at line 236 of file Mesh.h.

References _globalToLocalNodes.

236 { return _globalToLocalNodes;}
map< int, int > _globalToLocalNodes
Definition: Mesh.h:399
const StorageSite& Mesh::getIBFaces ( ) const
inline

Definition at line 111 of file Mesh.h.

References _ibFaces.

Referenced by CellMark_Impl(), COMETESBGKDiscretizer< T >::COMETConvection(), COMETESBGKDiscretizer< T >::COMETConvectionFine(), GradientModel< Vector< T, 3 > >::compute(), VacancyModel< T >::Impl::computeIBFaceConcentration(), KineticModel< T >::computeIBFaceDsf(), COMETModel< T >::computeIBFaceDsf(), ElectricModel< T >::Impl::computeIBFacePotential(), ThermalModel< T >::Impl::computeIBFaceTemperature(), FlowModel< T >::Impl::computeIBFaceVelocity(), MeshMetricsCalculator< T >::computeIBInterpolationMatrices(), MeshMetricsCalculator< T >::computeIBInterpolationMatricesCells(), KineticModel< T >::computeSolidFaceDsf(), COMETModel< T >::computeSolidFaceDsf(), KineticModel< T >::computeSolidFacePressure(), COMETModel< T >::computeSolidFacePressure(), KineticModel< T >::correctMassDeficit(), COMETModel< T >::correctMassDeficit(), IBManager::createIBFaces(), IBManager::createIBInterpolationStencil(), IBManager::createSolidInterpolationStencil(), GenericIBDiscretization< X, Diag, OffDiag >::discretize(), GenericKineticIBDiscretization< X, Diag, OffDiag >::discretize(), discretizeMassFluxInterior(), MeshMetricsCalculator< T >::eraseIBInterpolationMatrices(), FlowModel< T >::Impl::getMomentumFluxIntegralonIBFaces(), FlowModel< T >::Impl::getPressureIntegralonIBFaces(), KineticModel< T >::MacroparameterIBCell(), COMETModel< T >::MakeCoarseMesh2(), COMETModel< T >::MakeIBCoarseModel(), markIBFaces(), COMETESBGKDiscretizer< T >::setBoundaryValFine(), and IBManager::update().

111 {return _ibFaces;}
StorageSite _ibFaces
Definition: Mesh.h:358
StorageSite& Mesh::getIBFaces ( )
inline

Definition at line 159 of file Mesh.h.

References _ibFaces.

159 {return _ibFaces;}
StorageSite _ibFaces
Definition: Mesh.h:358
int Mesh::getID ( ) const
inline

Definition at line 106 of file Mesh.h.

References _id.

Referenced by IdealGasDensityModel< T >::Impl::advance(), RosselandModel< T >::Impl::advance(), COMETModel< T >::binwiseHeatFluxIntegral(), ElectricModel< T >::Impl::calculateEquilibriumParameters(), COMETModel< T >::COMETModel(), ElectricModel< T >::Impl::computeSolidSurfaceForce(), createDoubleShell(), debug_mesh(), BatteryElectricDiffusionDiscretization< X, Diag, OffDiag >::discretize(), BatteryPCBinaryElectrolyteDiscretization< X, Diag, OffDiag >::discretize(), BatteryBinaryElectrolyteDiscretization< X, Diag, OffDiag >::discretize(), ElectricModel< T >::Impl::generateBandDiagram(), COMETModel< T >::getValueArray(), COMETModel< T >::HeatFluxIntegral(), COMETModel< T >::HeatFluxIntegralFace(), RosselandModel< T >::Impl::Impl(), IdealGasDensityModel< T >::Impl::Impl(), ThermalModel< T >::Impl::Impl(), VacancyModel< T >::Impl::Impl(), SpeciesModel< T >::Impl::Impl(), FractureModel< T >::Impl::Impl(), KeModel< T >::Impl::Impl(), BatteryModel< T >::Impl::Impl(), ElectricModel< T >::Impl::Impl(), FlowModel< T >::Impl::Impl(), StructureModel< T >::Impl::Impl(), PlateModel< T >::Impl::Impl(), ThermalModel< T >::Impl::init(), FractureModel< T >::Impl::init(), VacancyModel< T >::Impl::init(), SpeciesModel< T >::Impl::init(), KeModel< T >::Impl::init(), KineticModel< T >::init(), ElectricModel< T >::Impl::init(), FlowModel< T >::Impl::init(), BatteryModel< T >::Impl::init(), COMETModel< T >::init(), StructureModel< T >::Impl::init(), PlateModel< T >::Impl::init(), COMETModel< T >::initFromOld(), KineticModel< T >::KineticModel(), COMETModel< T >::modewiseHeatFluxIntegral(), FlowModel< T >::Impl::printMassFluxIntegrals(), BatteryModel< T >::Impl::printMatrixElementsOnFace(), FlowModel< T >::Impl::printMomentumFluxIntegrals(), FlowModel< T >::Impl::printPressureIntegrals(), KineticModel< T >::SetBoundaryConditions(), COMETModel< T >::SetBoundaryConditions(), IBManager::update(), ElectricModel< T >::Impl::updateTime(), and MovingMeshModel< T >::volChange().

106 {return _id;}
int _id
Definition: Mesh.h:349
const FaceGroupList& Mesh::getInterfaceGroups ( ) const
inline

Definition at line 190 of file Mesh.h.

References _interfaceGroups.

Referenced by PhononModel< T >::callBoundaryConditions(), KineticModel< T >::callBoundaryConditions(), COMETModel< T >::callCOMETBoundaryConditions(), MeshPartitioner::cellcells_global_extension(), BatteryModel< T >::Impl::copyCoupledToSeparate(), BatteryModel< T >::Impl::copySeparateToCoupled(), COMETModel< T >::correctSingleNeighbor(), MeshDismantler::faceCellsAddPartitionInterfaces(), MeshDismantler::faceNodesAddPartitionInterfaces(), MeshDismantler::faceNodesInit(), MeshPartitioner::gatherCellsLevel1_partID_map(), BatteryModel< T >::Impl::getHeatFluxIntegral(), MeshAssembler::getInnerNodesCount(), MeshAssembler::getInterfaceNodesCount(), MeshAssembler::getInterfaceNodesDuplicatedCount(), SpeciesModel< T >::Impl::getMassFluxIntegral(), BatteryModel< T >::Impl::getMassFluxIntegral(), ElectricModel< T >::Impl::getPotentialFluxIntegral(), BatteryModel< T >::Impl::getPotentialFluxIntegral(), ThermalModel< T >::Impl::init(), FractureModel< T >::Impl::init(), VacancyModel< T >::Impl::init(), SpeciesModel< T >::Impl::init(), KeModel< T >::Impl::init(), KineticModel< T >::init(), ElectricModel< T >::Impl::init(), BatteryModel< T >::Impl::init(), COMETModel< T >::init(), ElectricModel< T >::Impl::initChargeTransportLinearization(), COMETModel< T >::initCoarse(), FlowModel< T >::Impl::initContinuityLinearization(), ElectricModel< T >::Impl::initElectroStaticsLinearization(), ThermalModel< T >::Impl::initLinearization(), FractureModel< T >::Impl::initLinearization(), VacancyModel< T >::Impl::initLinearization(), SpeciesModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearizationk(), FlowModel< T >::Impl::initMomentumLinearization(), BatteryModel< T >::Impl::initPCLinearization(), BatteryModel< T >::Impl::initPotentialLinearization(), BatteryModel< T >::Impl::initSpeciesLinearization(), BatteryModel< T >::Impl::initThermalLinearization(), ThermalModel< T >::Impl::linearize(), FractureModel< T >::Impl::linearize(), VacancyModel< T >::Impl::linearize(), SpeciesModel< T >::Impl::linearize(), ElectricModel< T >::Impl::linearizeChargeTransport(), FlowModel< T >::Impl::linearizeContinuity(), KeModel< T >::Impl::linearizedissipation(), ElectricModel< T >::Impl::linearizeElectroStatics(), KeModel< T >::Impl::linearizeenergy(), KineticModel< T >::linearizeKineticModel(), FlowModel< T >::Impl::linearizeMomentum(), BatteryModel< T >::Impl::linearizePC(), BatteryModel< T >::Impl::linearizePC_Thermal(), BatteryModel< T >::Impl::linearizePotential(), BatteryModel< T >::Impl::linearizeSpecies(), BatteryModel< T >::Impl::linearizeThermal(), COMETModel< T >::MakeCoarseMesh2(), MeshDismantler::partitionInterfaceMappers(), FlowModel< T >::Impl::postContinuitySolve(), MeshAssembler::setFaceCells(), MeshAssembler::setFaceNodes(), and MeshAssembler::setInterfaceNodes().

191  {return _interfaceGroups;}
FaceGroupList _interfaceGroups
Definition: Mesh.h:364
const Array<int>& Mesh::getLocalToGlobal ( ) const
inline

Definition at line 241 of file Mesh.h.

References _localToGlobal.

241 { return *_localToGlobal;}
shared_ptr< Array< int > > _localToGlobal
Definition: Mesh.h:397
shared_ptr< Array<int> > Mesh::getLocalToGlobalNodesPtr ( )
inline

Definition at line 234 of file Mesh.h.

References _localToGlobalNodes.

234 { return _localToGlobalNodes;}
shared_ptr< Array< int > > _localToGlobalNodes
Definition: Mesh.h:396
shared_ptr< ArrayBase > Mesh::getLocalToGlobalPtr ( )
inline

Definition at line 239 of file Mesh.h.

References _localToGlobal.

239 { return _localToGlobal;}
shared_ptr< Array< int > > _localToGlobal
Definition: Mesh.h:397
Array<VecD3>& Mesh::getNodeCoordinates ( )
inline

Definition at line 219 of file Mesh.h.

References _coordinates.

219 {return *_coordinates;}
shared_ptr< Array< VecD3 > > _coordinates
Definition: Mesh.h:366
shared_ptr<ArrayBase> Mesh::getNodeCoordinatesPtr ( )
inline

Definition at line 220 of file Mesh.h.

References _coordinates.

220 {return _coordinates;}
shared_ptr< Array< VecD3 > > _coordinates
Definition: Mesh.h:366
StorageSite& Mesh::getNodes ( )
inline

Definition at line 158 of file Mesh.h.

References _nodes.

158 {return _nodes;}
StorageSite _nodes
Definition: Mesh.h:356
int Mesh::getNumBounCells ( )
private

Definition at line 2350 of file Mesh.cpp.

References getBoundaryFaceGroups().

Referenced by addCRConn(), countCRConn(), and createRowColSiteCRConn().

2351 {
2352  //boundary information has been stored
2353  const FaceGroupList& boundaryFaceGroups = this->getBoundaryFaceGroups();
2354  int nBounElm = 0;
2355  for ( int bounID = 0; bounID < int(boundaryFaceGroups.size()); bounID++){
2356  nBounElm += boundaryFaceGroups.at(bounID)->site.getCount();
2357  }
2358  return nBounElm;
2359 }
const FaceGroupList & getBoundaryFaceGroups() const
Definition: Mesh.h:187
vector< FaceGroupPtr > FaceGroupList
Definition: Mesh.h:47
int Mesh::getNumOfAssembleMesh ( ) const
inline

Definition at line 251 of file Mesh.h.

References _numOfAssembleMesh.

Referenced by MeshDismantler::init().

251 { return _numOfAssembleMesh;}
int _numOfAssembleMesh
Definition: Mesh.h:373
PeriodicFacePairs& Mesh::getPeriodicFacePairs ( )
inline

Definition at line 337 of file Mesh.h.

References _periodicFacePairs.

Referenced by FluentReader::createMesh(), and MeshMetricsCalculator< T >::init().

337 { return _periodicFacePairs;}
PeriodicFacePairs _periodicFacePairs
Definition: Mesh.h:423
const PeriodicFacePairs& Mesh::getPeriodicFacePairs ( ) const
inline

Definition at line 338 of file Mesh.h.

References _periodicFacePairs.

338 { return _periodicFacePairs;}
PeriodicFacePairs _periodicFacePairs
Definition: Mesh.h:423
const ArrayBase& Mesh::getRecvCounts ( const EntryIndex e) const
inline

Definition at line 280 of file Mesh.h.

References _recvCounts.

Referenced by GradientMatrix< T_Scalar >::createScatterGatherValuesBuffer(), and GradientMatrix< T_Scalar >::syncValues().

280 { return *_recvCounts[e];}
GhostArrayMap _recvCounts
Definition: Mesh.h:384
const ArrayBase& Mesh::getRecvIndices ( const EntryIndex e) const
inline

Definition at line 281 of file Mesh.h.

References _recvIndices.

Referenced by GradientMatrix< T_Scalar >::syncValues().

281 { return *_recvIndices[e];}
GhostArrayMap _recvIndices
Definition: Mesh.h:386
const ArrayBase& Mesh::getSendCounts ( const EntryIndex e) const
inline

Definition at line 277 of file Mesh.h.

References _sendCounts.

Referenced by recvScatterGatherCountsBufferLocal().

277 { return *_sendCounts[e];}
GhostArrayMap _sendCounts
Definition: Mesh.h:383
const ArrayBase& Mesh::getSendIndices ( const EntryIndex e) const
inline

Definition at line 278 of file Mesh.h.

References _sendIndices.

Referenced by recvScatterGatherIndicesBufferLocal().

278 { return *_sendIndices[e];}
GhostArrayMap _sendIndices
Definition: Mesh.h:385
shared_ptr< ArrayBase > Mesh::getUpdatedNodesCoordCoupling ( const GeomFields geomField,
const Mesh bMesh 
)

Definition at line 784 of file Mesh.cpp.

References _boundaryNodesSet, _repeatNodes, GeomFields::coordinate, StorageSite::getCount(), getNodes(), StorageSite::getScatterIndex(), and Array< T >::zero().

785 {
786  const StorageSite& nodes = this->getNodes();
787  const StorageSite& boundaryNodes = bMesh.getNodes();
788  const map<int,int>& globalToLocal = nodes.getScatterIndex().find(&boundaryNodes)->second;
789  const Array<VecD3>& fieldCoord = dynamic_cast< const Array<VecD3>& > (geomField.coordinate[nodes]);
790  shared_ptr< ArrayBase> returnCoord = geomField.coordinate[nodes].newSizedClone( boundaryNodes.getCount() );
791  Array<VecD3>& coord = dynamic_cast< Array<VecD3>& > ( *returnCoord );
792  coord.zero();
793 
794  foreach( const set<int>::value_type node, _boundaryNodesSet ){
795  const int globalNodeID = (*_localToGlobalNodes)[node];
796  const int localNodeID = globalToLocal.find(globalNodeID)->second;
797  coord[localNodeID] = fieldCoord[node] / double( (*_repeatNodes)[localNodeID] ); //this fill local partitionin mesh
798  }
799  //global reduction to find repeating nodes
800 // #ifdef FVM_PARALLEL
801 // const int count = coord.getLength() * 3;
802 // MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, coord.getData(), count, MPI::DOUBLE, MPI::SUM);
803 // #endif
804  return returnCoord;
805 }
virtual void zero()
Definition: Array.h:281
Field coordinate
Definition: GeomFields.h:19
const StorageSite & getNodes() const
Definition: Mesh.h:110
const ScatterIndex & getScatterIndex() const
Definition: StorageSite.h:61
set< int > _boundaryNodesSet
Definition: Mesh.h:394
Definition: Array.h:14
shared_ptr< Array< int > > _repeatNodes
Definition: Mesh.h:395
int getCount() const
Definition: StorageSite.h:39
void Mesh::InterfaceToBoundary ( )

Definition at line 2424 of file Mesh.cpp.

References _boundaryGroups, and _interfaceGroups.

2425 {
2426  foreach(FaceGroupPtr fgPtr, _interfaceGroups)
2427  {
2428  _boundaryGroups.push_back(fgPtr);
2429  }
2430  _interfaceGroups.clear();
2431 }
shared_ptr< FaceGroup > FaceGroupPtr
Definition: Mesh.h:46
FaceGroupList _interfaceGroups
Definition: Mesh.h:364
FaceGroupList _boundaryGroups
Definition: Mesh.h:363
bool Mesh::isMergedMesh ( ) const
inline

Definition at line 250 of file Mesh.h.

References _isAssembleMesh.

250 { return _isAssembleMesh;}
bool _isAssembleMesh
Definition: Mesh.h:374
void Mesh::recvScatterGatherCountsBufferLocal ( )

Definition at line 2050 of file Mesh.cpp.

References _recvCounts, getCells(), StorageSite::getGatherMap(), StorageSite::getGatherProcID(), StorageSite::getMesh(), and getSendCounts().

Referenced by MeshDismantler::setCellCellsGhostExt().

2051 {
2052 #ifdef FVM_PARALLEL
2053  const StorageSite& site = this->getCells();
2054  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2055  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2056  const StorageSite& oSite = *mpos.first;
2057  //checking if storage site is only site or ghost site, we only communicate ghost site ( oSite.getCount() == -1 )
2058  EntryIndex e(&oSite,&site);
2059  //allocate array
2060  //mesh interface can be done know
2061  if ( oSite.getGatherProcID() == - 1) {
2062  const Mesh& otherMesh = oSite.getMesh();
2063  *_recvCounts[e] = otherMesh.getSendCounts(e);
2064  }
2065  }
2066 #endif
2067 }
const ArrayBase & getSendCounts(const EntryIndex &e) const
Definition: Mesh.h:277
Definition: Mesh.h:49
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
GhostArrayMap _recvCounts
Definition: Mesh.h:384
int getGatherProcID() const
Definition: StorageSite.h:83
const Mesh & getMesh() const
Definition: StorageSite.h:56
const StorageSite & getCells() const
Definition: Mesh.h:109
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
void Mesh::recvScatterGatherIndicesBufferLocal ( )

Definition at line 2172 of file Mesh.cpp.

References _recvIndices, getCells(), StorageSite::getGatherMap(), StorageSite::getGatherProcID(), StorageSite::getMesh(), and getSendIndices().

Referenced by MeshDismantler::setCellCellsGhostExt().

2173 {
2174 #ifdef FVM_PARALLEL
2175  //RECIEVING allocation (filling will be done by MPI Communication)
2176  const StorageSite& site = this->getCells();
2177  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2178  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2179  const StorageSite& oSite = *mpos.first;
2180  EntryIndex e(&oSite,&site);
2181  //mesh interface can be done know
2182  if ( oSite.getGatherProcID() == - 1) {
2183  const Mesh& otherMesh = oSite.getMesh();
2184  *_recvIndices[e] = otherMesh.getSendIndices(e);
2185  }
2186  }
2187 #endif
2188 }
Definition: Mesh.h:49
const ArrayBase & getSendIndices(const EntryIndex &e) const
Definition: Mesh.h:278
GhostArrayMap _recvIndices
Definition: Mesh.h:386
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
int getGatherProcID() const
Definition: StorageSite.h:83
const Mesh & getMesh() const
Definition: StorageSite.h:56
const StorageSite & getCells() const
Definition: Mesh.h:109
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
void Mesh::setCellZoneID ( const int  id)
inline

Definition at line 320 of file Mesh.h.

References _cellZoneID.

Referenced by MeshPartitioner::construct_mesh(), and FluentReader::createMesh().

320 {_cellZoneID = id;}
int _cellZoneID
Definition: Mesh.h:352
void Mesh::setCommonFacesMap ( const Mesh bMesh)

Definition at line 810 of file Mesh.cpp.

References _commonFacesMap, _commonFacesMapOther, getAllFaceNodes(), getBoundaryFaceGroups(), StorageSite::getCount(), CRConnectivity::getCount(), getNodes(), StorageSite::getOffset(), StorageSite::getScatterIndex(), CRConnectivity::getTranspose(), and FaceGroup::site.

811 {
812  //loop over local faces
813  const StorageSite& nodes = this->getNodes();
814  const StorageSite& boundaryNodes = bMesh.getNodes();
815  const map<int,int>& globalToLocal = nodes.getScatterIndex().find(&boundaryNodes)->second;
816 
817  const CRConnectivity& faceNodes = this->getAllFaceNodes();
818  const CRConnectivity& faceNodesBMesh = bMesh.getAllFaceNodes();
819  shared_ptr<CRConnectivity> nodeFacesBMeshPtr = faceNodesBMesh.getTranspose();
820  const CRConnectivity& nodeFacesBMesh = *nodeFacesBMeshPtr;
821 
822  foreach(const FaceGroupPtr fgPtr, this->getBoundaryFaceGroups()){
823  const FaceGroup& fg = *fgPtr;
824  const StorageSite& faces = fg.site;
825  const int nFaces = faces.getCount();
826 
827  for(int f=0; f<nFaces; f++){
828  const int faceID = f + faces.getOffset();
829  const int nFaceNodes = faceNodes.getCount(faceID);
830  set<int> comp; //vector to store localIds of bMesh
831  vector<int> nodeList(nFaceNodes,0);
832  for(int nn=0; nn<nFaceNodes; nn++){
833  //get local node number
834  const int n=faceNodes(faceID,nn);
835  const int globalNodeID = (*_localToGlobalNodes)[n];
836  const int localNodeID = globalToLocal.find(globalNodeID)->second; //localID boundary mesh
837  comp.insert(localNodeID);
838  nodeList[nn] = localNodeID;
839  }
840  //now get corresponding faceID to boundaryMeshFaceID
841  //loop over nodeFaces on boundaryMesh
842  for( int i = 0; i < nFaceNodes; i++ ){
843  bool breakUpperLoop = false;
844  const int nfaces = nodeFacesBMesh.getCount(nodeList[i]);
845  //loop over faces around nodes of boundary mesh
846  for ( int j = 0; j < nfaces; j++ ){
847  const int localFaceID = nodeFacesBMesh(nodeList[i],j); //localFaceID boundary mesh
848  //check if this face is connected to our comp vector
849  const int nnodes = faceNodesBMesh.getCount(localFaceID);
850  vector<bool> matchingNodes(nFaceNodes,false);
851  for ( int k = 0; k < nnodes; k++ ){
852  const int nodeID = faceNodesBMesh(localFaceID,j);
853  if ( comp.count(nodeID) == 1 ){ //this means if this node is in search sets
854  matchingNodes[k] = true;
855  }
856  }
857  //checking if matchinNodes bools are all true
858  if ( find(matchingNodes.begin(), matchingNodes.end(), false) == matchingNodes.end() ){
859  _commonFacesMap[faceID] = localFaceID;
860  _commonFacesMapOther[localFaceID] = faceID;
861  breakUpperLoop = true;
862  break;
863  }
864  }
865  if ( breakUpperLoop ){
866  break;
867  }
868  }
869  }
870  }
871 
872 
873 }
const CRConnectivity & getAllFaceNodes() const
Definition: Mesh.cpp:368
const FaceGroupList & getBoundaryFaceGroups() const
Definition: Mesh.h:187
int getCount(const int i) const
shared_ptr< FaceGroup > FaceGroupPtr
Definition: Mesh.h:46
Definition: Mesh.h:28
const StorageSite & getNodes() const
Definition: Mesh.h:110
map< int, int > _commonFacesMapOther
Definition: Mesh.h:393
const ScatterIndex & getScatterIndex() const
Definition: StorageSite.h:61
map< int, int > _commonFacesMap
Definition: Mesh.h:392
int getOffset() const
Definition: StorageSite.h:87
shared_ptr< CRConnectivity > getTranspose() const
int getCount() const
Definition: StorageSite.h:39
StorageSite site
Definition: Mesh.h:40
void Mesh::setConnectivity ( const StorageSite rowSite,
const StorageSite colSite,
shared_ptr< CRConnectivity conn 
)

Definition at line 352 of file Mesh.cpp.

References _connectivityMap.

Referenced by CellMark_Impl(), IBManager::createIBInterpolationStencil(), IBManager::createSolidInterpolationStencil(), COMETModel< T >::FinishCoarseMesh(), COMETModel< T >::MakeCoarseMesh2(), COMETModel< T >::makeFinestToCoarseConn(), and Grid::setConnFaceToGrid().

354 {
355  SSPair key(&rowSite,&colSite);
356  _connectivityMap[key] = conn;
357 }
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
void Mesh::setCoordinates ( shared_ptr< Array< VecD3 > >  x)
inline

Definition at line 204 of file Mesh.h.

References _coordinates.

Referenced by FluentReader::createMesh(), MeshPartitioner::extractBoundaryMesh(), extractBoundaryMesh(), extrude(), and Mesh().

204 {_coordinates = x;}
shared_ptr< Array< VecD3 > > _coordinates
Definition: Mesh.h:366
void Mesh::setFaceCells ( shared_ptr< CRConnectivity faceCells)

Definition at line 654 of file Mesh.cpp.

References _cells, _connectivityMap, and _faces.

Referenced by FluentReader::createMesh().

655 {
656 
657 
658  SSPair key(&_faces,&_cells);
659  _connectivityMap[key] = faceCells;
660 
661 
662 }
StorageSite _faces
Definition: Mesh.h:355
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
StorageSite _cells
Definition: Mesh.h:354
void Mesh::setFaceNodes ( shared_ptr< CRConnectivity faceNodes)

Definition at line 646 of file Mesh.cpp.

References _connectivityMap, _faces, and _nodes.

Referenced by FluentReader::createMesh().

647 {
648  SSPair key(&_faces,&_nodes);
649  _connectivityMap[key] = faceNodes;
650 }
StorageSite _faces
Definition: Mesh.h:355
ConnectivityMap _connectivityMap
Definition: Mesh.h:365
pair< const StorageSite *, const StorageSite * > SSPair
Definition: Mesh.h:60
StorageSite _nodes
Definition: Mesh.h:356
void Mesh::setIBFaces ( shared_ptr< Array< int > >  faceList)
inline

Definition at line 290 of file Mesh.h.

References _ibFaceList.

Referenced by IBManager::createIBFaces().

290 {_ibFaceList = faceList;}
shared_ptr< Array< int > > _ibFaceList
Definition: Mesh.h:369
void Mesh::setID ( const int  id)
inline

Definition at line 321 of file Mesh.h.

References _id.

Referenced by PartMesh::construct_mesh(), MeshPartitioner::construct_mesh(), and COMETModel< T >::MakeInteriorCoarseMesh().

321 {_id = id;}
int _id
Definition: Mesh.h:349
void Mesh::setNodeRepeationArrayCoupling ( const Mesh bMesh)

Definition at line 753 of file Mesh.cpp.

References _boundaryNodesSet, _repeatNodes, StorageSite::getCount(), getNodes(), and StorageSite::getScatterIndex().

754 {
755  const StorageSite& nodes = this->getNodes();
756  const StorageSite& boundaryNodes = bMesh.getNodes();
757  const map<int,int>& globalToLocal = nodes.getScatterIndex().find(&boundaryNodes)->second;
758  //create repeatNodes array
759  _repeatNodes = shared_ptr< Array<int> > ( new Array<int> ( boundaryNodes.getCount() ) );
760  *_repeatNodes = 0;
761  foreach( const set<int>::value_type& node, _boundaryNodesSet ){
762  const int globalNodeID = (*_localToGlobalNodes)[node]; //from local parition mesh to global number
763  const int localNodeID = globalToLocal.find(globalNodeID)->second; //from global node id to local id in boundary mesh
764  (*_repeatNodes)[localNodeID] = 1; //this fill local partitionin mesh
765  }
766 
767  //global reduction to find repeating nodes
768 #ifdef FVM_PARALLEL
769  MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, _repeatNodes->getData(),_repeatNodes->getLength(), MPI::INT, MPI::SUM);
770 #endif
771 
772 // if ( MPI::COMM_WORLD.Get_rank() == 0 )
773 // for( int i = 0; i < _repeatNodes->getLength(); i++ ){
774 // if ( (*_repeatNodes)[i] > 1 )
775 // cout << "repeatNodes[" << i << "] = " << (*_repeatNodes)[i] << endl;
776 // }
777 
778 
779 
780 
781 }
const StorageSite & getNodes() const
Definition: Mesh.h:110
const ScatterIndex & getScatterIndex() const
Definition: StorageSite.h:61
set< int > _boundaryNodesSet
Definition: Mesh.h:394
shared_ptr< Array< int > > _repeatNodes
Definition: Mesh.h:395
int getCount() const
Definition: StorageSite.h:39
void Mesh::setNumOfAssembleMesh ( int  nmesh)
inline

Definition at line 222 of file Mesh.h.

References _numOfAssembleMesh.

222 { _numOfAssembleMesh = nmesh; }
int _numOfAssembleMesh
Definition: Mesh.h:373
void Mesh::syncCounts ( )

Definition at line 2072 of file Mesh.cpp.

References _recvCounts, _sendCounts, get_request_size(), getCells(), ArrayBase::getData(), ArrayBase::getDataSize(), StorageSite::getGatherMap(), StorageSite::getGatherProcID(), StorageSite::getScatterMap(), and StorageSite::getTag().

Referenced by MeshDismantler::setCellCellsGhostExt().

2073 {
2074 #ifdef FVM_PARALLEL
2075  //SENDING
2076  const int request_size = get_request_size();
2077  MPI::Request request_send[ request_size ];
2078  MPI::Request request_recv[ request_size ];
2079  int indxSend = 0;
2080  int indxRecv = 0;
2081  const StorageSite& site = this->getCells();
2082  const StorageSite::ScatterMap& scatterMap = site.getScatterMap();
2083  foreach(const StorageSite::ScatterMap::value_type& mpos, scatterMap){
2084  const StorageSite& oSite = *mpos.first;
2085  EntryIndex e(&site,&oSite);
2086  //checking if storage site is only site or ghost site, we only communicate ghost site ( oSite.getCount() == -1 )
2087  ArrayBase& sendArray = *_sendCounts[e];
2088 
2089  //loop over surround indices and itself
2090  int to_where = oSite.getGatherProcID();
2091  if ( to_where != -1 ){
2092  int mpi_tag = oSite.getTag();
2093  request_send[indxSend++] =
2094  MPI::COMM_WORLD.Isend( sendArray.getData(), sendArray.getDataSize(), MPI::BYTE, to_where, mpi_tag );
2095  }
2096  }
2097  //RECIEVING
2098  //getting values from other meshes to fill g
2099  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2100  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2101  const StorageSite& oSite = *mpos.first;
2102  //checking if storage site is only site or ghost site, we only communicate ghost site ( oSite.getCount() == -1 )
2103  EntryIndex e(&oSite,&site);
2104  ArrayBase& recvArray = *_recvCounts[e];
2105  int from_where = oSite.getGatherProcID();
2106  if ( from_where != -1 ){
2107  int mpi_tag = oSite.getTag();
2108  request_recv[indxRecv++] =
2109  MPI::COMM_WORLD.Irecv( recvArray.getData(), recvArray.getDataSize(), MPI::BYTE, from_where, mpi_tag );
2110  }
2111  }
2112 
2113  int count = get_request_size();
2114  MPI::Request::Waitall( count, request_recv );
2115  MPI::Request::Waitall( count, request_send );
2116 
2117 #endif
2118 
2119 }
virtual int getDataSize() const =0
int get_request_size()
Definition: Mesh.cpp:2363
GhostArrayMap _sendCounts
Definition: Mesh.h:383
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
int getTag() const
Definition: StorageSite.h:84
GhostArrayMap _recvCounts
Definition: Mesh.h:384
int getGatherProcID() const
Definition: StorageSite.h:83
const StorageSite & getCells() const
Definition: Mesh.h:109
const ScatterMap & getScatterMap() const
Definition: StorageSite.h:58
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
Definition: StorageSite.h:23
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
virtual void * getData() const =0
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
void Mesh::syncIndices ( )

Definition at line 2191 of file Mesh.cpp.

References _recvIndices, _sendIndices, get_request_size(), getCells(), ArrayBase::getData(), ArrayBase::getDataSize(), StorageSite::getGatherMap(), StorageSite::getGatherProcID(), StorageSite::getScatterMap(), and StorageSite::getTag().

Referenced by MeshDismantler::setCellCellsGhostExt().

2192 {
2193 #ifdef FVM_PARALLEL
2194  //SENDING
2195  const int request_size = get_request_size();
2196  MPI::Request request_send[ request_size ];
2197  MPI::Request request_recv[ request_size ];
2198  int indxSend = 0;
2199  int indxRecv = 0;
2200  const StorageSite& site = this->getCells();
2201  const StorageSite::ScatterMap& scatterMap = site.getScatterMap();
2202  foreach(const StorageSite::ScatterMap::value_type& mpos, scatterMap){
2203  const StorageSite& oSite = *mpos.first;
2204  EntryIndex e(&site,&oSite);
2205  //checking if storage site is only site or ghost site, we only communicate ghost site ( oSite.getCount() == -1 )
2206  ArrayBase& sendArray = *_sendIndices[e];
2207  //loop over surround indices and itself
2208  int to_where = oSite.getGatherProcID();
2209  if ( to_where != -1 ){
2210  int mpi_tag = oSite.getTag();
2211  request_send[indxSend++] =
2212  MPI::COMM_WORLD.Isend( sendArray.getData(), sendArray.getDataSize(), MPI::BYTE, to_where, mpi_tag );
2213  }
2214  }
2215  //RECIEVING
2216  //getting values from other meshes to fill g
2217  const StorageSite::GatherMap& gatherMap = site.getGatherMap();
2218  foreach(const StorageSite::GatherMap::value_type& mpos, gatherMap){
2219  const StorageSite& oSite = *mpos.first;
2220  EntryIndex e(&oSite,&site);
2221  ArrayBase& recvArray = *_recvIndices[e];
2222  int from_where = oSite.getGatherProcID();
2223  if ( from_where != -1 ){
2224  int mpi_tag = oSite.getTag();
2225  request_recv[indxRecv++] =
2226  MPI::COMM_WORLD.Irecv( recvArray.getData(), recvArray.getDataSize(), MPI::BYTE, from_where, mpi_tag );
2227  }
2228  }
2229 
2230  int count = get_request_size();
2231  MPI::Request::Waitall( count, request_recv );
2232  MPI::Request::Waitall( count, request_send );
2233 #endif
2234 
2235 }
virtual int getDataSize() const =0
int get_request_size()
Definition: Mesh.cpp:2363
GhostArrayMap _recvIndices
Definition: Mesh.h:386
pair< const StorageSite *, const StorageSite * > EntryIndex
Definition: Mesh.h:64
int getTag() const
Definition: StorageSite.h:84
int getGatherProcID() const
Definition: StorageSite.h:83
const StorageSite & getCells() const
Definition: Mesh.h:109
const ScatterMap & getScatterMap() const
Definition: StorageSite.h:58
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
Definition: StorageSite.h:23
const GatherMap & getGatherMap() const
Definition: StorageSite.h:59
virtual void * getData() const =0
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
Definition: StorageSite.h:24
GhostArrayMap _sendIndices
Definition: Mesh.h:385
void Mesh::uniqueFaceCells ( )

Definition at line 666 of file Mesh.cpp.

References _globalToLocal, eraseConnectivity(), getCells(), CRConnectivity::getCol(), StorageSite::getCount(), CRConnectivity::getRow(), and CRConnectivity::getRowSite().

667 {
668  //uniqing numberinf for face cells
669  {
670  CRConnectivity& faceCells = (const_cast<Mesh *>(this))->getAllFaceCells();
671  const int nfaces = faceCells.getRowSite().getCount();
672  const Array<int>& row = faceCells.getRow();
673  Array<int>& col = faceCells.getCol();
674  for( int i = 0; i < nfaces; i++ ){
675  for ( int j = row[i]; j < row[i+1]; j++ ){
676  const int globalID = (*_localToGlobal)[ col[j] ];
677  col[j] = _globalToLocal[globalID];
678  }
679  }
680  const StorageSite& cellSite = this->getCells();
681  this->eraseConnectivity(cellSite,cellSite);
682  }
683 }
const Array< int > & getCol() const
const Array< int > & getRow() const
map< int, int > _globalToLocal
Definition: Mesh.h:398
void eraseConnectivity(const StorageSite &rowSite, const StorageSite &colSite) const
Definition: Mesh.cpp:359
Definition: Mesh.h:49
const StorageSite & getCells() const
Definition: Mesh.h:109
int getCount() const
Definition: StorageSite.h:39
const StorageSite & getRowSite() const

Member Data Documentation

FaceGroupList Mesh::_boundaryGroups
protected
shared_ptr<Array<int> > Mesh::_boundaryNodeGlobalToLocalPtr
mutableprotected

Definition at line 367 of file Mesh.h.

Referenced by createAndGetBNglobalToLocal().

StorageSite* Mesh::_boundaryNodes
mutableprotected

Definition at line 359 of file Mesh.h.

Referenced by getBoundaryNodes().

set<int> Mesh::_boundaryNodesSet
protected
shared_ptr<CRConnectivity> Mesh::_cellCells2
mutableprotected

Definition at line 405 of file Mesh.h.

Referenced by getCellCells2().

shared_ptr<CRConnectivity> Mesh::_cellCellsGhostExt
protected

Definition at line 389 of file Mesh.h.

Referenced by addCRConn(), countCRConn(), createRowColSiteCRConn(), and getCellCellsGhostExt().

multiMap Mesh::_cellCellsGlobal
protected

Definition at line 400 of file Mesh.h.

Referenced by getCellCells2(), and getCellCellsGlobal().

shared_ptr< Array<int> > Mesh::_cellColor
protected

Definition at line 371 of file Mesh.h.

Referenced by createCellColor(), and getCellColors().

shared_ptr< Array<int> > Mesh::_cellColorOther
protected

Definition at line 372 of file Mesh.h.

Referenced by createCellColor(), and getCellColorsOther().

shared_ptr<StorageSite> Mesh::_cellSiteGhostExt
protected

Definition at line 388 of file Mesh.h.

Referenced by createRowColSiteCRConn().

int Mesh::_cellZoneID
protected

Definition at line 352 of file Mesh.h.

Referenced by getCellZoneID(), and setCellZoneID().

map<int,int> Mesh::_commonFacesMap
protected

Definition at line 392 of file Mesh.h.

Referenced by getCommonFacesMap(), and setCommonFacesMap().

map<int,int> Mesh::_commonFacesMapOther
protected

Definition at line 393 of file Mesh.h.

Referenced by getCommonFacesMapOther(), and setCommonFacesMap().

shared_ptr<Array<VecD3> > Mesh::_coordinates
protected

Definition at line 366 of file Mesh.h.

Referenced by getCellNodes(), getNodeCoordinates(), getNodeCoordinatesPtr(), and setCoordinates().

const int Mesh::_dimension
protected

Definition at line 346 of file Mesh.h.

Referenced by createDoubleShell(), createShell(), extractBoundaryMesh(), extrude(), getDimension(), and Mesh().

shared_ptr<CRConnectivity> Mesh::_faceCells2
mutableprotected

Definition at line 406 of file Mesh.h.

Referenced by getFaceCells2().

FaceGroupList Mesh::_faceGroups
protected
GhostCellSiteMap Mesh::_ghostCellSiteGatherMap
protected
GhostCellSiteMap Mesh::_ghostCellSiteGatherMapLevel1
protected
GhostCellSiteMap Mesh::_ghostCellSiteScatterMap
protected
GhostCellSiteMap Mesh::_ghostCellSiteScatterMapLevel1
protected
map<int,int> Mesh::_globalToLocal
mutableprotected

Definition at line 398 of file Mesh.h.

Referenced by getCellCells2(), getGlobalToLocal(), and uniqueFaceCells().

map<int,int> Mesh::_globalToLocalNodes
mutableprotected

Definition at line 399 of file Mesh.h.

Referenced by getGlobalToLocalNodes().

shared_ptr<Array<int> > Mesh::_ibFaceList
mutableprotected

Definition at line 369 of file Mesh.h.

Referenced by getIBFaceList(), and setIBFaces().

StorageSite Mesh::_ibFaces
protected

Definition at line 358 of file Mesh.h.

Referenced by getIBFaces().

int Mesh::_id
protected

Definition at line 349 of file Mesh.h.

Referenced by getID(), and setID().

FaceGroupList Mesh::_interfaceGroups
protected
shared_ptr<FaceGroup> Mesh::_interiorFaceGroup
protected

Definition at line 361 of file Mesh.h.

Referenced by createInteriorFaceGroup(), extrude(), and getInteriorFaceGroup().

bool Mesh::_isAssembleMesh
protected

Definition at line 374 of file Mesh.h.

Referenced by createCellColor(), and isMergedMesh().

bool Mesh::_isConnectedShell
protected

Definition at line 410 of file Mesh.h.

Referenced by createDoubleShell(), and isConnectedShell().

bool Mesh::_isDoubleShell
protected

Definition at line 409 of file Mesh.h.

Referenced by createDoubleShell(), and isDoubleShell().

bool Mesh::_isShell
protected

Definition at line 408 of file Mesh.h.

Referenced by createDoubleShell(), createShell(), and isShell().

int Mesh::_lastID = 0
staticprotected

Definition at line 421 of file Mesh.h.

shared_ptr< Array<int> > Mesh::_localToGlobal
protected

Definition at line 397 of file Mesh.h.

Referenced by createLocalGlobalArray(), getLocalToGlobal(), and getLocalToGlobalPtr().

shared_ptr< Array<int> > Mesh::_localToGlobalNodes
protected

Definition at line 396 of file Mesh.h.

Referenced by createLocalToGlobalNodesArray(), and getLocalToGlobalNodesPtr().

int Mesh::_numOfAssembleMesh
protected

Definition at line 373 of file Mesh.h.

Referenced by getNumOfAssembleMesh(), and setNumOfAssembleMesh().

const StorageSite* Mesh::_otherFaceGroupSite
protected

Definition at line 417 of file Mesh.h.

Referenced by createDoubleShell(), and getOtherFaceGroupSite().

int Mesh::_otherMeshID
protected

Definition at line 419 of file Mesh.h.

Referenced by createDoubleShell(), and getOtherMeshID().

const StorageSite* Mesh::_parentFaceGroupSite
protected

Definition at line 416 of file Mesh.h.

Referenced by createDoubleShell(), createShell(), and getParentFaceGroupSite().

int Mesh::_parentMeshID
protected

Definition at line 418 of file Mesh.h.

Referenced by createDoubleShell(), and getParentMeshID().

PeriodicFacePairs Mesh::_periodicFacePairs
protected

Definition at line 423 of file Mesh.h.

Referenced by getPeriodicFacePairs().

shared_ptr< Array<int> > Mesh::_repeatNodes
protected

Definition at line 395 of file Mesh.h.

Referenced by getUpdatedNodesCoordCoupling(), and setNodeRepeationArrayCoupling().

GhostArrayMap Mesh::_sendCounts
mutableprotected

Definition at line 383 of file Mesh.h.

Referenced by createScatterGatherCountsBuffer(), getSendCounts(), and syncCounts().

GhostArrayMap Mesh::_sendIndices
mutableprotected

Definition at line 385 of file Mesh.h.

Referenced by createScatterGatherIndicesBuffer(), getSendIndices(), and syncIndices().

enum { ... } Mesh::CellType

The documentation for this class was generated from the following files: