Skip to content
Snippets Groups Projects
Commit b9fc5662 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler Committed by Tobias Leibner
Browse files

[local.finite-elements] expose powered FEs

parent 1052c653
No related branches found
No related tags found
1 merge request!10Draft: consolidate refactoring work
......@@ -59,13 +59,15 @@ public:
BasisType*&& bas_ptr,
CoefficientsType*&& coeffs_ptr,
InterpolationType*&& inter_ptr,
std::vector<DomainType> lps = {})
std::vector<DomainType> lps = {},
const bool pwrd = false)
: geometry_type_(bas_ptr->geometry_type())
, order_(ord)
, basis_(std::move(bas_ptr))
, coefficients_(std::move(coeffs_ptr))
, interpolation_(std::move(inter_ptr))
, lagrange_points_(lps)
, powered_(pwrd)
{
check_input();
}
......@@ -112,6 +114,11 @@ public:
return lagrange_points_;
}
bool powered() const override final
{
return powered_;
}
private:
void check_input()
{
......@@ -144,6 +151,7 @@ private:
const XT::Common::ConstStorageProvider<CoefficientsType> coefficients_;
const XT::Common::ConstStorageProvider<InterpolationType> interpolation_;
const std::vector<DomainType> lagrange_points_;
const bool powered_;
}; // class LocalFiniteElementDefault
......
......@@ -291,6 +291,11 @@ public:
return false;
}
virtual bool powered() const
{
return false;
}
/**
* \brief Lagrange points associated with this local finite element (in reference element coordinates).
*
......@@ -300,7 +305,7 @@ public:
* Thus it always holds that
*
\code
assert(lagrange_points.size() == size() * r * rC);
assert(lagrange_points.size() * r * rC == size());
\endcode
*
* Regarding the relation between a Lagrange point and an element of the basis, we have the following: in the scalar
......
......@@ -54,7 +54,8 @@ public:
Storage::access().basis().copy(),
Storage::access().coefficients().copy(),
Storage::access().interpolation().copy(),
{ReferenceElements<D, d>::general(geometry_type).position(0, 0)})
{ReferenceElements<D, d>::general(geometry_type).position(0, 0)},
/*powered=*/(r == 1) ? false : true)
{}
}; // class LocalZeroOrderLagrangeFiniteElement
......
......@@ -330,7 +330,8 @@ public:
unpowered.basis().copy(),
unpowered.coefficients().copy(),
unpowered.interpolation().copy(),
unpowered.is_lagrangian() ? unpowered.lagrange_points() : std::vector<DomainType>())
unpowered.is_lagrangian() ? unpowered.lagrange_points() : std::vector<DomainType>(),
/*powered=*/false)
{}
}; // class LocalPowerFiniteElement<1, ...>
......@@ -352,7 +353,8 @@ public:
new LocalPowerFiniteElementBasis<power, D, d, R, r>(unpowered.basis()),
new LocalPowerFiniteElementCoefficients<D, d>(unpowered.coefficients(), power),
new LocalPowerFiniteElementInterpolation<power, D, d, R, r>(unpowered.interpolation()),
unpowered.is_lagrangian() ? unpowered.lagrange_points() : std::vector<DomainType>())
unpowered.is_lagrangian() ? unpowered.lagrange_points() : std::vector<DomainType>(),
/*powered=*/true)
{}
}; // class LocalPowerFiniteElement
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment