| 269 | } |
| 270 | |
| 271 | void 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 | |
| 325 | void initializeMemoryLayout(LtsInfo& ltsInfo, seissol::SeisSol& seissolInstance) { |
| 326 | const auto& seissolParams = seissolInstance.getSeisSolParameters(); |
no test coverage detected