Commit b29d4e12 authored by Dmitry Yu. Naumov's avatar Dmitry Yu. Naumov
Browse files

[PL/TH2M] rm postNonLinearSolverConcreteProcess().

Function is not needed.
parent 5f6623a9
......@@ -962,97 +962,6 @@ TH2MLocalAssembler<ShapeFunctionDisplacement, ShapeFunctionPressure,
return cache;
}
template <typename ShapeFunctionDisplacement, typename ShapeFunctionPressure,
typename IntegrationMethod, int DisplacementDim>
void TH2MLocalAssembler<ShapeFunctionDisplacement, ShapeFunctionPressure,
IntegrationMethod, DisplacementDim>::
postNonLinearSolverConcrete(std::vector<double> const& local_x,
std::vector<double> const& local_xdot,
double const t, double const dt,
bool const use_monolithic_scheme,
int const /*process_id*/)
{
const int displacement_offset =
use_monolithic_scheme ? displacement_index : 0;
auto const u =
Eigen::Map<typename ShapeMatricesTypeDisplacement::template VectorType<
displacement_size> const>(local_x.data() + displacement_offset,
displacement_size);
auto const temperature =
Eigen::Map<typename ShapeMatricesTypePressure::template VectorType<
temperature_size> const>(local_x.data() + temperature_index,
temperature_size);
auto const p =
Eigen::Map<typename ShapeMatricesTypePressure::template VectorType<
gas_pressure_size> const>(local_x.data() + gas_pressure_index,
gas_pressure_size);
auto const dT =
Eigen::Map<typename ShapeMatricesTypePressure::template VectorType<
temperature_size> const>(local_xdot.data() + temperature_index,
temperature_size) *
dt;
ParameterLib::SpatialPosition x_position;
x_position.setElementID(_element.getID());
auto const& medium = _process_data.media_map->getMedium(_element.getID());
auto const& solid_phase = medium->phase("Solid");
MaterialPropertyLib::VariableArray vars;
int const n_integration_points = _integration_method.getNumberOfPoints();
for (int ip = 0; ip < n_integration_points; ip++)
{
x_position.setIntegrationPoint(ip);
auto const& N_u = _ip_data[ip].N_u;
auto const& N_T = _ip_data[ip].N_p;
auto const& dNdx_u = _ip_data[ip].dNdx_u;
auto const x_coord =
NumLib::interpolateXCoordinate<ShapeFunctionDisplacement,
ShapeMatricesTypeDisplacement>(
_element, N_u);
auto const B =
LinearBMatrix::computeBMatrix<DisplacementDim,
ShapeFunctionDisplacement::NPOINTS,
typename BMatricesType::BMatrixType>(
dNdx_u, N_u, x_coord, _is_axially_symmetric);
double const T = N_T.dot(temperature);
vars[static_cast<int>(MaterialPropertyLib::Variable::temperature)] = T;
vars[static_cast<int>(MaterialPropertyLib::Variable::phase_pressure)] =
N_T.dot(p); // N_T = N_p
// solid phase linear thermal expansion coefficient
auto const alpha_T_SR = MathLib::KelvinVector::tensorToKelvin<
DisplacementDim>(MaterialPropertyLib::formEigenTensor<3>(
solid_phase
.property(
MaterialPropertyLib::PropertyType::thermal_expansivity)
.value(vars, x_position, t, dt)));
double const dT_int_pt = N_T.dot(dT);
MathLib::KelvinVector::KelvinVectorType<DisplacementDim> const
dthermal_strain = alpha_T_SR * dT_int_pt;
auto& eps = _ip_data[ip].eps;
eps.noalias() = B * u;
auto& eps_prev = _ip_data[ip].eps_prev;
auto& eps_m = _ip_data[ip].eps_m;
auto& eps_m_prev = _ip_data[ip].eps_m_prev;
eps_m.noalias() = eps_m_prev + eps - eps_prev - dthermal_strain;
vars[static_cast<int>(MaterialPropertyLib::Variable::mechanical_strain)]
.emplace<MathLib::KelvinVector::KelvinVectorType<DisplacementDim>>(
eps_m);
_ip_data[ip].updateConstitutiveRelation(vars, t, x_position, dt,
T - dT_int_pt);
}
}
template <typename ShapeFunctionDisplacement, typename ShapeFunctionPressure,
typename IntegrationMethod, int DisplacementDim>
void TH2MLocalAssembler<ShapeFunctionDisplacement, ShapeFunctionPressure,
......
......@@ -149,12 +149,6 @@ private:
double const t, double const dt, Eigen::VectorXd const& local_x,
Eigen::VectorXd const& local_x_dot) override;
void postNonLinearSolverConcrete(std::vector<double> const& local_x,
std::vector<double> const& local_xdot,
double const t, double const dt,
bool const use_monolithic_scheme,
int const process_id) override;
Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
const unsigned integration_point) const override
{
......
......@@ -364,24 +364,6 @@ void TH2MProcess<DisplacementDim>::postTimestepConcreteProcess(
x, t, dt);
}
template <int DisplacementDim>
void TH2MProcess<DisplacementDim>::postNonLinearSolverConcreteProcess(
GlobalVector const& x, GlobalVector const& xdot, const double t,
double const dt, const int process_id)
{
if (!hasMechanicalProcess(process_id))
{
return;
}
DBUG("PostNonLinearSolver TH2MProcess.");
// Calculate strain, stress or other internal variables of mechanics.
GlobalExecutor::executeMemberOnDereferenced(
&LocalAssemblerInterface::postNonLinearSolver, _local_assemblers,
getDOFTable(process_id), x, xdot, t, dt, _use_monolithic_scheme,
process_id);
}
template <int DisplacementDim>
void TH2MProcess<DisplacementDim>::computeSecondaryVariableConcrete(
double const t, double const dt, std::vector<GlobalVector*> const& x,
......
......@@ -95,11 +95,6 @@ private:
const double t, const double dt,
int const /*process_id*/) override;
void postNonLinearSolverConcreteProcess(GlobalVector const& x,
GlobalVector const& xdot,
const double t, double const dt,
int const process_id) override;
NumLib::LocalToGlobalIndexMap const& getDOFTable(
const int process_id) const override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment