1#ifndef __DUNE_ACFEM_GRIDFUNCTIONEXPRESSIONBASE_HH__
2#define __DUNE_ACFEM_GRIDFUNCTIONEXPRESSIONBASE_HH__
4#include <dune/fem/version.hh>
5#include <dune/fem/function/common/discretefunction.hh>
7#include "../expressions/expressionoperations.hh"
20 template<
class UnOp,
class Function>
21 class UnaryGridFunctionExpression;
23 template<
class BinOp,
class LeftFunction,
class RightFunction>
24 class BinaryGridFunctionExpression;
29 template<
class FunctionSpaceImp,
class ExpressionImp,
30 template<
class>
class ExpressionTag = ExpressionTemplate>
32 :
public Fem::Function<FunctionSpaceImp, ExpressionImp>,
33 public ExpressionTag<ExpressionImp>,
34 public Fem::HasLocalFunction
37 typedef FunctionSpaceImp FunctionSpaceType;
38 typedef typename FunctionSpaceType::ScalarFunctionSpaceType ScalarFunctionSpaceType;
39 typedef typename FunctionSpaceType::RangeType RangeType;
40 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
56 const std::string&
name()
const
70 return expressionName_;
75 template<
class LocalFunction,
class QuadratureType,
class VectorType>
76 static void evaluateQuadratureImp(
const LocalFunction& lf,
77 const QuadratureType& quadrature,
81 const unsigned int nop = quadrature.nop();
82 for (
unsigned int qp = 0; qp < nop; ++qp) {
83 lf.evaluate(quadrature[qp], values[qp]);
88 template<
class LocalFunction,
class QuadratureType,
class VectorType>
89 static void evaluateQuadratureImp(
const LocalFunction& lf,
90 const QuadratureType& quadrature,
92 const JacobianRangeType&)
94 const unsigned int nop = quadrature.nop();
95 for (
unsigned int qp = 0; qp < nop; ++qp) {
96 lf.jacobian(quadrature[qp], values[qp]);
100 mutable std::string expressionName_;
107 template<
class FunctionSpaceImp,
class ExpressionImp>
A class providing some basic functionality common to all expressions.
Definition: gridfunctionexpressionbase.hh:35
const std::string & expressionName() const
Return a lengthy descriptive name for the underlying algebraic expression.
Definition: gridfunctionexpressionbase.hh:68
void setName(const std::string &newName)
Supply a descriptive name for the function.
Definition: gridfunctionexpressionbase.hh:46
const std::string & name() const
Return a descriptive name for the function.
Definition: gridfunctionexpressionbase.hh:56
A base class for zero function expression.
Definition: gridfunctionexpressionbase.hh:110
const ExpressionType & expression() const
Return a const reference to the underlying expression.
Definition: expressionoperations.hh:42
Negation of IsPieceWiseConstant, in order to have something to branch to with std::conditional.
Definition: gridfunctionexpressionbase.hh:119
Tag type, consequences are zero Jacobian and Hessian.
Definition: gridfunctionexpressionbase.hh:114