diff --git a/ProcessLib/HydroMechanics/HydroMechanicsFEM-impl.h b/ProcessLib/HydroMechanics/HydroMechanicsFEM-impl.h index a58161a5b47098d313d6c973ca9b9687ba9e3fd7..7f4d723cdc1ff6918eab0680e36d10283870ceea 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsFEM-impl.h +++ b/ProcessLib/HydroMechanics/HydroMechanicsFEM-impl.h @@ -1060,7 +1060,7 @@ std::size_t HydroMechanicsLocalAssembler< _element.getID()); } - if (name == "sigma_ip") + if (name == "sigma") { if (_process_data.initial_stress != nullptr) { @@ -1075,13 +1075,13 @@ std::size_t HydroMechanicsLocalAssembler< values, _ip_data, &IpData::sigma_eff); } - if (name == "epsilon_ip") + if (name == "epsilon") { return ProcessLib::setIntegrationPointKelvinVectorData<DisplacementDim>( values, _ip_data, &IpData::eps); } - if (name == "strain_rate_variable_ip") + if (name == "strain_rate_variable") { return ProcessLib::setIntegrationPointScalarData( values, _ip_data, &IpData::strain_rate_variable); diff --git a/ProcessLib/LargeDeformation/LargeDeformationProcess.cpp b/ProcessLib/LargeDeformation/LargeDeformationProcess.cpp index c1abe5156c3d55fc6154d2b44f8d0d8cf1c3de74..02a03237ac860d10e88ac2ea28778471c553af2e 100644 --- a/ProcessLib/LargeDeformation/LargeDeformationProcess.cpp +++ b/ProcessLib/LargeDeformation/LargeDeformationProcess.cpp @@ -119,9 +119,8 @@ void LargeDeformationProcess<DisplacementDim>::initializeConcreteProcess( _process_data.solid_materials, _local_assemblers, _integration_point_writer, integration_order); - bool const remove_name_suffix = true; setIPDataInitialConditions(_integration_point_writer, mesh.getProperties(), - _local_assemblers, remove_name_suffix); + _local_assemblers); // Initialize local assemblers after all variables have been set. GlobalExecutor::executeMemberOnDereferenced( diff --git a/ProcessLib/RichardsMechanics/RichardsMechanicsFEM-impl.h b/ProcessLib/RichardsMechanics/RichardsMechanicsFEM-impl.h index 3c081fc93e9fdda7b56e1a7a34accff7fa5d14ad..2cd2acbc576f6f67f334f5afe00776bae1216f33 100644 --- a/ProcessLib/RichardsMechanics/RichardsMechanicsFEM-impl.h +++ b/ProcessLib/RichardsMechanics/RichardsMechanicsFEM-impl.h @@ -209,7 +209,7 @@ std::size_t RichardsMechanicsLocalAssembler< _element.getID()); } - if (name == "sigma_ip") + if (name == "sigma") { if (_process_data.initial_stress != nullptr) { @@ -223,34 +223,34 @@ std::size_t RichardsMechanicsLocalAssembler< values, _ip_data, &IpData::sigma_eff); } - if (name == "saturation_ip") + if (name == "saturation") { return ProcessLib::setIntegrationPointScalarData(values, _ip_data, &IpData::saturation); } - if (name == "porosity_ip") + if (name == "porosity") { return ProcessLib::setIntegrationPointScalarData(values, _ip_data, &IpData::porosity); } - if (name == "transport_porosity_ip") + if (name == "transport_porosity") { return ProcessLib::setIntegrationPointScalarData( values, _ip_data, &IpData::transport_porosity); } - if (name == "swelling_stress_ip") + if (name == "swelling_stress") { return ProcessLib::setIntegrationPointKelvinVectorData<DisplacementDim>( values, _ip_data, &IpData::sigma_sw); } - if (name == "epsilon_ip") + if (name == "epsilon") { return ProcessLib::setIntegrationPointKelvinVectorData<DisplacementDim>( values, _ip_data, &IpData::eps); } - if (name.starts_with("material_state_variable_") && name.ends_with("_ip")) + if (name.starts_with("material_state_variable_")) { - std::string const variable_name = name.substr(24, name.size() - 24 - 3); + std::string const variable_name = name.substr(24, name.size() - 24); // Using first ip data for solid material. TODO (naumov) move solid // material into element, store only material state in IPs. diff --git a/ProcessLib/SmallDeformation/SmallDeformationProcess.cpp b/ProcessLib/SmallDeformation/SmallDeformationProcess.cpp index e90f3a850517633ad9cddebed8a87bc3fc47b6b9..d6f2bfbe2590ecf72bdc59b675efe43fcf214088 100644 --- a/ProcessLib/SmallDeformation/SmallDeformationProcess.cpp +++ b/ProcessLib/SmallDeformation/SmallDeformationProcess.cpp @@ -121,9 +121,8 @@ void SmallDeformationProcess<DisplacementDim>::initializeConcreteProcess( _process_data.solid_materials, _local_assemblers, _integration_point_writer, integration_order); - bool const remove_name_suffix = true; setIPDataInitialConditions(_integration_point_writer, mesh.getProperties(), - _local_assemblers, remove_name_suffix); + _local_assemblers); // Initialize local assemblers after all variables have been set. GlobalExecutor::executeMemberOnDereferenced( diff --git a/ProcessLib/TH2M/TH2MProcess.cpp b/ProcessLib/TH2M/TH2MProcess.cpp index 49e6ec8f1c8e868bb23248410d5df2c49a3056b0..c097a0d0a265a54a1869408c6da749f0c15dcd72 100644 --- a/ProcessLib/TH2M/TH2MProcess.cpp +++ b/ProcessLib/TH2M/TH2MProcess.cpp @@ -310,9 +310,8 @@ void TH2MProcess<DisplacementDim>::initializeConcreteProcess( const_cast<MeshLib::Mesh&>(mesh), "temperature_interpolated", MeshLib::MeshItemType::Node, 1); - bool const remove_name_suffix = true; setIPDataInitialConditions(_integration_point_writer, mesh.getProperties(), - local_assemblers_, remove_name_suffix); + local_assemblers_); // Initialize local assemblers after all variables have been set. GlobalExecutor::executeMemberOnDereferenced( diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h index a7b84efd8b4c9c9506399becffe4cdf5b94f819b..9d91ed0ca9ea0bdb9463a10802698c310a2eac4d 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM-impl.h @@ -120,7 +120,7 @@ std::size_t ThermoHydroMechanicsLocalAssembler< _element.getID()); } - if (name == "sigma_ip") + if (name == "sigma") { if (_process_data.initial_stress != nullptr) { @@ -134,7 +134,7 @@ std::size_t ThermoHydroMechanicsLocalAssembler< return ProcessLib::setIntegrationPointKelvinVectorData<DisplacementDim>( values, _ip_data, &IpData::sigma_eff); } - if (name == "epsilon_ip") + if (name == "epsilon") { return ProcessLib::setIntegrationPointKelvinVectorData<DisplacementDim>( values, _ip_data, &IpData::eps); diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsFEM-impl.h b/ProcessLib/ThermoMechanics/ThermoMechanicsFEM-impl.h index 61da2353a35c4f41585401a7ef5b2174c2f9e0b7..61187376a9a07aacf9285b78a121c87d04e60469 100644 --- a/ProcessLib/ThermoMechanics/ThermoMechanicsFEM-impl.h +++ b/ProcessLib/ThermoMechanics/ThermoMechanicsFEM-impl.h @@ -95,15 +95,15 @@ std::size_t ThermoMechanicsLocalAssembler<ShapeFunction, DisplacementDim>:: _element.getID()); } - if (name == "sigma_ip") + if (name == "sigma") { return setSigma(values); } - if (name == "epsilon_ip") + if (name == "epsilon") { return setEpsilon(values); } - if (name == "epsilon_m_ip") + if (name == "epsilon_m") { return setEpsilonMechanical(values); } diff --git a/ProcessLib/ThermoRichardsFlow/ThermoRichardsFlowFEM-impl.h b/ProcessLib/ThermoRichardsFlow/ThermoRichardsFlowFEM-impl.h index f2c61895f9b8645b4d8f694f284a577ef659702f..a7b71707fe021170ff5e02b5edac5ab5f544f9ef 100644 --- a/ProcessLib/ThermoRichardsFlow/ThermoRichardsFlowFEM-impl.h +++ b/ProcessLib/ThermoRichardsFlow/ThermoRichardsFlowFEM-impl.h @@ -94,12 +94,12 @@ std::size_t ThermoRichardsFlowLocalAssembler<ShapeFunction, GlobalDim>:: _element.getID()); } - if (name == "saturation_ip") + if (name == "saturation") { return ProcessLib::setIntegrationPointScalarData(values, _ip_data, &IpData::saturation); } - if (name == "porosity_ip") + if (name == "porosity") { return ProcessLib::setIntegrationPointScalarData(values, _ip_data, &IpData::porosity); diff --git a/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcess.cpp b/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcess.cpp index 1b3c453ac6c6783085e9e4c88e7ca8f5853f662b..ed52b42128333d924a4a4be5eb8f7b0f1d99c082 100644 --- a/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcess.cpp +++ b/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcess.cpp @@ -187,9 +187,8 @@ void ThermoRichardsMechanicsProcess<DisplacementDim, ConstitutiveTraits>:: const_cast<MeshLib::Mesh&>(mesh), "temperature_interpolated", MeshLib::MeshItemType::Node, 1); - bool const remove_name_suffix = true; setIPDataInitialConditions(_integration_point_writer, mesh.getProperties(), - local_assemblers_, remove_name_suffix); + local_assemblers_); // Initialize local assemblers after all variables have been set. GlobalExecutor::executeMemberOnDereferenced(&LocalAssemblerIF::initialize, diff --git a/ProcessLib/Utils/SetIPDataInitialConditions.h b/ProcessLib/Utils/SetIPDataInitialConditions.h index c6188389811edc1fab9279021cf011e04c4f61a8..766d3a5a40bf91b10dbb2772c9fdf3e9c8953f0d 100644 --- a/ProcessLib/Utils/SetIPDataInitialConditions.h +++ b/ProcessLib/Utils/SetIPDataInitialConditions.h @@ -35,8 +35,7 @@ void setIPDataInitialConditions( std::vector<std::unique_ptr<MeshLib::IntegrationPointWriter>> const& _integration_point_writer, MeshLib::Properties const& mesh_properties, - LocalAssemblersVector& local_assemblers, - bool const remove_name_suffix = false) + LocalAssemblersVector& local_assemblers) { for (auto const& ip_writer : _integration_point_writer) { @@ -72,8 +71,7 @@ void setIPDataInitialConditions( INFO("Setting initial integration point data for '{}'", name); - auto const& name_transformed = - remove_name_suffix ? removeIPFieldDataNameSuffix(name) : name; + auto const& name_transformed = removeIPFieldDataNameSuffix(name); // Now we have a properly named vtk's field data array and the // corresponding meta data.