diff --git a/MaterialLib/SolidModels/CreateEhlers.h b/MaterialLib/SolidModels/CreateEhlers.h index 1f80ef3eac99988a73bc79458e3551e0afb6e870..406bfb3247ec76b750384c8c9ba415c811bea47f 100644 --- a/MaterialLib/SolidModels/CreateEhlers.h +++ b/MaterialLib/SolidModels/CreateEhlers.h @@ -11,14 +11,17 @@ #include <logog/include/logog.hpp> -#include "MechanicsBase.h" #include "ProcessLib/Utils/ProcessUtils.h" // required for findParameter + #include "Ehlers.h" +#include "MechanicsBase.h" namespace MaterialLib { namespace Solids { +namespace Ehlers +{ template <int DisplacementDim> std::unique_ptr<MechanicsBase<DisplacementDim>> createEhlers( std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters, @@ -41,25 +44,22 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createEhlers( DBUG("Use \'%s\' as bulk modulus parameter.", bulk_modulus.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__kappa} - auto& kappa = ProcessLib::findParameter<double>( - config, "kappa", parameters, 1); + auto& kappa = + ProcessLib::findParameter<double>(config, "kappa", parameters, 1); - DBUG("Use \'%s\' as kappa.", - kappa.name.c_str()); + DBUG("Use \'%s\' as kappa.", kappa.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__beta} - auto& beta = ProcessLib::findParameter<double>( - config, "beta", parameters, 1); + auto& beta = + ProcessLib::findParameter<double>(config, "beta", parameters, 1); - DBUG("Use \'%s\' as beta.", - beta.name.c_str()); + DBUG("Use \'%s\' as beta.", beta.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__gamma} - auto& gamma = ProcessLib::findParameter<double>( - config, "gamma", parameters, 1); + auto& gamma = + ProcessLib::findParameter<double>(config, "gamma", parameters, 1); - DBUG("Use \'%s\' as gamma.", - gamma.name.c_str()); + DBUG("Use \'%s\' as gamma.", gamma.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__hardening_modulus} auto& hardening_modulus = ProcessLib::findParameter<double>( @@ -69,74 +69,62 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createEhlers( hardening_modulus.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__alpha} - auto& alpha = ProcessLib::findParameter<double>( - config, "alpha", parameters, 1); + auto& alpha = + ProcessLib::findParameter<double>(config, "alpha", parameters, 1); - DBUG("Use \'%s\' as alpha.", - alpha.name.c_str()); + DBUG("Use \'%s\' as alpha.", alpha.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__delta} - auto& delta = ProcessLib::findParameter<double>( - config, "delta", parameters, 1); + auto& delta = + ProcessLib::findParameter<double>(config, "delta", parameters, 1); - DBUG("Use \'%s\' as delta.", - delta.name.c_str()); + DBUG("Use \'%s\' as delta.", delta.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__eps} - auto& eps = ProcessLib::findParameter<double>( - config, "eps", parameters, 1); + auto& eps = ProcessLib::findParameter<double>(config, "eps", parameters, 1); - DBUG("Use \'%s\' as eps.", - eps.name.c_str()); + DBUG("Use \'%s\' as eps.", eps.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__m} - auto& m = ProcessLib::findParameter<double>( - config, "m", parameters, 1); + auto& m = ProcessLib::findParameter<double>(config, "m", parameters, 1); - DBUG("Use \'%s\' as m.", - m.name.c_str()); + DBUG("Use \'%s\' as m.", m.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__alphap} - auto& alphap = ProcessLib::findParameter<double>( - config, "alphap", parameters, 1); + auto& alphap = + ProcessLib::findParameter<double>(config, "alphap", parameters, 1); - DBUG("Use \'%s\' as alphap.", - alphap.name.c_str()); + DBUG("Use \'%s\' as alphap.", alphap.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__deltap} - auto& deltap = ProcessLib::findParameter<double>( - config, "deltap", parameters, 1); + auto& deltap = + ProcessLib::findParameter<double>(config, "deltap", parameters, 1); - DBUG("Use \'%s\' as deltap.", - deltap.name.c_str()); + DBUG("Use \'%s\' as deltap.", deltap.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__epsp} - auto& epsp = ProcessLib::findParameter<double>( - config, "epsp", parameters, 1); + auto& epsp = + ProcessLib::findParameter<double>(config, "epsp", parameters, 1); - DBUG("Use \'%s\' as epsp.", - epsp.name.c_str()); + DBUG("Use \'%s\' as epsp.", epsp.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__mp} - auto& paremeter_mp = ProcessLib::findParameter<double>( - config, "mp", parameters, 1); + auto& paremeter_mp = + ProcessLib::findParameter<double>(config, "mp", parameters, 1); - DBUG("Use \'%s\' as mp.", - paremeter_mp.name.c_str()); + DBUG("Use \'%s\' as mp.", paremeter_mp.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__betap} - auto& betap = ProcessLib::findParameter<double>( - config, "betap", parameters, 1); + auto& betap = + ProcessLib::findParameter<double>(config, "betap", parameters, 1); - DBUG("Use \'%s\' as betap.", - betap.name.c_str()); + DBUG("Use \'%s\' as betap.", betap.name.c_str()); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__gammap} - auto& gammap = ProcessLib::findParameter<double>( - config, "gammap", parameters, 1); + auto& gammap = + ProcessLib::findParameter<double>(config, "gammap", parameters, 1); - DBUG("Use \'%s\' as gammap.", - gammap.name.c_str()); + DBUG("Use \'%s\' as gammap.", gammap.name.c_str()); typename SolidEhlers<DisplacementDim>::MaterialProperties mp{ shear_modulus, bulk_modulus, alpha, beta, @@ -148,5 +136,6 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createEhlers( new SolidEhlers<DisplacementDim>{mp}}; } +} // namespace Ehlers } // namespace Solids } // namespace MaterialLib diff --git a/MaterialLib/SolidModels/Ehlers-impl.h b/MaterialLib/SolidModels/Ehlers-impl.h index 92b1a81733aab334786208dde66968f35bbbc631..d5415da9d24fec0872f5acb635f6bce568e9119c 100644 --- a/MaterialLib/SolidModels/Ehlers-impl.h +++ b/MaterialLib/SolidModels/Ehlers-impl.h @@ -41,6 +41,8 @@ namespace MaterialLib { namespace Solids { +namespace Ehlers +{ template <int DisplacementDim> struct PhysicalStressWithInvariants final { @@ -654,5 +656,6 @@ bool SolidEhlers<DisplacementDim>::computeConstitutiveRelation( return true; } +} // namespace Ehlers } // namespace Solids } // namespace MaterialLib diff --git a/MaterialLib/SolidModels/Ehlers.cpp b/MaterialLib/SolidModels/Ehlers.cpp index fcf2b1e6f9e850c246007f7f406639c9f44aeb1e..af91297bbd6d64e3b9dacfdc46027dd105d0e87b 100644 --- a/MaterialLib/SolidModels/Ehlers.cpp +++ b/MaterialLib/SolidModels/Ehlers.cpp @@ -13,8 +13,11 @@ namespace MaterialLib { namespace Solids { +namespace Ehlers +{ template class SolidEhlers<2>; template class SolidEhlers<3>; +} // namespace Ehlers } // namespace Solids } // namespace MaterialLib diff --git a/MaterialLib/SolidModels/Ehlers.h b/MaterialLib/SolidModels/Ehlers.h index 0a858a00c267c53921692e997d6b55eaef077d2f..a9c14cf756f426003eade9f85e1500c2182664b8 100644 --- a/MaterialLib/SolidModels/Ehlers.h +++ b/MaterialLib/SolidModels/Ehlers.h @@ -36,6 +36,8 @@ namespace MaterialLib { namespace Solids { +namespace Ehlers +{ template <int DisplacementDim> class SolidEhlers final : public MechanicsBase<DisplacementDim> @@ -207,6 +209,7 @@ private: MaterialProperties _mp; }; +} // namespace Ehlers } // namespace Solids } // namespace MaterialLib #include "Ehlers-impl.h" diff --git a/NumLib/ODESolver/NonlinearSolver.cpp b/NumLib/ODESolver/NonlinearSolver.cpp index fe2139c557c53100914c3439152c200fa9cb45a0..9da3ac3cc747e9a29e55936e12dae48ca9873e5f 100644 --- a/NumLib/ODESolver/NonlinearSolver.cpp +++ b/NumLib/ODESolver/NonlinearSolver.cpp @@ -9,9 +9,6 @@ #include "NonlinearSolver.h" -// for debugging -// #include <iostream> - #include <logog/include/logog.hpp> #include "BaseLib/ConfigTree.h" diff --git a/ProcessLib/HT/HTFEM.h b/ProcessLib/HT/HTFEM.h index 750a9de9f028b28cf486d90be4c20afb3a5d14af..880ffeed54d7d9f47fae3587380d8d0431087557 100644 --- a/ProcessLib/HT/HTFEM.h +++ b/ProcessLib/HT/HTFEM.h @@ -9,7 +9,6 @@ #pragma once -#include <iostream> #include <Eigen/Dense> #include <vector> diff --git a/ProcessLib/HydroMechanics/HydroMechanicsFEM.h b/ProcessLib/HydroMechanics/HydroMechanicsFEM.h index 97e3f0d0eabb8632963620caf89e07a81c1c4f30..fe9f0c8624fb900fbceb0b6e191f5b1ce6a2e8d3 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsFEM.h +++ b/ProcessLib/HydroMechanics/HydroMechanicsFEM.h @@ -9,7 +9,6 @@ #pragma once -#include <iostream> #include <memory> #include <vector> diff --git a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp index 3c2373401e498a686317082e0174a629d6611a90..f53e2a4201b41810ca5a624dbbdb99bb10a5658a 100644 --- a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -56,7 +56,7 @@ std::unique_ptr<Process> createHydroMechanicsProcess( for (std::string const& pv_name : range) { if (pv_name != "pressure" && pv_name != "displacement" && - pv_name.find("displacement_jump") == std::string::npos) + pv_name.find("displacement_jump") != 0) OGS_FATAL("Found a process variable name '%s'. It should be 'displacement' or 'displacement_jumpN' or 'pressure'"); auto variable = std::find_if( variables.cbegin(), variables.cend(), diff --git a/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.cpp b/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.cpp index 548a15c5071485c5b7302225d19f1e42839078ec..1dfe9c37e02d4f352f7f3116aca5c93471f3a410 100644 --- a/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.cpp +++ b/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.cpp @@ -12,7 +12,6 @@ #include <algorithm> #include <cassert> -#include <iostream> #include <vector> #include "MeshLib/Elements/Element.h" diff --git a/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp b/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp index 1c19e13ca9926a4c993cd0d8d63deb0644558941..a00758073b60221ea72a925d56a15db406f91eb9 100644 --- a/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp +++ b/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp @@ -81,7 +81,7 @@ createSmallDeformationProcess( material = nullptr; if (type == "Ehlers") { - material = MaterialLib::Solids::createEhlers<DisplacementDim>( + material = MaterialLib::Solids::Ehlers::createEhlers<DisplacementDim>( parameters, constitutive_relation_config); } else if (type == "LinearElasticIsotropic") diff --git a/ProcessLib/SmallDeformation/SmallDeformationFEM.h b/ProcessLib/SmallDeformation/SmallDeformationFEM.h index 15b3c62c71e14153a58bdc16b500ccc3804cd27f..7f22b197a37d5870d3605003fed61eefe58d4176 100644 --- a/ProcessLib/SmallDeformation/SmallDeformationFEM.h +++ b/ProcessLib/SmallDeformation/SmallDeformationFEM.h @@ -27,6 +27,11 @@ #include "SmallDeformationProcessData.h" +namespace ProcessLib +{ +namespace SmallDeformation +{ + template <typename BMatricesType, int DisplacementDim> struct IntegrationPointData final { @@ -77,11 +82,6 @@ struct IntegrationPointData final } }; -namespace ProcessLib -{ -namespace SmallDeformation -{ - /// Used by for extrapolation of the integration point values. It is ordered /// (and stored) by integration points. template <typename ShapeMatrixType> diff --git a/ProcessLib/TES/TESLocalAssemblerInner-impl.h b/ProcessLib/TES/TESLocalAssemblerInner-impl.h index 03dd47be1da6ec7b6638018dbcd67bc27c47aa56..767b0923cb0cdb29534b87620e22772aa77996bf 100644 --- a/ProcessLib/TES/TESLocalAssemblerInner-impl.h +++ b/ProcessLib/TES/TESLocalAssemblerInner-impl.h @@ -12,9 +12,6 @@ #pragma once -#include <cstdio> -#include <iostream> - #include <logog/include/logog.hpp> #include "NumLib/Function/Interpolation.h" diff --git a/ProcessLib/UncoupledProcessesTimeLoop.cpp b/ProcessLib/UncoupledProcessesTimeLoop.cpp index ab2301a1e8c92eb66619d4a385d56b294ecf46de..d6b043a727fe1682692a9b16f7a90accebcd7070 100644 --- a/ProcessLib/UncoupledProcessesTimeLoop.cpp +++ b/ProcessLib/UncoupledProcessesTimeLoop.cpp @@ -319,12 +319,12 @@ std::vector<std::unique_ptr<SingleProcessData>> createPerProcessData( coupled_process_tree->getConfigParameterList<std::string>( "coupled_process")) { - auto const& cpl_pcs_ptr = BaseLib::getOrError( + auto const& coupled_process = *BaseLib::getOrError( processes, cpl_pcs_name, "A process with the given name has not been defined."); auto const inserted = coupled_processes.emplace( - std::type_index(typeid(*cpl_pcs_ptr)), *cpl_pcs_ptr); + std::type_index(typeid(coupled_process)), coupled_process); if (!inserted.second) { // insertion failed, i.e., key already exists OGS_FATAL("Coupled process `%s' already exists.", @@ -509,8 +509,9 @@ bool UncoupledProcessesTimeLoop::setCoupledSolutions() _per_process_data.end(), [&coupled_process]( std::unique_ptr<SingleProcessData> const& item) { + auto const& item_process = item->process; return std::type_index(typeid(coupled_process)) == - std::type_index(typeid(item->process)); + std::type_index(typeid(item_process)); }); if (found_item != _per_process_data.end())