Commit 00b09ad2 authored by Praetorius, Simon's avatar Praetorius, Simon

allow to pass quadrature rule to makeOperator, cleanup of documentation

parent 90c3d73b
Pipeline #945 failed with stage
in 2 minutes and 14 seconds
......@@ -10,25 +10,30 @@ INTERNAL_DOCS = NO
MARKDOWN_SUPPORT = YES
EXCLUDE_SYMBOLS = AMDiS::Impl \
AMDiS::traits::Impl \
AMDiS::Math::Impl_ \
AMDiS::Concepts::Impl_ \
AMDiS::detail \
itl::details
PREDEFINED += HAVE_UMFPACK \
HAVE_ALBERTA \
HAVE_UG \
AMDIS_BACKEND_MTL
# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT += @top_srcdir@/dune/amdis \
@top_srcdir@/dune/amdis/assembler \
@top_srcdir@/dune/amdis/common \
@top_srcdir@/dune/amdis/utility \
@top_srcdir@/dune/amdis/gridfunctions \
@top_srcdir@/dune/amdis/io \
@top_srcdir@/dune/amdis/linear_algebra \
@top_srcdir@/dune/amdis/linear_algebra/mtl
@top_srcdir@/dune/amdis/linear_algebra/mtl \
@top_srcdir@/dune/amdis/operations \
@top_srcdir@/dune/amdis/utility
# see e.g. dune-grid for the examples of mainpage and modules
#INPUT += @srcdir@/mainpage \
# @srcdir@/modules
......@@ -50,4 +55,4 @@ EXAMPLE_PATH += @top_srcdir@/src
# directories that contain image that are included in the documentation (see
# the \image command).
# IMAGE_PATH += @top_srcdir@/dune/amdis/pics
# IMAGE_PATH += @top_srcdir@/doc/pics
......@@ -30,7 +30,7 @@ namespace AMDiS
* Must be implemented by sub classes of CreatorInterface.
* Creates a new instance of the sub class of BaseClass.
*/
virtual shared_ptr<BaseClass> create() = 0;
virtual std::shared_ptr<BaseClass> create() = 0;
};
/**
......
This diff is collapsed.
#pragma once
/**
* \defgroup GridFunctions GridFunction module
* \brief Defines GridFunctions to be used in operators, boundary-conditions,
* interpolation and integration.
*
* GridFunctions are expressions build up of some elementary terms and can be
* used to construct a \ref GridFunctionOperator, can be interpolated to a
* \ref DOFVector, and can be integrated over a GridView.
*
* Thus, GridFunctions are an important incredient to formulate the bilinear
* and linear forms und to postprocess the solutions.
*
* **Examples:**
* 1. Usage of GridFunctions to build Operators:
* ```
* ProblemStat<Traits> prob("name");
* prob.initialize(INIT_ALL);
*
* auto opB = makeOperator(BiLinearForm, Expression);
* prob.addMatrixOperator(opB, Row, Col);
*
* auto opL = makeOperator(LinearForm, Expression);
* prob.addVectorOperator(opL, Row);
* ```
*
* 2. Usage of GridFunctions in BoundaryConditions:
* ```
* prob.addDirichletBC(Predicate, Row, Col, Expression);
* ```
*
* 3. Interpolate a GridFunction to a DOFVector:
* ```
* prob.getSolution(_0).interpol(Expression);
* ```
*
* 4. Integrate a GridFunction on a GridView:
* ```
* auto value = integrate(Expression, prob.leafGridView());
* ```
*
* **Remarks:**
* - An `Expression` is anything, a GridFunction can be created from, sometimes
* also called PreGridFunction. It includes constants, functors callable with
* GlobalCoordinates, and any combination of GridFunctions.
* - Anything that needs a quadrature formula, e.g., makeOperator() and
* integrate(), needs to determine the (approximative) polynomial degree of
* the GridFunctions. If the Gridfunction builds a polynomial expression, it
* can be deduced automatically, i.e. if it includes constants, DOFVectors,
* and arithmetic operator operator+, operator-, or operator*.
*
* If the polynomial order can not be deduced, the compiler gives an error.
* Then, these functions, accept an additional argument, to provide either the
* polynomial degree of the expression, or a quadrature rule explicitly.
*
* *Examples:*
* + `auto op1 = makeOperator(B, 1.0 + pow<2>(prob.getSolution(_0)));`
* + `auto op2 = makeOperator(B, sin(X(0)), 4);`
* + `auto op3 = makeOperator(B, sin(X(0)), Dune::QuadratureRules(Dune::GeometryType::simplex, 4));`
* + `auto value1 = integrate(sin(X(0)), 4);`
**/
#include <dune/amdis/gridfunctions/AnalyticGridFunction.hpp>
#include <dune/amdis/gridfunctions/ConstantGridFunction.hpp>
#include <dune/amdis/gridfunctions/CoordsGridFunction.hpp>
......@@ -9,7 +70,40 @@
namespace AMDiS
{
// Generator for Gridfunctions from Pre-Gridfunctions
/// \brief Generator for Gridfunctions from Expressions (PreGridfunctions)
/**
* \ingroup GridFunctions
* Create an evaluable GridFunction from an expression that itself can not be
* evaluated. Therefore, it binds the GridFunction to a GridView.
*
* **Example:**
* ```
* ProblemStat<Traits> prob("name");
* prob.initialize(INIT_ALL);
*
* auto gridFct = makeGridFunction(Expression, prob.leafGridView());
*
* // eval GridFunction at GlobalCoordinates
* auto value = gridFct(Dune::FieldVector<double,2>{1.0, 2.0});
*
* auto localFct = localFunction(gridFct);
* for (auto const& element : elements(prob.leafGridView())) {
* localFct.bind(element);
* // eval LocalFunction at local coordinates
* auto x = localFct(element.geometry().center());
* localFct.unbind();
* }
* ```
*
* In contrast to Expressions, GridFunctions can be evaluated, and
* - have the free-function \ref localFunction() to obtain a LocalFunction
* - its LocalFunctions have the free-function \ref order() to obtain the
* polynomial order of the Expression (if available)
* - its LocalFunctions have the free-function \ref derivative() to
* differentiate the Expression with respect to global Coordinates.
* A derivative Expression can be created, using \ref gradientAtQP() that
* can be converted to a GridFunction afterwards.
**/
template <class PreGridFct, class GridView>
decltype(auto) makeGridFunction(PreGridFct&& preGridFct, GridView const& gridView)
{
......
......@@ -83,14 +83,11 @@ namespace AMDiS
ElementMatrixVector& elementMatrixVector,
Nodes const&... nodes) final
{
decltype(auto) localGeometry = getLocalGeometry(localContext);
using QuadratureRules = Dune::QuadratureRules<typename Geometry::ctype, LocalContext::mydimension>;
int degree = op_.getDegree(nodes...);
auto const& quad = QuadratureRules::rule(localGeometry.type(), degree);
auto&& localGeometry = getLocalGeometry(localContext);
auto&& quad = op_.getQuadratureRule(localGeometry.type(), nodes...);
Context data{localContext, getGeometry(), localGeometry};
assembleImpl(data, quad, elementMatrixVector, nodes...);
assembleImpl(data, std::forward<decltype(quad)>(quad), elementMatrixVector, nodes...);
return true;
}
......@@ -199,7 +196,7 @@ namespace AMDiS
/// Generate a \ref LocalAssembler on a given `LocalContext` (element or intersection)
template <class LocalContext, class Operator, class... Nodes,
std::enable_if_t<not traits::is_reference_wrapper<Operator>::value, int> = 0>
std::enable_if_t<not Traits::IsReferenceWrapper<Operator>::value, int> = 0>
auto makeLocalAssembler(Operator const& op, Nodes const&...)
{
return LocalAssembler<LocalContext, Operator, Nodes...>{op};
......@@ -213,7 +210,7 @@ namespace AMDiS
/// Generate a shared_ptr to \ref LocalAssembler on a given `LocalContext` (element or intersection)
template <class LocalContext, class Operator, class... Nodes,
std::enable_if_t<not traits::is_reference_wrapper<Operator>::value, int> = 0>
std::enable_if_t<not Traits::IsReferenceWrapper<Operator>::value, int> = 0>
auto makeLocalAssemblerPtr(Operator const& op, Nodes const&...)
{
return std::make_shared<LocalAssembler<LocalContext, Operator, Nodes...>>(op);
......
......@@ -70,7 +70,7 @@ namespace AMDiS
template <class Grid>
class MeshCreator
{
static unique_ptr<Grid> create(std::string meshName)
static std::unique_ptr<Grid> create(std::string meshName)
{
error_exit("Creator not yet implemented for this mesh type.");
}
......@@ -82,7 +82,7 @@ namespace AMDiS
{
using Grid = Dune::AlbertaGrid<dim, dimworld>;
static unique_ptr<Grid> create(std::string meshName)
static std::unique_ptr<Grid> create(std::string meshName)
{
std::string macro_filename = "";
Parameters::get(meshName + "->macro file name", macro_filename);
......@@ -90,7 +90,7 @@ namespace AMDiS
// TODO: if filename_extension is ".2d" or ".3d" read it directly from file
// otherwise use a factory method
return make_unique<Grid>(macro_filename);
return std::make_unique<Grid>(macro_filename);
}
};
#endif
......@@ -102,7 +102,7 @@ namespace AMDiS
{
using Grid = Dune::UGGrid<dim>;
static unique_ptr<Grid> create(std::string meshName)
static std::unique_ptr<Grid> create(std::string meshName)
{
std::string filename = "";
......@@ -117,12 +117,12 @@ namespace AMDiS
Dune::GridFactory<Grid> factory;
Dune::AlbertaReader<Grid> reader;
reader.readGrid(filename, factory);
return unique_ptr<Grid>{factory.createGrid()};
return std::unique_ptr<Grid>{factory.createGrid()};
}
#endif
if (ext == "msh") {
Dune::GmshReader<Grid> reader;
return unique_ptr<Grid>{reader.read(filename)};
return std::unique_ptr<Grid>{reader.read(filename)};
}
} else {
error_exit("Construction of UGGrid without filename not yet implemented!");
......@@ -139,7 +139,7 @@ namespace AMDiS
{
using Grid = Dune::YaspGrid<dim, Dune::EquidistantCoordinates<T,dim>>;
static unique_ptr<Grid> create(std::string meshName)
static std::unique_ptr<Grid> create(std::string meshName)
{
Dune::FieldVector<double, dim> L; L = 1.0; // extension of the domain
Parameters::get(meshName + "->dimension", L);
......@@ -151,7 +151,7 @@ namespace AMDiS
// TODO: add more parameters for yasp-grid (see constructor)
return make_unique<Grid>(L, s);
return std::make_unique<Grid>(L, s);
}
};
......@@ -161,7 +161,7 @@ namespace AMDiS
{
using Grid = Dune::YaspGrid<dim, Dune::EquidistantOffsetCoordinates<T, dim>>;
static unique_ptr<Grid> create(std::string meshName)
static std::unique_ptr<Grid> create(std::string meshName)
{
Dune::FieldVector<double, dim> lowerleft; lowerleft = 0.0; // Lower left corner of the domain
Dune::FieldVector<double, dim> upperright; upperright = 1.0; // Upper right corner of the domain
......@@ -173,7 +173,7 @@ namespace AMDiS
// TODO: add more parameters for yasp-grid (see constructor)
return make_unique<Grid>(lowerleft, upperright, s);
return std::make_unique<Grid>(lowerleft, upperright, s);
}
};
......
#pragma once
/**
* \defgroup operations Functor module
* \brief Collection of functor that can be used in Expression and
* in \ref FunctorGridFunction.
*
* Functors wrapping arithmetic and other mathematical operations
* with definition of polynomial order (if applicable) and partial
* derivatives w.r.t. the functor arguments.
**/
#include <dune/amdis/operations/Arithmetic.hpp>
#include <dune/amdis/operations/Basic.hpp>
#include <dune/amdis/operations/CMath.hpp>
......
......@@ -3,7 +3,7 @@
#include <dune/amdis/LocalAssembler.hpp>
#include <dune/amdis/GridFunctionOperator.hpp>
/**
/*
* In the following comments we use the notation
* psi ... scalar testfunction
* Psi ... vector testfunction
......@@ -14,6 +14,29 @@
* c ..... scalar coefficient
*/
/**
* \defgroup operators Operator module
* \brief Defines operators to be assembled in the matrix/vector
*
* An `Operator` is a class providing methods necessary for assembling:
* - `void bind(Element, Geometry)` and `void unbind()` for binding an unbinding the
* element to (from) an GridView entity of codim 0. Additionally the Geometry
* object of the element is provided.
* - `Dune::QuadratureRule<ctype,dim> getQuadratureRule(Nodes...)` factory for the
* quadrature rules used in assembling the operator on the element. `Nodes...`
* is either `{RowNode, ColNode}` for Matrix-Operators or `{Node}` for a
* Vector-Operator.
* - `void calculateElementVector(ContextGeometry, QuadratureRule, ElementVector, Node)`
* where the `ContextGeometry` provides a reference to the ElementGeometry and
* geometry of the LocalContext (that can be different), *or*
* - `void calculateElementMatrix(ContextGeometry, QuadratureRule, ElementMatrix, RowNode, ColNode, Flags...)`
* Same as for `calculateElementVector` but additionally two optimization flags
* are provided as `bool_t<...>` type:
* + `sameFE`: the FiniteElementSpace of `RowNode` and `ColNode` are the same.
* + `sameNode`: the nodes are the same in the GlobalBasis-tree.
**/
// zero-order operators
#include <dune/amdis/assembler/ZeroOrderTest.hpp> // <psi * c>
#include <dune/amdis/assembler/ZeroOrderTestTrial.hpp> // <psi, c * phi>
......
......@@ -6,22 +6,27 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct divtestvec_trial {};
}
// first-order operator <div(Psi), c*phi>
template <class GridFct>
class GridFunctionOperator<tag::divtestvec_trial, GridFct>
: public GridFunctionOperator<tag::test_divtrialvec, GridFct>
/// first-order operator \f$ \langle\nabla\cdot\Psi, c\,\phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::divtestvec_trial, GridFct, QuadCreator>
: public GridFunctionOperator<tag::test_divtrialvec, GridFct, QuadCreator>
{
using Transposed = GridFunctionOperator<tag::test_divtrialvec, GridFct>;
using Transposed = GridFunctionOperator<tag::test_divtrialvec, GridFct, QuadCreator>;
public:
GridFunctionOperator(tag::divtestvec_trial, GridFct const& expr, int degree)
: Transposed(tag::test_divtrialvec{}, expr, degree)
GridFunctionOperator(tag::divtestvec_trial, GridFct const& expr, QuadCreator const& quadCreator)
: Transposed(tag::test_divtrialvec{}, expr, quadCreator)
{}
template <class Context, class QuadratureRule,
......@@ -43,4 +48,6 @@ namespace AMDiS
}
};
/** @} **/
} // end namespace AMDiS
......@@ -6,22 +6,27 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct gradtest_trial {};
}
// first-order operator <grad(psi), b*phi>
template <class GridFct>
class GridFunctionOperator<tag::gradtest_trial, GridFct>
: public GridFunctionOperator<tag::test_gradtrial, GridFct>
/// first-order operator \f$ \langle\nabla\psi, \mathbf{b}\,\phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::gradtest_trial, GridFct, QuadCreator>
: public GridFunctionOperator<tag::test_gradtrial, GridFct, QuadCreator>
{
using Transposed = GridFunctionOperator<tag::test_gradtrial, GridFct>;
using Transposed = GridFunctionOperator<tag::test_gradtrial, GridFct, QuadCreator>;
public:
GridFunctionOperator(tag::gradtest_trial, GridFct const& expr, int degree)
: Transposed(tag::test_gradtrial{}, expr, degree)
GridFunctionOperator(tag::gradtest_trial, GridFct const& expr, QuadCreator const& quadCreator)
: Transposed(tag::test_gradtrial{}, expr, quadCreator)
{}
template <class Context, class QuadratureRule,
......@@ -40,4 +45,6 @@ namespace AMDiS
}
};
/** @} **/
} // end namespace AMDiS
......@@ -6,22 +6,27 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct gradtest_trialvec {};
}
// first-order operator <grad(psi), c*Phi>
template <class GridFct>
class GridFunctionOperator<tag::gradtest_trialvec, GridFct>
: public GridFunctionOperator<tag::testvec_gradtrial, GridFct>
/// first-order operator \f$ \langle\nabla\psi, c\,\Phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::gradtest_trialvec, GridFct, QuadCreator>
: public GridFunctionOperator<tag::testvec_gradtrial, GridFct, QuadCreator>
{
using Transposed = GridFunctionOperator<tag::testvec_gradtrial, GridFct>;
using Transposed = GridFunctionOperator<tag::testvec_gradtrial, GridFct, QuadCreator>;
public:
GridFunctionOperator(tag::gradtest_trialvec, GridFct const& expr, int degree)
: Transposed(tag::testvec_gradtrial{}, expr, degree)
GridFunctionOperator(tag::gradtest_trialvec, GridFct const& expr, QuadCreator const& quadCreator)
: Transposed(tag::testvec_gradtrial{}, expr, quadCreator)
{}
template <class Context, class QuadratureRule,
......@@ -40,4 +45,6 @@ namespace AMDiS
}
};
/** @} **/
} // end namespace AMDiS
......@@ -6,6 +6,11 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct partialtest_trial
......@@ -15,16 +20,16 @@ namespace AMDiS
}
// first-order operator <d_i(psi), c*phi>
template <class GridFct>
class GridFunctionOperator<tag::partialtest_trial, GridFct>
: public GridFunctionOperator<tag::test_partialtrial, GridFct>
/// first-order operator \f$ \langle\partial_i\psi, c\,\phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::partialtest_trial, GridFct, QuadCreator>
: public GridFunctionOperator<tag::test_partialtrial, GridFct, QuadCreator>
{
using Transposed = GridFunctionOperator<tag::test_partialtrial, GridFct>;
using Transposed = GridFunctionOperator<tag::test_partialtrial, GridFct, QuadCreator>;
public:
GridFunctionOperator(tag::partialtest_trial tag, GridFct const& expr, int degree)
: Transposed(tag::test_partialtrial{tag.comp}, expr, degree)
GridFunctionOperator(tag::partialtest_trial tag, GridFct const& expr, QuadCreator const& quadCreator)
: Transposed(tag::test_partialtrial{tag.comp}, expr, quadCreator)
{}
template <class Context, class QuadratureRule,
......@@ -43,4 +48,6 @@ namespace AMDiS
}
};
/** @} **/
} // end namespace AMDiS
......@@ -8,24 +8,29 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct test_divtrialvec {};
}
// first-order operator <psi, c*div(Phi)>
template <class GridFct>
class GridFunctionOperator<tag::test_divtrialvec, GridFct>
: public GridFunctionOperatorBase<GridFct>
/// first-order operator \f$ \langle\psi, c\,\nabla\cdot\Phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::test_divtrialvec, GridFct, QuadCreator>
: public GridFunctionOperatorBase<GridFct, QuadCreator>
{
using Super = GridFunctionOperatorBase<GridFct>;
using Super = GridFunctionOperatorBase<GridFct, QuadCreator>;
static_assert( Category::Scalar<typename GridFct::Range>, "Expression must be of scalar type." );
public:
GridFunctionOperator(tag::test_divtrialvec, GridFct const& expr, int degree)
: Super(expr, 1, degree)
GridFunctionOperator(tag::test_divtrialvec, GridFct const& expr, QuadCreator const& quadCreator)
: Super(expr, quadCreator, 1)
{}
template <class Context, class QuadratureRule,
......@@ -88,4 +93,6 @@ namespace AMDiS
std::vector<Dune::FieldVector<double,1>> rowShapeValues_;
};
/** @} **/
} // end namespace AMDiS
......@@ -8,24 +8,29 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct test_gradtrial {};
}
// first-order operator <psi, b*grad(phi)>
template <class GridFct>
class GridFunctionOperator<tag::test_gradtrial, GridFct>
: public GridFunctionOperatorBase<GridFct>
/// first-order operator \f$ \langle\psi, \mathbf{b}\cdot\nabla\phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::test_gradtrial, GridFct, QuadCreator>
: public GridFunctionOperatorBase<GridFct, QuadCreator>
{
using Super = GridFunctionOperatorBase<GridFct>;
using Super = GridFunctionOperatorBase<GridFct, QuadCreator>;
static_assert( Category::Vector<typename GridFct::Range>, "Expression must be of vector type." );
public:
GridFunctionOperator(tag::test_gradtrial, GridFct const& expr, int degree)
: Super(expr, 1, degree)
GridFunctionOperator(tag::test_gradtrial, GridFct const& expr, QuadCreator const& quadCreator)
: Super(expr, quadCreator, 1)
{}
template <class Context, class QuadratureRule,
......@@ -84,4 +89,6 @@ namespace AMDiS
std::vector<Dune::FieldVector<double,1>> rowShapeValues_;
};
/** @} **/
} // end namespace AMDiS
......@@ -8,6 +8,11 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct test_partialtrial
......@@ -17,18 +22,18 @@ namespace AMDiS
}
// first-order operator <psi, c*d_i(phi)>
template <class GridFct>
class GridFunctionOperator<tag::test_partialtrial, GridFct>
: public GridFunctionOperatorBase<GridFct>
/// first-order operator \f$ \langle\psi, c\,\partial_i\phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::test_partialtrial, GridFct, QuadCreator>
: public GridFunctionOperatorBase<GridFct, QuadCreator>
{
using Super = GridFunctionOperatorBase<GridFct>;
using Super = GridFunctionOperatorBase<GridFct, QuadCreator>;
static_assert( Category::Scalar<typename GridFct::Range>, "Expression must be of scalar type." );
public:
GridFunctionOperator(tag::test_partialtrial tag, GridFct const& expr, int degree)
: Super(expr, 1, degree)
GridFunctionOperator(tag::test_partialtrial tag, GridFct const& expr, QuadCreator const& quadCreator)
: Super(expr, quadCreator, 1)
, comp_(tag.comp)
{}
......@@ -91,4 +96,6 @@ namespace AMDiS
std::vector<Dune::FieldVector<double,1>> rowShapeValues_;
};
/** @} **/
} // end namespace AMDiS
......@@ -8,24 +8,29 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct testvec_gradtrial {};
}
// first-order operator <Psi, c*grad(phi)>
template <class GridFct>
class GridFunctionOperator<tag::testvec_gradtrial, GridFct>
: public GridFunctionOperatorBase<GridFct>
/// first-order operator \f$ \langle\Psi, c\,\nabla\phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::testvec_gradtrial, GridFct, QuadCreator>
: public GridFunctionOperatorBase<GridFct, QuadCreator>
{
using Super = GridFunctionOperatorBase<GridFct>;
using Super = GridFunctionOperatorBase<GridFct, QuadCreator>;
static_assert( Category::Scalar<typename GridFct::Range>, "Expression must be of scalar type." );
public:
GridFunctionOperator(tag::testvec_gradtrial, GridFct const& expr, int degree)
: Super(expr, 1, degree)
GridFunctionOperator(tag::testvec_gradtrial, GridFct const& expr, QuadCreator const& quadCreator)
: Super(expr, quadCreator, 1)
{}
template <class Context, class QuadratureRule,
......@@ -88,4 +93,6 @@ namespace AMDiS
std::vector<Dune::FieldVector<double,1>> rowShapeValues_;
};
/** @} **/
} // end namespace AMDiS
......@@ -8,24 +8,29 @@
namespace AMDiS
{
/**
* \addtogroup operators
* @{
**/
namespace tag
{
struct divtestvec_divtrialvec {};
}
// second-order operator <div(Psi), c * div(Phi)>
template <class GridFct>
class GridFunctionOperator<tag::divtestvec_divtrialvec, GridFct>
: public GridFunctionOperatorBase<GridFct>
/// second-order operator \f$ \langle\nabla\cdot\Psi, c\,\nabla\cdot\Phi\rangle \f$
template <class GridFct, class QuadCreator>
class GridFunctionOperator<tag::divtestvec_divtrialvec, GridFct, QuadCreator>
: public GridFunctionOperatorBase<GridFct, QuadCreator>
{
using Super = GridFunctionOperatorBase<GridFct>;
using Super = GridFunctionOperatorBase<GridFct, QuadCreator>;
static_assert( Category::Scalar<typename GridFct::Range>, "Expression must be of scalar type." );
public: