Commit 7d43014a authored by Andreas Dedner's avatar Andreas Dedner

[!311] added some typedef to the some bfs, e.g., DomainFieldType and made some

Merge branch 'bugfix/sometypedefadded' into 'master'

ref:dune-fem/dune-fem existing typedefs public instead of protected

See merge request [!311]

parents c3cfd0c3 a0cf0b0d
Pipeline #18122 passed with stage
in 44 minutes and 54 seconds
......@@ -300,6 +300,8 @@ namespace Dune
typedef typename GF::LocalFunctionType::JacobianRangeType JacobianRangeType;
typedef typename GF::LocalFunctionType::HessianRangeType HessianRangeType;
static const int dimRange = RangeType::dimension;
explicit Type ( const GridFunctionType &gridFunction )
: GridFunctionType::LocalFunctionType( gridFunction ),
gridFunction_( gridFunction )
......@@ -367,6 +369,7 @@ namespace Dune
typedef typename GridFunctionDecayType::JacobianRangeType JacobianRangeType;
typedef typename GridFunctionDecayType::HessianRangeType HessianRangeType;
typedef typename GridFunctionDecayType::FunctionSpaceType FunctionSpaceType;
static const int dimRange = RangeType::dimension;
  • This apperently breaks tensor-valued stuff when RangeType is e.g. a FieldMatrix<double, 2, 2> that does not have the member dimension.

  • That is a problem I guess. It's just that the other versions of local functions also have a dimRange field. Does in your example GF::LocalFunctionType have a dimRange field so that static const int dimRange = GF::LocalFunctionType::dimension could be used here?

  • In my case Fem::BindableGridFunction does not even have a LocalFunctionType. I currently see two options:

    • require a dimRange member for all grid functions and write here static const int dimRange = GridFunctionDecayType::dimRange, then dimRange can be implemented by the user
    • don't have a dimRange on local functions and instead access from the outside through ::RangeType::dimension if you know your specific RangeType
  • I just tested with getting dimRange like in your first example and that does work with my code but I can also get around the issue like you also suggested above. So I'm happy to have this removed - I guess the LocalFunction really doens't need a dimRange (the matrix range is a point in case).

    @stephan.hilb are you happy to remove it or do you want me to do that?

  • I've removed it, see !312 (merged)

Please register or sign in to reply
template<class Arg, std::enable_if_t<std::is_constructible<GF, Arg>::value, int> = 0>
explicit Type ( Arg&& gridFunction )
......@@ -58,18 +58,17 @@ namespace Dune
//! \brief shape function set type
typedef ShapeFunctionSet ShapeFunctionSetType;
typedef typename ShapeFunctionSetType::FunctionSpaceType LocalFunctionSpaceType;
typedef typename LocalFunctionSpaceType::JacobianRangeType LocalJacobianRangeType;
typedef typename LocalFunctionSpaceType::HessianRangeType LocalHessianRangeType;
typedef typename LocalFunctionSpaceType::DomainFieldType DomainFieldType;
typedef typename LocalFunctionSpaceType::RangeFieldType RangeFieldType;
typedef typename EntityType::Geometry GeometryType;
typedef typename GeometryType::ctype ctype;
// slight misuse of struct ToLocalFunctionSpace!!!
//! \brief type of function space
typedef typename ToNewDimDomainFunctionSpace< LocalFunctionSpaceType, EntityType :: Geometry :: coorddimension >::Type FunctionSpaceType;
......@@ -48,6 +48,9 @@ namespace Dune
//! \brief hessian range type
typedef typename FunctionSpaceType::HessianRangeType HessianRangeType;
typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
//! \brief type of reference element
typedef Dune::ReferenceElement< typename EntityType::Geometry > ReferenceElementType;
......@@ -295,12 +295,13 @@ namespace Dune
typedef DofAlignment< ScalarBasisFunctionSet, Range > DofAlignmentType;
typedef typename DofAlignmentType::GlobalDofType GlobalDofType;
typedef typename DofAlignmentType::LocalDofType LocalDofType;
typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
struct EvaluateAll;
struct JacobianAll;
struct HessianAll;
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