diff --git a/Tests/MeshLib/ElementUtils.h b/Tests/MeshLib/ElementUtils.h index 5409c08504d54eb214a847f9e8eb68e06079aef6..374417fe4c2ab71438b976497fc0a997a14da733 100644 --- a/Tests/MeshLib/ElementUtils.h +++ b/Tests/MeshLib/ElementUtils.h @@ -61,7 +61,7 @@ inline std::unique_ptr<MeshLib::Element const> getFace( } } - OGS_FATAL("Unsupported element dimension: " + std::to_string(dim)); + OGS_FATAL("Unsupported element dimension: {}", dim); } template <typename BulkElementRule> diff --git a/Tests/MeshLib/UnitCube.h b/Tests/MeshLib/UnitCube.h index 675527a0a0df0c77e5fede74e54983b940be49a3..bfbbdf08021ef91870b7d87e33cd5d5c70f70349 100644 --- a/Tests/MeshLib/UnitCube.h +++ b/Tests/MeshLib/UnitCube.h @@ -44,7 +44,7 @@ inline VTKCellType toVtk(MeshLib::CellType const cell_type) case CellType::PYRAMID5: return VTK_PYRAMID; default: - OGS_FATAL("Unsupported cell type " + CellType2String(cell_type)); + OGS_FATAL("Unsupported cell type {}", CellType2String(cell_type)); } } @@ -66,10 +66,10 @@ inline void checkBounds(vtkUnstructuredGrid& grid, std::size_t const dim) if (min != -0.5 || max != 0.5) { - OGS_FATAL("Unexpected bounds for a unit cube. " + - std::to_string(min) + " != -0.5 or " + - std::to_string(max) + " != 0.5 for component " + - std::to_string(c) + '.'); + OGS_FATAL( + "Unexpected bounds for a unit cube. {} != -0.5 or {} != 0.5 " + "for component {}.", + min, max, c); } } } @@ -82,9 +82,9 @@ inline void checkCellTypes(MeshLib::Mesh const& mesh, auto const& e = *mesh.getElement(i); if (e.getCellType() != cell_type) { - OGS_FATAL("Unexpected element type: " + - MeshLib::CellType2String(e.getCellType()) + - " != " + MeshLib::CellType2String(cell_type)); + OGS_FATAL("Unexpected element type: {} != {}", + MeshLib::CellType2String(e.getCellType()), + MeshLib::CellType2String(cell_type)); } } } @@ -103,9 +103,9 @@ inline void checkVolume(MeshLib::Mesh const& mesh) if (diff > tol) { OGS_FATAL( - "The volume of a unit cube must be 1. Instead, the volume is " + - std::to_string(volume) + ". The difference is " + - std::to_string(diff) + " > " + std::to_string(tol) + '.'); + "The volume of a unit cube must be 1. Instead, the volume is {}. " + "The difference is {:g} > {:g}", + volume, diff, tol); } } diff --git a/Tests/NumLib/ReferenceElementUtils.cpp b/Tests/NumLib/ReferenceElementUtils.cpp index 3a2cc47d1e308cee7f55bd1bf867ab64407ca897..5eb5e4669ff252dd1ff19ce68a92ac0e5ab4251c 100644 --- a/Tests/NumLib/ReferenceElementUtils.cpp +++ b/Tests/NumLib/ReferenceElementUtils.cpp @@ -53,7 +53,7 @@ getNodeCoordsOfReferenceElement(MeshLib::CellType const cell_type) case CellType::PYRAMID13: return getNodeCoordsOfReferenceElement<Pyramid13>(); default: - OGS_FATAL("Unsupported cell type " + CellType2String(cell_type)); + OGS_FATAL("Unsupported cell type {}", CellType2String(cell_type)); } } @@ -104,7 +104,7 @@ std::shared_ptr<MeshLib::Element const> getReferenceElement( case CellType::PYRAMID13: return create(Type<Pyramid13>{}); default: - OGS_FATAL("Unsupported cell type " + CellType2String(cell_type)); + OGS_FATAL("Unsupported cell type {}", CellType2String(cell_type)); } } @@ -224,6 +224,6 @@ std::vector<std::array<double, 3>> getCoordsInReferenceElementForTest( return coords; } - OGS_FATAL("Unsupported element dimension " + std::to_string(dim)); + OGS_FATAL("Unsupported element dimension {}", dim); } } // namespace ReferenceElementUtils diff --git a/Tests/NumLib/ShapeFunctionUtils.h b/Tests/NumLib/ShapeFunctionUtils.h index dd558e22f858c5340692dd096fa353895d04e62d..8f4174e56806bc942603ec7ed808c52b5b6b9f26 100644 --- a/Tests/NumLib/ShapeFunctionUtils.h +++ b/Tests/NumLib/ShapeFunctionUtils.h @@ -76,7 +76,8 @@ auto computeShapeMatricesOnFace(MeshLib::Element const& face, case CellType::PYRAMID5: return compute(Type<Pyramid>{}); default: - OGS_FATAL("Unsupported cell type " + CellType2String(cell_type)); + OGS_FATAL("Unsupported cell type {}", + MeshLib::CellType2String(cell_type)); } } @@ -132,7 +133,8 @@ auto interpolateNodeCoordinatesFace(MeshLib::Element const& face, case CellType::PYRAMID5: return interpolate(Type<Pyramid>{}); default: - OGS_FATAL("Unsupported cell type " + CellType2String(cell_type)); + OGS_FATAL("Unsupported cell type {}", + MeshLib::CellType2String(cell_type)); } } } // namespace ShapeFunctionUtils