Commit 0faff253 authored by Praetorius, Simon's avatar Praetorius, Simon

renamed template parameters, to shorten error messages and symbols

parent 68c1eb6d
...@@ -15,11 +15,14 @@ ...@@ -15,11 +15,14 @@
namespace AMDiS namespace AMDiS
{ {
/// Implementation of interface \ref AssemblerBase /// Implementation of interface \ref AssemblerBase
template <class LocalContext, class Operator, class... Nodes> /**
* \tparam LC LocalContext
**/
template <class LC, class Operator, class... Nodes>
class Assembler class Assembler
: public AssemblerInterface<LocalContext, Nodes...> : public AssemblerInterface<LC, Nodes...>
{ {
using Super = AssemblerInterface<LocalContext, Nodes...>; using Super = AssemblerInterface<LC, Nodes...>;
private: private:
...@@ -74,12 +77,11 @@ namespace AMDiS ...@@ -74,12 +77,11 @@ namespace AMDiS
* \ref calculateElementVector or \ref calculateElementMatrix on the * \ref calculateElementVector or \ref calculateElementMatrix on the
* vector or matrix operator, respectively. * vector or matrix operator, respectively.
**/ **/
void assemble(LocalContext const& localContext, void assemble(LC const& localContext, Nodes const&... nodes,
Nodes const&... nodes,
ElementMatrixVector& elementMatrixVector) final ElementMatrixVector& elementMatrixVector) final
{ {
ContextGeometry<LocalContext> context{localContext, element(), geometry()}; ContextGeometry<LC> contextGeo{localContext, element(), geometry()};
assembleImpl(context, nodes..., elementMatrixVector); assembleImpl(contextGeo, nodes..., elementMatrixVector);
} }
...@@ -88,21 +90,17 @@ namespace AMDiS ...@@ -88,21 +90,17 @@ namespace AMDiS
protected: // implementation detail protected: // implementation detail
// matrix assembling // matrix assembling
template <class Context, class RowNode, class ColNode, class ElementMatrix> template <class CG, class RN, class CN, class Mat>
void assembleImpl(Context const& context, void assembleImpl(CG const& contextGeo, RN const& rowNode, CN const& colNode, Mat& elementMatrix)
RowNode const& rowNode, ColNode const& colNode,
ElementMatrix& elementMatrix)
{ {
op_->calculateElementMatrix(context, rowNode, colNode, elementMatrix); op_->calculateElementMatrix(contextGeo, rowNode, colNode, elementMatrix);
} }
// vector assembling // vector assembling
template <class Context, class Node, class ElementVector> template <class CG, class Node, class Vec>
void assembleImpl(Context const& context, void assembleImpl(CG const& contextGeo, Node const& node, Vec& elementVector)
Node const& node,
ElementVector& elementVector)
{ {
op_->calculateElementVector(context, node, elementVector); op_->calculateElementVector(contextGeo, node, elementVector);
} }
#endif // DOXYGEN #endif // DOXYGEN
...@@ -134,11 +132,11 @@ namespace AMDiS ...@@ -134,11 +132,11 @@ namespace AMDiS
}; };
/// Generate a \ref Assembler on a given `LocalContext` (element or intersection) /// Generate a \ref Assembler on a given LocalContext `LC` (element or intersection)
template <class LocalContext, class Operator, class... Nodes> template <class LC, class Operator, class... Nodes>
auto makeAssembler(Operator&& op, Nodes const&...) auto makeAssembler(Operator&& op, Nodes const&...)
{ {
return Assembler<LocalContext, Underlying_t<Operator>, Nodes...>{FWD(op)}; return Assembler<LC, Underlying_t<Operator>, Nodes...>{FWD(op)};
} }
} // end namespace AMDiS } // end namespace AMDiS
...@@ -128,8 +128,8 @@ namespace AMDiS ...@@ -128,8 +128,8 @@ namespace AMDiS
NodeDataTransferContainer nodeDataTransfer_; NodeDataTransferContainer nodeDataTransfer_;
}; };
template <class Container, class Basis> template <class C, class B>
void DataTransfer<Container, Basis>::preAdapt(Container const& coeff, bool mightCoarsen) void DataTransfer<C,B>::preAdapt(C const& coeff, bool mightCoarsen)
{ {
auto gv = basis_->gridView(); auto gv = basis_->gridView();
auto lv = basis_->localView(); auto lv = basis_->localView();
...@@ -217,8 +217,8 @@ namespace AMDiS ...@@ -217,8 +217,8 @@ namespace AMDiS
} }
} }
template <class Container, class Basis> template <class C, class B>
void DataTransfer<Container, Basis>::postAdapt(Container& coeff, bool refined) void DataTransfer<C,B>::postAdapt(C& coeff, bool refined)
{ {
coeff.resize(*basis_); coeff.resize(*basis_);
auto gv = basis_->gridView(); auto gv = basis_->gridView();
...@@ -370,9 +370,9 @@ namespace AMDiS ...@@ -370,9 +370,9 @@ namespace AMDiS
NodeElementData fatherDOFsTemp_; NodeElementData fatherDOFsTemp_;
}; };
template <class Node, class Container, class Basis> template <class Node, class C, class B>
template <class Trafo> template <class Trafo>
bool NodeDataTransfer<Node, Container, Basis>:: bool NodeDataTransfer<Node,C,B>::
restrictLocal(Element const& father, NodeElementData& fatherDOFs, Trafo const& trafo, restrictLocal(Element const& father, NodeElementData& fatherDOFs, Trafo const& trafo,
NodeElementData const& childDOFs, bool init) NodeElementData const& childDOFs, bool init)
{ {
...@@ -426,9 +426,9 @@ namespace AMDiS ...@@ -426,9 +426,9 @@ namespace AMDiS
std::logical_and<bool>()); std::logical_and<bool>());
} }
template <class Node, class Container, class Basis> template <class Node, class C, class B>
template <class Trafo> template <class Trafo>
void NodeDataTransfer<Node, Container, Basis>:: void NodeDataTransfer<Node,C,B>::
prolongLocal(Element const& father, NodeElementData const& fatherDOFs, prolongLocal(Element const& father, NodeElementData const& fatherDOFs,
Trafo const& trafo, bool init) Trafo const& trafo, bool init)
{ {
......
...@@ -53,22 +53,28 @@ namespace AMDiS ...@@ -53,22 +53,28 @@ namespace AMDiS
, values_(FWD(values)) , values_(FWD(values))
{} {}
template <class Intersection> template <class IS>
bool onBoundary(Intersection const& intersection) const bool onBoundary(IS const& intersection) const
{ {
return predicate_ ? (*predicate_)(intersection.geometry().center()) return predicate_ ? (*predicate_)(intersection.geometry().center())
: Super::onBoundary(intersection); : Super::onBoundary(intersection);
} }
// fill \ref dirichletNodes_ with 1 or 0 whether DOF corresponds to the boundary or not. // fill \ref dirichletNodes_ with 1 or 0 whether DOF corresponds to the boundary or not.
template <class RowBasis, class ColBasis> template <class RB, class CB>
void init(RowBasis const& rowBasis, ColBasis const& colBasis); void init(RB const& rowBasis, CB const& colBasis);
/// \brief Apply dirichlet BC to matrix and vector, i.e., add a unit-row /// \brief Apply dirichlet BC to matrix and vector, i.e., add a unit-row
/// to the matrix and optionally delete the corresponding matrix-column. /// to the matrix and optionally delete the corresponding matrix-column.
template <class Matrix, class VectorX, class VectorB, class RowNode, class ColNode> /**
void fillBoundaryCondition(Matrix& matrix, VectorX& solution, VectorB& rhs, * \tparam Mat Matrix
RowNode const& rowNode, ColNode const& colNode); * \tparam Sol Vector of solution
* \tparam Rhs Vector of rhs
* \tparam RN RowNode
* \tparam CN ColNode
**/
template <class Mat, class Sol, class Rhs, class RN, class CN>
void fillBoundaryCondition(Mat& matrix, Sol& solution, Rhs& rhs, RN const& rowNode, CN const& colNode);
private: private:
Dune::Std::optional<std::function<bool(Domain)>> predicate_; Dune::Std::optional<std::function<bool(Domain)>> predicate_;
...@@ -82,8 +88,8 @@ namespace AMDiS ...@@ -82,8 +88,8 @@ namespace AMDiS
{ {
using WorldVector = typename Basis::GridView::template Codim<0>::Geometry::GlobalCoordinate; using WorldVector = typename Basis::GridView::template Codim<0>::Geometry::GlobalCoordinate;
template <class RowNode, class ColNode> template <class RN, class CN>
using type = std::list< std::shared_ptr<DirichletBC<WorldVector, RangeType_t<RowNode>>> >; using type = std::list< std::shared_ptr<DirichletBC<WorldVector, RangeType_t<RN>>> >;
}; };
template <class RowBasis, class ColBasis> template <class RowBasis, class ColBasis>
......
...@@ -13,29 +13,28 @@ ...@@ -13,29 +13,28 @@
namespace AMDiS { namespace AMDiS {
template <class D, class R> template <class D, class R>
template <class RowBasis, class ColBasis> template <class RB, class CB>
void DirichletBC<D,R>:: void DirichletBC<D,R>::
init(RowBasis const& rowBasis, ColBasis const& colBasis) init(RB const& rowBasis, CB const& colBasis)
{ {
using Dune::Functions::forEachBoundaryDOF; using Dune::Functions::forEachBoundaryDOF;
using LV = typename ColBasis::LocalView; using LV = typename CB::LocalView;
using I = typename ColBasis::GridView::Intersection; using IS = typename CB::GridView::Intersection;
dirichletNodes_.resize(colBasis.dimension()); dirichletNodes_.resize(colBasis.dimension());
forEachBoundaryDOF(colBasis, [&](int localIndex, LV const& localView, I const& intersection) { forEachBoundaryDOF(colBasis, [&](int localIndex, LV const& localView, IS const& intersection) {
dirichletNodes_[localView.index(localIndex)] = onBoundary(intersection); dirichletNodes_[localView.index(localIndex)] = onBoundary(intersection);
}); });
} }
template <class D, class R> template <class D, class R>
template <class Matrix, class VectorX, class VectorB, class RowNode, class ColNode> template <class Mat, class Sol, class Rhs, class RN, class CN>
void DirichletBC<D,R>:: void DirichletBC<D,R>::
fillBoundaryCondition(Matrix& matrix, VectorX& solution, VectorB& rhs, fillBoundaryCondition(Mat& matrix, Sol& solution, Rhs& rhs, RN const& rowNode, CN const& colNode)
RowNode const& rowNode, ColNode const& colNode)
{ {
auto columns = Constraints<Matrix>::dirichletBC(matrix, dirichletNodes_); auto columns = Constraints<Mat>::dirichletBC(matrix, dirichletNodes_);
Dune::Hybrid::ifElse(std::is_same<RangeType_t<RowNode>, R>{}, Dune::Hybrid::ifElse(std::is_same<RangeType_t<RN>, R>{},
[&](auto id) { [&](auto id) {
auto subBasis = Dune::Functions::subspaceBasis(rhs.basis(), rowNode.treePath()); auto subBasis = Dune::Functions::subspaceBasis(rhs.basis(), rowNode.treePath());
Dune::Functions::interpolate(subBasis, rhs, values_, dirichletNodes_); Dune::Functions::interpolate(subBasis, rhs, values_, dirichletNodes_);
...@@ -45,7 +44,7 @@ fillBoundaryCondition(Matrix& matrix, VectorX& solution, VectorB& rhs, ...@@ -45,7 +44,7 @@ fillBoundaryCondition(Matrix& matrix, VectorX& solution, VectorB& rhs,
for (auto const& triplet : columns) for (auto const& triplet : columns)
rhs[triplet.row] -= triplet.value * solution[triplet.col]; rhs[triplet.row] -= triplet.value * solution[triplet.col];
Dune::Hybrid::ifElse(std::is_same<RangeType_t<ColNode>, R>{}, Dune::Hybrid::ifElse(std::is_same<RangeType_t<CN>, R>{},
[&](auto id) { [&](auto id) {
auto subBasis = Dune::Functions::subspaceBasis(solution.basis(), colNode.treePath()); auto subBasis = Dune::Functions::subspaceBasis(solution.basis(), colNode.treePath());
Dune::Functions::interpolate(subBasis, solution, values_, dirichletNodes_); Dune::Functions::interpolate(subBasis, solution, values_, dirichletNodes_);
......
...@@ -26,28 +26,30 @@ namespace AMDiS ...@@ -26,28 +26,30 @@ namespace AMDiS
* *
* The class is specialized, by deriving from it, in \ref GridFunctionOperator. * The class is specialized, by deriving from it, in \ref GridFunctionOperator.
* *
* \tparam Derived The class derived from GridFunctionOperatorBase * \tparam Derived The class derived from GridFunctionOperatorBase
* \tparam LocalContext The Element or Intersection type * \tparam LC The Element or Intersection type
* \tparam GridFunction The GridFunction, a LocalFunction is created from, and * \tparam GF The GridFunction, a LocalFunction is created from, and
* that is evaluated at quadrature points. * that is evaluated at quadrature points.
* *
* **Requirements:** * **Requirements:**
* - `LocalContext` models either Entity (of codim 0) or Intersection * - `LC` models either Entity (of codim 0) or Intersection
* - `GridFunction` models the \ref Concepts::GridFunction * - `GF` models the \ref Concepts::GridFunction
**/ **/
template <class Derived, class LocalContext, class GridFunction> template <class Derived, class LC, class GF>
class GridFunctionOperatorBase class GridFunctionOperatorBase
: public LocalOperator<Derived, LocalContext> : public LocalOperator<Derived, LC>
{ {
template <class D, class LC> template <class, class>
friend class LocalOperator; friend class LocalOperator;
using ContextType = Impl::ContextTypes<LocalContext>; using ContextType = Impl::ContextTypes<LC>;
using Super = LocalOperator<Derived, LocalContext>; using Super = LocalOperator<Derived, LC>;
private: private:
using GridFunction = GF;
/// The type of the localFunction associated with the GridFunction /// The type of the localFunction associated with the GridFunction
using LocalFunction = decltype(localFunction(std::declval<GridFunction>())); using LocalFunction = decltype(localFunction(std::declval<GF>()));
/// The Codim=0 entity of the grid, the localFunction can be bound to /// The Codim=0 entity of the grid, the localFunction can be bound to
using Element = typename ContextType::Entity; using Element = typename ContextType::Entity;
...@@ -56,10 +58,10 @@ namespace AMDiS ...@@ -56,10 +58,10 @@ namespace AMDiS
using Geometry = typename Element::Geometry; using Geometry = typename Element::Geometry;
/// The type of the local coordinates in the \ref Element /// The type of the local coordinates in the \ref Element
using LocalCoordinate = typename GridFunction::EntitySet::LocalCoordinate; using LocalCoordinate = typename GF::EntitySet::LocalCoordinate;
/// A factory for QuadratureRules that incooperate the order of the LocalFunction /// A factory for QuadratureRules that incooperate the order of the LocalFunction
using QuadFactory = QuadratureFactory<typename Geometry::ctype, LocalContext::mydimension, LocalFunction>; using QuadFactory = QuadratureFactory<typename Geometry::ctype, LC::mydimension, LocalFunction>;
public: public:
/// \brief Constructor. Stores a copy of `gridFct`. /// \brief Constructor. Stores a copy of `gridFct`.
...@@ -68,19 +70,20 @@ namespace AMDiS ...@@ -68,19 +70,20 @@ namespace AMDiS
* differentiation order of the operator, to calculate the * differentiation order of the operator, to calculate the
* quadrature degree in \ref getDegree. * quadrature degree in \ref getDegree.
**/ **/
template <class GF> template <class GridFct>
GridFunctionOperatorBase(GF&& gridFct, int termOrder) GridFunctionOperatorBase(GridFct&& gridFct, int termOrder)
: gridFct_(FWD(gridFct)) : gridFct_(FWD(gridFct))
, termOrder_(termOrder) , termOrder_(termOrder)
{} {}
/// Create a quadrature factory from a PreQuadratureFactory, e.g. class derived from \ref QuadratureFactory /// Create a quadrature factory from a PreQuadratureFactory, e.g. class derived from \ref QuadratureFactory
template <class PreQuadFactory> /// \tparam PQF A PreQuadratureFactory
void setQuadFactory(PreQuadFactory&& pre) template <class PQF>
void setQuadFactory(PQF&& pre)
{ {
using ctype = typename Geometry::ctype; using ctype = typename Geometry::ctype;
quadFactory_.emplace( quadFactory_.emplace(
makeQuadratureFactory<ctype, LocalContext::mydimension, LocalFunction>(FWD(pre))); makeQuadratureFactory<ctype, LC::mydimension, LocalFunction>(FWD(pre)));
} }
protected: protected:
...@@ -147,7 +150,7 @@ namespace AMDiS ...@@ -147,7 +150,7 @@ namespace AMDiS
class GridFunctionOperatorTransposed class GridFunctionOperatorTransposed
: public LocalOperator<Derived, typename Transposed::LocalContext> : public LocalOperator<Derived, typename Transposed::LocalContext>
{ {
template <class D, class LC> template <class, class>
friend class LocalOperator; friend class LocalOperator;
template <class T, class... Args> template <class T, class... Args>
...@@ -161,8 +164,9 @@ namespace AMDiS ...@@ -161,8 +164,9 @@ namespace AMDiS
{} {}
/// Redirects the setQuadFactory call top the transposed operator /// Redirects the setQuadFactory call top the transposed operator
template <class PreQuadFactory> /// \tparam PQF A PreQuadratureFactory
void setQuadFactory(PreQuadFactory&& pre) template <class PQF>
void setQuadFactory(PQF&& pre)
{ {
transposedOp_.setQuadFactory(FWD(pre)); transposedOp_.setQuadFactory(FWD(pre));
} }
...@@ -182,15 +186,18 @@ namespace AMDiS ...@@ -182,15 +186,18 @@ namespace AMDiS
} }
/// Apply the assembling to the transposed elementMatrix with interchanged row-/colNode /// Apply the assembling to the transposed elementMatrix with interchanged row-/colNode
template <class Context, class RowNode, class ColNode, class ElementMatrix> /**
void getElementMatrix(Context const& context, * \tparam CG ContextGeometry
RowNode const& rowNode, * \tparam RN RowNode
ColNode const& colNode, * \tparam CN ColNode
ElementMatrix& elementMatrix) * \tparam Mat ElementMatrix
**/
template <class CG, class RN, class CN, class Mat>
void getElementMatrix(CG const& contextGeometry, RN const& rowNode, CN const& colNode, Mat& elementMatrix)
{ {
auto elementMatrixTransposed = transposed(elementMatrix); auto elementMatrixTransposed = transposed(elementMatrix);
transposedOp_.getElementMatrix( transposedOp_.getElementMatrix(
context, colNode, rowNode, elementMatrixTransposed); contextGeometry, colNode, rowNode, elementMatrixTransposed);
} }
private: private:
...@@ -199,12 +206,12 @@ namespace AMDiS ...@@ -199,12 +206,12 @@ namespace AMDiS
#ifndef DOXYGEN #ifndef DOXYGEN
template <class Tag, class PreGridFct, class PreQuadFactory> template <class Tag, class PreGridFct, class PQF>
struct PreGridFunctionOperator struct PreGridFunctionOperator
{ {
Tag tag; Tag tag;
PreGridFct expr; PreGridFct expr;
PreQuadFactory quadFactory; PQF quadFactory;
}; };
#endif #endif
...@@ -228,12 +235,12 @@ namespace AMDiS ...@@ -228,12 +235,12 @@ namespace AMDiS
* other effect. * other effect.
* *
* \tparam Tag An Identifier for this GridFunctionOperator * \tparam Tag An Identifier for this GridFunctionOperator
* \tparam LocalContext An Element or Intersection the operator is evaluated on * \tparam LC An Element or Intersection the operator is evaluated on
* \tparam GridFct A GridFunction evaluated in local coordinates on the bound element * \tparam GridFct A GridFunction evaluated in local coordinates on the bound element
**/ **/
template <class Tag, class LocalContext, class GridFct> template <class Tag, class LC, class GridFct>
class GridFunctionOperator class GridFunctionOperator
: public GridFunctionOperatorBase<GridFunctionOperator<Tag, LocalContext, GridFct>, LocalContext, GridFct> : public GridFunctionOperatorBase<GridFunctionOperator<Tag, LC, GridFct>, LC, GridFct>
{}; {};
template <class Context, class Tag, class GF, class QF> template <class Context, class Tag, class GF, class QF>
......
...@@ -17,7 +17,7 @@ namespace AMDiS ...@@ -17,7 +17,7 @@ namespace AMDiS
/// Static administration class for automatic handling of DOFVectors during grid adaption /// Static administration class for automatic handling of DOFVectors during grid adaption
class GridTransferManager class GridTransferManager
{ {
template <class T1, class T2> template <class, class>
friend class DOFVectorBase; friend class DOFVectorBase;
using Self = GridTransferManager; using Self = GridTransferManager;
......
...@@ -8,8 +8,8 @@ namespace AMDiS ...@@ -8,8 +8,8 @@ namespace AMDiS
{ {
namespace Impl namespace Impl
{ {
template <class GF, class GridView, class QuadProvider> template <class GF, class GV, class QP>
auto integrateImpl(GF&& gf, GridView const& gridView, QuadProvider makeQuad) auto integrateImpl(GF&& gf, GV const& gridView, QP makeQuad)
{ {
auto localFct = localFunction(FWD(gf)); auto localFct = localFunction(FWD(gf));
...@@ -31,8 +31,8 @@ namespace AMDiS ...@@ -31,8 +31,8 @@ namespace AMDiS
return result; return result;
} }
template <class GF, class GridView, class QuadProvider> template <class GF, class GV, class QP>
auto integrateImpl(GF&& gf, GridView const& gv, QuadProvider makeQuad, std::true_type) auto integrateImpl(GF&& gf, GV const& gv, QP makeQuad, std::true_type)
{ {
return integrateImpl(FWD(gf), gv, makeQuad); return integrateImpl(FWD(gf), gv, makeQuad);
} }
......
...@@ -73,34 +73,29 @@ namespace AMDiS ...@@ -73,34 +73,29 @@ namespace AMDiS
/// \brief Assemble a local element matrix on the element that is bound. /// \brief Assemble a local element matrix on the element that is bound.
/** /**
* \param context Container for geometry related data, \ref ContextGeometry * \param contextGeo Container for geometry related data, \ref ContextGeometry
* \param rowNode The node of the test-basis * \param rowNode The node of the test-basis
* \param colNode The node of the trial-basis * \param colNode The node of the trial-basis
* \param elementMatrix The output element matrix * \param elementMatrix The output element matrix
**/ **/
template <class Context, class RowNode, class ColNode, class ElementMatrix> template <class CG, class RN, class CN, class Mat>
void calculateElementMatrix(Context const& context, void calculateElementMatrix(CG const& contextGeo, RN const& rowNode, CN const& colNode, Mat& elementMatrix)
RowNode const& rowNode,
ColNode const& colNode,
ElementMatrix& elementMatrix)
{ {
assert( bound_ ); assert( bound_ );
derived().getElementMatrix(context, rowNode, colNode, elementMatrix); derived().getElementMatrix(contextGeo, rowNode, colNode, elementMatrix);
} }
/// \brief Assemble a local element vector on the element that is bound. /// \brief Assemble a local element vector on the element that is bound.
/** /**
* \param context Container for geometry related data \ref ContextGeometry * \param contextGeo Container for geometry related data \ref ContextGeometry
* \param node The node of the test-basis * \param node The node of the test-basis
* \param elementVector The output element vector * \param elementVector The output element vector
**/ **/
template <class Context, class Node, class ElementVector> template <class CG, class Node, class Vec>
void calculateElementVector(Context const& context, void calculateElementVector(CG const& contextGeo, Node const& node, Vec& elementVector)
Node const& node,
ElementVector& elementVector)
{ {
assert( bound_ ); assert( bound_ );
derived().getElementVector(context, node, elementVector); derived().getElementVector(contextGeo, node, elementVector);
} }
...@@ -121,33 +116,17 @@ namespace AMDiS ...@@ -121,33 +116,17 @@ namespace AMDiS
// default implementation. Can be overridden in the derived classes // default implementation. Can be overridden in the derived classes
void unbind_impl() {} void unbind_impl() {}
// default implementation called by \ref calculateElementMatrix
template <class Context, class RowNode, class ColNode, class ElementMatrix>
void getElementMatrix(Context const& /*context*/,
RowNode const& /*rowNode*/,
ColNode const& /*colNode*/,
ElementMatrix& /*elementMatrix*/)
{
error_exit("Needs to be implemented by derived class!");
}
// default implementation called by \ref calculateElementVector
template <class Context, class Node, class ElementVector>
void getElementVector(Context const& /*context*/,
Node const& /*node*/,
ElementVector& /*elementVector*/)
{
error_exit("Needs to be implemented by derived class!");
}
/// \brief Return the quadrature degree for a matrix operator. /// \brief Return the quadrature degree for a matrix operator.
/** /**
* The quadrature degree that is necessary, to integrate the expression * The quadrature degree that is necessary, to integrate the expression
* multiplied with (possibly derivatives of) shape functions. Thus it needs * multiplied with (possibly derivatives of) shape functions. Thus it needs
* the order of derivatives, this operator implements. * the order of derivatives, this operator implements.
*
* \tparam RN RowNode
* \tparam CN ColNode
**/ **/
template <class RowNode, class ColNode> template <class RN, class CN>
int getDegree(int order, int coeffDegree, RowNode const& rowNode, ColNode const& colNode) const int getDegree(int order, int coeffDegree, RN const& rowNode, CN const& colNode) const
{ {
assert( bound_ ); assert( bound_ );
test_warning(coeffDegree >= 0, test_warning(coeffDegree >= 0,
...@@ -198,8 +177,13 @@ namespace AMDiS ...@@ -198,8 +177,13 @@ namespace AMDiS
/// Generate a \ref LocalOperator from a PreOperator. /// Generate a \ref LocalOperator from a PreOperator.
template <class Derived, class Context, class GridView> /**
auto makeLocalOperator(LocalOperator<Derived, Context> const& localOp, GridView const& /*gridView*/) * \tparam Derived Implementation of LocalOperator
* \tparam LC LocalContext
* \tparam GV GridView
**/
template <class Derived, class LC, class GV>
auto makeLocalOperator(LocalOperator<Derived, LC> const& localOp, GV const& /*gridView*/)
{ {
return localOp.derived(); return localOp.derived();
} }
......
...@@ -26,10 +26,10 @@ namespace AMDiS ...@@ -26,10 +26,10 @@ namespace AMDiS
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
using Intersection = typename GridView::Intersection; using Intersection = typename GridView::Intersection;
template <class OperatorType> template <class Op>
struct DataElement struct DataElement
{ {
std::shared_ptr<OperatorType> op; std::shared_ptr<Op> op;
BoundaryCondition bc; BoundaryCondition bc;
}; };
......
...@@ -40,6 +40,10 @@ namespace AMDiS ...@@ -40,6 +40,10 @@ namespace AMDiS