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

#721 Hyperelasticity: remove dof source and the template parameters for...

#721 Hyperelasticity: remove dof source and the template parameters for volumic and surfacic sources.
parent 0106dbce
......@@ -116,11 +116,8 @@ namespace HappyHeart
std::move(coords.begin(), coords.end(),
std::cout << "NCOORDS AFTER SHRINKING = " << coords_list.size() << std::endl;
......@@ -51,13 +51,10 @@ namespace HappyHeart
//! Return the name of the model.
......@@ -22,7 +22,7 @@
# include "ModelInstances/Hyperelasticity/Hyperelasticity.hpp"
# include "ModelInstances/Hyperelasticity/Impl/SnesFunctions.hpp"
# include "ModelInstances/Hyperelasticity/InputParameterList.hpp"
# include "ModelInstances/Hyperelasticity/TimeSchemes/HalfSum/HalfSum.hpp"
# include "ModelInstances/Hyperelasticity/TimeSchemes/Midpoint/Midpoint.hpp"
......@@ -61,33 +61,27 @@ namespace HappyHeart
* of course include the file in which CiarletGeymonat is defined).
* \tparam TimeSchemeT Approximation used to handle non-linear term.
* \tparam VolumicIndexT Index of the volumic force in the input parameter data tuple of the model considered.
* (i.e. the index N called in InputParameter::TransientSource<N> template instantiation).
* \tparam SurfacicIndexT Same as VolumicIndexT for the surfacic force.
* \tparam DofSourcePolicyT Policy for a dof source term. In hyperelastic model, the source is provided by either
* a surfacic and/or a volumic force; this force uses up a Parameter which gives away the expected values at
* the quadrature points. Policy of choice in this case is 'None'. However, we might need to give a source
* expressed at the dofs, as is the case in the FSI model. Policy of choice is then 'DofSource'.
class LawPolicyT,
HyperelasticityNS::TimeScheme TimeSchemeT,
unsigned int VolumicIndexT,
unsigned int SurfacicIndexT,
class DofSourcePolicyT = ::HappyHeart::VariationalFormulationNS::DofSourcePolicyNS::None
HyperelasticityNS::TimeScheme TimeSchemeT
class VariationalFormulationHyperElasticity final
: public VariationalFormulation<VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT, VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>>,
public Crtp::VolumicAndSurfacicSource<VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT, VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>, VolumicIndexT, SurfacicIndexT>,
private ::HappyHeart::Crtp::Mutex<VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT, VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>>,
public DofSourcePolicyT
: public VariationalFormulation<VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT>>,
public Crtp::VolumicAndSurfacicSource
VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT>,
private ::HappyHeart::Crtp::Mutex<VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT>>
//! Convenient alias.
using self = VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT, VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>;
using self = VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT>;
//! Alias to the parent class.
using parent = VariationalFormulation<self>;
......@@ -101,8 +95,6 @@ namespace HappyHeart
//! Friendship to the model that uses this variational formulation.
friend HyperElasticityModel<LawPolicyT, TimeSchemeT>;
using dof_source_policy = DofSourcePolicyT;
......@@ -127,10 +119,8 @@ namespace HappyHeart
* \param[in] main_felt_space Finite element space upon which the variational formulation apply.
* \param[in] neumann_felt_space Finite element space upon which the Neumann condition apply.
* \param[in] solid_displacement Unknown considered; it should be a solid displacement.
* \param[in] dof_source_policy_args Supplementary arguments that might be required by the DofSourcePolicyT.
template<typename... DofSourcePolicyArgs>
explicit VariationalFormulationHyperElasticity(const Wrappers::Mpi& mpi,
const FEltSpace& main_felt_space,
const FEltSpace& neumann_felt_space,
......@@ -138,8 +128,7 @@ namespace HappyHeart
const NumberingSubset& numbering_subset,
const time_manager_type& time_manager,
const GodOfDof& god_of_dof,
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list,
DofSourcePolicyArgs&&... dof_source_policy_args);
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list);
//! Destructor.
~VariationalFormulationHyperElasticity() = default;
......@@ -185,8 +174,7 @@ namespace HappyHeart
* \internal This method is called by base class method VariationalFormulation::Init().
template<class InputParameterDataT>
void SupplInit(const InputParameterDataT& input_parameter_data);
void SupplInit(const InputParameterList& input_parameter_data);
* \brief Allocate the global matrices and vectors.
......@@ -212,8 +200,7 @@ namespace HappyHeart
* \param[in] input_parameter_data Object which hold the values of all the parameters defined in
* the input file.
template<class InputParameterDataT>
void DefineOperators(const InputParameterDataT& input_parameter_data);
void DefineOperators(const InputParameterList& input_parameter_data);
* \brief Update the content of all the vectors and matrices relevant to the computation of the tangent
Supports Markdown
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