Commit 54e14c63 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1049 Fix Heat model.

parent 73919666
......@@ -210,6 +210,31 @@ Domain5 = {
}
Domain6 = {
-- Index of the geometric mesh upon which the domain is defined (as defined in the present file). Might be
-- left empty if domain not limited to one mesh; at most one value is expected here.
-- Expected format: {VALUE1}
-- Expected format: VALUE
mesh_index = { 1 },
-- List of dimensions encompassed by the domain. Might be left empty if no restriction at all upon
-- dimensions.
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: ops_in(v, {0, 1, 2, 3})
dimension_list = { },
-- List of mesh labels encompassed by the domain. Might be left empty if no restriction at all upon mesh
-- labels. This parameter does not make sense if no mesh is defined for the domain.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_label_list = { },
-- List of geometric element types considered in the domain. Might be left empty if no restriction upon
-- these.
-- Expected format: {"VALUE1", "VALUE2", ...}
geometric_element_type_list = { }
}
EssentialBoundaryCondition1 = {
-- Name of the boundary condition (must be unique).
......
......@@ -209,6 +209,31 @@ Domain5 = {
}
Domain6 = {
-- Index of the geometric mesh upon which the domain is defined (as defined in the present file). Might be
-- left empty if domain not limited to one mesh; at most one value is expected here.
-- Expected format: {VALUE1}
-- Expected format: VALUE
mesh_index = { 1 },
-- List of dimensions encompassed by the domain. Might be left empty if no restriction at all upon
-- dimensions.
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: ops_in(v, {0, 1, 2, 3})
dimension_list = { },
-- List of mesh labels encompassed by the domain. Might be left empty if no restriction at all upon mesh
-- labels. This parameter does not make sense if no mesh is defined for the domain.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_label_list = { },
-- List of geometric element types considered in the domain. Might be left empty if no restriction upon
-- these.
-- Expected format: {"VALUE1", "VALUE2", ...}
geometric_element_type_list = { }
}
EssentialBoundaryCondition1 = {
......
......@@ -8,7 +8,7 @@
//
// # include "HappyHeart/Geometry/GeometricElt/Advanced/FreeFunctions.hpp"
# include "HappyHeart/Geometry/Domain/DomainManager.hpp"
# include "HappyHeart/Parameters/InitParameterFromInputData/InitParameterFromInputData.hpp"
......@@ -40,18 +40,20 @@ namespace HappyHeart
{
using Diffusion = InputParameter::Diffusion;
const GodOfDof& god_of_dof = GetGodOfDof();
const GeometricMeshRegion& mesh = god_of_dof.GetGeometricMeshRegion();
decltype(auto) domain = DomainManager::GetInstance().GetDomain(EnumUnderlyingType(DomainIndex::full_mesh));
diffusion_tensor_ = InitScalarParameterFromInputData<Diffusion::Tensor<EnumUnderlyingType(TensorIndex::diffusion_tensor)>>("Diffusion tensor",
mesh,
input_parameter_data);
transfert_coefficient_ = InitScalarParameterFromInputData<Diffusion::TransfertCoefficient>("Transfert coefficient",
mesh,
input_parameter_data);
diffusion_tensor_ =
InitScalarParameterFromInputData<Diffusion::Tensor<EnumUnderlyingType(TensorIndex::diffusion_tensor)>>("Diffusion tensor",
domain,
input_parameter_data);
transfert_coefficient_ =
InitScalarParameterFromInputData<Diffusion::TransfertCoefficient>("Transfert coefficient",
domain,
input_parameter_data);
density_ = InitScalarParameterFromInputData<Diffusion::Density>("Density",
mesh,
input_parameter_data);
domain,
input_parameter_data);
if (!GetDiffusionTensor().IsConstant())
throw Exception("Current heat model is restricted to a constant diffusion tensor.", __FILE__, __LINE__);
......@@ -89,13 +91,14 @@ namespace HappyHeart
void HeatVariationalFormulation::DefineOperators(const InputParameterList& input_parameter_data)
{
const GodOfDof& god_of_dof = GetGodOfDof();
const GeometricMeshRegion& mesh = god_of_dof.GetGeometricMeshRegion();
const FEltSpace& felt_space_highest_dimension = god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::highest_dimension));
const FEltSpace& felt_space_dim_N_minus_1_Neumann = god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::neumann));
const FEltSpace& felt_space_dim_N_minus_1_Robin = god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::robin));
const Unknown& temperature = UnknownManager::GetInstance().GetUnknown(EnumUnderlyingType(UnknownIndex::temperature));
decltype(auto) domain = DomainManager::GetInstance().GetDomain(EnumUnderlyingType(DomainIndex::full_mesh));
namespace GVO = GlobalVariationalOperatorNS;
namespace IPL = Utilities::InputParameterListNS;
......@@ -105,8 +108,8 @@ namespace HappyHeart
volumic_source_parameter_ =
InitThreeDimensionalParameterFromInputData<parameter_type>("Volumic source",
mesh,
input_parameter_data);
domain,
input_parameter_data);
if (volumic_source_parameter_ != nullptr)
{
......@@ -129,7 +132,7 @@ namespace HappyHeart
neumann_parameter_ =
InitThreeDimensionalParameterFromInputData<parameter_type>("Neumann boundary condition",
mesh,
domain,
input_parameter_data);
if (neumann_parameter_ != nullptr)
......@@ -149,7 +152,7 @@ namespace HappyHeart
robin_parameter_ =
InitThreeDimensionalParameterFromInputData<parameter_type>("Robin boundary condition",
mesh,
domain,
input_parameter_data);
if (robin_parameter_ != nullptr)
......
......@@ -52,7 +52,8 @@ namespace HappyHeart
neumann = 2,
robin = 3,
dirichlet_1 = 4,
dirichlet_2 = 5
dirichlet_2 = 5,
full_mesh = 6
};
......@@ -114,6 +115,7 @@ namespace HappyHeart
InputParameter::Domain<EnumUnderlyingType(DomainIndex::robin)>,
InputParameter::Domain<EnumUnderlyingType(DomainIndex::dirichlet_1)>,
InputParameter::Domain<EnumUnderlyingType(DomainIndex::dirichlet_2)>,
InputParameter::Domain<EnumUnderlyingType(DomainIndex::full_mesh)>,
InputParameter::DirichletBoundaryCondition<EnumUnderlyingType(BoundaryConditionIndex::first)>,
InputParameter::DirichletBoundaryCondition<EnumUnderlyingType(BoundaryConditionIndex::second)>,
......
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