12#ifndef DUMUX_SOLIDMECHANICS_ELASTIC_FV_SPATIAL_PARAMS_HH 
   13#define DUMUX_SOLIDMECHANICS_ELASTIC_FV_SPATIAL_PARAMS_HH 
   18#include <dune/common/exceptions.hh> 
   23#include "spatialparamstraits_.hh" 
   31template<
class Gr
idGeometry, 
class Scalar, 
class Implementation>
 
   35    using FVElementGeometry = 
typename GridGeometry::LocalView;
 
   36    using SubControlVolume = 
typename GridGeometry::SubControlVolume;
 
   37    using GridView = 
typename GridGeometry::GridView;
 
   38    using Element = 
typename GridView::template Codim<0>::Entity;
 
   39    using GlobalPosition = 
typename Element::Geometry::GlobalCoordinate;
 
   57    template<
class Sol
idSystem, 
class ElementSolution>
 
   59                               const SubControlVolume& scv,
 
   60                               const ElementSolution& elemSol,
 
   63        static_assert(SolidSystem::isInert(), 
"Elastic model can only be used with inert solid systems");
 
   66        if constexpr (SolidSystem::numInertComponents == 1)
 
 
   81    template<
class Sol
idSystem>
 
   83    { DUNE_THROW(Dune::InvalidStateException, 
"The spatial parameters do not provide inertVolumeFractionAtPos() method."); }
 
 
   98    template<
class ElemVolVars, 
class FluxVarsCache>
 
  100                              const FVElementGeometry& fvGeometry,
 
  101                              const ElemVolVars& elemVolVars,
 
  102                              const FluxVarsCache& fluxVarsCache) 
const 
  104        static_assert(
decltype(
isValid(Detail::hasLameParamsAtPos<GlobalPosition>())(this->
asImp_()))::value,
" \n\n" 
  105        "   Your spatial params class has to either implement\n\n" 
  106        "         const LameParams& lameParamsAtPos(const GlobalPosition& globalPos) const\n\n" 
  107        "   or overload this function\n\n" 
  108        "         template<class ElementSolution>\n" 
  109        "         const LameParams& lameParams(const Element& element,\n" 
  110        "                                      const FVElementGeometry& fvGeometry,\n" 
  111        "                                      const ElemVolVars& elemVolVars,\n" 
  112        "                                      const FluxVarsCache& fluxVarsCache) const\n\n");
 
  114        return this->
asImp_().lameParamsAtPos(fluxVarsCache.ipGlobal());
 
 
 
Scalar inertVolumeFractionAtPos(const GlobalPosition &globalPos, int compIdx) const
Function for defining the solid volume fraction. That is possibly solution dependent.
Definition solidmechanics/elastic/fvspatialparams.hh:82
decltype(auto) lameParams(const Element &element, const FVElementGeometry &fvGeometry, const ElemVolVars &elemVolVars, const FluxVarsCache &fluxVarsCache) const
Define the Lame parameters.
Definition solidmechanics/elastic/fvspatialparams.hh:99
FVElasticSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
The constructor.
Definition solidmechanics/elastic/fvspatialparams.hh:43
Scalar inertVolumeFraction(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, int compIdx) const
Function for defining the solid volume fraction. That is possibly solution dependent.
Definition solidmechanics/elastic/fvspatialparams.hh:58
Implementation & asImp_()
Returns the implementation of the spatial parameters (static polymorphism)
Definition common/fvspatialparams.hh:135
FVSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition common/fvspatialparams.hh:45
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition common/fvspatialparams.hh:130
Basic spatial parameters to be used with finite-volume schemes.
constexpr auto isValid(const Expression &t)
A function that creates a test functor to do class member introspection at compile time.
Definition isvalid.hh:81
A helper function for class member function introspection.