Skip to content
Snippets Groups Projects
Commit c8458a84 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MatL] Lubby2: Extract material properties class.

parent 6c2d0256
No related branches found
No related tags found
No related merge requests found
......@@ -92,8 +92,7 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createLubby2(
DBUG("Use '%s' as dependency parameter mvM.",
dependency_parameter_mvM.name.c_str());
typename Lubby2<DisplacementDim>::MaterialProperties mp{
Lubby2MaterialProperties mp{
kelvin_shear_modulus, maxwell_shear_modulus,
maxwell_bulk_modulus, kelvin_viscosity,
maxwell_viscosity, dependency_parameter_mK,
......
......@@ -20,6 +20,42 @@ namespace MaterialLib
{
namespace Solids
{
//
// Variables specific to the material model.
//
struct Lubby2MaterialProperties
{
using P = ProcessLib::Parameter<double>;
Lubby2MaterialProperties(P const& GK0_,
P const& GM0_,
P const& KM0_,
P const& etaK0_,
P const& etaM0_,
P const& mK_,
P const& mvK_,
P const& mvM_)
: GK0(GK0_),
GM0(GM0_),
KM0(KM0_),
etaK0(etaK0_),
etaM0(etaM0_),
mK(mK_),
mvK(mvK_),
mvM(mvM_)
{
}
// basic material parameters
P const& GK0;
P const& GM0;
P const& KM0;
P const& etaK0;
P const& etaM0;
P const& mK;
P const& mvK;
P const& mvM;
};
template <int DisplacementDim>
class Lubby2 final : public MechanicsBase<DisplacementDim>
{
......@@ -121,7 +157,7 @@ public:
Eigen::RowMajor>;
public:
explicit Lubby2(MaterialProperties& material_properties)
explicit Lubby2(Lubby2MaterialProperties& material_properties)
: _mp(material_properties)
{
}
......@@ -190,7 +226,7 @@ private:
}
private:
MaterialProperties _mp;
Lubby2MaterialProperties _mp;
};
extern template class Lubby2<2>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment