version 3.11-dev
Loading...
Searching...
No Matches
solidmechanics/hyperelastic/model.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
51#ifndef DUMUX_SOLIDMECHANICS_HYPERELASTIC_MODEL_HH
52#define DUMUX_SOLIDMECHANICS_HYPERELASTIC_MODEL_HH
53
54#include <type_traits>
55
60#include <dumux/discretization/cvfe/gridvariablescache_.hh>
65
66#include "spatialparams.hh"
67#include "localresidual.hh"
68#include "variables.hh"
69
70namespace Dumux {
71
72template<class PV, class MT>
78
80{
81 static constexpr int displacementIdx(int i) { return i; };
82 static constexpr int equationIdx(int i) { return i; };
83};
84
89template<int dim>
91{
93 static constexpr int numEq() { return dim; }
94};
95
96namespace Properties {
97
98// Create new type tags
99namespace TTag {
100struct Hyperelastic { using InheritsFrom = std::tuple<ModelProperties>; };
101} // end namespace TTag
102
103template<class TypeTag>
106
107template<class TypeTag>
108struct LocalResidual<TypeTag, TTag::Hyperelastic>
110
111template<class TypeTag>
119
121template<class TypeTag>
122struct GridVariables<TypeTag, TTag::Hyperelastic>
123{
124private:
126 using ElementDiscretization = typename GG::LocalView;
130 static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridVolumeVariablesCache>();
131
136 using CVFECache = Dumux::Experimental::CVFE::CVFEGridVariablesCache<
137 Dumux::Experimental::CVFE::CVFEDefaultGridVariablesCacheTraits<Problem, Variables, IPDataCache>, enableCache>;
138
139 using Cache = std::conditional_t<Dumux::Experimental::Concepts::FEElementDiscretization<ElementDiscretization>, FECache,
140 std::conditional_t<Dumux::Experimental::Concepts::HybridElementDiscretization<ElementDiscretization>, HybridCache,
141 CVFECache>>;
142public:
144};
145
146// Set the default spatial parameters
147template<class TypeTag>
154
155} // end namespace Properties
156} // end namespace Dumux
157
158#endif
Interpolation point data related to a local basis.
Definition cvfe/interpolationpointdata.hh:161
Definition solidmechanics/hyperelastic/spatialparams.hh:36
A class for providing the new update interface of variables. This allows to still use the VolumesVari...
Definition variablesadapter.hh:36
The grid variables cache class for hybrid control-volume finite element methods.
Definition cvfe/hybrid/gridvariablescache.hh:49
Base class for the grid local variables.
Definition fem/gridvariablescache.hh:50
The grid variables class for general schemes, storing variables and data.
Definition discretization/gridvariables.hh:27
Local residual of the hyperelastic model.
Definition solidmechanics/hyperelastic/localresidual.hh:59
Variables of the hyperelastic model: the displacement at a local dof.
Definition solidmechanics/hyperelastic/variables.hh:25
Defines a type tags and some fundamental properties for all models.
Defines all properties used in Dumux.
Concepts for discretization types.
The grid variables cache class for hybrid control-volume finite element methods.
Classes representing interpolation point data for control-volume finite element schemes.
The grid variables class for general schemes, storing variables and data.
The grid local variables class for finite element methods.
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:310
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296
Type tag for numeric models.
Definition grid.hh:24
Definition adapt.hh:17
Local residual of the hyperelastic model.
Default implementation of the spatial params.
Variables of the hyperelastic model.
Definition cvfe/hybrid/gridvariablescache.hh:35
Definition fem/gridvariablescache.hh:36
Definition solidmechanics/hyperelastic/model.hh:80
static constexpr int displacementIdx(int i)
Definition solidmechanics/hyperelastic/model.hh:81
static constexpr int equationIdx(int i)
Definition solidmechanics/hyperelastic/model.hh:82
HyperelasticModelTraits.
Definition solidmechanics/hyperelastic/model.hh:91
static constexpr int numEq()
Definition solidmechanics/hyperelastic/model.hh:93
HyperelasticIndices Indices
Definition solidmechanics/hyperelastic/model.hh:92
Definition solidmechanics/hyperelastic/model.hh:74
PV PrimaryVariables
Definition solidmechanics/hyperelastic/model.hh:75
MT ModelTraits
Definition solidmechanics/hyperelastic/model.hh:76
Dumux::Experimental::GridVariables< GG, Cache > type
Definition solidmechanics/hyperelastic/model.hh:143
HyperelasticLocalResidual< TypeTag > type
Definition solidmechanics/hyperelastic/model.hh:109
HyperelasticModelTraits< GetPropType< TypeTag, Properties::GridGeometry >::GridView::dimension > type
Definition solidmechanics/hyperelastic/model.hh:105
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition solidmechanics/hyperelastic/model.hh:150
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition solidmechanics/hyperelastic/model.hh:151
DefaultHyperelasticSpatialParams< GridGeometry, Scalar > type
Definition solidmechanics/hyperelastic/model.hh:152
Definition solidmechanics/hyperelastic/model.hh:100
std::tuple< ModelProperties > InheritsFrom
Definition solidmechanics/hyperelastic/model.hh:100
HyperelasticVolumeVariablesTraits< PV, MT > Traits
Definition solidmechanics/hyperelastic/model.hh:116
GetPropType< TypeTag, Properties::ModelTraits > MT
Definition solidmechanics/hyperelastic/model.hh:115
HyperelasticVariables< Traits > type
Definition solidmechanics/hyperelastic/model.hh:117
GetPropType< TypeTag, Properties::PrimaryVariables > PV
Definition solidmechanics/hyperelastic/model.hh:114