diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index c0747fc788f226262c6d9307fae5f38ae019fe71..ba1c53ea279530bcf54409228656b33556a0366c 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -1169,7 +1169,7 @@ void ProjectData::parseLinearSolvers(BaseLib::ConfigTree const& config) void ProjectData::parseNonlinearSolvers(BaseLib::ConfigTree const& config) { - DBUG("Reading linear solver configuration."); + DBUG("Reading non-linear solver configuration."); //! \ogs_file_param{prj__nonlinear_solvers__nonlinear_solver} for (auto conf : config.getConfigSubtreeList("nonlinear_solver")) diff --git a/MeshGeoToolsLib/GeoMapper.cpp b/MeshGeoToolsLib/GeoMapper.cpp index f54ea043cf4c74a5df123bdfd30ab00b5e888021..a43f3adc4b083314feecfbc5d386a5444d601e18 100644 --- a/MeshGeoToolsLib/GeoMapper.cpp +++ b/MeshGeoToolsLib/GeoMapper.cpp @@ -451,7 +451,7 @@ static void mapPointOnSurfaceElement(MeshLib::Element const& elem, // create plane equation: n*p = d auto const p = Eigen::Map<Eigen::Vector3d const>(elem.getNode(0)->getCoords()); - Eigen::Vector3d const n(MeshLib::FaceRule::getSurfaceNormal(&elem)); + Eigen::Vector3d const n(MeshLib::FaceRule::getSurfaceNormal(elem)); if (n[2] == 0.0) { // vertical plane, z coordinate is arbitrary q[2] = p[2]; diff --git a/MeshLib/Elements/CellRule.cpp b/MeshLib/Elements/CellRule.cpp index 17e0a3fd4b17d88180b1f59bf03ba08a383625e7..2e3e26975e3629c536c6139105e7638202c98d9b 100644 --- a/MeshLib/Elements/CellRule.cpp +++ b/MeshLib/Elements/CellRule.cpp @@ -16,14 +16,14 @@ namespace MeshLib { -bool CellRule::testElementNodeOrder(const Element* e) +bool CellRule::testElementNodeOrder(Element const& e) { Eigen::Vector3d const cc = - Eigen::Map<Eigen::Vector3d const>(getCenterOfGravity(*e).getCoords()); - const unsigned nFaces(e->getNumberOfFaces()); + Eigen::Map<Eigen::Vector3d const>(getCenterOfGravity(e).getCoords()); + const unsigned nFaces(e.getNumberOfFaces()); for (unsigned j = 0; j < nFaces; ++j) { - MeshLib::Element const* const face(e->getFace(j)); + MeshLib::Element const* const face(e.getFace(j)); // Node 1 is checked below because that way all nodes are used for the // test at some point, while for node 0 at least one node in every // element type would be used for checking twice and one wouldn't be @@ -31,7 +31,7 @@ bool CellRule::testElementNodeOrder(const Element* e) auto const x = Eigen::Map<Eigen::Vector3d const>(face->getNode(1)->getCoords()); Eigen::Vector3d const cx = x - cc; - const double s = FaceRule::getSurfaceNormal(face).dot(cx); + const double s = FaceRule::getSurfaceNormal(*face).dot(cx); delete face; if (s >= 0) { diff --git a/MeshLib/Elements/CellRule.h b/MeshLib/Elements/CellRule.h index 01c50f3262037ec1b136e520e1e144283e317aff..a82d4dae4d1e028cfe25bdab928e89465693204f 100644 --- a/MeshLib/Elements/CellRule.h +++ b/MeshLib/Elements/CellRule.h @@ -29,7 +29,7 @@ public: * (non-planar faces, non-convex geometry, possibly zero volume) which causes the calculated * center of gravity to lie outside of the actual element */ - static bool testElementNodeOrder(const Element* /*e*/); + static bool testElementNodeOrder(Element const& e); }; /* class */ } // namespace MeshLib diff --git a/MeshLib/Elements/EdgeRule.h b/MeshLib/Elements/EdgeRule.h index 927b0c25943d8e30e223967ddc831607e9587eba..509e286e1417989a60501bce356b93b80b959a7d 100644 --- a/MeshLib/Elements/EdgeRule.h +++ b/MeshLib/Elements/EdgeRule.h @@ -34,7 +34,7 @@ public: * Checks if the node order of an element is correct by testing surface normals. * For 1D elements this always returns true. */ - static bool testElementNodeOrder(const Element* /*e*/) { return true; } + static bool testElementNodeOrder(Element const& /*e*/) { return true; } }; /* class */ diff --git a/MeshLib/Elements/FaceRule.cpp b/MeshLib/Elements/FaceRule.cpp index 7471c4a3457d72bef27414281a3447601ca4290b..44e58996404645292ccd65755bcff9f1621fb5b3 100644 --- a/MeshLib/Elements/FaceRule.cpp +++ b/MeshLib/Elements/FaceRule.cpp @@ -16,32 +16,32 @@ namespace MeshLib { -bool FaceRule::testElementNodeOrder(const Element* e) +bool FaceRule::testElementNodeOrder(Element const& e) { return getSurfaceNormal(e)[2] < 0; } -Eigen::Vector3d FaceRule::getFirstSurfaceVector(Element const* const e) +Eigen::Vector3d FaceRule::getFirstSurfaceVector(Element const& e) { auto const a = - Eigen::Map<Eigen::Vector3d const>(e->getNode(0)->getCoords()); + Eigen::Map<Eigen::Vector3d const>(e.getNode(0)->getCoords()); auto const b = - Eigen::Map<Eigen::Vector3d const>(e->getNode(1)->getCoords()); + Eigen::Map<Eigen::Vector3d const>(e.getNode(1)->getCoords()); Eigen::Vector3d const v = a - b; return v; } -Eigen::Vector3d FaceRule::getSecondSurfaceVector(Element const* const e) +Eigen::Vector3d FaceRule::getSecondSurfaceVector(Element const& e) { auto const a = - Eigen::Map<Eigen::Vector3d const>(e->getNode(1)->getCoords()); + Eigen::Map<Eigen::Vector3d const>(e.getNode(1)->getCoords()); auto const b = - Eigen::Map<Eigen::Vector3d const>(e->getNode(2)->getCoords()); + Eigen::Map<Eigen::Vector3d const>(e.getNode(2)->getCoords()); Eigen::Vector3d const v = b - a; return v; } -Eigen::Vector3d FaceRule::getSurfaceNormal(const Element* e) +Eigen::Vector3d FaceRule::getSurfaceNormal(Element const& e) { Eigen::Vector3d const u = getFirstSurfaceVector(e); Eigen::Vector3d const v = getSecondSurfaceVector(e); diff --git a/MeshLib/Elements/FaceRule.h b/MeshLib/Elements/FaceRule.h index db02b4b9909ad081d3a05b7edcc62ec9577fdfff..ad846cb777919ce43d2a0add551c1c7389b18ea4 100644 --- a/MeshLib/Elements/FaceRule.h +++ b/MeshLib/Elements/FaceRule.h @@ -31,16 +31,16 @@ public: * Checks if the node order of an element is correct by testing surface normals. * For 2D elements true is returned if the normal points (roughly) upwards. */ - static bool testElementNodeOrder(const Element* /*e*/); + static bool testElementNodeOrder(Element const& e); /// \returns the first vector forming the surface' plane - static Eigen::Vector3d getFirstSurfaceVector(Element const* const e); + static Eigen::Vector3d getFirstSurfaceVector(Element const& e); /// \returns the second vector forming the surface' plane - static Eigen::Vector3d getSecondSurfaceVector(Element const* const e); + static Eigen::Vector3d getSecondSurfaceVector(Element const& e); /// Returns the surface normal of a 2D element. - static Eigen::Vector3d getSurfaceNormal(const Element* e); + static Eigen::Vector3d getSurfaceNormal(Element const& e); }; /* class */ diff --git a/MeshLib/Elements/TemplateElement.h b/MeshLib/Elements/TemplateElement.h index 6ba17bf641eedace8db14977b32cac1ae6e423c5..16d7a5cc90ac1f018fabcd837c7bed887afb799c 100644 --- a/MeshLib/Elements/TemplateElement.h +++ b/MeshLib/Elements/TemplateElement.h @@ -190,7 +190,7 @@ public: */ bool testElementNodeOrder() const override { - return ELEMENT_RULE::testElementNodeOrder(this); + return ELEMENT_RULE::testElementNodeOrder(*this); } }; diff --git a/MeshLib/Elements/Utils.h b/MeshLib/Elements/Utils.h index 53d3b4f4e0fbd0a7319016c99ef1e496434ced52..a49a339fba7039e5a41044261c6856f890748d46 100644 --- a/MeshLib/Elements/Utils.h +++ b/MeshLib/Elements/Utils.h @@ -49,7 +49,7 @@ inline Eigen::Vector3d calculateNormalizedSurfaceNormal( if (surface_element.getDimension() < 2) { auto const bulk_element_normal = - MeshLib::FaceRule::getSurfaceNormal(&bulk_element); + MeshLib::FaceRule::getSurfaceNormal(bulk_element); auto const v0 = Eigen::Map<Eigen::Vector3d const>( surface_element.getNode(0)->getCoords()); auto const v1 = Eigen::Map<Eigen::Vector3d const>( @@ -60,7 +60,7 @@ inline Eigen::Vector3d calculateNormalizedSurfaceNormal( else { surface_element_normal = - MeshLib::FaceRule::getSurfaceNormal(&surface_element); + MeshLib::FaceRule::getSurfaceNormal(surface_element); } surface_element_normal.normalize(); diff --git a/MeshLib/Elements/VertexRule.h b/MeshLib/Elements/VertexRule.h index cbf6dc0360614404c29fc3c6b4a58d4dec9d91a4..f9839df4cdc8cc9615404b3969ce737decc5efdc 100644 --- a/MeshLib/Elements/VertexRule.h +++ b/MeshLib/Elements/VertexRule.h @@ -35,8 +35,7 @@ public: /// Checks if the node order of an element is correct by testing surface /// normals. For 0D elements this always returns true. - static bool testElementNodeOrder(const Element* /*e*/) { return true; } - + static bool testElementNodeOrder(Element const& /*e*/) { return true; } }; } // namespace MeshLib diff --git a/MeshLib/MeshEditing/ProjectPointOnMesh.cpp b/MeshLib/MeshEditing/ProjectPointOnMesh.cpp index 99a446022d5be45b98e526db3a48bb77c6feb54e..565a641396eab0f9bc2f24a5e04f7b06462b8f07 100644 --- a/MeshLib/MeshEditing/ProjectPointOnMesh.cpp +++ b/MeshLib/MeshEditing/ProjectPointOnMesh.cpp @@ -60,7 +60,7 @@ double getElevation(Element const& element, Node const& node) Eigen::Vector3d const v = Eigen::Map<Eigen::Vector3d const>(node.getCoords()) - Eigen::Map<Eigen::Vector3d const>(element.getNode(0)->getCoords()); - auto const n = FaceRule::getSurfaceNormal(&element).normalized(); + auto const n = FaceRule::getSurfaceNormal(element).normalized(); return node[2] - n.dot(v) * n[2]; } diff --git a/MeshLib/MeshSurfaceExtraction.cpp b/MeshLib/MeshSurfaceExtraction.cpp index 6ff19b802c755449659a89c8afbd9ed98800f02d..72eaff38961db9acca3b91d00b59001dfffc0368 100644 --- a/MeshLib/MeshSurfaceExtraction.cpp +++ b/MeshLib/MeshSurfaceExtraction.cpp @@ -312,8 +312,7 @@ void MeshSurfaceExtraction::get2DSurfaceElements( { if (!complete_surface) { - auto const* face = elem; - if (FaceRule::getSurfaceNormal(face).normalized().dot( + if (FaceRule::getSurfaceNormal(*elem).normalized().dot( norm_dir) > cos_theta) { continue; @@ -341,7 +340,7 @@ void MeshSurfaceExtraction::get2DSurfaceElements( std::unique_ptr<MeshLib::Element const>{elem->getFace(j)}; if (!complete_surface) { - if (FaceRule::getSurfaceNormal(face.get()) + if (FaceRule::getSurfaceNormal(*face) .normalized() .dot(norm_dir) < cos_theta) { diff --git a/MeshLib/NodeAdjacencyTable.h b/MeshLib/NodeAdjacencyTable.h index a166060e7f1b03989bb12fe270f6bba4e81966eb..da9f1fcc4a6789add542ffd78310e27d347ece15 100644 --- a/MeshLib/NodeAdjacencyTable.h +++ b/MeshLib/NodeAdjacencyTable.h @@ -32,10 +32,7 @@ namespace MeshLib class NodeAdjacencyTable { - public: - NodeAdjacencyTable() = default; - explicit NodeAdjacencyTable(std::vector<Node*> const& nodes) { diff --git a/NumLib/DOF/ComputeSparsityPattern.cpp b/NumLib/DOF/ComputeSparsityPattern.cpp index 166ecc0efe8654b430e0df43e723ec777ea0819d..dcc45b5cec1f6229eca29eb63e5e9798c0e91431 100644 --- a/NumLib/DOF/ComputeSparsityPattern.cpp +++ b/NumLib/DOF/ComputeSparsityPattern.cpp @@ -36,8 +36,7 @@ GlobalSparsityPattern computeSparsityPatternPETSc( GlobalSparsityPattern computeSparsityPatternNonPETSc( NumLib::LocalToGlobalIndexMap const& dof_table, MeshLib::Mesh const& mesh) { - MeshLib::NodeAdjacencyTable node_adjacency_table; - node_adjacency_table.createTable(mesh.getNodes()); + MeshLib::NodeAdjacencyTable const node_adjacency_table(mesh.getNodes()); // A mapping mesh node id -> global indices // It acts as a cache for dof table queries. diff --git a/NumLib/ODESolver/TimeDiscretizedODESystem.cpp b/NumLib/ODESolver/TimeDiscretizedODESystem.cpp index 227a044611b895a7a050561f96a62dbbbd010c0e..fb0d2ed7ced9adcadf4667d1732050ae1b3c6df8 100644 --- a/NumLib/ODESolver/TimeDiscretizedODESystem.cpp +++ b/NumLib/ODESolver/TimeDiscretizedODESystem.cpp @@ -177,7 +177,7 @@ void TimeDiscretizedODESystem<ODESystemTag::FirstOrderImplicitQuasilinear, std::vector<IndexType> ids; for (auto const& bc : *_known_solutions) { - std::copy(bc.ids.cbegin(), bc.ids.cend(), std::back_inserter(ids)); + ids.insert(end(ids), begin(bc.ids), end(bc.ids)); } // For the Newton method the values must be zero @@ -280,9 +280,8 @@ void TimeDiscretizedODESystem<ODESystemTag::FirstOrderImplicitQuasilinear, std::vector<double> values; for (auto const& bc : *_known_solutions) { - std::copy(bc.ids.cbegin(), bc.ids.cend(), std::back_inserter(ids)); - std::copy(bc.values.cbegin(), bc.values.cend(), - std::back_inserter(values)); + ids.insert(end(ids), begin(bc.ids), end(bc.ids)); + values.insert(end(values), begin(bc.values), end(bc.values)); } MathLib::applyKnownSolution(A, rhs, x, ids, values); } diff --git a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h index 1fadbf5b11a5e358c6b48c7b795a05500cbef81a..604422cbb5f7ad7859e45188bb990111077f2971 100644 --- a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h +++ b/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler.h @@ -107,7 +107,7 @@ private: // according to the right hand rule // for correct results it is necessary to multiply the normal with -1 Eigen::Vector3d surface_normal = - -MeshLib::FaceRule::getSurfaceNormal(&e).normalized(); + -MeshLib::FaceRule::getSurfaceNormal(e).normalized(); auto const zeros_size = 3 - _data.process.getMesh().getDimension(); surface_normal.tail(zeros_size).setZero(); return surface_normal; diff --git a/ProcessLib/BoundaryCondition/NormalTractionBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryCondition/NormalTractionBoundaryConditionLocalAssembler.h index 3d329226e4995ba7d3fdc540c5feb24cf6c16c19..244393cf38115e2a4c830151867991ee932a3455 100644 --- a/ProcessLib/BoundaryCondition/NormalTractionBoundaryConditionLocalAssembler.h +++ b/ProcessLib/BoundaryCondition/NormalTractionBoundaryConditionLocalAssembler.h @@ -95,7 +95,7 @@ public: } else { - auto const n = MeshLib::FaceRule::getSurfaceNormal(&e).normalized(); + auto const n = MeshLib::FaceRule::getSurfaceNormal(e).normalized(); for (decltype(GlobalDim) i = 0; i < GlobalDim; ++i) { element_normal[i] = n[i]; diff --git a/ProcessLib/HT/CreateHTProcess.cpp b/ProcessLib/HT/CreateHTProcess.cpp index 192a112b5d1357473a9a27666da5a4cb009195c4..68941ed6d9ac9163e6c35e57320ab3e7b6d0b135 100644 --- a/ProcessLib/HT/CreateHTProcess.cpp +++ b/ProcessLib/HT/CreateHTProcess.cpp @@ -70,11 +70,11 @@ std::unique_ptr<Process> createHTProcess( DBUG("Create HTProcess."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__HT__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. diff --git a/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp index ec6f085e20f484b134a43fca21bb66453e7892e2..fed730594f4c1c3111a5c4787ee130b47428c51d 100644 --- a/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -55,11 +55,11 @@ std::unique_ptr<Process> createHydroMechanicsProcess( } } - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__HYDRO_MECHANICS__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. diff --git a/ProcessLib/HydroMechanics/CreateLocalAssemblers.h b/ProcessLib/HydroMechanics/CreateLocalAssemblers.h index f4c10031e61be0db562f360db345c657e01ae6c9..d71df6cb31cbfe27502be7f55b167316a5eb2a09 100644 --- a/ProcessLib/HydroMechanics/CreateLocalAssemblers.h +++ b/ProcessLib/HydroMechanics/CreateLocalAssemblers.h @@ -12,10 +12,8 @@ #include <vector> #include "BaseLib/Logging.h" - -#include "NumLib/DOF/LocalToGlobalIndexMap.h" - #include "LocalDataInitializer.h" +#include "NumLib/DOF/LocalToGlobalIndexMap.h" namespace ProcessLib { @@ -65,8 +63,9 @@ void createLocalAssemblers( * The first two template parameters cannot be deduced from the arguments. * Therefore they always have to be provided manually. */ -template <int GlobalDim, template <typename, typename, typename, int> - class LocalAssemblerImplementation, +template <int GlobalDim, + template <typename, typename, typename, int> + class LocalAssemblerImplementation, typename LocalAssemblerInterface, typename... ExtraCtorArgs> void createLocalAssemblers( const unsigned /*dimension*/, diff --git a/ProcessLib/HydroMechanics/LocalDataInitializer.h b/ProcessLib/HydroMechanics/LocalDataInitializer.h index cfcaf5b065359c6a8316b030e38324db4b320e63..47f7da36a7b47e2107dc019257825bc6291e492e 100644 --- a/ProcessLib/HydroMechanics/LocalDataInitializer.h +++ b/ProcessLib/HydroMechanics/LocalDataInitializer.h @@ -109,16 +109,16 @@ namespace ProcessLib::HydroMechanics /// The LocalDataInitializer is a functor creating a local assembler data with /// corresponding to the mesh element type shape functions and calling /// initialization of the new local assembler data. -/// For example for MeshLib::Line a local assembler data with template argument -/// NumLib::ShapeLine2 is created. +/// For example for MeshLib::Quad a local assembler data with template argument +/// NumLib::ShapeQuad4 is created. /// /// \attention This is modified version of the ProcessLib::LocalDataInitializer /// class which does not include line or point elements. For the shape functions /// of order 2 (used for displacement) a shape function of order 1 will be used -/// for the pressure. +/// for the scalar variables. template <typename LocalAssemblerInterface, template <typename, typename, typename, int> class LocalAssemblerData, - unsigned GlobalDim, typename... ConstructorArgs> + int GlobalDim, typename... ConstructorArgs> class LocalDataInitializer final { public: @@ -134,7 +134,7 @@ public: if (shapefunction_order == 1) { - // /// Quads and Hexahedra /////////////////////////////////// + // /// Quads and Hexahedra /////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_QUAD) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -162,7 +162,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeHex8>(); #endif - // /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -188,7 +188,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeTet4>(); #endif - // /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -202,7 +202,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapePrism6>(); #endif - // /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -218,7 +218,7 @@ public: } else if (shapefunction_order == 2) { - // /// Quads and Hexahedra /////////////////////////////////// + // /// Quads and Hexahedra /////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_QUAD) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -234,7 +234,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeHex20>(); #endif - // /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -248,7 +248,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeTet10>(); #endif - // /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -256,7 +256,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapePrism15>(); #endif - // /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -304,9 +304,10 @@ private: template <typename ShapeFunctionDisplacement, typename ShapeFunctionPressure> - using LAData = LocalAssemblerData< - ShapeFunctionDisplacement, ShapeFunctionPressure, - IntegrationMethod<ShapeFunctionDisplacement>, GlobalDim>; + using LAData = + LocalAssemblerData<ShapeFunctionDisplacement, ShapeFunctionPressure, + IntegrationMethod<ShapeFunctionDisplacement>, + GlobalDim>; /// A helper forwarding to the correct version of makeLocalAssemblerBuilder /// depending whether the global dimension is less than the shape function's diff --git a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp index 4f79279a69aa37e0189fcd06f32bdce9dcb181ec..730ae72a42e9189fbd4136e709ab145e5b447828 100644 --- a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -43,11 +43,11 @@ std::unique_ptr<Process> createHydroMechanicsProcess( //! \ogs_file_param{prj__processes__process__type} config.checkConfigParameter("type", "HYDRO_MECHANICS_WITH_LIE"); DBUG("Create HydroMechanicsProcess with LIE."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variables //! \ogs_file_param{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__process_variables} diff --git a/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp b/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp index 77cad62bb234b87f58b23a2f9ecd69ed1315912f..4bc5db6b405dda9b8389dae0080cce01153e6c47 100644 --- a/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp +++ b/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp @@ -40,11 +40,11 @@ std::unique_ptr<Process> createPhaseFieldProcess( config.checkConfigParameter("type", "PHASE_FIELD"); DBUG("Create PhaseFieldProcess."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__PHASE_FIELD__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. diff --git a/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp b/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp index b5dcc6eb0fc0e9f2af52085b8ad7352729cb9254..50fb71cf6f0f8e9d5ad4e8b20bec5920dd5ac710 100644 --- a/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp +++ b/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp @@ -91,11 +91,11 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( DBUG("Create RichardsComponentTransportProcess."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__RichardsComponentTransport__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. @@ -123,14 +123,6 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( else // staggered scheme. { OGS_FATAL("The staggered coupling scheme is not implemented."); - - using namespace std::string_literals; - for (auto const& variable_name : {"concentration"s, "pressure"s}) - { - auto per_process_variables = - findProcessVariables(variables, pv_config, {variable_name}); - process_variables.push_back(std::move(per_process_variables)); - } } // Specific body force parameter. diff --git a/ProcessLib/RichardsMechanics/CreateLocalAssemblers.h b/ProcessLib/RichardsMechanics/CreateLocalAssemblers.h index 9f48858760620480537f8e2919197b4b3980b3ed..185a7d21ad35b0398edca1efea377136e0f238fd 100644 --- a/ProcessLib/RichardsMechanics/CreateLocalAssemblers.h +++ b/ProcessLib/RichardsMechanics/CreateLocalAssemblers.h @@ -12,10 +12,8 @@ #include <vector> #include "BaseLib/Logging.h" - -#include "NumLib/DOF/LocalToGlobalIndexMap.h" - #include "LocalDataInitializer.h" +#include "NumLib/DOF/LocalToGlobalIndexMap.h" namespace ProcessLib { diff --git a/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp b/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp index 6450d47382a452ea4468fe7e2bf678f8795d30ac..0e24745a1807502782d4ab94b00e38340935ce38 100644 --- a/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp +++ b/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp @@ -69,11 +69,11 @@ std::unique_ptr<Process> createRichardsMechanicsProcess( config.checkConfigParameter("type", "RICHARDS_MECHANICS"); DBUG("Create RichardsMechanicsProcess."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__RICHARDS_MECHANICS__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. diff --git a/ProcessLib/RichardsMechanics/LocalDataInitializer.h b/ProcessLib/RichardsMechanics/LocalDataInitializer.h index 2f70f2cad11b794f4a5786752a96af3fa6ea444a..8e28131f69b3f56c11fcf9dfec195ef644e6706e 100644 --- a/ProcessLib/RichardsMechanics/LocalDataInitializer.h +++ b/ProcessLib/RichardsMechanics/LocalDataInitializer.h @@ -109,15 +109,16 @@ namespace ProcessLib::RichardsMechanics /// The LocalDataInitializer is a functor creating a local assembler data with /// corresponding to the mesh element type shape functions and calling /// initialization of the new local assembler data. -/// For example for MeshLib::Line a local assembler data with template argument -/// NumLib::ShapeLine2 is created. +/// For example for MeshLib::Quad a local assembler data with template argument +/// NumLib::ShapeQuad4 is created. +/// /// \attention This is modified version of the ProcessLib::LocalDataInitializer /// class which does not include line or point elements. For the shape functions /// of order 2 (used for displacement) a shape function of order 1 will be used -/// for the pressure. +/// for the scalar variables. template <typename LocalAssemblerInterface, template <typename, typename, typename, int> class LocalAssemblerData, - unsigned GlobalDim, typename... ConstructorArgs> + int GlobalDim, typename... ConstructorArgs> class LocalDataInitializer final { public: @@ -133,7 +134,7 @@ public: if (shapefunction_order == 1) { -// /// Quads and Hexahedra /////////////////////////////////// + // /// Quads and Hexahedra /////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_QUAD) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -161,7 +162,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeHex8>(); #endif -// /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -187,7 +188,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeTet4>(); #endif -// /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -201,7 +202,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapePrism6>(); #endif -// /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -217,7 +218,7 @@ public: } else if (shapefunction_order == 2) { -// /// Quads and Hexahedra /////////////////////////////////// + // /// Quads and Hexahedra /////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_QUAD) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -233,7 +234,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeHex20>(); #endif -// /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -247,7 +248,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeTet10>(); #endif -// /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -255,7 +256,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapePrism15>(); #endif -// /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -271,8 +272,8 @@ public: /// The index \c id is not necessarily the mesh item's id. Especially when /// having multiple meshes it will differ from the latter. LADataIntfPtr operator()(std::size_t const id, - MeshLib::Element const& mesh_item, - ConstructorArgs&&... args) const + MeshLib::Element const& mesh_item, + ConstructorArgs&&... args) const { auto const type_idx = std::type_index(typeid(mesh_item)); auto const it = _builder.find(type_idx); @@ -319,7 +320,6 @@ private: bool, (GlobalDim >= ShapeFunction::DIM)>*>(nullptr)); } - /// Mapping of element types to local assembler constructors. std::unordered_map<std::type_index, LADataBuilder> _builder; diff --git a/ProcessLib/SmallDeformation/CreateLocalAssemblers.h b/ProcessLib/SmallDeformation/CreateLocalAssemblers.h index dda5435c0a78569aff5d0df1fcf293ff41aba1d3..42847cd36424906889b951f8de5752b008bc8924 100644 --- a/ProcessLib/SmallDeformation/CreateLocalAssemblers.h +++ b/ProcessLib/SmallDeformation/CreateLocalAssemblers.h @@ -12,10 +12,8 @@ #include <vector> #include "BaseLib/Logging.h" - -#include "NumLib/DOF/LocalToGlobalIndexMap.h" - #include "LocalDataInitializer.h" +#include "NumLib/DOF/LocalToGlobalIndexMap.h" namespace ProcessLib { @@ -46,9 +44,7 @@ void createLocalAssemblers( DBUG("Calling local assembler builder for all mesh elements."); GlobalExecutor::transformDereferenced( - initializer, - mesh_elements, - local_assemblers, + initializer, mesh_elements, local_assemblers, std::forward<ExtraCtorArgs>(extra_ctor_args)...); } diff --git a/ProcessLib/SmallDeformation/LocalDataInitializer.h b/ProcessLib/SmallDeformation/LocalDataInitializer.h index 5091ce175d0fd5df89337a5ceecfbc94937dd0fb..591c27d5b189c7fd5a3acf60b0283c04a4fa8905 100644 --- a/ProcessLib/SmallDeformation/LocalDataInitializer.h +++ b/ProcessLib/SmallDeformation/LocalDataInitializer.h @@ -12,9 +12,9 @@ #include <functional> #include <memory> +#include <type_traits> #include <typeindex> #include <typeinfo> -#include <type_traits> #include <unordered_map> #include "MeshLib/Elements/Elements.h" @@ -212,8 +212,8 @@ public: /// The index \c id is not necessarily the mesh item's id. Especially when /// having multiple meshes it will differ from the latter. LADataIntfPtr operator()(std::size_t const id, - MeshLib::Element const& mesh_item, - ConstructorArgs&&... args) const + MeshLib::Element const& mesh_item, + ConstructorArgs&&... args) const { auto const type_idx = std::type_index(typeid(mesh_item)); auto const it = _builder.find(type_idx); @@ -257,7 +257,6 @@ private: bool, (GlobalDim >= ShapeFunction::DIM)>*>(nullptr)); } - /// Mapping of element types to local assembler constructors. std::unordered_map<std::type_index, LADataBuilder> _builder; diff --git a/ProcessLib/StokesFlow/CreateLocalAssemblers.h b/ProcessLib/StokesFlow/CreateLocalAssemblers.h index 9d3215354d370ba2a6e5761f299decd0d0b7c0fe..06d131e87ef4a6881d8a79be9286079a45642db3 100644 --- a/ProcessLib/StokesFlow/CreateLocalAssemblers.h +++ b/ProcessLib/StokesFlow/CreateLocalAssemblers.h @@ -11,9 +11,8 @@ #include <vector> -#include "LocalDataInitializer.h" - #include "BaseLib/Logging.h" +#include "LocalDataInitializer.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" namespace ProcessLib @@ -82,6 +81,6 @@ void createLocalAssemblers( dof_table, shapefunction_order, mesh_elements, local_assemblers, std::forward<ExtraCtorArgs>(extra_ctor_args)...); } - } // namespace StokesFlow + } // namespace ProcessLib diff --git a/ProcessLib/StokesFlow/LocalDataInitializer.h b/ProcessLib/StokesFlow/LocalDataInitializer.h index caaaee96fce7b5f40cacd9a8ff2ca76c1612aa53..48e1d0f5484e8e936ecd05599cf741552bf006c9 100644 --- a/ProcessLib/StokesFlow/LocalDataInitializer.h +++ b/ProcessLib/StokesFlow/LocalDataInitializer.h @@ -109,16 +109,16 @@ namespace ProcessLib::StokesFlow /// The LocalDataInitializer is a functor creating a local assembler data with /// corresponding to the mesh element type shape functions and calling /// initialization of the new local assembler data. -/// For example for MeshLib::Line a local assembler data with template argument -/// NumLib::ShapeLine2 is created. +/// For example for MeshLib::Quad a local assembler data with template argument +/// NumLib::ShapeQuad4 is created. /// /// \attention This is modified version of the ProcessLib::LocalDataInitializer /// class which does not include line or point elements. For the shape functions /// of order 2 (used for fluid velocity in StokesFlow) a shape function of order -/// 1 will be used for the pressure. +/// 1 will be used for the scalar variables. template <typename LocalAssemblerInterface, template <typename, typename, typename, int> class LocalAssemblerData, - unsigned GlobalDim, typename... ConstructorArgs> + int GlobalDim, typename... ConstructorArgs> class LocalDataInitializer final { public: @@ -253,7 +253,7 @@ private: template <typename ShapeFunction> static LADataBuilder makeLocalAssemblerBuilder(std::true_type* /*unused*/) { - assert(ShapeFunction::ORDER == 2); + static_assert(ShapeFunction::ORDER == 2); using LowerOrderShapeFunction = typename NumLib::LowerDim<ShapeFunction>::type; diff --git a/ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h b/ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h index 548a15c95debd061c8bf205db538f6a9af799d49..7153a55973a0c145da4e60b574cf4813cee5a4e9 100644 --- a/ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h +++ b/ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h @@ -114,7 +114,7 @@ public: if (surface_element.getGeomType() == MeshLib::MeshElemType::LINE) { auto const bulk_normal = MeshLib::FaceRule::getSurfaceNormal( - bulk_mesh.getElements()[_bulk_element_id]); + *bulk_mesh.getElements()[_bulk_element_id]); auto const l0 = Eigen::Map<Eigen::Vector3d const>( _surface_element.getNode(0)->getCoords()); auto const l1 = Eigen::Map<Eigen::Vector3d const>( @@ -125,7 +125,7 @@ public: else { surface_element_normal = - MeshLib::FaceRule::getSurfaceNormal(&surface_element); + MeshLib::FaceRule::getSurfaceNormal(surface_element); } surface_element_normal.normalize(); // At the moment (2016-09-28) the surface normal is not oriented diff --git a/ProcessLib/TH2M/CreateLocalAssemblers.h b/ProcessLib/TH2M/CreateLocalAssemblers.h index bc4d500bb60710cf6030a4fa7db4f28583a4d085..e9a0b86e15997847f4ca0cba5e33e02ba58edcfe 100644 --- a/ProcessLib/TH2M/CreateLocalAssemblers.h +++ b/ProcessLib/TH2M/CreateLocalAssemblers.h @@ -11,6 +11,7 @@ #include <vector> +#include "BaseLib/Logging.h" #include "LocalDataInitializer.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" diff --git a/ProcessLib/TH2M/CreateTH2MProcess.cpp b/ProcessLib/TH2M/CreateTH2MProcess.cpp index 159c44bf51becba72fe5649cc647c745c7df7664..5413266b0fb2613372f397a37f45514a0bde3a0b 100644 --- a/ProcessLib/TH2M/CreateTH2MProcess.cpp +++ b/ProcessLib/TH2M/CreateTH2MProcess.cpp @@ -81,11 +81,11 @@ std::unique_ptr<Process> createTH2MProcess( WARN(" https://gitlab.opengeosys.org/ogs/ogs/-/issues "); WARN(" "); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__TH2M__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. //! \ogs_file_param{prj__processes__process__TH2M__process_variables} diff --git a/ProcessLib/TH2M/LocalDataInitializer.h b/ProcessLib/TH2M/LocalDataInitializer.h index cfce57845dc0a5fb7b9429a87ceb7240ae99458b..816a3184e7d8ac9efceef7a6bfbc41df287dfef3 100644 --- a/ProcessLib/TH2M/LocalDataInitializer.h +++ b/ProcessLib/TH2M/LocalDataInitializer.h @@ -113,8 +113,9 @@ namespace ProcessLib::TH2M /// NumLib::ShapeQuad4 is created. /// /// \attention This is modified version of the ProcessLib::LocalDataInitializer -/// class which does not include line elements, allows only shapefunction of -/// order 2. +/// class which does not include line or point elements. For the shape functions +/// of order 2 (used for displacement) a shape function of order 1 will be used +/// for the scalar variables. template <typename LocalAssemblerInterface, template <typename, typename, typename, int> class LocalAssemblerData, int GlobalDim, typename... ConstructorArgs> diff --git a/ProcessLib/ThermoHydroMechanics/CreateLocalAssemblers.h b/ProcessLib/ThermoHydroMechanics/CreateLocalAssemblers.h index a6d1de75061774441cd58a6a41feef9a7e9692eb..b17f0601628fbf42d88c5cd5b34961182e4fa064 100644 --- a/ProcessLib/ThermoHydroMechanics/CreateLocalAssemblers.h +++ b/ProcessLib/ThermoHydroMechanics/CreateLocalAssemblers.h @@ -9,10 +9,9 @@ #pragma once -#include <spdlog/spdlog.h> - #include <vector> +#include "BaseLib/Logging.h" #include "LocalDataInitializer.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" diff --git a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp index df5bf1db7bf2fe16eb0618fb55fcfd2dd037c914..a39718111497b494593a0e53d2e847718429ac46 100644 --- a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp +++ b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp @@ -41,11 +41,11 @@ std::unique_ptr<Process> createThermoHydroMechanicsProcess( config.checkConfigParameter("type", "THERMO_HYDRO_MECHANICS"); DBUG("Create ThermoHydroMechanicsProcess."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__THERMO_HYDRO_MECHANICS__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. diff --git a/ProcessLib/ThermoHydroMechanics/LocalDataInitializer.h b/ProcessLib/ThermoHydroMechanics/LocalDataInitializer.h index 7c3d72105f7adbe9c7db9ab2dbe5e2a3edff605c..e3c9dad66a49922fe787f124c68ffd02d0c6cafe 100644 --- a/ProcessLib/ThermoHydroMechanics/LocalDataInitializer.h +++ b/ProcessLib/ThermoHydroMechanics/LocalDataInitializer.h @@ -113,8 +113,9 @@ namespace ProcessLib::ThermoHydroMechanics /// NumLib::ShapeQuad4 is created. /// /// \attention This is modified version of the ProcessLib::LocalDataInitializer -/// class which does not include line elements, allows only shapefunction of -/// order 2. +/// class which does not include line or point elements. For the shape functions +/// of order 2 (used for displacement) a shape function of order 1 will be used +/// for the scalar variables. template <typename LocalAssemblerInterface, template <typename, typename, typename, int> class LocalAssemblerData, int GlobalDim, typename... ConstructorArgs> @@ -221,46 +222,46 @@ public: #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_QUAD) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 - _builder[std::type_index(typeid(MeshLib::Quad8))] = - makeLocalAssemblerBuilder<NumLib::ShapeQuad8>(); - _builder[std::type_index(typeid(MeshLib::Quad9))] = - makeLocalAssemblerBuilder<NumLib::ShapeQuad9>(); + _builder[std::type_index(typeid(MeshLib::Quad8))] = + makeLocalAssemblerBuilder<NumLib::ShapeQuad8>(); + _builder[std::type_index(typeid(MeshLib::Quad9))] = + makeLocalAssemblerBuilder<NumLib::ShapeQuad9>(); #endif #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_CUBOID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 - _builder[std::type_index(typeid(MeshLib::Hex20))] = - makeLocalAssemblerBuilder<NumLib::ShapeHex20>(); + _builder[std::type_index(typeid(MeshLib::Hex20))] = + makeLocalAssemblerBuilder<NumLib::ShapeHex20>(); #endif - // /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 - _builder[std::type_index(typeid(MeshLib::Tri6))] = - makeLocalAssemblerBuilder<NumLib::ShapeTri6>(); + _builder[std::type_index(typeid(MeshLib::Tri6))] = + makeLocalAssemblerBuilder<NumLib::ShapeTri6>(); #endif #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_SIMPLEX) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 - _builder[std::type_index(typeid(MeshLib::Tet10))] = - makeLocalAssemblerBuilder<NumLib::ShapeTet10>(); + _builder[std::type_index(typeid(MeshLib::Tet10))] = + makeLocalAssemblerBuilder<NumLib::ShapeTet10>(); #endif - // /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 - _builder[std::type_index(typeid(MeshLib::Prism15))] = - makeLocalAssemblerBuilder<NumLib::ShapePrism15>(); + _builder[std::type_index(typeid(MeshLib::Prism15))] = + makeLocalAssemblerBuilder<NumLib::ShapePrism15>(); #endif - // /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 - _builder[std::type_index(typeid(MeshLib::Pyramid13))] = - makeLocalAssemblerBuilder<NumLib::ShapePyra13>(); + _builder[std::type_index(typeid(MeshLib::Pyramid13))] = + makeLocalAssemblerBuilder<NumLib::ShapePyra13>(); #endif } } diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h index aa8e6e02e6dca173cf7ccba143d9a71bbcd387db..637c510ff925630a3ea7efcbce0172b35eb7f3f4 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h @@ -338,7 +338,6 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, .value(vars, x_position, t, dt)) : Eigen::MatrixXd::Zero(DisplacementDim, DisplacementDim)); - // Add thermo-osmosis effect on velocity auto velocity = (-K_over_mu * dNdx_p * p - K_pT_thermal_osmosis * dNdx_T * T) .eval(); @@ -381,7 +380,6 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, storage_p.noalias() += N_p.transpose() * (porosity * fluid_compressibility + (alpha - porosity) * beta_SR) * N_p * w; - // Add thermo-osmosis effect on laplace_T laplace_T.noalias() += dNdx_p.transpose() * K_pT_thermal_osmosis * dNdx_T * w; // @@ -416,7 +414,6 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, ->property(MaterialPropertyLib::PropertyType::thermal_conductivity) .value(vars, x_position, t, dt)); - // Add thermo-osmosis effect on KTT KTT.noalias() += (dNdx_T.transpose() * effective_thermal_conductivity * dNdx_T + N_T.transpose() * velocity.transpose() * dNdx_T * fluid_density * c_f) * @@ -438,7 +435,6 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, // // temperature equation, pressure part // - // Add thermo-osmosis effect on KTp KTp.noalias() += fluid_density * c_f * N_T.transpose() * (dNdx_T * T).transpose() * K_over_mu * dNdx_p * w - @@ -460,7 +456,6 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement, solid_skeleton_compressibility) * N_T.transpose() * identity2.transpose() * B * w; - // Add thermo-osmosis effect on KTT KTT.noalias() += dNdx_T.transpose() * (-T_int_pt * fluid_volumetric_thermal_expansion_coefficient * diff --git a/ProcessLib/ThermoMechanics/CreateThermoMechanicsProcess.cpp b/ProcessLib/ThermoMechanics/CreateThermoMechanicsProcess.cpp index 70448dcd42322d405e88d3a663e9dd33b928eac7..38d42f1f55c688ee47e8c689470b4d2d1c906c0a 100644 --- a/ProcessLib/ThermoMechanics/CreateThermoMechanicsProcess.cpp +++ b/ProcessLib/ThermoMechanics/CreateThermoMechanicsProcess.cpp @@ -57,11 +57,11 @@ std::unique_ptr<Process> createThermoMechanicsProcess( config.checkConfigParameter("type", "THERMO_MECHANICS"); DBUG("Create ThermoMechanicsProcess."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__THERMO_MECHANICS__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. diff --git a/ProcessLib/ThermoRichardsFlow/CreateThermoRichardsFlowProcess.cpp b/ProcessLib/ThermoRichardsFlow/CreateThermoRichardsFlowProcess.cpp index 2ac2c523e5a9acf0e36b8f32d8812a24cce69e4a..8403fb41ce94da49449eb121131217e9b5daecda 100644 --- a/ProcessLib/ThermoRichardsFlow/CreateThermoRichardsFlowProcess.cpp +++ b/ProcessLib/ThermoRichardsFlow/CreateThermoRichardsFlowProcess.cpp @@ -83,11 +83,11 @@ std::unique_ptr<Process> createThermoRichardsFlowProcess( config.checkConfigParameter("type", "THERMO_RICHARDS_FLOW"); DBUG("Create ThermoRichardsFlowProcess."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__THERMO_RICHARDS_FLOW__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. diff --git a/ProcessLib/ThermoRichardsMechanics/CreateThermoRichardsMechanicsProcess.cpp b/ProcessLib/ThermoRichardsMechanics/CreateThermoRichardsMechanicsProcess.cpp index d63703b41c14e969b0e022f409d5ebf0540bb98a..dc112ad08df295ec40fe2ba7a750aae8d63ba6ca 100644 --- a/ProcessLib/ThermoRichardsMechanics/CreateThermoRichardsMechanicsProcess.cpp +++ b/ProcessLib/ThermoRichardsMechanics/CreateThermoRichardsMechanicsProcess.cpp @@ -85,11 +85,11 @@ std::unique_ptr<Process> createThermoRichardsMechanicsProcess( config.checkConfigParameter("type", "THERMO_RICHARDS_MECHANICS"); DBUG("Create ThermoRichardsMechanicsProcess."); - auto const staggered_scheme = + auto const coupling_scheme = //! \ogs_file_param{prj__processes__process__THERMO_RICHARDS_MECHANICS__coupling_scheme} config.getConfigParameterOptional<std::string>("coupling_scheme"); const bool use_monolithic_scheme = - !(staggered_scheme && (*staggered_scheme == "staggered")); + !(coupling_scheme && (*coupling_scheme == "staggered")); // Process variable. diff --git a/ProcessLib/ThermoRichardsMechanics/LocalDataInitializer.h b/ProcessLib/ThermoRichardsMechanics/LocalDataInitializer.h index 43a8102822d0c829fa9673f2cdd8999f1d9385bf..33bfc6ba690088f7aca5365981ee60a03eed1c05 100644 --- a/ProcessLib/ThermoRichardsMechanics/LocalDataInitializer.h +++ b/ProcessLib/ThermoRichardsMechanics/LocalDataInitializer.h @@ -109,15 +109,16 @@ namespace ProcessLib::ThermoRichardsMechanics /// The LocalDataInitializer is a functor creating a local assembler data with /// corresponding to the mesh element type shape functions and calling /// initialization of the new local assembler data. -/// For example for MeshLib::Line a local assembler data with template argument -/// NumLib::ShapeLine2 is created. +/// For example for MeshLib::Quad a local assembler data with template argument +/// NumLib::ShapeQuad4 is created. +/// /// \attention This is modified version of the ProcessLib::LocalDataInitializer /// class which does not include line or point elements. For the shape functions /// of order 2 (used for displacement) a shape function of order 1 will be used -/// for the pressure. +/// for the scalar variables. template <typename LocalAssemblerInterface, template <typename, typename, typename, int> class LocalAssemblerData, - unsigned GlobalDim, typename... ConstructorArgs> + int GlobalDim, typename... ConstructorArgs> class LocalDataInitializer final { public: @@ -133,7 +134,7 @@ public: if (shapefunction_order == 1) { -// /// Quads and Hexahedra /////////////////////////////////// + // /// Quads and Hexahedra /////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_QUAD) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -161,7 +162,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeHex8>(); #endif -// /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -187,7 +188,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeTet4>(); #endif -// /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -201,7 +202,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapePrism6>(); #endif -// /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -217,7 +218,7 @@ public: } else if (shapefunction_order == 2) { -// /// Quads and Hexahedra /////////////////////////////////// + // /// Quads and Hexahedra /////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_QUAD) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -233,7 +234,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeHex20>(); #endif -// /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -247,7 +248,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeTet10>(); #endif -// /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -255,7 +256,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapePrism15>(); #endif -// /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -271,8 +272,8 @@ public: /// The index \c id is not necessarily the mesh item's id. Especially when /// having multiple meshes it will differ from the latter. LADataIntfPtr operator()(std::size_t const id, - MeshLib::Element const& mesh_item, - ConstructorArgs&&... args) const + MeshLib::Element const& mesh_item, + ConstructorArgs&&... args) const { auto const type_idx = std::type_index(typeid(mesh_item)); auto const it = _builder.find(type_idx); @@ -319,7 +320,6 @@ private: bool, (GlobalDim >= ShapeFunction::DIM)>*>(nullptr)); } - /// Mapping of element types to local assembler constructors. std::unordered_map<std::type_index, LADataBuilder> _builder; diff --git a/ProcessLib/Utils/CreateLocalAssemblers.h b/ProcessLib/Utils/CreateLocalAssemblers.h index 5b42b2b23f8ed6ebfc1b08d95edadf31d94e72a7..0c5d827f77a56d456b013b3c132eb84104a761d3 100644 --- a/ProcessLib/Utils/CreateLocalAssemblers.h +++ b/ProcessLib/Utils/CreateLocalAssemblers.h @@ -12,11 +12,8 @@ #include <vector> #include "BaseLib/Logging.h" - -#include "NumLib/DOF/LocalToGlobalIndexMap.h" - #include "LocalDataInitializer.h" - +#include "NumLib/DOF/LocalToGlobalIndexMap.h" namespace ProcessLib { diff --git a/ProcessLib/Utils/LocalDataInitializer.h b/ProcessLib/Utils/LocalDataInitializer.h index b604e8a16819785e76e01e31c7df9ac0b76dc57f..61823f9ff9adcb320b27705e05cfaadaac699829 100644 --- a/ProcessLib/Utils/LocalDataInitializer.h +++ b/ProcessLib/Utils/LocalDataInitializer.h @@ -117,8 +117,8 @@ namespace ProcessLib /// The LocalDataInitializer is a functor creating a local assembler data with /// corresponding to the mesh element type shape functions and calling /// initialization of the new local assembler data. -/// For example for MeshLib::Line a local assembler data with template argument -/// NumLib::ShapeLine2 is created. +/// For example for MeshLib::Quad a local assembler data with template argument +/// NumLib::ShapeQuad4 is created. template <typename LocalAssemblerInterface, template <typename, typename, unsigned> class LocalAssemblerData, unsigned GlobalDim, typename... ConstructorArgs> @@ -185,7 +185,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeHex8>(); #endif -// /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -211,7 +211,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeTet4>(); #endif -// /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -225,7 +225,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapePrism6>(); #endif -// /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 @@ -270,7 +270,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeHex20>(); #endif -// /// Simplices //////////////////////////////////////////////// + // /// Simplices //////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_TRI) != 0 && \ OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -284,7 +284,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapeTet10>(); #endif -// /// Prisms //////////////////////////////////////////////////// + // /// Prisms //////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 @@ -292,7 +292,7 @@ public: makeLocalAssemblerBuilder<NumLib::ShapePrism15>(); #endif -// /// Pyramids ////////////////////////////////////////////////// + // /// Pyramids ////////////////////////////////////////////////// #if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 diff --git a/Tests/BaseLib/TestConfigTree.cpp b/Tests/BaseLib/TestConfigTree.cpp index bd8828b9aff086b3a5c1a9127ec4cf4d2fe3f199..41c2e087d0aa54c8acc8ec0eace1c9906c7fab9e 100644 --- a/Tests/BaseLib/TestConfigTree.cpp +++ b/Tests/BaseLib/TestConfigTree.cpp @@ -360,11 +360,10 @@ TEST(BaseLibConfigTree, GetSubtreeList) { auto const conf = makeConfigTree(ptree, cbs); - for (auto p : conf.getConfigSubtreeList("nonexistent_list")) - { - (void)p; - FAIL() << "Expected empty list"; - } + auto const expected_empty_list = + conf.getConfigParameterList("nonexistent_list"); + ASSERT_TRUE(expected_empty_list.empty()) << "Expected empty list"; + EXPECT_ERR_WARN(cbs, false, false); int i = 0; @@ -392,11 +391,10 @@ TEST(BaseLibConfigTree, GetParamList) { auto const conf = makeConfigTree(ptree, cbs); - for (auto p : conf.getConfigParameterList("nonexistent_list")) - { - (void)p; - FAIL() << "Expected empty list"; - } + auto const expected_empty_list = + conf.getConfigParameterList("nonexistent_list"); + ASSERT_TRUE(expected_empty_list.empty()) << "Expected empty list"; + EXPECT_ERR_WARN(cbs, false, false); int i = 0; @@ -442,11 +440,10 @@ TEST(BaseLibConfigTree, GetValueList) { auto const conf = makeConfigTree(ptree, cbs); - for (auto p : conf.getConfigParameterList<int>("nonexistent_list")) - { - (void)p; - FAIL() << "Expected empty list"; - } + auto const expected_empty_list = + conf.getConfigParameterList<int>("nonexistent_list"); + ASSERT_TRUE(expected_empty_list.empty()) << "Expected empty list"; + EXPECT_ERR_WARN(cbs, false, false); int n = 0; diff --git a/Tests/Data/RichardsMechanics/A2.prj b/Tests/Data/RichardsMechanics/A2.prj index 8a6f384edc86bd6dd3abc534380d18b93fc49641..3daf5835ba3772951cc96c3c4a579385a916a63e 100644 --- a/Tests/Data/RichardsMechanics/A2.prj +++ b/Tests/Data/RichardsMechanics/A2.prj @@ -11,8 +11,9 @@ </meshes> <processes> <process> - <name>TRM</name> - <type>THERMO_RICHARDS_MECHANICS</type> + <name>RM</name> + <type>RICHARDS_MECHANICS</type> + <dimension>3</dimension> <integration_order>3</integration_order> <constitutive_relation id="0"> <type>LinearElasticIsotropic</type> @@ -28,7 +29,6 @@ <process_variables> <displacement>displacement</displacement> <pressure>pressure</pressure> - <temperature>temperature</temperature> </process_variables> <secondary_variables> <secondary_variable internal_name="sigma" output_name="sigma"/> @@ -145,18 +145,23 @@ <name>thermal_conductivity</name> <type>EffectiveThermalConductivityPorosityMixing</type> </property> + <property> + <name>reference_temperature</name> + <type>Constant</type> + <value>298.15</value> + </property> </properties> </medium> </media> <time_loop> <processes> - <process ref="TRM"> + <process ref="RM"> <nonlinear_solver>basic_newton</nonlinear_solver> <convergence_criterion> <type>PerComponentDeltaX</type> <norm_type>NORM2</norm_type> - <abstols>1e-16 1e-16 1e-16 1e-16 1e-16</abstols> - <reltols>1e-14 1e-14 1e-8 1e-8 1e-8</reltols> + <abstols>1e-16 1e-16 1e-16 1e-16</abstols> + <reltols>1e-14 1e-8 1e-8 1e-8</reltols> </convergence_criterion> <time_discretization> <type>BackwardEuler</type> @@ -236,7 +241,6 @@ <variables> <variable>displacement</variable> <variable>pressure</variable> - <variable>temperature</variable> <variable>sigma</variable> <variable>epsilon</variable> <variable>saturation</variable> @@ -275,16 +279,6 @@ <type>Constant</type> <values>4e6</values> </parameter> - <parameter> - <name>temperature0</name> - <type>Constant</type> - <values>298.15</values> - </parameter> - <parameter> - <name>temperature_outside</name> - <type>Constant</type> - <values>298.15</values> - </parameter> <parameter> <name>pressure_tunnel</name> <type>Constant</type> @@ -407,40 +401,6 @@ </deactivated_subdomain> </deactivated_subdomains> </process_variable> - <process_variable> - <name>temperature</name> - <components>1</components> - <order>1</order> - <initial_condition>temperature0</initial_condition> - <boundary_conditions> - <boundary_condition> - <mesh>A2_back</mesh> - <type>Dirichlet</type> - <parameter>temperature_outside</parameter> - </boundary_condition> - <boundary_condition> - <mesh>A2_right</mesh> - <type>Dirichlet</type> - <parameter>temperature_outside</parameter> - </boundary_condition> - <boundary_condition> - <mesh>A2_top</mesh> - <type>Dirichlet</type> - <parameter>temperature_outside</parameter> - </boundary_condition> - </boundary_conditions> - <deactivated_subdomains> - <deactivated_subdomain> - <time_curve>excavation_curve</time_curve> - <line_segment> - <start>0 0 0</start> - <end>0 0.4 0</end> - </line_segment> - <material_ids>1</material_ids> - <boundary_parameter>temperature_outside</boundary_parameter> - </deactivated_subdomain> - </deactivated_subdomains> - </process_variable> </process_variables> <nonlinear_solvers> <nonlinear_solver> diff --git a/Tests/MeshLib/TestFlipElements.cpp b/Tests/MeshLib/TestFlipElements.cpp index 1cc9a27b8a21464446a9edf886520bab0cb58d42..a52871dccc913a3b3d3c33524f676ca3649a5620 100644 --- a/Tests/MeshLib/TestFlipElements.cpp +++ b/Tests/MeshLib/TestFlipElements.cpp @@ -52,7 +52,7 @@ TEST(MeshLib, FlipTriMesh) ASSERT_EQ(mesh->getElement(i)->getNode(2)->getID(), result->getElement(i)->getNode(2)->getID()); ASSERT_EQ( - 1.0, MeshLib::FaceRule::getSurfaceNormal(result->getElement(i))[2]); + 1.0, MeshLib::FaceRule::getSurfaceNormal(*result->getElement(i))[2]); } } @@ -75,7 +75,7 @@ TEST(MeshLib, FlipQuadMesh) ASSERT_EQ(mesh->getElement(i)->getNode(3)->getID(), result->getElement(i)->getNode(2)->getID()); ASSERT_EQ( - 1.0, MeshLib::FaceRule::getSurfaceNormal(result->getElement(i))[2]); + 1.0, MeshLib::FaceRule::getSurfaceNormal(*result->getElement(i))[2]); } }