diff --git a/ProcessLib/AnalyticalJacobianAssembler.cpp b/ProcessLib/AnalyticalJacobianAssembler.cpp index d560ce3bf2d27640f845d2b1ee266b393d4f4a46..6767a405da1f1eb3a4614981bb6233a26cdd9d4c 100644 --- a/ProcessLib/AnalyticalJacobianAssembler.cpp +++ b/ProcessLib/AnalyticalJacobianAssembler.cpp @@ -9,6 +9,7 @@ */ #include "AnalyticalJacobianAssembler.h" + #include "CoupledSolutionsForStaggeredScheme.h" #include "LocalAssemblerInterface.h" diff --git a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp index 64a0bfeeac4a587f2b1388850f3e0bd9b9f8f4d6..406c38c7e3abf8ab6ce3eafdec4ac14cc97aa132 100644 --- a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp @@ -12,8 +12,8 @@ #include <algorithm> #include <vector> -#include "BaseLib/Logging.h" +#include "BaseLib/Logging.h" #include "MeshLib/MeshSearch/NodeSearch.h" // for getUniqueNodes #include "MeshLib/Node.h" #include "ParameterLib/Utils.h" @@ -78,15 +78,15 @@ ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition( "bulk_node_ids", MeshLib::MeshItemType::Node, 1); auto const& bulk_nodes = bulk_mesh.getNodes(); - auto get_bulk_element_face_id = - [&](auto const bulk_element_id, MeshLib::Element const* bc_elem) { - auto const* bulk_elem = _bulk_mesh.getElement(bulk_element_id); - std::array<MeshLib::Node*, 3> nodes{ - {bulk_nodes[(*bulk_node_ids)[bc_elem->getNode(0)->getID()]], - bulk_nodes[(*bulk_node_ids)[bc_elem->getNode(1)->getID()]], - bulk_nodes[(*bulk_node_ids)[bc_elem->getNode(2)->getID()]]}}; - return bulk_elem->identifyFace(nodes.data()); - }; + auto get_bulk_element_face_id = [&](auto const bulk_element_id, + MeshLib::Element const* bc_elem) { + auto const* bulk_elem = _bulk_mesh.getElement(bulk_element_id); + std::array<MeshLib::Node*, 3> nodes{ + {bulk_nodes[(*bulk_node_ids)[bc_elem->getNode(0)->getID()]], + bulk_nodes[(*bulk_node_ids)[bc_elem->getNode(1)->getID()]], + bulk_nodes[(*bulk_node_ids)[bc_elem->getNode(2)->getID()]]}}; + return bulk_elem->identifyFace(nodes.data()); + }; _bulk_ids.reserve(bc_elements.size()); std::transform(begin(bc_elements), end(bc_elements), @@ -210,7 +210,7 @@ void ConstraintDirichletBoundaryCondition::getEssentialBCValues( else { bc_values.ids.emplace_back(current_id); - bc_values.values.emplace_back(sum/cnt); + bc_values.values.emplace_back(sum / cnt); cnt = 1; sum = tmp_bc_value.second; current_id = tmp_bc_value.first; @@ -236,7 +236,7 @@ createConstraintDirichletBoundaryCondition( config.checkConfigParameter("type", "ConstraintDirichlet"); auto const constraint_type = - //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__constraint_type} + //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__constraint_type} config.getConfigParameter<std::string>("constraint_type"); if (constraint_type != "Flux") { @@ -247,7 +247,7 @@ createConstraintDirichletBoundaryCondition( // Todo (TF) Open question: How to specify which getFlux function should be // used for the constraint calculation? auto const constraining_process_variable = - //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__constraining_process_variable} + //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__constraining_process_variable} config.getConfigParameter<std::string>("constraining_process_variable"); if (!constraining_process.isMonolithicSchemeUsed()) @@ -259,11 +259,11 @@ createConstraintDirichletBoundaryCondition( const int process_id = 0; auto process_variables = constraining_process.getProcessVariables(process_id); - auto constraining_pv = - std::find_if(process_variables.cbegin(), process_variables.cend(), - [&constraining_process_variable](ProcessVariable const& pv) { - return pv.getName() == constraining_process_variable; - }); + auto constraining_pv = std::find_if( + process_variables.cbegin(), process_variables.cend(), + [&constraining_process_variable](ProcessVariable const& pv) { + return pv.getName() == constraining_process_variable; + }); if (constraining_pv == std::end(process_variables)) { auto const& constraining_process_variable_name = @@ -277,11 +277,11 @@ createConstraintDirichletBoundaryCondition( } auto const constraint_threshold = - //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__constraint_threshold} + //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__constraint_threshold} config.getConfigParameter<double>("constraint_threshold"); auto const constraint_direction_string = - //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__constraint_direction} + //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__constraint_direction} config.getConfigParameter<std::string>("constraint_direction"); if (constraint_direction_string != "greater" && constraint_direction_string != "lower") @@ -293,7 +293,6 @@ createConstraintDirichletBoundaryCondition( } bool const lower = constraint_direction_string == "lower"; - //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__parameter} auto const param_name = config.getConfigParameter<std::string>("parameter"); DBUG("Using parameter {:s}", param_name); diff --git a/ProcessLib/BoundaryCondition/CreateDirichletBoundaryConditionWithinTimeInterval.cpp b/ProcessLib/BoundaryCondition/CreateDirichletBoundaryConditionWithinTimeInterval.cpp index 90ef7229614f500256e7a4b62c52b5e36e0e2a79..8bfd85d69d9ca77e1034768f71e7ccfa81b3a8c5 100644 --- a/ProcessLib/BoundaryCondition/CreateDirichletBoundaryConditionWithinTimeInterval.cpp +++ b/ProcessLib/BoundaryCondition/CreateDirichletBoundaryConditionWithinTimeInterval.cpp @@ -16,7 +16,6 @@ namespace ProcessLib { - std::unique_ptr<BoundaryCondition> createDirichletBoundaryConditionWithinTimeInterval( BaseLib::ConfigTree const& config, MeshLib::Mesh const& bc_mesh, @@ -57,7 +56,7 @@ createDirichletBoundaryConditionWithinTimeInterval( #endif // USE_PETSC return std::make_unique<DirichletBoundaryConditionWithinTimeInterval>( - std::move(time_interval), param, bc_mesh, dof_table_bulk, - variable_id, component_id); + std::move(time_interval), param, bc_mesh, dof_table_bulk, variable_id, + component_id); } } // namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.cpp b/ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.cpp index 8848b9d6116ed1efe7ad3e66fab17f6a18393e99..cfa16eb3179d09f08f9f7ba9e081eb864e62f489 100644 --- a/ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.cpp +++ b/ProcessLib/BoundaryCondition/DeactivatedSubdomainDirichlet.cpp @@ -37,8 +37,8 @@ DeactivatedSubdomainDirichlet::DeactivatedSubdomainDirichlet( void DeactivatedSubdomainDirichlet::config( NumLib::LocalToGlobalIndexMap const& dof_table_bulk) { - checkParametersOfDirichletBoundaryCondition(*_subdomain.mesh, dof_table_bulk, - _variable_id, _component_id); + checkParametersOfDirichletBoundaryCondition( + *_subdomain.mesh, dof_table_bulk, _variable_id, _component_id); std::vector<MeshLib::Node*> const& bc_nodes = _subdomain.mesh->getNodes(); MeshLib::MeshSubset subdomain_mesh_subset(*_subdomain.mesh, bc_nodes); @@ -80,9 +80,9 @@ void DeactivatedSubdomainDirichlet::getEssentialBCValues( }; if (time_interval_contains(t)) { - getEssentialBCValuesLocal(_parameter, *_subdomain.mesh, - inactive_nodes_in_bc_mesh, *_dof_table_boundary, - _variable_id, _component_id, t, x, bc_values); + getEssentialBCValuesLocal( + _parameter, *_subdomain.mesh, inactive_nodes_in_bc_mesh, + *_dof_table_boundary, _variable_id, _component_id, t, x, bc_values); return; } diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp index f526cd53ef2587505911c3262c05f38c63e1984a..61c37a656f17076f03b72c6c59d45c682217f198 100644 --- a/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp @@ -12,11 +12,10 @@ #include <algorithm> #include <vector> -#include "BaseLib/Logging.h" - -#include "DirichletBoundaryConditionAuxiliaryFunctions.h" #include "BaseLib/ConfigTree.h" +#include "BaseLib/Logging.h" +#include "DirichletBoundaryConditionAuxiliaryFunctions.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" #include "NumLib/IndexValueVector.h" #include "ParameterLib/Parameter.h" diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp index d564e66eb5a6900c1f5a493ed255516ee4eb82c8..928e1709c6a55a09f6eb2cd9ffa5bb843ab31be3 100644 --- a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp +++ b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp @@ -14,7 +14,6 @@ #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" - #include "NumLib/DOF/LocalToGlobalIndexMap.h" #include "NumLib/IndexValueVector.h" #include "ParameterLib/Parameter.h" diff --git a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp index 6c155b761f9f4e2e152f0109b89476c50afc7361..124131ef1f08a8de032d2a099b98865b6a884668 100644 --- a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp @@ -9,6 +9,7 @@ */ #include "HCNonAdvectiveFreeComponentFlowBoundaryCondition.h" + #include "MeshLib/Elements/Element.h" #include "ParameterLib/Utils.h" diff --git a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp index 084273cadfc6279b54fdcc4629783c81f3f30565..9bd8de32794d2241527935fe540dba0ade1a25a3 100644 --- a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp @@ -9,6 +9,7 @@ */ #include "NeumannBoundaryCondition.h" + #include "ParameterLib/Utils.h" namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.cpp b/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.cpp index 3c396b23298fc2223075cd4127b854233d68029d..9bba328b4b0913134d4979094e1706211bc903b1 100644 --- a/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.cpp +++ b/ProcessLib/BoundaryCondition/Python/BHEInflowPythonBoundaryConditionModule.cpp @@ -38,12 +38,12 @@ public: } std::tuple<bool, bool, std::vector<double>, std::vector<double>> - tespySolver( - double t, - std::vector<double> const& Tin_val, - std::vector<double> const& Tout_val) const override + tespySolver(double t, + std::vector<double> const& Tin_val, + std::vector<double> const& Tout_val) const override { - using Ret = std::tuple<bool, bool, std::vector<double>, std::vector<double>>; + using Ret = + std::tuple<bool, bool, std::vector<double>, std::vector<double>>; PYBIND11_OVERLOAD(Ret, BHEInflowPythonBoundaryConditionPythonSideInterface, tespySolver, t, Tin_val, Tout_val); @@ -64,8 +64,7 @@ void bheInflowpythonBindBoundaryCondition(pybind11::module& m) &BHEInflowPythonBoundaryConditionPythonSideInterface:: initializeDataContainer); pybc.def("tespySolver", - &BHEInflowPythonBoundaryConditionPythonSideInterface:: - tespySolver); + &BHEInflowPythonBoundaryConditionPythonSideInterface::tespySolver); } } // namespace ProcessLib diff --git a/ProcessLib/CentralDifferencesJacobianAssembler.cpp b/ProcessLib/CentralDifferencesJacobianAssembler.cpp index bd01dc7d50b7da3069b47c6ea736cf33a9320585..7d8f4d54e011bcdeb5da0d083ee2aa5d8442cf35 100644 --- a/ProcessLib/CentralDifferencesJacobianAssembler.cpp +++ b/ProcessLib/CentralDifferencesJacobianAssembler.cpp @@ -36,7 +36,8 @@ void CentralDifferencesJacobianAssembler::assembleWithJacobian( std::vector<double>& local_Jac_data) { // TODO do not check in every call. - if (local_x_data.size() % _absolute_epsilons.size() != 0) { + if (local_x_data.size() % _absolute_epsilons.size() != 0) + { OGS_FATAL( "The number of specified epsilons ({:d}) and the number of local " "d.o.f.s ({:d}) do not match, i.e., the latter is not divisible by " @@ -52,8 +53,8 @@ void CentralDifferencesJacobianAssembler::assembleWithJacobian( auto const local_xdot = MathLib::toVector<Eigen::VectorXd>(local_xdot_data, num_r_c); - auto local_Jac = MathLib::createZeroedMatrix(local_Jac_data, - num_r_c, num_r_c); + auto local_Jac = + MathLib::createZeroedMatrix(local_Jac_data, num_r_c, num_r_c); _local_x_perturbed_data = local_x_data; _local_xdot_perturbed_data = local_xdot_data; @@ -88,7 +89,8 @@ void CentralDifferencesJacobianAssembler::assembleWithJacobian( _local_x_perturbed_data[i] = local_x_data[i]; _local_xdot_perturbed_data[i] = local_xdot_data[i]; - if (!local_M_data.empty()) { + if (!local_M_data.empty()) + { auto const local_M_p = MathLib::toMatrix(local_M_data, num_r_c, num_r_c); auto const local_M_m = @@ -99,7 +101,8 @@ void CentralDifferencesJacobianAssembler::assembleWithJacobian( local_M_data.clear(); _local_M_data.clear(); } - if (!local_K_data.empty()) { + if (!local_K_data.empty()) + { auto const local_K_p = MathLib::toMatrix(local_K_data, num_r_c, num_r_c); auto const local_K_m = @@ -110,7 +113,8 @@ void CentralDifferencesJacobianAssembler::assembleWithJacobian( local_K_data.clear(); _local_K_data.clear(); } - if (!local_b_data.empty()) { + if (!local_b_data.empty()) + { auto const local_b_p = MathLib::toVector<Eigen::VectorXd>(local_b_data, num_r_c); auto const local_b_m = @@ -128,11 +132,13 @@ void CentralDifferencesJacobianAssembler::assembleWithJacobian( local_K_data, local_b_data); // Compute remaining terms of the Jacobian. - if (dxdot_dx != 0.0 && !local_M_data.empty()) { + if (dxdot_dx != 0.0 && !local_M_data.empty()) + { auto local_M = MathLib::toMatrix(local_M_data, num_r_c, num_r_c); local_Jac.noalias() += local_M * dxdot_dx; } - if (dx_dx != 0.0 && !local_K_data.empty()) { + if (dx_dx != 0.0 && !local_K_data.empty()) + { auto local_K = MathLib::toMatrix(local_K_data, num_r_c, num_r_c); local_Jac.noalias() += local_K * dx_dx; } @@ -152,7 +158,8 @@ createCentralDifferencesJacobianAssembler(BaseLib::ConfigTree const& config) auto comp_mag = config.getConfigParameterOptional<std::vector<double>>( "component_magnitudes"); - if (!!rel_eps != !!comp_mag) { + if (!!rel_eps != !!comp_mag) + { OGS_FATAL( "Either both or none of <relative_epsilons> and " "<component_magnitudes> have to be specified."); @@ -160,18 +167,23 @@ createCentralDifferencesJacobianAssembler(BaseLib::ConfigTree const& config) std::vector<double> abs_eps; - if (rel_eps) { - if (rel_eps->size() != comp_mag->size()) { + if (rel_eps) + { + if (rel_eps->size() != comp_mag->size()) + { OGS_FATAL( "The numbers of components of <relative_epsilons> and " "<component_magnitudes> do not match."); } abs_eps.resize(rel_eps->size()); - for (std::size_t i=0; i<rel_eps->size(); ++i) { + for (std::size_t i = 0; i < rel_eps->size(); ++i) + { abs_eps[i] = (*rel_eps)[i] * (*comp_mag)[i]; } - } else { + } + else + { // By default 1e-8 is used as epsilon for all components. // TODO: remove this default value. abs_eps.emplace_back(1e-8); diff --git a/ProcessLib/CompareJacobiansJacobianAssembler.cpp b/ProcessLib/CompareJacobiansJacobianAssembler.cpp index 5ef330d06cbe1c5bc22d60e81e2f8d2b01a9f34d..2eab4201b7699dc72d8d54f447f8ec78f465e1a2 100644 --- a/ProcessLib/CompareJacobiansJacobianAssembler.cpp +++ b/ProcessLib/CompareJacobiansJacobianAssembler.cpp @@ -12,9 +12,8 @@ #include <sstream> -#include "MathLib/LinAlg/Eigen/EigenMapTools.h" - #include "CreateJacobianAssembler.h" +#include "MathLib/LinAlg/Eigen/EigenMapTools.h" namespace { diff --git a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp index 23a075d8b566bedeabd4d180b164ccae3a316622..4fc9bf55b24d6ec39f9b1745888d6089fe0beff1 100644 --- a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp +++ b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp @@ -11,15 +11,14 @@ #include "CreateComponentTransportProcess.h" #include "ChemistryLib/ChemicalSolverInterface.h" +#include "ComponentTransportProcess.h" +#include "ComponentTransportProcessData.h" #include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MeshLib/IO/readMeshFromFile.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/SurfaceFlux/SurfaceFluxData.h" #include "ProcessLib/Utils/ProcessUtils.h" -#include "ComponentTransportProcess.h" -#include "ComponentTransportProcessData.h" - namespace ProcessLib { namespace ComponentTransport diff --git a/ProcessLib/CreateJacobianAssembler.cpp b/ProcessLib/CreateJacobianAssembler.cpp index 4dd325d39bffe8ab8497ef1751c3165d0fe95c09..2c1322625e7c1d75fad77f185a403d2403e978cf 100644 --- a/ProcessLib/CreateJacobianAssembler.cpp +++ b/ProcessLib/CreateJacobianAssembler.cpp @@ -9,9 +9,9 @@ */ #include "CreateJacobianAssembler.h" -#include "BaseLib/Error.h" #include "AnalyticalJacobianAssembler.h" +#include "BaseLib/Error.h" #include "CentralDifferencesJacobianAssembler.h" #include "CompareJacobiansJacobianAssembler.h" @@ -28,7 +28,8 @@ std::unique_ptr<AbstractJacobianAssembler> createJacobianAssembler( //! \ogs_file_param{prj__processes__process__jacobian_assembler__type} auto const type = config->peekConfigParameter<std::string>("type"); - if (type == "Analytical") { + if (type == "Analytical") + { config->ignoreConfigParameter("type"); return std::make_unique<AnalyticalJacobianAssembler>(); } diff --git a/ProcessLib/CreateProcessData.cpp b/ProcessLib/CreateProcessData.cpp index 9319f67d7dd7bf8483ed88ce6fbebfe38f53b2cf..fbf2429dd286bef382aa5e433d396ea40385b1bf 100644 --- a/ProcessLib/CreateProcessData.cpp +++ b/ProcessLib/CreateProcessData.cpp @@ -9,14 +9,12 @@ */ #include "BaseLib/Algorithm.h" - #include "NumLib/ODESolver/TimeDiscretizationBuilder.h" #ifdef USE_PETSC #include "NumLib/ODESolver/PETScNonlinearSolver.h" #endif // USE_PETSC -#include "NumLib/TimeStepping/CreateTimeStepper.h" - #include "CreateProcessData.h" +#include "NumLib/TimeStepping/CreateTimeStepper.h" namespace ProcessLib { diff --git a/ProcessLib/CreateTimeLoop.cpp b/ProcessLib/CreateTimeLoop.cpp index 15e677bc60fd92e0413e729811b551e807933202..44138a4d5a427444693a2a8035d5052d8df75279 100644 --- a/ProcessLib/CreateTimeLoop.cpp +++ b/ProcessLib/CreateTimeLoop.cpp @@ -14,7 +14,6 @@ #include "ProcessLib/CreateProcessData.h" #include "ProcessLib/Output/CreateOutput.h" #include "ProcessLib/Output/Output.h" - #include "TimeLoop.h" namespace ProcessLib diff --git a/ProcessLib/HT/CreateHTProcess.cpp b/ProcessLib/HT/CreateHTProcess.cpp index abc76f0be750b1e658d657f9483d7cc523b3f501..7b412b43550a9c9c52d73e487407734e1c169086 100644 --- a/ProcessLib/HT/CreateHTProcess.cpp +++ b/ProcessLib/HT/CreateHTProcess.cpp @@ -10,6 +10,9 @@ #include "CreateHTProcess.h" +#include "HTLocalAssemblerInterface.h" +#include "HTProcess.h" +#include "HTProcessData.h" #include "MaterialLib/MPL/CheckMaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -19,10 +22,6 @@ #include "ProcessLib/SurfaceFlux/SurfaceFluxData.h" #include "ProcessLib/Utils/ProcessUtils.h" -#include "HTProcess.h" -#include "HTProcessData.h" -#include "HTLocalAssemblerInterface.h" - namespace ProcessLib { namespace HT @@ -46,8 +45,8 @@ void checkMPLProperties( MaterialPropertyLib::PropertyType::storage}; MaterialPropertyLib::checkMaterialSpatialDistributionMap( - mesh, media_map, required_property_medium, required_property_solid_phase, - required_property_liquid_phase); + mesh, media_map, required_property_medium, + required_property_solid_phase, required_property_liquid_phase); } std::unique_ptr<Process> createHTProcess( diff --git a/ProcessLib/HT/HTProcess.cpp b/ProcessLib/HT/HTProcess.cpp index 13acb43a21fc087eef9db5fcf07884223ffa4067..0f909abda1b925189bab859e375c7ba5e322ef8c 100644 --- a/ProcessLib/HT/HTProcess.cpp +++ b/ProcessLib/HT/HTProcess.cpp @@ -12,12 +12,11 @@ #include <cassert> +#include "MonolithicHTFEM.h" #include "NumLib/DOF/DOFTableUtil.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" #include "ProcessLib/SurfaceFlux/SurfaceFluxData.h" #include "ProcessLib/Utils/CreateLocalAssemblers.h" - -#include "MonolithicHTFEM.h" #include "StaggeredHTFEM.h" namespace ProcessLib diff --git a/ProcessLib/HeatConduction/HeatConductionProcess.cpp b/ProcessLib/HeatConduction/HeatConductionProcess.cpp index 13f0fe54d4bde56d6d2e042647d74c8718adcde1..2cab6d4bb1b10e77f1bea375bdb4498477ca96b7 100644 --- a/ProcessLib/HeatConduction/HeatConductionProcess.cpp +++ b/ProcessLib/HeatConduction/HeatConductionProcess.cpp @@ -13,8 +13,8 @@ #include <cassert> #include "NumLib/DOF/DOFTableUtil.h" -#include "ProcessLib/Utils/CreateLocalAssemblers.h" #include "ProcessLib/Utils/ComputeResiduum.h" +#include "ProcessLib/Utils/CreateLocalAssemblers.h" namespace ProcessLib { diff --git a/ProcessLib/HeatTransportBHE/BHE/BHE_1P.cpp b/ProcessLib/HeatTransportBHE/BHE/BHE_1P.cpp index f8015e89efc4db19e8ab8082c721d0fc74b39cb3..80e41d3b300488f5310d1253d029ee50b05a8d32 100644 --- a/ProcessLib/HeatTransportBHE/BHE/BHE_1P.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/BHE_1P.cpp @@ -11,6 +11,7 @@ #include "BHE_1P.h" #include <boost/math/constants/constants.hpp> + #include "FlowAndTemperatureControl.h" #include "Physics.h" #include "ThermoMechanicalFlowProperties.h" diff --git a/ProcessLib/HeatTransportBHE/BHE/BHE_1U.cpp b/ProcessLib/HeatTransportBHE/BHE/BHE_1U.cpp index 2ef82cbe6b649f3039adc7a35e9d1c90d51b5ab8..1f0fc430c97209317aeeef4c79a4de26fae42b96 100644 --- a/ProcessLib/HeatTransportBHE/BHE/BHE_1U.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/BHE_1U.cpp @@ -11,6 +11,7 @@ #include "BHE_1U.h" #include <boost/math/constants/constants.hpp> + #include "FlowAndTemperatureControl.h" #include "Physics.h" #include "ThermoMechanicalFlowProperties.h" diff --git a/ProcessLib/HeatTransportBHE/BHE/BHE_2U.cpp b/ProcessLib/HeatTransportBHE/BHE/BHE_2U.cpp index 99555a2ea541cb02815d5efbc62664e8c1db6ba5..0a9255667c931a6d2337b2c720d914bcf0905f6b 100644 --- a/ProcessLib/HeatTransportBHE/BHE/BHE_2U.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/BHE_2U.cpp @@ -11,6 +11,7 @@ #include "BHE_2U.h" #include <boost/math/constants/constants.hpp> + #include "FlowAndTemperatureControl.h" #include "Physics.h" #include "ThermoMechanicalFlowProperties.h" diff --git a/ProcessLib/HeatTransportBHE/BHE/BoreholeGeometry.cpp b/ProcessLib/HeatTransportBHE/BHE/BoreholeGeometry.cpp index 494a444874bdd7bbf1782bfa88ef9194230f54c0..509dd1b6e6603ceba7e3efa4e4b866ddc3566ffe 100644 --- a/ProcessLib/HeatTransportBHE/BHE/BoreholeGeometry.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/BoreholeGeometry.cpp @@ -9,6 +9,7 @@ */ #include "BoreholeGeometry.h" + #include "BaseLib/ConfigTree.h" namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/CreateBHE1PType.cpp b/ProcessLib/HeatTransportBHE/BHE/CreateBHE1PType.cpp index 0cd2ef56f9fb076c37c73eb9682471c4ea40b247..66cb35c65f3c8cd338a85818f84eeaa61cca5589 100644 --- a/ProcessLib/HeatTransportBHE/BHE/CreateBHE1PType.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/CreateBHE1PType.cpp @@ -8,10 +8,9 @@ * http://www.opengeosys.org/project/license */ +#include "BHE_1P.h" #include "BaseLib/ConfigTree.h" #include "CreateBHEUType.h" - -#include "BHE_1P.h" #include "CreateFlowAndTemperatureControl.h" namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/CreateBHECoaxial.cpp b/ProcessLib/HeatTransportBHE/BHE/CreateBHECoaxial.cpp index d540924517d7a58ea96c8f68eaff3046253850b8..a75151c65f0f5fec85a37101478b52b737248218 100644 --- a/ProcessLib/HeatTransportBHE/BHE/CreateBHECoaxial.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/CreateBHECoaxial.cpp @@ -9,10 +9,10 @@ */ #include "CreateBHECoaxial.h" -#include "BaseLib/ConfigTree.h" #include "BHE_CXA.h" #include "BHE_CXC.h" +#include "BaseLib/ConfigTree.h" #include "CreateFlowAndTemperatureControl.h" namespace ProcessLib { diff --git a/ProcessLib/HeatTransportBHE/BHE/CreateBHEUType.cpp b/ProcessLib/HeatTransportBHE/BHE/CreateBHEUType.cpp index 3cc75827c89654f0dadd6de8b7a26b635b2bb51c..af5408736887d11accbf65627d1ac911fbba8447 100644 --- a/ProcessLib/HeatTransportBHE/BHE/CreateBHEUType.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/CreateBHEUType.cpp @@ -9,11 +9,11 @@ */ #include "CreateBHEUType.h" -#include "BaseLib/ConfigTree.h" #include "BHE_1P.h" #include "BHE_1U.h" #include "BHE_2U.h" +#include "BaseLib/ConfigTree.h" #include "CreateFlowAndTemperatureControl.h" namespace ProcessLib { diff --git a/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.cpp b/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.cpp index 7c389e7f5b610a9c58345ac6f837e9330f3a479c..b90fc9f6ec16c5dd95bae40816e00704d63d582d 100644 --- a/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.cpp @@ -8,12 +8,12 @@ * http://www.opengeosys.org/project/license */ +#include "CreateFlowAndTemperatureControl.h" + #include "BaseLib/Algorithm.h" #include "BaseLib/ConfigTree.h" -#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" - #include "BuildingPowerCurves.h" -#include "CreateFlowAndTemperatureControl.h" +#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" #include "RefrigerantProperties.h" namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/GroutParameters.cpp b/ProcessLib/HeatTransportBHE/BHE/GroutParameters.cpp index 951d539429f6e4e4db8c6b47d9e8b06da2473047..f49dd9a15140c9fa552470a0045604daa8385a83 100644 --- a/ProcessLib/HeatTransportBHE/BHE/GroutParameters.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/GroutParameters.cpp @@ -9,6 +9,7 @@ */ #include "GroutParameters.h" + #include "BaseLib/ConfigTree.h" namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/Pipe.cpp b/ProcessLib/HeatTransportBHE/BHE/Pipe.cpp index 44c3249f71b36963ce2afdab5d6670f9ccacd22c..ec2f036a3089d97013d8b9897ee181ab1c5ac081 100644 --- a/ProcessLib/HeatTransportBHE/BHE/Pipe.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/Pipe.cpp @@ -9,6 +9,7 @@ */ #include "Pipe.h" + #include "BaseLib/ConfigTree.h" namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/RefrigerantProperties.cpp b/ProcessLib/HeatTransportBHE/BHE/RefrigerantProperties.cpp index e29a201a5282d141edc23ddd6cd7dce1c8439f17..e1fdf5a5bf72c2bd29f039c9d4d1a0018e6fb487 100644 --- a/ProcessLib/HeatTransportBHE/BHE/RefrigerantProperties.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/RefrigerantProperties.cpp @@ -9,6 +9,7 @@ */ #include "RefrigerantProperties.h" + #include "BaseLib/ConfigTree.h" namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEBottomDirichletBoundaryCondition.cpp b/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEBottomDirichletBoundaryCondition.cpp index ffac298e87fec7c454907c4d7a13dca7ce112c4e..bd5fd16eeee18f4551f6349767b199981517e419 100644 --- a/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEBottomDirichletBoundaryCondition.cpp +++ b/ProcessLib/HeatTransportBHE/BoundaryConditions/BHEBottomDirichletBoundaryCondition.cpp @@ -9,6 +9,7 @@ */ #include "BHEBottomDirichletBoundaryCondition.h" + #include "BaseLib/Error.h" namespace ProcessLib::HeatTransportBHE diff --git a/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp b/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp index ffd05169237fdcc5514d3c57d05579a19b0a7c1d..2220e527b53d9e7c8f4d2acdafa209672601adf4 100644 --- a/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp +++ b/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp @@ -12,15 +12,14 @@ #include <vector> -#include "ParameterLib/Utils.h" -#include "ProcessLib/Output/CreateSecondaryVariables.h" - #include "BHE/BHETypes.h" +#include "BHE/CreateBHE1PType.h" #include "BHE/CreateBHECoaxial.h" #include "BHE/CreateBHEUType.h" -#include "BHE/CreateBHE1PType.h" #include "HeatTransportBHEProcess.h" #include "HeatTransportBHEProcessData.h" +#include "ParameterLib/Utils.h" +#include "ProcessLib/Output/CreateSecondaryVariables.h" #ifdef OGS_USE_PYTHON #include <pybind11/pybind11.h> #endif // OGS_USE_PYTHON @@ -220,9 +219,8 @@ std::unique_ptr<Process> createHeatTransportBHEProcess( #endif // OGS_USE_PYTHON } - HeatTransportBHEProcessData process_data(std::move(media_map), - std::move(bhes), - py_object); + HeatTransportBHEProcessData process_data( + std::move(media_map), std::move(bhes), py_object); SecondaryVariableCollection secondary_variables; diff --git a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp index 415f190d070010c15195d280c744bae00ae660f9..6aeb559d2b32388579121a67972c9495434152b4 100644 --- a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp +++ b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp @@ -112,7 +112,7 @@ void HeatTransportBHEProcess::constructDofTable() // Here the number of components equals to the // number of unknowns on the BHE number_of_unknowns, - [& ms = _mesh_subset_BHE_nodes.back()]() { return *ms; }); + [&ms = _mesh_subset_BHE_nodes.back()]() { return *ms; }); vec_n_components.push_back(number_of_unknowns); vec_var_elements.push_back(&bhe_elements); @@ -335,12 +335,12 @@ void HeatTransportBHEProcess::createBHEBoundaryConditionTopBottom( } } - auto get_global_index = - [&](std::size_t const node_id, int const component) { - return _local_to_global_index_map->getGlobalIndex( - {_mesh.getID(), MeshLib::MeshItemType::Node, node_id}, - variable_id, component); - }; + auto get_global_index = [&](std::size_t const node_id, + int const component) { + return _local_to_global_index_map->getGlobalIndex( + {_mesh.getID(), MeshLib::MeshItemType::Node, node_id}, + variable_id, component); + }; auto get_global_bhe_bc_indices = [&](std::array< @@ -413,11 +413,11 @@ void HeatTransportBHEProcess::createBHEBoundaryConditionTopBottom( bcs.addBoundaryCondition( createBHEBottomDirichletBoundaryCondition( get_global_bhe_bc_indices( - {{{bc_bottom_node_id, in_out_component_id.first}, + {{{bc_bottom_node_id, + in_out_component_id.first}, {bc_bottom_node_id, in_out_component_id.second}}}))); } - } }; visit(createBCs, _process_data._vec_BHE_property[bhe_i]); diff --git a/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp index e66ac8e3cc21c5f63ae3b182dd3b75459e37608f..aec517c09e33b7bc6768b2eff0964eddb99322e8 100644 --- a/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -12,19 +12,17 @@ #include <cassert> +#include "HydroMechanicsProcess.h" +#include "HydroMechanicsProcessData.h" #include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/Medium.h" - #include "MaterialLib/SolidModels/CreateConstitutiveRelation.h" #include "MaterialLib/SolidModels/MechanicsBase.h" #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" -#include "HydroMechanicsProcess.h" -#include "HydroMechanicsProcessData.h" - namespace ProcessLib { namespace HydroMechanics @@ -68,9 +66,9 @@ std::unique_ptr<Process> createHydroMechanicsProcess( auto per_process_variables = findProcessVariables( variables, pv_config, {//! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS__process_variables__pressure} - "pressure", - //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS__process_variables__displacement} - "displacement"}); + "pressure", + //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS__process_variables__displacement} + "displacement"}); variable_p = &per_process_variables[0].get(); variable_u = &per_process_variables[1].get(); process_variables.push_back(std::move(per_process_variables)); @@ -144,13 +142,11 @@ std::unique_ptr<Process> createHydroMechanicsProcess( std::array const requiredMediumProperties = { MaterialPropertyLib::reference_temperature, - MaterialPropertyLib::permeability, - MaterialPropertyLib::porosity, MaterialPropertyLib::biot_coefficient - }; - std::array const requiredFluidProperties = { - MaterialPropertyLib::viscosity, MaterialPropertyLib::density}; - std::array const requiredSolidProperties = { - MaterialPropertyLib::density}; + MaterialPropertyLib::permeability, MaterialPropertyLib::porosity, + MaterialPropertyLib::biot_coefficient}; + std::array const requiredFluidProperties = {MaterialPropertyLib::viscosity, + MaterialPropertyLib::density}; + std::array const requiredSolidProperties = {MaterialPropertyLib::density}; for (auto const& element : mesh.getElements()) { diff --git a/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp b/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp index 5187d5d3152ce21ea723a38b84c575b2256fe61e..43e065940273f45e8a251e8a7a8d810f75d8fe9c 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp +++ b/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp @@ -228,9 +228,8 @@ void HydroMechanicsProcess<DisplacementDim>::initializeConcreteProcess( DisplacementDim>::RowsAtCompileTime, &LocalAssemblerIF::getIntPtEpsilon); - add_secondary_variable("velocity", - DisplacementDim, - &LocalAssemblerIF::getIntPtDarcyVelocity); + add_secondary_variable( + "velocity", DisplacementDim, &LocalAssemblerIF::getIntPtDarcyVelocity); // // enable output of internal variables defined by material models diff --git a/ProcessLib/LIE/Common/PostUtils.cpp b/ProcessLib/LIE/Common/PostUtils.cpp index 2cb3c9ce64cb4f571051d4e64e1f6053be7efc37..f5934f92ebbe3e2ee4d44fdb376243b1ea9a9d49 100644 --- a/ProcessLib/LIE/Common/PostUtils.cpp +++ b/ProcessLib/LIE/Common/PostUtils.cpp @@ -235,8 +235,8 @@ PostProcessTool::PostProcessTool( { copyPropertyValues(*p, createProperty(*p)); } - else if (auto p = - dynamic_cast<MeshLib::PropertyVector<long long>*>(property)) + else if (auto p = dynamic_cast<MeshLib::PropertyVector<long long>*>( + property)) { copyPropertyValues(*p, createProperty(*p)); } diff --git a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp index 880b3dd55603ff3f52245a497292659479034cd2..2160d28b0390cc88f320684fd7594d81b45d1374 100644 --- a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp @@ -10,26 +10,23 @@ #include "HydroMechanicsProcess.h" +#include "LocalAssembler/CreateLocalAssemblers.h" +#include "LocalAssembler/HydroMechanicsLocalAssemblerFracture.h" +#include "LocalAssembler/HydroMechanicsLocalAssemblerMatrix.h" +#include "LocalAssembler/HydroMechanicsLocalAssemblerMatrixNearFracture.h" #include "MeshLib/ElementCoordinatesMappingLocal.h" #include "MeshLib/ElementStatus.h" #include "MeshLib/Elements/Utils.h" #include "MeshLib/Mesh.h" #include "MeshLib/MeshInformation.h" #include "MeshLib/Properties.h" - #include "NumLib/DOF/DOFTableUtil.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" - #include "ParameterLib/MeshElementParameter.h" #include "ProcessLib/LIE/Common/BranchProperty.h" #include "ProcessLib/LIE/Common/JunctionProperty.h" #include "ProcessLib/LIE/Common/MeshUtils.h" -#include "LocalAssembler/CreateLocalAssemblers.h" -#include "LocalAssembler/HydroMechanicsLocalAssemblerFracture.h" -#include "LocalAssembler/HydroMechanicsLocalAssemblerMatrix.h" -#include "LocalAssembler/HydroMechanicsLocalAssemblerMatrixNearFracture.h" - namespace ProcessLib { namespace LIE @@ -213,10 +210,11 @@ void HydroMechanicsProcess<GlobalDim>::initializeConcreteProcess( HydroMechanicsLocalAssemblerFracture>( mesh.getElements(), dof_table, // use displacement process variable for shapefunction order - getProcessVariables( - monolithic_process_id)[1].get().getShapeFunctionOrder(), - _local_assemblers, mesh.isAxiallySymmetric(), integration_order, - _process_data); + getProcessVariables(monolithic_process_id)[1] + .get() + .getShapeFunctionOrder(), + _local_assemblers, mesh.isAxiallySymmetric(), integration_order, + _process_data); auto mesh_prop_sigma_xx = MeshLib::getOrCreateMeshProperty<double>( const_cast<MeshLib::Mesh&>(mesh), "stress_xx", @@ -512,8 +510,8 @@ void HydroMechanicsProcess<GlobalDim>::postTimestepConcreteProcess( _mesh, pv_g.getName(), MeshLib::MeshItemType::Node, num_comp); for (int component_id = 0; component_id < num_comp; ++component_id) { - auto const& mesh_subset = dof_table.getMeshSubset( - g_variable_id, component_id); + auto const& mesh_subset = + dof_table.getMeshSubset(g_variable_id, component_id); auto const mesh_id = mesh_subset.getMeshID(); for (auto const* node : mesh_subset.getNodes()) { @@ -604,7 +602,7 @@ void HydroMechanicsProcess<GlobalDim>::assembleWithJacobianConcreteProcess( // Call global assembler for each local assembly item. std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; GlobalExecutor::executeSelectedMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, pv.getActiveElementIDs(), dof_table, t, dt, x, xdot, diff --git a/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.cpp b/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.cpp index e0fd6d8183de4d9592b5cd496c4fe411ccf142a2..3c14d7368a7ddf2dac5ff9c7b911f3b1a7c24bbf 100644 --- a/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.cpp +++ b/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.cpp @@ -13,9 +13,7 @@ #include "MeshLib/ElementCoordinatesMappingLocal.h" #include "MeshLib/Mesh.h" #include "MeshLib/Properties.h" - #include "NumLib/DOF/LocalToGlobalIndexMap.h" - #include "ProcessLib/LIE/Common/BranchProperty.h" #include "ProcessLib/LIE/Common/MeshUtils.h" #include "ProcessLib/LIE/SmallDeformation/LocalAssembler/CreateLocalAssemblers.h" diff --git a/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.cpp b/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.cpp index d1af03e1d201fdc0c51b90dfdb9c6f7dd3e2009c..a9869bcfc276eb0c2ca8dbcfafb8ede1fc536973 100644 --- a/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.cpp +++ b/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.cpp @@ -13,6 +13,7 @@ #include <algorithm> +#include "LiquidFlowProcess.h" #include "MaterialLib/MPL/CheckMaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MaterialLib/PhysicalConstant.h" @@ -20,8 +21,6 @@ #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" -#include "LiquidFlowProcess.h" - namespace ProcessLib { namespace LiquidFlow @@ -79,7 +78,6 @@ std::unique_ptr<Process> createLiquidFlowProcess( SecondaryVariableCollection secondary_variables; - ProcessLib::createSecondaryVariables(config, secondary_variables); // Get the gravity vector for the Darcy velocity diff --git a/ProcessLib/LocalAssemblerInterface.cpp b/ProcessLib/LocalAssemblerInterface.cpp index 367691ea752d834bc62681ea6f0dd5610b4a6f4f..ecb95106f95edabab887688b8eaf9765370a1a57 100644 --- a/ProcessLib/LocalAssemblerInterface.cpp +++ b/ProcessLib/LocalAssemblerInterface.cpp @@ -67,7 +67,8 @@ void LocalAssemblerInterface::assembleWithJacobianForStaggeredScheme( std::vector<double>& /*local_Jac_data*/) { OGS_FATAL( - "The assembleWithJacobianForStaggeredScheme() function is not implemented in" + "The assembleWithJacobianForStaggeredScheme() function is not " + "implemented in" " the local assembler."); } diff --git a/ProcessLib/Output/CreateOutput.cpp b/ProcessLib/Output/CreateOutput.cpp index f3e44068b5eed2692f82aa0142f96ce0e91f01fb..9e02560bff8c89aa11fe78919b35f4fe2a9c1aef 100644 --- a/ProcessLib/Output/CreateOutput.cpp +++ b/ProcessLib/Output/CreateOutput.cpp @@ -12,14 +12,12 @@ #include <memory> #include <tuple> -#include "BaseLib/Logging.h" #include "BaseLib/Algorithm.h" #include "BaseLib/ConfigTree.h" #include "BaseLib/FileTools.h" - +#include "BaseLib/Logging.h" #include "MeshLib/Mesh.h" - #include "Output.h" namespace ProcessLib @@ -30,8 +28,7 @@ std::unique_ptr<Output> createOutput( std::vector<std::unique_ptr<MeshLib::Mesh>> const& meshes) { DBUG("Parse output configuration:"); - OutputType const output_type = [](auto output_type) - { + OutputType const output_type = [](auto output_type) { try { const std::map<std::string, OutputType> outputType_to_enum = { @@ -42,17 +39,17 @@ std::unique_ptr<Output> createOutput( } catch (std::out_of_range&) { - OGS_FATAL("No supported file type provided. Read `{:s}' from <output><type> \ + OGS_FATAL( + "No supported file type provided. Read `{:s}' from <output><type> \ in prj File. Supported: VTK, XDMF.", output_type); } - //! \ogs_file_param{prj__time_loop__output__type} + //! \ogs_file_param{prj__time_loop__output__type} }(config.getConfigParameter<std::string>("type")); auto const prefix = //! \ogs_file_param{prj__time_loop__output__prefix} - config.getConfigParameter<std::string>("prefix", - "{:meshname}"); + config.getConfigParameter<std::string>("prefix", "{:meshname}"); auto const suffix = //! \ogs_file_param{prj__time_loop__output__suffix} @@ -127,7 +124,7 @@ std::unique_ptr<Output> createOutput( //! \ogs_file_param{prj__time_loop__output__meshes} if (auto const meshes_config = config.getConfigSubtreeOptional("meshes")) { - if(prefix.find("{:meshname}") == std::string::npos) + if (prefix.find("{:meshname}") == std::string::npos) { OGS_FATAL( "There are multiple meshes defined in the output section of " @@ -158,8 +155,8 @@ std::unique_ptr<Output> createOutput( config.getConfigParameter<bool>("output_iteration_results", false); return std::make_unique<Output>( - output_directory, output_type, prefix, suffix, compress_output, data_mode, - output_iteration_results, std::move(repeats_each_steps), + output_directory, output_type, prefix, suffix, compress_output, + data_mode, output_iteration_results, std::move(repeats_each_steps), std::move(fixed_output_times), std::move(output_data_specification), std::move(mesh_names_for_output), meshes); } diff --git a/ProcessLib/Output/IntegrationPointWriter.cpp b/ProcessLib/Output/IntegrationPointWriter.cpp index 7e4f5d75b1dd1dacbbf15c3dbcde3ee0b278ed74..c18fe54ab9afc12149e27f8b6985617586d2a639 100644 --- a/ProcessLib/Output/IntegrationPointWriter.cpp +++ b/ProcessLib/Output/IntegrationPointWriter.cpp @@ -8,12 +8,12 @@ * http://www.opengeosys.org/project/license */ +#include "IntegrationPointWriter.h" + #include <nlohmann/json.hpp> #include "MeshLib/Mesh.h" -#include "IntegrationPointWriter.h" - using nlohmann::json; /// Adds the integration point data and creates meta data for it. diff --git a/ProcessLib/Output/Output.cpp b/ProcessLib/Output/Output.cpp index cdcb7990876e26f2710c2d8aabe25b338977d784..4dc9ace8fd05df2674c07c2ea041085c7a3e1c76 100644 --- a/ProcessLib/Output/Output.cpp +++ b/ProcessLib/Output/Output.cpp @@ -240,9 +240,8 @@ void Output::outputMeshXdmf(OutputFile const& output_file, if (!_mesh_xdmf_hdf_writer) { std::filesystem::path path(output_file.path); - _mesh_xdmf_hdf_writer = - std::make_unique<MeshLib::IO::XdmfHdfWriter>(MeshLib::IO::XdmfHdfWriter( - mesh, path, timestep)); + _mesh_xdmf_hdf_writer = std::make_unique<MeshLib::IO::XdmfHdfWriter>( + MeshLib::IO::XdmfHdfWriter(mesh, path, timestep)); } _mesh_xdmf_hdf_writer->writeStep(timestep, t); } @@ -317,10 +316,10 @@ void Output::doOutputAlways(Process const& process, else if (_output_file_type == ProcessLib::OutputType::xdmf) { #ifdef OGS_USE_XDMF - OutputFile const file(_output_directory, _output_file_type, - _output_file_prefix, "", mesh.getName(), - timestep, t, iteration, _output_file_data_mode, - _output_file_compression); + OutputFile const file( + _output_directory, _output_file_type, _output_file_prefix, "", + mesh.getName(), timestep, t, iteration, _output_file_data_mode, + _output_file_compression); outputMeshXdmf(file, mesh, timestep, t); #else diff --git a/ProcessLib/Output/ProcessOutput.cpp b/ProcessLib/Output/ProcessOutput.cpp index d3d5b4a46d0f48603330243436c845078a80b0a7..b207a96da18aa173a071662bc3091579b8a600dc 100644 --- a/ProcessLib/Output/ProcessOutput.cpp +++ b/ProcessLib/Output/ProcessOutput.cpp @@ -269,8 +269,8 @@ void makeOutput(std::string const& file_name, MeshLib::Mesh const& mesh, fegetenv(&fe_env); fesetenv(FE_DFL_ENV); // Set default environment effectively disabling // exceptions. -#endif //_WIN32 -#endif //__APPLE__ +#endif //_WIN32 +#endif //__APPLE__ switch (file_type) { @@ -285,8 +285,7 @@ void makeOutput(std::string const& file_name, MeshLib::Mesh const& mesh, case OutputType::xdmf: { #ifdef OGS_USE_XDMF - MeshLib::IO::XdmfHdfWriter writer( - mesh, file_name, time_step); + MeshLib::IO::XdmfHdfWriter writer(mesh, file_name, time_step); writer.writeStep(time_step, time); #else // silence compiler warnings diff --git a/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp b/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp index dc4ce24bf4d074d052bb808700c426b114ad06ae..bf25f2fd238adfcb0def5d0f0d21a0db5047aa53 100644 --- a/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp +++ b/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp @@ -15,11 +15,10 @@ #include "MaterialLib/SolidModels/CreateConstitutiveRelation.h" #include "MaterialLib/SolidModels/MechanicsBase.h" #include "ParameterLib/Utils.h" -#include "ProcessLib/Output/CreateSecondaryVariables.h" -#include "ProcessLib/Utils/ProcessUtils.h" - #include "PhaseFieldProcess.h" #include "PhaseFieldProcessData.h" +#include "ProcessLib/Output/CreateSecondaryVariables.h" +#include "ProcessLib/Utils/ProcessUtils.h" namespace ProcessLib { diff --git a/ProcessLib/PhaseField/PhaseFieldProcess.cpp b/ProcessLib/PhaseField/PhaseFieldProcess.cpp index 30c1e98aaaa13c874ecb509abb5506e18080193c..837c02429b1f3aefbdceba043ffd3500e4c99be9 100644 --- a/ProcessLib/PhaseField/PhaseFieldProcess.cpp +++ b/ProcessLib/PhaseField/PhaseFieldProcess.cpp @@ -13,12 +13,10 @@ #include <cassert> #include "NumLib/DOF/ComputeSparsityPattern.h" - +#include "PhaseFieldFEM.h" #include "ProcessLib/Process.h" #include "ProcessLib/SmallDeformation/CreateLocalAssemblers.h" -#include "PhaseFieldFEM.h" - namespace ProcessLib { namespace PhaseField diff --git a/ProcessLib/Process.cpp b/ProcessLib/Process.cpp index 60f58a75a6b5eb1e4bf3ec842450abdc179aed03..e147a8aa0e789f1148951f3e699ca763caf6427d 100644 --- a/ProcessLib/Process.cpp +++ b/ProcessLib/Process.cpp @@ -10,13 +10,12 @@ #include "Process.h" +#include "CoupledSolutionsForStaggeredScheme.h" #include "NumLib/DOF/ComputeSparsityPattern.h" #include "NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h" #include "NumLib/ODESolver/ConvergenceCriterionPerComponent.h" #include "ParameterLib/Parameter.h" - #include "ProcessVariable.h" -#include "CoupledSolutionsForStaggeredScheme.h" namespace ProcessLib { diff --git a/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp b/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp index aad61ef1bc31346cd7defc18fee20497cb08d89d..b5baad1c71ced0a21bf95fec2a2889854ee35455 100644 --- a/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp +++ b/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp @@ -16,7 +16,6 @@ #include "MaterialLib/PorousMedium/Storage/createStorageModel.h" #include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h" #include "MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.h" - #include "MeshLib/Mesh.h" namespace ProcessLib @@ -43,11 +42,12 @@ PorousMediaProperties createPorousMediaProperties( relative_permeability_models; std::vector<int> mat_ids; - for (auto const& porous_medium_config : - //! \ogs_file_param{prj__processes__process__RichardsComponentTransport__porous_medium__porous_medium} - porous_medium_configs.getConfigSubtreeList("porous_medium")) + for ( + auto const& porous_medium_config : + //! \ogs_file_param{prj__processes__process__RichardsComponentTransport__porous_medium__porous_medium} + porous_medium_configs.getConfigSubtreeList("porous_medium")) { - //! \ogs_file_attr{prj__processes__process__RichardsComponentTransport__porous_medium__porous_medium__id} + //! \ogs_file_attr{prj__processes__process__RichardsComponentTransport__porous_medium__porous_medium__id} auto const id = porous_medium_config.getConfigAttribute<int>("id"); mat_ids.push_back(id); @@ -76,8 +76,9 @@ PorousMediaProperties createPorousMediaProperties( auto const& capillary_pressure_config = //! \ogs_file_param{prj__processes__process__RichardsComponentTransport__porous_medium__porous_medium__capillary_pressure} porous_medium_config.getConfigSubtree("capillary_pressure"); - auto capillary_pressure = MaterialLib::PorousMedium::createCapillaryPressureModel( - capillary_pressure_config); + auto capillary_pressure = + MaterialLib::PorousMedium::createCapillaryPressureModel( + capillary_pressure_config); capillary_pressure_models.emplace_back(std::move(capillary_pressure)); auto const& krel_config = diff --git a/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp b/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp index 719f557ea8654ad523ce553958140a5e3c020833..b0decfb7f26e23209dfb8633f0d30762fd07d969 100644 --- a/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp +++ b/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp @@ -10,13 +10,12 @@ #include "CreateRichardsComponentTransportProcess.h" +#include "CreatePorousMediaProperties.h" #include "MaterialLib/Fluid/FluidProperties/CreateFluidProperties.h" #include "ParameterLib/ConstantParameter.h" #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" - -#include "CreatePorousMediaProperties.h" #include "RichardsComponentTransportProcess.h" #include "RichardsComponentTransportProcessData.h" @@ -55,11 +54,10 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( { auto per_process_variables = findProcessVariables( variables, pv_config, - { - //! \ogs_file_param_special{prj__processes__process__RichardsComponentTransport__process_variables__concentration} - "concentration", - //! \ogs_file_param_special{prj__processes__process__RichardsComponentTransport__process_variables__pressure} - "pressure"}); + {//! \ogs_file_param_special{prj__processes__process__RichardsComponentTransport__process_variables__concentration} + "concentration", + //! \ogs_file_param_special{prj__processes__process__RichardsComponentTransport__process_variables__pressure} + "pressure"}); process_variables.push_back(std::move(per_process_variables)); } else // staggered scheme. diff --git a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcess.cpp b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcess.cpp index 40e062e2b0e34491912c738f1fc738c765aab333..eed7ba8752911c2cda200d8a1907877c0268ad45 100644 --- a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcess.cpp +++ b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcess.cpp @@ -71,7 +71,7 @@ void RichardsComponentTransportProcess::assembleConcreteProcess( DBUG("Assemble RichardsComponentTransportProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. @@ -102,4 +102,3 @@ void RichardsComponentTransportProcess::assembleWithJacobianConcreteProcess( } // namespace RichardsComponentTransport } // namespace ProcessLib - diff --git a/ProcessLib/RichardsFlow/CreateRichardsFlowProcess.cpp b/ProcessLib/RichardsFlow/CreateRichardsFlowProcess.cpp index 652b7c7d5c637a4827589e6afa7bc0813f36be91..f402d9c3255e3ee191f23da4611c2c12e0741cbd 100644 --- a/ProcessLib/RichardsFlow/CreateRichardsFlowProcess.cpp +++ b/ProcessLib/RichardsFlow/CreateRichardsFlowProcess.cpp @@ -16,7 +16,6 @@ #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" - #include "RichardsFlowProcess.h" #include "RichardsFlowProcessData.h" @@ -58,7 +57,7 @@ std::unique_ptr<Process> createRichardsFlowProcess( BaseLib::ConfigTree const& config, std::map<std::string, std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& - /*curves*/, + /*curves*/, std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) { //! \ogs_file_param{prj__processes__process__type} diff --git a/ProcessLib/RichardsFlow/RichardsFlowProcess.cpp b/ProcessLib/RichardsFlow/RichardsFlowProcess.cpp index bbadab154e5a73ddbcc3a11caf92f3157a3f9966..50ec9b46e4bb3c28be2306e244431f698d0a3da4 100644 --- a/ProcessLib/RichardsFlow/RichardsFlowProcess.cpp +++ b/ProcessLib/RichardsFlow/RichardsFlowProcess.cpp @@ -68,7 +68,7 @@ void RichardsFlowProcess::assembleConcreteProcess( DBUG("Assemble RichardsFlowProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. @@ -87,7 +87,7 @@ void RichardsFlowProcess::assembleWithJacobianConcreteProcess( DBUG("AssembleWithJacobian RichardsFlowProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. diff --git a/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp b/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp index 3fe0730a5f89ccd0dee5462de120186db519db9c..6450d47382a452ea4468fe7e2bf678f8795d30ac 100644 --- a/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp +++ b/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp @@ -36,12 +36,11 @@ void checkMPLProperties( MaterialPropertyLib::bishops_effective_stress, MaterialPropertyLib::relative_permeability, MaterialPropertyLib::saturation, - MaterialPropertyLib::porosity, MaterialPropertyLib::biot_coefficient - }; + MaterialPropertyLib::porosity, + MaterialPropertyLib::biot_coefficient}; std::array const required_liquid_properties = { MaterialPropertyLib::viscosity, MaterialPropertyLib::density}; - std::array const required_solid_properties = { - MaterialPropertyLib::density}; + std::array const required_solid_properties = {MaterialPropertyLib::density}; for (auto const& m : media) { @@ -191,7 +190,8 @@ std::unique_ptr<Process> createRichardsMechanicsProcess( auto const explicit_hm_coupling_in_unsaturated_zone = //! \ogs_file_param{prj__processes__process__RICHARDS_MECHANICS__explicit_hm_coupling_in_unsaturated_zone} - config.getConfigParameter<bool>("explicit_hm_coupling_in_unsaturated_zone", false); + config.getConfigParameter<bool>( + "explicit_hm_coupling_in_unsaturated_zone", false); RichardsMechanicsProcessData<DisplacementDim> process_data{ materialIDs(mesh), diff --git a/ProcessLib/RichardsMechanics/RichardsMechanicsProcess.cpp b/ProcessLib/RichardsMechanics/RichardsMechanicsProcess.cpp index ef66ec6f20eebe3cf3a5386dcbbbe0a2711c79ca..8a46bc59e803b51fee2d9f7b81dfcc4521a82ad8 100644 --- a/ProcessLib/RichardsMechanics/RichardsMechanicsProcess.cpp +++ b/ProcessLib/RichardsMechanics/RichardsMechanicsProcess.cpp @@ -307,9 +307,8 @@ void RichardsMechanicsProcess<DisplacementDim>::initializeConcreteProcess( DisplacementDim>::RowsAtCompileTime, &LocalAssemblerIF::getIntPtEpsilon); - add_secondary_variable("velocity", - DisplacementDim, - &LocalAssemblerIF::getIntPtDarcyVelocity); + add_secondary_variable( + "velocity", DisplacementDim, &LocalAssemblerIF::getIntPtDarcyVelocity); add_secondary_variable("saturation", 1, &LocalAssemblerIF::getIntPtSaturation); @@ -320,8 +319,7 @@ void RichardsMechanicsProcess<DisplacementDim>::initializeConcreteProcess( add_secondary_variable("micro_pressure", 1, &LocalAssemblerIF::getIntPtMicroPressure); - add_secondary_variable("porosity", 1, - &LocalAssemblerIF::getIntPtPorosity); + add_secondary_variable("porosity", 1, &LocalAssemblerIF::getIntPtPorosity); add_secondary_variable("transport_porosity", 1, &LocalAssemblerIF::getIntPtTransportPorosity); @@ -334,7 +332,7 @@ void RichardsMechanicsProcess<DisplacementDim>::initializeConcreteProcess( // ProcessLib::Deformation::solidMaterialInternalToSecondaryVariables< LocalAssemblerIF>(_process_data.solid_materials, - add_secondary_variable); + add_secondary_variable); _process_data.element_saturation = MeshLib::getOrCreateMeshProperty<double>( const_cast<MeshLib::Mesh&>(mesh), "saturation_avg", @@ -406,11 +404,10 @@ void RichardsMechanicsProcess<DisplacementDim>::initializeConcreteProcess( } } - // Initialize local assemblers after all variables have been set. - GlobalExecutor::executeMemberOnDereferenced( - &LocalAssemblerIF::initialize, _local_assemblers, - *_local_to_global_index_map); + GlobalExecutor::executeMemberOnDereferenced(&LocalAssemblerIF::initialize, + _local_assemblers, + *_local_to_global_index_map); } template <int DisplacementDim> diff --git a/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp b/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp index 108b3cded52ca20707eed9ceecc7528127a31ab0..bfad7f4d154e8a660766c1abcb4190fae5ebcad5 100644 --- a/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp +++ b/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp @@ -16,7 +16,6 @@ #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" - #include "SmallDeformationProcess.h" #include "SmallDeformationProcessData.h" diff --git a/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.cpp b/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.cpp index 75510a4d2d8adab1342f33b343377b017e4647bf..73287a2212c4b2e8714cad326001ad95ebd916b2 100644 --- a/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.cpp +++ b/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.cpp @@ -16,7 +16,6 @@ #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" - #include "SmallDeformationNonlocalProcess.h" #include "SmallDeformationNonlocalProcessData.h" diff --git a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp index 6b5e360521a3a0241d57eacfe7760d287af02471..2321364c6a8369996eb3fc798bec4354b6cae44b 100644 --- a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp +++ b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp @@ -10,8 +10,8 @@ #include "SmallDeformationNonlocalProcess.h" -#include <nlohmann/json.hpp> #include <iostream> +#include <nlohmann/json.hpp> #include "ProcessLib/Output/IntegrationPointWriter.h" diff --git a/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp b/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp index dc3a0e193bd02f29ce6129751055ebb87164f469..72d29b6caeb116f4bc67d5a2f87b758d1b9d5171 100644 --- a/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp +++ b/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp @@ -10,12 +10,10 @@ #include "CreateNodalSourceTerm.h" -#include "BaseLib/Logging.h" - #include "BaseLib/ConfigTree.h" -#include "ParameterLib/Utils.h" - +#include "BaseLib/Logging.h" #include "NodalSourceTerm.h" +#include "ParameterLib/Utils.h" namespace ProcessLib { diff --git a/ProcessLib/SourceTerms/CreateSourceTerm.cpp b/ProcessLib/SourceTerms/CreateSourceTerm.cpp index 70f87a1881f3db905d4848e9f1136c65d3926cf0..efda2ba4875578e8d0f2c8f221b41df7a958651b 100644 --- a/ProcessLib/SourceTerms/CreateSourceTerm.cpp +++ b/ProcessLib/SourceTerms/CreateSourceTerm.cpp @@ -64,7 +64,6 @@ std::unique_ptr<SourceTerm> createSourceTerm( MeshLib::MeshSubset source_term_mesh_subset(source_term_mesh, source_term_nodes); - if (type == "Nodal") { std::unique_ptr<NumLib::LocalToGlobalIndexMap> dof_table_source_term( diff --git a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp b/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp index 4de799992bf8a8823939fb51671784b0f108419d..0124cc52c19a0ba2f2d1a8b72ce231a56c336646 100644 --- a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp +++ b/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp @@ -32,7 +32,7 @@ std::unique_ptr<SourceTerm> createPythonSourceTerm( config.checkConfigParameter("type", "Python"); auto const source_term_object = - //! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__Python__source_term_object} + //! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__Python__source_term_object} config.getConfigParameter<std::string>("source_term_object"); //! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__Python__flush_stdout} auto const flush_stdout = config.getConfigParameter("flush_stdout", false); diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTerm.cpp b/ProcessLib/SourceTerms/Python/PythonSourceTerm.cpp index 6c4c69aee3a8081c162bfcad3783aa65a683bff8..35b4bbc35fa7ba89d60e52854a07c2f097a108fb 100644 --- a/ProcessLib/SourceTerms/Python/PythonSourceTerm.cpp +++ b/ProcessLib/SourceTerms/Python/PythonSourceTerm.cpp @@ -11,6 +11,7 @@ #include "PythonSourceTerm.h" #include <pybind11/pybind11.h> + #include <iostream> #include "MeshLib/MeshSearch/NodeSearch.h" diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp b/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp index 34c3998d03193e711958e0c669e52cf4b2a87c72..b233e9c49fb77700dd3db6a910deb1408f074f9b 100644 --- a/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp +++ b/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp @@ -12,6 +12,7 @@ #include <pybind11/pybind11.h> #include <pybind11/stl.h> + #include "PythonSourceTermPythonSideInterface.h" namespace ProcessLib diff --git a/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp b/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp index aa8e07e504bb4c35070d3dd630c072c627647b07..6901d7537c80e74beacb3b324772d3c2e847b254 100644 --- a/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp +++ b/ProcessLib/SourceTerms/VolumetricSourceTerm.cpp @@ -41,4 +41,4 @@ void VolumetricSourceTerm::integrate(const double t, GlobalVector const& /*x*/, _local_assemblers, *_source_term_dof_table, t, b); } -} // namespace ProcessLib +} // namespace ProcessLib diff --git a/ProcessLib/SteadyStateDiffusion/CreateSteadyStateDiffusion.cpp b/ProcessLib/SteadyStateDiffusion/CreateSteadyStateDiffusion.cpp index 60b1ade2cc70b61c37b17b9eacc0014c93398454..a4bf05c8625b8cfc1165ca296d8ef317088fd1a1 100644 --- a/ProcessLib/SteadyStateDiffusion/CreateSteadyStateDiffusion.cpp +++ b/ProcessLib/SteadyStateDiffusion/CreateSteadyStateDiffusion.cpp @@ -11,8 +11,6 @@ #include "CreateSteadyStateDiffusion.h" #include "BaseLib/FileTools.h" -#include "SteadyStateDiffusion.h" -#include "SteadyStateDiffusionData.h" #include "MaterialLib/MPL/CheckMaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" @@ -20,6 +18,8 @@ #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" +#include "SteadyStateDiffusion.h" +#include "SteadyStateDiffusionData.h" namespace ProcessLib { diff --git a/ProcessLib/SteadyStateDiffusion/SteadyStateDiffusion.cpp b/ProcessLib/SteadyStateDiffusion/SteadyStateDiffusion.cpp index f3ab036911eff979c276b2a9cc3986320bab0189..208a10404b0475a8d1efcd43c59f1a71d70ddb46 100644 --- a/ProcessLib/SteadyStateDiffusion/SteadyStateDiffusion.cpp +++ b/ProcessLib/SteadyStateDiffusion/SteadyStateDiffusion.cpp @@ -93,4 +93,4 @@ void SteadyStateDiffusion::assembleWithJacobianConcreteProcess( } } // namespace SteadyStateDiffusion -} // namespace ProcessLib +} // namespace ProcessLib diff --git a/ProcessLib/SurfaceFlux/SurfaceFlux.cpp b/ProcessLib/SurfaceFlux/SurfaceFlux.cpp index 8c6a79cb7b1aed85e8e83bb952e0e125a73112f2..88fed1e28f60d60500af24fd257c40366fbe2504 100644 --- a/ProcessLib/SurfaceFlux/SurfaceFlux.cpp +++ b/ProcessLib/SurfaceFlux/SurfaceFlux.cpp @@ -16,10 +16,9 @@ namespace ProcessLib { -SurfaceFlux::SurfaceFlux( - MeshLib::Mesh& boundary_mesh, - std::size_t bulk_property_number_of_components, - unsigned const integration_order) +SurfaceFlux::SurfaceFlux(MeshLib::Mesh& boundary_mesh, + std::size_t bulk_property_number_of_components, + unsigned const integration_order) { DBUG("Create local balance assemblers."); // Populate the vector of local assemblers. @@ -66,8 +65,8 @@ void SurfaceFlux::integrate( DBUG("Integrate SurfaceFlux."); GlobalExecutor::executeSelectedMemberOnDereferenced( - &SurfaceFluxLocalAssemblerInterface::integrate, - _local_assemblers, active_element_ids, x, balance, t, bulk_mesh, getFlux); + &SurfaceFluxLocalAssemblerInterface::integrate, _local_assemblers, + active_element_ids, x, balance, t, bulk_mesh, getFlux); } } // namespace ProcessLib diff --git a/ProcessLib/TES/CreateTESProcess.cpp b/ProcessLib/TES/CreateTESProcess.cpp index 6b5110822033fd0965c803582793d7273c76246b..fbda50fbdf07689c838a29d921cfe46c3e4c8907 100644 --- a/ProcessLib/TES/CreateTESProcess.cpp +++ b/ProcessLib/TES/CreateTESProcess.cpp @@ -9,6 +9,7 @@ */ #include "CreateTESProcess.h" + #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" #include "TESProcess.h" @@ -36,13 +37,12 @@ std::unique_ptr<Process> createTESProcess( auto per_process_variables = findProcessVariables( variables, pv_config, - { - //! \ogs_file_param_special{prj__processes__process__TES__process_variables__fluid_pressure} - "fluid_pressure", - //! \ogs_file_param_special{prj__processes__process__TES__process_variables__temperature} - "temperature", - //! \ogs_file_param_special{prj__processes__process__TES__process_variables__vapour_mass_fraction} - "vapour_mass_fraction"}); + {//! \ogs_file_param_special{prj__processes__process__TES__process_variables__fluid_pressure} + "fluid_pressure", + //! \ogs_file_param_special{prj__processes__process__TES__process_variables__temperature} + "temperature", + //! \ogs_file_param_special{prj__processes__process__TES__process_variables__vapour_mass_fraction} + "vapour_mass_fraction"}); std::vector<std::vector<std::reference_wrapper<ProcessVariable>>> process_variables; process_variables.push_back(std::move(per_process_variables)); diff --git a/ProcessLib/TES/TESLocalAssemblerData.cpp b/ProcessLib/TES/TESLocalAssemblerData.cpp index 53c46faf5852ecf32d4dac3cd56b3f2fd42981f0..04097a61b526a3bea65a8cb24e6044f376a52af6 100644 --- a/ProcessLib/TES/TESLocalAssemblerData.cpp +++ b/ProcessLib/TES/TESLocalAssemblerData.cpp @@ -8,6 +8,7 @@ */ #include "TESLocalAssemblerData.h" + #include "TESReactionAdaptor.h" namespace ProcessLib diff --git a/ProcessLib/TES/TESProcess.cpp b/ProcessLib/TES/TESProcess.cpp index ac25bca5cb572bc39bf1dbf89a6be03e41f7b062..aa10eb083b7b242828fab104c8d4f79db7f60db7 100644 --- a/ProcessLib/TES/TESProcess.cpp +++ b/ProcessLib/TES/TESProcess.cpp @@ -9,6 +9,7 @@ */ #include "TESProcess.h" + #include "NumLib/DOF/DOFTableUtil.h" #include "ProcessLib/Utils/CreateLocalAssemblers.h" @@ -63,7 +64,7 @@ TESProcess::TESProcess( { if (auto const par = //! \ogs_file_special - config.getConfigParameterOptional<double>(p.first)) + config.getConfigParameterOptional<double>(p.first)) { DBUG("setting parameter `{:s}' to value `{:g}'", p.first, *par); *p.second = *par; @@ -85,7 +86,7 @@ TESProcess::TESProcess( { if (auto const par = //! \ogs_file_special - config.getConfigParameterOptional<double>(p.first)) + config.getConfigParameterOptional<double>(p.first)) { INFO("setting parameter `{:s}' to value `{:g}'", p.first, *par); *p.second = Trafo{*par}; @@ -96,7 +97,8 @@ TESProcess::TESProcess( // permeability if (auto par = //! \ogs_file_param{prj__processes__process__TES__solid_hydraulic_permeability} - config.getConfigParameterOptional<double>("solid_hydraulic_permeability")) + config.getConfigParameterOptional<double>( + "solid_hydraulic_permeability")) { DBUG( "setting parameter `solid_hydraulic_permeability' to isotropic " @@ -115,7 +117,7 @@ TESProcess::TESProcess( // debug output if (auto const param = //! \ogs_file_param{prj__processes__process__TES__output_element_matrices} - config.getConfigParameterOptional<bool>("output_element_matrices")) + config.getConfigParameterOptional<bool>("output_element_matrices")) { DBUG("output_element_matrices: {:s}", (*param) ? "true" : "false"); @@ -216,7 +218,7 @@ void TESProcess::assembleConcreteProcess(const double t, double const dt, DBUG("Assemble TESProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. @@ -233,7 +235,7 @@ void TESProcess::assembleWithJacobianConcreteProcess( GlobalVector& b, GlobalMatrix& Jac) { std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. @@ -296,7 +298,7 @@ NumLib::IterationResult TESProcess::postIterationConcreteProcess( }; GlobalExecutor::executeDereferenced(check_variable_bounds, - _local_assemblers); + _local_assemblers); } if (!check_passed) diff --git a/ProcessLib/TES/TESReactionAdaptor.cpp b/ProcessLib/TES/TESReactionAdaptor.cpp index a03dce6d319f7ca9153e604673f7fe3cfad9f672..e1c65999d7ce53ebb5dc241ebd52f3448b9bd3eb 100644 --- a/ProcessLib/TES/TESReactionAdaptor.cpp +++ b/ProcessLib/TES/TESReactionAdaptor.cpp @@ -8,18 +8,16 @@ * */ -#include <cassert> - +#include "TESReactionAdaptor.h" -#include "MathLib/Nonlinear/Root1D.h" -#include "MathLib/ODE/ODESolverBuilder.h" +#include <cassert> #include "MaterialLib/Adsorption/Adsorption.h" #include "MaterialLib/Adsorption/ReactionInert.h" #include "MaterialLib/Adsorption/ReactionSinusoidal.h" - +#include "MathLib/Nonlinear/Root1D.h" +#include "MathLib/ODE/ODESolverBuilder.h" #include "TESLocalAssemblerInner.h" -#include "TESReactionAdaptor.h" namespace ProcessLib { @@ -54,8 +52,7 @@ TESFEMReactionAdaptorAdsorption::TESFEMReactionAdaptorAdsorption( TESLocalAssemblerData const& data) // caution fragile: this relies in this constructor b eing called __after__ // data.solid_density has been properly set up! - : _bounds_violation(data.solid_density.size(), false), - _d(data) + : _bounds_violation(data.solid_density.size(), false), _d(data) { assert(dynamic_cast<Adsorption::AdsorptionReaction const*>( data.ap.react_sys.get()) != nullptr && @@ -104,8 +101,7 @@ TESFEMReactionAdaptorAdsorption::initReaction_slowDownUndershootStrategy( const double delta_pV = pV_eq - _d.p_V; const double delta_rhoV = delta_pV * _d.ap.M_react / - MaterialLib::PhysicalConstant::IdealGasConstant / _d.T * - _d.ap.poro; + MaterialLib::PhysicalConstant::IdealGasConstant / _d.T * _d.ap.poro; const double delta_rhoSR = delta_rhoV / (_d.ap.poro - 1.0); double react_rate_R2 = delta_rhoSR / _d.ap.delta_t; diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp index 2a71658fc56972673a7fc71514442c4ae53409ea..237a7c633370f65ddbd2cbbcaa8598ce0afca570 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp @@ -11,8 +11,8 @@ #include "CreateThermalTwoPhaseFlowWithPPMaterialProperties.h" #include <tuple> -#include "BaseLib/Logging.h" +#include "BaseLib/Logging.h" #include "MaterialLib/Fluid/FluidProperty.h" #include "MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.h" #include "MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.h" @@ -28,7 +28,6 @@ #include "MeshLib/PropertyVector.h" #include "ParameterLib/Parameter.h" #include "ParameterLib/SpatialPosition.h" - #include "ThermalTwoPhaseFlowWithPPMaterialProperties.h" namespace ProcessLib diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp index 8ad8fca48f736490f024131ea11c3933a590e187..6abdc6408373b818394f6eb25bb605af8dd43a20 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp @@ -17,7 +17,6 @@ #include "ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h" #include "ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h" #include "ProcessLib/Utils/ProcessUtils.h" - #include "ThermalTwoPhaseFlowWithPPProcess.h" #include "ThermalTwoPhaseFlowWithPPProcessData.h" diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp index 184ad125ec44c1ff14ff46c2b854af8c2cc9e471..4137546b72664f6ac06a9255bbff24bdd8d0e22f 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp @@ -11,7 +11,6 @@ #include "ThermalTwoPhaseFlowWithPPMaterialProperties.h" #include "BaseLib/Logging.h" - #include "MaterialLib/Fluid/FluidProperty.h" #include "MaterialLib/PorousMedium/Porosity/Porosity.h" #include "MaterialLib/PorousMedium/Storage/Storage.h" @@ -154,8 +153,8 @@ double ThermalTwoPhaseFlowWithPPMaterialProperties::calculateVaporPressureNonwet( const double pc, const double T, const double mass_density_water) const { - return _water_vapor_properties->calculateVaporPressureNonwet(pc, T, - mass_density_water); + return _water_vapor_properties->calculateVaporPressureNonwet( + pc, T, mass_density_water); } double ThermalTwoPhaseFlowWithPPMaterialProperties::calculateDerivativedPsatdT( const double T) const @@ -165,14 +164,14 @@ double ThermalTwoPhaseFlowWithPPMaterialProperties::calculateDerivativedPsatdT( double ThermalTwoPhaseFlowWithPPMaterialProperties::calculateDerivativedPgwdT( const double pc, const double T, const double mass_density_water) const { - return _water_vapor_properties->calculateDerivativedPgwdT(pc, T, - mass_density_water); + return _water_vapor_properties->calculateDerivativedPgwdT( + pc, T, mass_density_water); } double ThermalTwoPhaseFlowWithPPMaterialProperties::calculateDerivativedPgwdPC( const double pc, const double T, const double mass_density_water) const { - return _water_vapor_properties->calculateDerivativedPgwdPC(pc, T, - mass_density_water); + return _water_vapor_properties->calculateDerivativedPgwdPC( + pc, T, mass_density_water); } double ThermalTwoPhaseFlowWithPPMaterialProperties::calculatedDensityNonwetdT( const double p_air_nonwet, const double p_vapor_nonwet, const double pc, @@ -196,7 +195,8 @@ double ThermalTwoPhaseFlowWithPPMaterialProperties::getAirEnthalpySimple( const double /*pg*/) const { return heat_capacity_dry_air * (temperature - CelsiusZeroInKelvin) + - IdealGasConstant * (temperature - CelsiusZeroInKelvin) / _air_mol_mass; + IdealGasConstant * (temperature - CelsiusZeroInKelvin) / + _air_mol_mass; } double diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp index e5081998e166bf68c8b987a6e80d7a3f5df5864c..373de1c4cdf8fd1ffc337aa240ebe478082e9b82 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp @@ -12,15 +12,13 @@ #include <cassert> -#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" -#include "MeshLib/PropertyVector.h" #include "MaterialLib/PorousMedium/Porosity/Porosity.h" #include "MaterialLib/PorousMedium/Storage/Storage.h" +#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" +#include "MeshLib/PropertyVector.h" #include "ProcessLib/Utils/CreateLocalAssemblers.h" - #include "ThermalTwoPhaseFlowWithPPLocalAssembler.h" - namespace ProcessLib { namespace ThermalTwoPhaseFlowWithPP @@ -81,7 +79,7 @@ void ThermalTwoPhaseFlowWithPPProcess::assembleConcreteProcess( DBUG("Assemble ThermalTwoPhaseFlowWithPPProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. @@ -100,7 +98,7 @@ void ThermalTwoPhaseFlowWithPPProcess::assembleWithJacobianConcreteProcess( DBUG("AssembleWithJacobian ThermalTwoPhaseFlowWithPPProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. diff --git a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp index f445ed535545092259584df8bf161d356a2dae48..df5bf1db7bf2fe16eb0618fb55fcfd2dd037c914 100644 --- a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp +++ b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp @@ -14,13 +14,11 @@ #include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" - #include "MaterialLib/SolidModels/CreateConstitutiveRelation.h" #include "MaterialLib/SolidModels/MechanicsBase.h" #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" - #include "ThermoHydroMechanicsProcess.h" #include "ThermoHydroMechanicsProcessData.h" diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp index 2eac64af3d956bbb688d307afb22b36dbc633e51..25f5daf2bf51d25670c8fec51621b6f301a551f3 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp @@ -16,7 +16,6 @@ #include "NumLib/DOF/ComputeSparsityPattern.h" #include "ProcessLib/Process.h" #include "ProcessLib/ThermoHydroMechanics/CreateLocalAssemblers.h" - #include "ThermoHydroMechanicsFEM.h" #include "ThermoHydroMechanicsProcessData.h" diff --git a/ProcessLib/ThermoMechanicalPhaseField/CreateThermoMechanicalPhaseFieldProcess.cpp b/ProcessLib/ThermoMechanicalPhaseField/CreateThermoMechanicalPhaseFieldProcess.cpp index 0c20e9b7b4bc182ccb0c60ecfee600ca2bbf6adb..915053b2001f79f1a2601a91857ac6de712b532f 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/CreateThermoMechanicalPhaseFieldProcess.cpp +++ b/ProcessLib/ThermoMechanicalPhaseField/CreateThermoMechanicalPhaseFieldProcess.cpp @@ -17,7 +17,6 @@ #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" - #include "ThermoMechanicalPhaseFieldProcess.h" #include "ThermoMechanicalPhaseFieldProcessData.h" @@ -163,11 +162,11 @@ std::unique_ptr<Process> createThermoMechanicalPhaseFieldProcess( DBUG("Use '{:s}' as solid density parameter.", solid_density.name); // Linear thermal expansion coefficient - auto const& linear_thermal_expansion_coefficient = ParameterLib::findParameter< - double>( - thermal_parameters_config, - //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__thermal_parameters__linear_thermal_expansion_coefficient} - "linear_thermal_expansion_coefficient", parameters, 1, &mesh); + auto const& linear_thermal_expansion_coefficient = + ParameterLib::findParameter<double>( + thermal_parameters_config, + //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__thermal_parameters__linear_thermal_expansion_coefficient} + "linear_thermal_expansion_coefficient", parameters, 1, &mesh); DBUG("Use '{:s}' as linear thermal expansion coefficient.", linear_thermal_expansion_coefficient.name); diff --git a/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp b/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp index 061be95782967ac97c16123223c931b8b8d0a921..e8b1180c320b9bcdd44734252c15fba71d5fb9a1 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp +++ b/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp @@ -8,15 +8,15 @@ * */ -#include "ThermoMechanicalPhaseFieldFEM.h" #include "ThermoMechanicalPhaseFieldProcess.h" -#include "ThermoMechanicalPhaseFieldProcessData.h" #include <cassert> #include "NumLib/DOF/ComputeSparsityPattern.h" #include "ProcessLib/Process.h" #include "ProcessLib/SmallDeformation/CreateLocalAssemblers.h" +#include "ThermoMechanicalPhaseFieldFEM.h" +#include "ThermoMechanicalPhaseFieldProcessData.h" namespace ProcessLib { diff --git a/ProcessLib/ThermoRichardsMechanics/CreateThermoRichardsMechanicsProcess.cpp b/ProcessLib/ThermoRichardsMechanics/CreateThermoRichardsMechanicsProcess.cpp index 59631a74865fb2a7c3d7f121c2da24fed20b782a..d63703b41c14e969b0e022f409d5ebf0540bb98a 100644 --- a/ProcessLib/ThermoRichardsMechanics/CreateThermoRichardsMechanicsProcess.cpp +++ b/ProcessLib/ThermoRichardsMechanics/CreateThermoRichardsMechanicsProcess.cpp @@ -105,8 +105,7 @@ std::unique_ptr<Process> createThermoRichardsMechanicsProcess( { auto per_process_variables = findProcessVariables( variables, pv_config, - { - //! \ogs_file_param_special{prj__processes__process__THERMO_RICHARDS_MECHANICS__process_variables__temperature} + {//! \ogs_file_param_special{prj__processes__process__THERMO_RICHARDS_MECHANICS__process_variables__temperature} "temperature", //! \ogs_file_param_special{prj__processes__process__THERMO_RICHARDS_MECHANICS__process_variables__pressure} "pressure", diff --git a/ProcessLib/TimeLoop.cpp b/ProcessLib/TimeLoop.cpp index e6388e066076462a3d782b88db92df2cfd583e73..8efa0c1a4be940ec73c89d2d4d8774f768546290 100644 --- a/ProcessLib/TimeLoop.cpp +++ b/ProcessLib/TimeLoop.cpp @@ -242,7 +242,7 @@ setInitialConditions( process_id); auto& time_disc = *process_data->time_disc; - time_disc.setInitialState(t0); // push IC + time_disc.setInitialState(t0); // push IC } return {process_solutions, process_solutions_prev}; @@ -318,8 +318,7 @@ NumLib::NonlinearSolverStatus solveOneTimeStepOneProcess( time_disc.getXdot(*x[process_id], *x_prev[process_id], x_dot); - process.postNonLinearSolver(*x[process_id], x_dot, t, delta_t, - process_id); + process.postNonLinearSolver(*x[process_id], x_dot, t, delta_t, process_id); NumLib::GlobalVectorProvider::provider.releaseVector(x_dot); return nonlinear_solver_status; diff --git a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.cpp index 0fdf26e5abf4207fc4ff0c0fd3e5df500cc4ac98..fb2110cbdbb1149cb3cb14ce5867aa02447d9acb 100644 --- a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.cpp @@ -8,15 +8,14 @@ * */ #include "CreateTwoPhaseFlowWithPPProcess.h" + #include <cassert> #include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" - #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" - #include "TwoPhaseFlowWithPPProcess.h" #include "TwoPhaseFlowWithPPProcessData.h" namespace ProcessLib diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp index 2cb46eec54e90f688581afbc971729ceb9704d32..9c9567f6ad885fe6be8e79e83bfe7221bb63ec81 100644 --- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp @@ -71,7 +71,7 @@ void TwoPhaseFlowWithPPProcess::assembleConcreteProcess( DBUG("Assemble TwoPhaseFlowWithPPProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. @@ -90,7 +90,7 @@ void TwoPhaseFlowWithPPProcess::assembleWithJacobianConcreteProcess( DBUG("AssembleWithJacobian TwoPhaseFlowWithPPProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.cpp b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.cpp index 2121823653a9636aac2c30d7243dbc33e4be4a31..991c180cdded9ebd85eec7bf4204722701e33858 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.cpp +++ b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.cpp @@ -9,6 +9,7 @@ */ #include "CreateTwoPhaseFlowPrhoMaterialProperties.h" + #include "BaseLib/Algorithm.h" #include "BaseLib/Logging.h" #include "MaterialLib/Fluid/FluidProperty.h" diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.cpp b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.cpp index cc3383d47b8732afb05c400d121028fc59d66bab..08f6146658e8201eb56e35d0caf5e9f56f945171 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.cpp +++ b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.cpp @@ -8,7 +8,9 @@ * */ #include "CreateTwoPhaseFlowWithPrhoProcess.h" + #include <cassert> + #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.h" diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp index 6be25552319870b76ae2c2d828746162fd7d3f82..283b18134380f8bd0bcae0f11916cac79085e516 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp +++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp @@ -9,7 +9,9 @@ */ #include "TwoPhaseFlowWithPrhoMaterialProperties.h" + #include <utility> + #include "BaseLib/Logging.h" #include "MaterialLib/Fluid/FluidProperty.h" #include "MaterialLib/PorousMedium/Porosity/Porosity.h" @@ -25,9 +27,9 @@ #include "ParameterLib/Parameter.h" #include "ParameterLib/SpatialPosition.h" -using MaterialLib::PhysicalConstant::MolarMass::H2; using MaterialLib::PhysicalConstant::IdealGasConstant; using MaterialLib::PhysicalConstant::HenryConstant::HenryConstantH2; +using MaterialLib::PhysicalConstant::MolarMass::H2; namespace ProcessLib { namespace TwoPhaseFlowWithPrho @@ -270,8 +272,8 @@ void TwoPhaseFlowWithPrhoMaterialProperties::calculateJacobian( } /** Complementary condition 1 -* for calculating molar fraction of light component in the liquid phase -*/ + * for calculating molar fraction of light component in the liquid phase + */ double TwoPhaseFlowWithPrhoMaterialProperties::calculateEquilibiumRhoWetLight( double const pg, double const Sw, double const rho_wet_h2) { @@ -280,8 +282,8 @@ double TwoPhaseFlowWithPrhoMaterialProperties::calculateEquilibiumRhoWetLight( } /** Complementary condition 2 -* for calculating the saturation -*/ + * for calculating the saturation + */ double TwoPhaseFlowWithPrhoMaterialProperties::calculateSaturation( double /*PL*/, double X, double Sw, double rho_wet_h2, double rho_nonwet_h2, double /*T*/) @@ -290,8 +292,8 @@ double TwoPhaseFlowWithPrhoMaterialProperties::calculateSaturation( } /** -* Calculate the derivatives using the analytical way -*/ + * Calculate the derivatives using the analytical way + */ double TwoPhaseFlowWithPrhoMaterialProperties::calculatedSwdP( double pl, double S, double rho_wet_h2, double const T, int current_material_id) const @@ -316,8 +318,8 @@ double TwoPhaseFlowWithPrhoMaterialProperties::calculatedSwdP( return alpha / (beta - alpha * dPC_dSw); } /** -* Calculate the derivatives using the analytical way -*/ + * Calculate the derivatives using the analytical way + */ double TwoPhaseFlowWithPrhoMaterialProperties::calculatedSwdX( double const pl, const double /*X*/, const double S, const double rho_wet_h2, double const T, int current_material_id) const @@ -342,8 +344,8 @@ double TwoPhaseFlowWithPrhoMaterialProperties::calculatedSwdX( return -1 / (beta - alpha * dPC_dSw); } /** -* Calculate the derivatives using the analytical way -*/ + * Calculate the derivatives using the analytical way + */ double TwoPhaseFlowWithPrhoMaterialProperties::calculatedXmdX( double pl, double Sw, double rho_wet_h2, double dSwdX, int current_material_id) const @@ -362,8 +364,8 @@ double TwoPhaseFlowWithPrhoMaterialProperties::calculatedXmdX( return HenryConstantH2 * H2 * dPC_dSw * dSwdX; } /** -* Calculate the derivatives using the analytical way -*/ + * Calculate the derivatives using the analytical way + */ double TwoPhaseFlowWithPrhoMaterialProperties::calculatedXmdP( double pl, double Sw, double rho_wet_h2, double dSwdP, int current_material_id) const diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp index 0b4d86be804a3acb9c1eda03f91f03cccc0c0c85..bf2c192884ac9bb97991f8cfb8512db473bd5480 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp +++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp @@ -72,7 +72,7 @@ void TwoPhaseFlowWithPrhoProcess::assembleConcreteProcess( DBUG("Assemble TwoPhaseFlowWithPrhoProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. @@ -91,7 +91,7 @@ void TwoPhaseFlowWithPrhoProcess::assembleWithJacobianConcreteProcess( DBUG("AssembleWithJacobian TwoPhaseFlowWithPrhoProcess."); std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> - dof_table = {std::ref(*_local_to_global_index_map)}; + dof_table = {std::ref(*_local_to_global_index_map)}; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; // Call global assembler for each local assembly item. diff --git a/ProcessLib/VectorMatrixAssembler.cpp b/ProcessLib/VectorMatrixAssembler.cpp index d911128d7d665a7aa7c027297a51932ab831c674..91810975a4cd6930c1789ebdff797758f879940a 100644 --- a/ProcessLib/VectorMatrixAssembler.cpp +++ b/ProcessLib/VectorMatrixAssembler.cpp @@ -13,11 +13,10 @@ #include <cassert> #include <functional> // for std::reference_wrapper. -#include "NumLib/DOF/DOFTableUtil.h" -#include "MathLib/LinAlg/Eigen/EigenMapTools.h" -#include "LocalAssemblerInterface.h" - #include "CoupledSolutionsForStaggeredScheme.h" +#include "LocalAssemblerInterface.h" +#include "MathLib/LinAlg/Eigen/EigenMapTools.h" +#include "NumLib/DOF/DOFTableUtil.h" #include "Process.h" namespace ProcessLib @@ -78,7 +77,6 @@ void VectorMatrixAssembler::assemble( getCoupledLocalSolutions(xdot, indices_of_processes); auto const local_xdot = MathLib::toVector(local_coupled_xdots); - local_assembler.assembleForStaggeredScheme( t, dt, local_x, local_xdot, process_id, _local_M_data, _local_K_data, _local_b_data); @@ -148,7 +146,6 @@ void VectorMatrixAssembler::assembleWithJacobian( getCoupledLocalSolutions(xdot, indices_of_processes); auto const local_xdot = MathLib::toVector(local_coupled_xdots); - _jacobian_assembler->assembleWithJacobianForStaggeredScheme( local_assembler, t, dt, local_x, local_xdot, dxdot_dx, dx_dx, process_id, _local_M_data, _local_K_data, _local_b_data,