Skip to content

Commit

Permalink
[PL] RM; Setting initial stress in FEM.
Browse files Browse the repository at this point in the history
Was forgotten in the main PR #2635.
  • Loading branch information
endJunction committed Sep 3, 2019
1 parent 164b7c5 commit 7fff4bb
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion ProcessLib/RichardsMechanics/RichardsMechanicsFEM.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,27 @@ class RichardsMechanicsLocalAssembler : public LocalAssemblerInterface

for (unsigned ip = 0; ip < n_integration_points; ip++)
{
_ip_data[ip].pushBackState();
auto& ip_data = _ip_data[ip];

/// Set initial stress from parameter.
if (_process_data.initial_stress != nullptr)
{
ParameterLib::SpatialPosition const x_position{
boost::none, _element.getID(), ip,
MathLib::Point3d(
interpolateCoordinates<ShapeFunctionDisplacement,
ShapeMatricesTypeDisplacement>(
_element, ip_data.N_u))};

ip_data.sigma_eff =
MathLib::KelvinVector::symmetricTensorToKelvinVector<
DisplacementDim>((*_process_data.initial_stress)(
std::numeric_limits<
double>::quiet_NaN() /* time independent */,
x_position));
}

ip_data.pushBackState();
}
}

Expand Down

0 comments on commit 7fff4bb

Please sign in to comment.