diff --git a/ProcessLib/ThermoRichardsMechanics/LocalDataInitializer.h b/ProcessLib/ThermoRichardsMechanics/LocalDataInitializer.h index a3c861706b1dc25b3cf0822833dfe8d7aafeed80..459fc79b2aa6ce0d76d01c8c5e25aff11c77c3cc 100644 --- a/ProcessLib/ThermoRichardsMechanics/LocalDataInitializer.h +++ b/ProcessLib/ThermoRichardsMechanics/LocalDataInitializer.h @@ -341,7 +341,8 @@ private: { return [](MeshLib::Element const& e, std::size_t const local_matrix_size, - ConstructorArgs&&... args) { + ConstructorArgs&&... args) + { return LADataIntfPtr{new LAData<ShapeFunction, ShapeFunction>{ e, local_matrix_size, std::forward<ConstructorArgs>(args)...}}; @@ -353,7 +354,8 @@ private: typename NumLib::LowerDim<ShapeFunction>::type; return [](MeshLib::Element const& e, std::size_t const local_matrix_size, - ConstructorArgs&&... args) { + ConstructorArgs&&... args) + { return LADataIntfPtr{ new LAData<ShapeFunction, LowerOrderShapeFunction>{ e, local_matrix_size, diff --git a/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsFEM-impl.h b/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsFEM-impl.h index c6808af3bd32c71a87e35fc11d7197141c220ccb..102875b5cd39ea7a8c056f2b86268f9dcdae10d1 100644 --- a/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsFEM-impl.h +++ b/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsFEM-impl.h @@ -427,7 +427,8 @@ void ThermoRichardsMechanicsLocalAssembler<ShapeFunctionDisplacement, (p_cap_dot_ip == 0) ? dS_L_dp_cap : (S_L - S_L_prev) / (dt * p_cap_dot_ip); - auto const chi = [medium, x_position, t, dt](double const S_L) { + auto const chi = [medium, x_position, t, dt](double const S_L) + { MPL::VariableArray vs; vs[static_cast<int>(MPL::Variable::liquid_saturation)] = S_L; return medium->property(MPL::PropertyType::bishops_effective_stress) @@ -745,8 +746,9 @@ void ThermoRichardsMechanicsLocalAssembler<ShapeFunctionDisplacement, .template value<double>(variables, x_position, t, dt); M_TT.noalias() += - w * (rho_SR * specific_heat_capacity_solid * (1 - phi) + - (S_L * rho_LR * specific_heat_capacity_fluid) * phi) * + w * + (rho_SR * specific_heat_capacity_solid * (1 - phi) + + (S_L * rho_LR * specific_heat_capacity_fluid) * phi) * N.transpose() * N; auto const thermal_conductivity = @@ -859,9 +861,8 @@ std::vector<double> ThermoRichardsMechanicsLocalAssembler< MathLib::KelvinVector::kelvin_vector_dimensions(DisplacementDim); return transposeInPlace<kelvin_vector_size>( - [this](std::vector<double>& values) { - return getIntPtSigma(0, {}, {}, values); - }); + [this](std::vector<double>& values) + { return getIntPtSigma(0, {}, {}, values); }); } template <typename ShapeFunctionDisplacement, typename ShapeFunction, @@ -889,9 +890,8 @@ std::vector<double> ThermoRichardsMechanicsLocalAssembler< MathLib::KelvinVector::kelvin_vector_dimensions(DisplacementDim); return transposeInPlace<kelvin_vector_size>( - [this](std::vector<double>& values) { - return getIntPtSwellingStress(0, {}, {}, values); - }); + [this](std::vector<double>& values) + { return getIntPtSwellingStress(0, {}, {}, values); }); } template <typename ShapeFunctionDisplacement, typename ShapeFunction, @@ -934,9 +934,8 @@ std::vector<double> ThermoRichardsMechanicsLocalAssembler< MathLib::KelvinVector::kelvin_vector_dimensions(DisplacementDim); return transposeInPlace<kelvin_vector_size>( - [this](std::vector<double>& values) { - return getIntPtEpsilon(0, {}, {}, values); - }); + [this](std::vector<double>& values) + { return getIntPtEpsilon(0, {}, {}, values); }); } template <typename ShapeFunctionDisplacement, typename ShapeFunction, @@ -1167,7 +1166,8 @@ void ThermoRichardsMechanicsLocalAssembler<ShapeFunctionDisplacement, variables_prev[static_cast<int>(MPL::Variable::liquid_saturation)] = S_L_prev; - auto const chi = [medium, x_position, t, dt](double const S_L) { + auto const chi = [medium, x_position, t, dt](double const S_L) + { MPL::VariableArray vs; vs.fill(std::numeric_limits<double>::quiet_NaN()); vs[static_cast<int>(MPL::Variable::liquid_saturation)] = S_L; @@ -1321,8 +1321,8 @@ void ThermoRichardsMechanicsLocalAssembler<ShapeFunctionDisplacement, if (solid_phase.hasProperty(MPL::PropertyType::swelling_stress_rate)) { - eps_m.noalias() -= -C_el.inverse() * (ip_data.sigma_sw - - ip_data.sigma_sw_prev); + eps_m.noalias() -= + -C_el.inverse() * (ip_data.sigma_sw - ip_data.sigma_sw_prev); } variables[static_cast<int>( diff --git a/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcess.cpp b/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcess.cpp index ca869e11e62dadcd365091c20294d8d57a0f0177..f49a246228811fc58495199dc60ed70ba728f406 100644 --- a/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcess.cpp +++ b/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcess.cpp @@ -54,7 +54,9 @@ ThermoRichardsMechanicsProcess<DisplacementDim>::ThermoRichardsMechanicsProcess( std::make_unique<IntegrationPointWriter>( "sigma_ip", static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/, - integration_order, [this]() { + integration_order, + [this]() + { // Result containing integration point data for each local // assembler. std::vector<std::vector<double>> result; @@ -71,7 +73,9 @@ ThermoRichardsMechanicsProcess<DisplacementDim>::ThermoRichardsMechanicsProcess( _integration_point_writer.emplace_back( std::make_unique<IntegrationPointWriter>( - "saturation_ip", 1 /*n components*/, integration_order, [this]() { + "saturation_ip", 1 /*n components*/, integration_order, + [this]() + { // Result containing integration point data for each local // assembler. std::vector<std::vector<double>> result; @@ -88,7 +92,9 @@ ThermoRichardsMechanicsProcess<DisplacementDim>::ThermoRichardsMechanicsProcess( _integration_point_writer.emplace_back( std::make_unique<IntegrationPointWriter>( - "porosity_ip", 1 /*n components*/, integration_order, [this]() { + "porosity_ip", 1 /*n components*/, integration_order, + [this]() + { // Result containing integration point data for each local // assembler. std::vector<std::vector<double>> result; @@ -106,7 +112,8 @@ ThermoRichardsMechanicsProcess<DisplacementDim>::ThermoRichardsMechanicsProcess( _integration_point_writer.emplace_back( std::make_unique<IntegrationPointWriter>( "transport_porosity_ip", 1 /*n components*/, integration_order, - [this]() { + [this]() + { // Result containing integration point data for each local // assembler. std::vector<std::vector<double>> result; @@ -125,7 +132,9 @@ ThermoRichardsMechanicsProcess<DisplacementDim>::ThermoRichardsMechanicsProcess( std::make_unique<IntegrationPointWriter>( "swelling_stress_ip", static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/, - integration_order, [this]() { + integration_order, + [this]() + { // Result containing integration point data for each local // assembler. std::vector<std::vector<double>> result; @@ -144,7 +153,9 @@ ThermoRichardsMechanicsProcess<DisplacementDim>::ThermoRichardsMechanicsProcess( std::make_unique<IntegrationPointWriter>( "epsilon_ip", static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/, - integration_order, [this]() { + integration_order, + [this]() + { // Result containing integration point data for each local // assembler. std::vector<std::vector<double>> result; @@ -241,7 +252,8 @@ void ThermoRichardsMechanicsProcess<DisplacementDim>::initializeConcreteProcess( auto add_secondary_variable = [&](std::string const& name, int const num_components, - auto get_ip_values_function) { + auto get_ip_values_function) + { _secondary_variables.addSecondaryVariable( name, makeExtrapolator(num_components, getExtrapolator(), @@ -424,7 +436,8 @@ void ThermoRichardsMechanicsProcess<DisplacementDim>:: local_assemblers_, pv.getActiveElementIDs(), dof_tables, t, dt, x, xdot, dxdot_dx, dx_dx, process_id, M, K, b, Jac); - auto copyRhs = [&](int const variable_id, auto& output_vector) { + auto copyRhs = [&](int const variable_id, auto& output_vector) + { transformVariableFromGlobalVector(b, variable_id, dof_tables[0], output_vector, std::negate<double>()); };