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

Function getBestQueryGenerator

src/Initializer/ParameterDB.cpp:651–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651QueryGenerator* getBestQueryGenerator(bool anelasticity,
652 bool plasticity,
653 bool anisotropy,
654 bool poroelasticity,
655 bool useCellHomogenizedMaterial,
656 const CellToVertexArray& cellToVertex) {
657 QueryGenerator* queryGen = nullptr;
658 if (!useCellHomogenizedMaterial) {
659 queryGen = new ElementBarycentreGenerator(cellToVertex);
660 } else {
661 const auto rank = MPI::mpi.rank();
662 if (anisotropy) {
663 logWarning(rank)
664 << "Material Averaging is not implemented for anisotropic materials. Falling back to "
665 "material properties sampled from the element barycenters instead.";
666 queryGen = new ElementBarycentreGenerator(cellToVertex);
667 } else if (plasticity) {
668 logWarning(rank)
669 << "Material Averaging is not implemented for plastic materials. Falling back to "
670 "material properties sampled from the element barycenters instead.";
671 queryGen = new ElementBarycentreGenerator(cellToVertex);
672 } else if (poroelasticity) {
673 logWarning(rank)
674 << "Material Averaging is not implemented for poroelastic materials. Falling back to "
675 "material properties sampled from the element barycenters instead.";
676 queryGen = new ElementBarycentreGenerator(cellToVertex);
677 } else {
678 queryGen = new ElementAverageGenerator(cellToVertex);
679 }
680 }
681 return queryGen;
682}
683
684template class MaterialParameterDB<seissol::model::AnisotropicMaterial>;
685template class MaterialParameterDB<seissol::model::ElasticMaterial>;

Callers 2

initializeCellMaterialFunction · 0.85
computeTimestepsFunction · 0.85

Calls 1

rankMethod · 0.80

Tested by

no test coverage detected