1 #ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTION_HH 2 #define DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTION_HH 7 #include <dune/common/fvector.hh> 40 template<
class BasisFunctionSet,
class LocalDofVector >
53 typedef typename LocalDofVectorType::value_type
DofType;
56 typedef typename LocalDofVectorType::size_type
SizeType;
220 template<
class Po
intType >
221 void axpy (
const PointType &x,
const RangeType &factor )
238 template<
class Po
intType >
239 void axpy (
const PointType &x,
const JacobianRangeType &factor)
257 template<
class Po
intType >
258 void axpy (
const PointType &x,
const RangeType &factor1,
const JacobianRangeType &factor2 )
299 template<
class Po
intType >
300 void evaluate (
const PointType &x, RangeType &ret )
const 313 template<
class Po
intType >
314 void jacobian (
const PointType &x, JacobianRangeType &ret )
const 327 template<
class Po
intType >
328 void hessian (
const PointType &x, HessianRangeType &ret )
const 354 assert(
numDofs() % dimRange == 0 );
360 template<
class QuadratureType,
class VectorType >
368 template<
class QuadratureType,
class RangeVectorType,
class JacobianRangeVectorType >
370 const RangeVectorType& rangeVector,
371 const JacobianRangeVectorType& jacobianVector )
377 template<
class QuadratureType,
class VectorType >
380 assert( result.size() > 0 );
395 template<
class QuadratureType,
class VectorType >
404 template<
class QuadratureType,
class VectorType >
405 void evaluateQuadrature(
const QuadratureType &quad, VectorType &result,
const JacobianRangeType & )
const 420 #endif // #ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTION_HH LocalDofVectorType localDofVector_
Definition: localfunction.hh:411
int numDofs() const
obtain the number of local DoFs
Definition: localfunction.hh:340
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::RangeFieldType RangeFieldType
Intrinsic type used for values in the range field (usually a double)
Definition: functionspaceinterface.hh:62
LocalDofVectorType::value_type DofType
type of DoF use with the discrete function
Definition: localfunction.hh:53
BasisFunctionSetType basisFunctionSet_
Definition: localfunction.hh:410
LocalFunction(const BasisFunctionSetType &basisFunctionSet)
ctor taking a basisFunctionSet, calling default ctor for LocalDofVectorType, and resize ...
Definition: localfunction.hh:89
FunctionSpaceType::DomainFieldType DomainFieldType
field type of the domain
Definition: localfunction.hh:65
LocalFunction()
default constructor, calls default ctor of BasisFunctionSetType and LocalDofVectorType ...
Definition: localfunction.hh:86
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::LinearMappingType JacobianRangeType
Intrinsic type used for the jacobian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:74
FieldVector< FieldMatrix< RangeFieldType, dimDomain, dimDomain >, dimRange > HessianRangeType
Intrinsic type used for the hessian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:78
FunctionSpaceType::RangeFieldType RangeFieldType
field type of the range
Definition: localfunction.hh:67
void jacobianAll(const QuadratureType &quad, const DofVector &dofs, JacobianArray &jacobians) const
evaluate the jacobian of all basis functions and store the result in the jacobians array ...
dimension of domain vector space
Definition: functionspaceinterface.hh:45
LocalDofVectorType & localDofVector()
return mutable reference to local Dof Vector
Definition: localfunction.hh:389
void axpy(const Quadrature &quad, const Vector &values, DofVector &dofs) const
evaluate all basis function and multiply with given values and add to dofs
dimension of range vector space
Definition: functionspaceinterface.hh:47
void evaluateQuadrature(const QuadratureType &quad, VectorType &result, const JacobianRangeType &) const
Definition: localfunction.hh:405
LocalFunction(const LocalDofVectorType &localDofVector)
ctor taking a localDofVector, calling default ctor for BasisFunctionSetType
Definition: localfunction.hh:96
static const int dimRange
dimension of the range
Definition: localfunction.hh:83
const DofType & operator[](SizeType num) const
access to local dofs (read-only)
Definition: localfunction.hh:134
const BasisFunctionSetType & basisFunctionSet() const
obtain the basis function set for this local function
Definition: localfunction.hh:279
FunctionSpaceType::JacobianRangeType JacobianRangeType
type of the Jacobian, i.e., type of evaluated Jacobian matrix
Definition: localfunction.hh:73
interface for local functions
Definition: localfunction.hh:41
LocalFunction(const ThisType &other)
copy constructor
Definition: localfunction.hh:124
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::DomainFieldType DomainFieldType
Intrinsic type used for values in the domain field (usually a double)
Definition: functionspaceinterface.hh:59
BasisFunctionSetType::EntityType EntityType
type of the entity, the local function lives on is given by the space
Definition: localfunction.hh:59
int order() const
return order of basis function set
LocalDofVectorType::size_type SizeType
type of index
Definition: localfunction.hh:56
Definition: coordinate.hh:4
void evaluateAll(const Quadrature &quad, const DofVector &dofs, RangeArray &ranges) const
evaluate all basis functions and store the result in the ranges array
ThisType & operator-=(const LocalFunction< BasisFunctionSet, T > &other)
subtract another local function to this one
Definition: localfunction.hh:185
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::DomainType DomainType
Type of domain vector (using type of domain field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:66
EntityType::Geometry::LocalCoordinate LocalCoordinateType
type of local coordinates
Definition: localfunction.hh:78
void axpy(const PointType &x, const RangeType &factor1, const JacobianRangeType &factor2)
axpy operation for local function
Definition: localfunction.hh:258
void clear()
set all DoFs to zero
Definition: localfunction.hh:170
const EntityType & entity() const
obtain the entity, this local function lives on
Definition: localfunction.hh:285
void evaluateQuadrature(const QuadratureType &quad, VectorType &result) const
evaluate all basisfunctions for all quadrature points and store the results in the result vector ...
Definition: localfunction.hh:378
void axpyQuadrature(const QuadratureType &quad, const RangeVectorType &rangeVector, const JacobianRangeVectorType &jacobianVector)
evaluate all basisfunctions for all quadrature points, multiply with the given factor and add the res...
Definition: localfunction.hh:369
static const int dimDomain
dimension of the domain
Definition: localfunction.hh:81
int numScalarDofs() const
obtain the number of local DoFs in the scalar case
Definition: localfunction.hh:352
LocalFunction(LocalDofVectorType &&localDofVector)
half move ctor
Definition: localfunction.hh:107
void axpy(const PointType &x, const JacobianRangeType &factor)
axpy operation for local function
Definition: localfunction.hh:239
LocalFunction(const BasisFunctionSetType &basisFunctionSet, const LocalDofVector &localDofVector)
copy given agruments
Definition: localfunction.hh:99
LocalDofVector LocalDofVectorType
type of local Dof Vector
Definition: localfunction.hh:50
BasisFunctionSetType::FunctionSpaceType FunctionSpaceType
type of functionspace
Definition: localfunction.hh:62
ThisType & operator+=(const LocalFunction< BasisFunctionSet, T > &other)
add another local function to this one
Definition: localfunction.hh:153
void evaluateQuadrature(const QuadratureType &quad, VectorType &result, const RangeType &) const
Definition: localfunction.hh:396
FunctionSpace< typename Entity::Geometry::ctype, typename Range::value_type, Entity::Geometry::coorddimension, Range::dimension > FunctionSpaceType
function space type
Definition: basisfunctionset/basisfunctionset.hh:40
void init(const BasisFunctionSetType &basisFunctionSet)
Definition: localfunction.hh:288
void move(ArrayInterface< T > &array, const unsigned int oldOffset, const unsigned int newOffset, const unsigned int length)
Definition: array_inline.hh:38
LocalFunction(ThisType &&other)
move constructor
Definition: localfunction.hh:118
void hessianAll(const Point &x, const DofVector &dofs, HessianRangeType &hessian) const
void jacobian(const PointType &x, JacobianRangeType &ret) const
evaluate Jacobian of the local function
Definition: localfunction.hh:314
void assign(const LocalFunction< BasisFunctionSet, T > &other)
assign all DoFs of this local function
Definition: localfunction.hh:164
void axpy(const PointType &x, const RangeType &factor)
axpy operation for local function
Definition: localfunction.hh:221
void evaluate(const PointType &x, RangeType &ret) const
evaluate the local function
Definition: localfunction.hh:300
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::RangeType RangeType
Type of range vector (using type of range field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:70
Entity EntityType
entity type
Definition: basisfunctionset/basisfunctionset.hh:35
FunctionSpaceType::DomainType DomainType
type of domain vectors, i.e., type of coordinates
Definition: localfunction.hh:69
const EntityType & entity() const
return entity
void hessian(const PointType &x, HessianRangeType &ret) const
evaluate Hessian of the local function
Definition: localfunction.hh:328
void axpyQuadrature(const QuadratureType &quad, const VectorType &values)
evaluate all basisfunctions for all quadrature points, multiply with the given factor and add the res...
Definition: localfunction.hh:361
SizeType size() const
Definition: localfunction.hh:342
int order() const
obtain the order of this local function
Definition: localfunction.hh:273
BasisFunctionSet BasisFunctionSetType
type of basis function set
Definition: localfunction.hh:47
FunctionSpaceType::HessianRangeType HessianRangeType
type of the Hessian
Definition: localfunction.hh:75
Definition: basisfunctionset/basisfunctionset.hh:31
LocalFunction(const BasisFunctionSetType &basisFunctionSet, LocalDofVector &&localDofVector)
half move ctor
Definition: localfunction.hh:110
ThisType & axpy(const RangeFieldType s, const LocalFunction< BasisFunctionSet, T > &other)
add a multiple of another local function to this one
Definition: localfunction.hh:202
const LocalDofVectorType & localDofVector() const
return const reference to local Dof Vector
Definition: localfunction.hh:386
FunctionSpaceType::RangeType RangeType
type of range vectors, i.e., type of function values
Definition: localfunction.hh:71