Commit d0163925 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1049 Fix Elasticity model.

parent b3714185
......@@ -8,7 +8,7 @@
// Copyright (c) 2014 Inria. All rights reserved.
//
#include "HappyHeart/Geometry/Domain/Internal/
#include "HappyHeart/Geometry/Domain/DomainManager.hpp"
#include "HappyHeart/ModelInstances/Elasticity/VariationalFormulationElasticity.hpp"
......@@ -24,24 +24,21 @@ namespace HappyHeart
void VariationalFormulationElasticity
::SupplInit(const InputParameterList& input_parameter_data)
{
const auto& god_of_dof = this->GetGodOfDof();
const auto& mesh = god_of_dof.GetGeometricMeshRegion();
decltype(auto) domain = DomainManager::GetInstance().GetDomain(EnumUnderlyingType(DomainIndex::full_mesh));
volumic_mass_ = InitScalarParameterFromInputData<InputParameter::Solid::VolumicMass>("Volumic mass",
mesh,
domain,
input_parameter_data);
if (!GetVolumicMass().IsConstant())
throw Exception("Current elastic model is restricted to a constant volumic mass!", __FILE__, __LINE__);
young_modulus_ = InitScalarParameterFromInputData<InputParameter::Solid::YoungModulus>("Young modulus",
mesh,
domain,
input_parameter_data);
poisson_ratio_ = InitScalarParameterFromInputData<InputParameter::Solid::PoissonRatio>("Poisson ratio",
mesh,
domain,
input_parameter_data);
DefineOperators(input_parameter_data);
......
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