MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / correctGhostRegionSetups

Method correctGhostRegionSetups

src/Initializer/MemoryManager.cpp:131–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void seissol::initializer::MemoryManager::correctGhostRegionSetups()
132{
133 for (unsigned tc = 0; tc < m_ltsTree.numChildren(); ++tc) {
134 Layer& ghost = m_ltsTree.child(tc).child<Ghost>();
135 CellLocalInformation* cellInformation = ghost.var(m_lts.cellInformation);
136
137 unsigned int l_offset = 0;
138 for( unsigned int l_region = 0; l_region < m_meshStructure[tc].numberOfRegions; l_region++ ) {
139 // iterate over ghost cells
140 for( unsigned int l_cell = 0; l_cell < m_meshStructure[tc].numberOfGhostRegionCells[l_region]; l_cell++ ) {
141 if( l_cell < m_meshStructure[tc].numberOfGhostRegionDerivatives[l_region] ) {
142 // assert the cell provides derivatives
143 assert( (cellInformation[l_offset+l_cell].ltsSetup >> 9)%2 );
144
145 // reset possible buffers
146 cellInformation[l_offset+l_cell].ltsSetup &= ( ~(1 << 8 ) );
147 cellInformation[l_offset+l_cell].ltsSetup &= ( ~(1 << 10) );
148 } else {
149 // assert the cell provides buffers
150 assert( (cellInformation[l_offset+l_cell].ltsSetup >> 8)%2 );
151
152 // reset possible derivatives
153 cellInformation[l_offset+l_cell].ltsSetup &= ( ~(1 << 9 ) );
154 }
155 }
156 // update offset with ghost region size
157 l_offset += m_meshStructure[tc].numberOfGhostRegionCells[l_region];
158 }
159 }
160}
161
162void seissol::initializer::MemoryManager::deriveLayerLayouts() {
163 // initialize memory

Callers

nothing calls this directly

Calls 2

numChildrenMethod · 0.80
varMethod · 0.45

Tested by

no test coverage detected