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

Function initializeClusteredLts

src/Initializer/InitProcedure/InitModel.cpp:271–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271void initializeClusteredLts(LtsInfo& ltsInfo, seissol::SeisSol& seissolInstance) {
272 const auto& seissolParams = seissolInstance.getSeisSolParameters();
273
274 assert(seissolParams.timeStepping.lts.getRate() > 0);
275
276 if (seissolParams.timeStepping.lts.getRate() == 1) {
277 seissolInstance.getLtsLayout().deriveLayout(TimeClustering::Single, 1);
278 } else {
279 seissolInstance.getLtsLayout().deriveLayout(TimeClustering::MultiRate,
280 seissolParams.timeStepping.lts.getRate());
281 }
282
283 seissolInstance.getLtsLayout().getMeshStructure(ltsInfo.meshStructure);
284 seissolInstance.getLtsLayout().getCrossClusterTimeStepping(ltsInfo.timeStepping);
285
286 seissolInstance.getMemoryManager().initializeFrictionLaw();
287
288 unsigned* numberOfDRCopyFaces = nullptr;
289 unsigned* numberOfDRInteriorFaces = nullptr;
290
291 seissolInstance.getLtsLayout().getDynamicRuptureInformation(
292 ltsInfo.ltsMeshToFace, numberOfDRCopyFaces, numberOfDRInteriorFaces);
293
294 seissolInstance.getMemoryManager().fixateLtsTree(ltsInfo.timeStepping,
295 ltsInfo.meshStructure,
296 numberOfDRCopyFaces,
297 numberOfDRInteriorFaces,
298 seissolParams.model.plasticity);
299
300 seissolInstance.getMemoryManager().setLtsToFace(ltsInfo.ltsMeshToFace);
301
302 delete[] numberOfDRCopyFaces;
303 delete[] numberOfDRInteriorFaces;
304
305 const auto& ltsTree = seissolInstance.getMemoryManager().getLtsTree();
306 const auto& lts = seissolInstance.getMemoryManager().getLts();
307
308 unsigned* ltsToMesh = nullptr;
309 unsigned numberOfMeshCells = 0;
310
311 seissolInstance.getLtsLayout().getCellInformation(
312 ltsTree->var(lts->cellInformation), ltsToMesh, numberOfMeshCells);
313
314 // TODO(David): move all of this method to the MemoryManager
315 seissolInstance.getMemoryManager().getLtsLutUnsafe().createLuts(
316 ltsTree, ltsToMesh, numberOfMeshCells);
317
318 delete[] ltsToMesh;
319
320 seissol::initializer::time_stepping::deriveLtsSetups(ltsInfo.timeStepping.numberOfLocalClusters,
321 ltsInfo.meshStructure,
322 ltsTree->var(lts->cellInformation));
323}
324
325void initializeMemoryLayout(LtsInfo& ltsInfo, seissol::SeisSol& seissolInstance) {
326 const auto& seissolParams = seissolInstance.getSeisSolParameters();

Callers 1

initModelMethod · 0.85

Calls 14

deriveLtsSetupsFunction · 0.85
getRateMethod · 0.80
deriveLayoutMethod · 0.80
getMeshStructureMethod · 0.80
initializeFrictionLawMethod · 0.80
fixateLtsTreeMethod · 0.80
setLtsToFaceMethod · 0.80
getLtsTreeMethod · 0.80
getLtsMethod · 0.80
getCellInformationMethod · 0.80

Tested by

no test coverage detected