| 649 | } |
| 650 | |
| 651 | QueryGenerator* 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 | |
| 684 | template class MaterialParameterDB<seissol::model::AnisotropicMaterial>; |
| 685 | template class MaterialParameterDB<seissol::model::ElasticMaterial>; |
no test coverage detected