5#ifndef _DUNE_ACFEM_EMPTY_BLOCKCONSTRAINTS_HH_
6#define _DUNE_ACFEM_EMPTY_BLOCKCONSTRAINTS_HH_
8#include "blockconstraintsoperator.hh"
22 template<
class DiscreteFunction>
23 class EmptyBlockConstraints;
25 template<
class DiscreteFunction>
26 class LocalEmptyBlockConstraints;
28 template<
class DiscreteFunction>
29 struct EmptyBlockConstraintsTraits
30 : BlockConstraintsDefaultTraits<EmptyBlockConstraints<DiscreteFunction>,
31 LocalEmptyBlockConstraints<DiscreteFunction> >
36 template<
class DiscreteFunction>
39 EmptyBlockConstraintsTraits<DiscreteFunction> >
43 typedef EmptyBlockConstraintsTraits<DiscreteFunction> TraitsType;
44 typedef DiscreteFunction DiscreteFunctionType;
45 typedef typename TraitsType::LocalOperatorType LocalOperatorType;
46 typedef typename DiscreteFunctionType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType;
47 typedef typename DiscreteFunctionSpaceType::GridPartType GridPartType;
48 typedef typename DiscreteFunctionSpaceType::EntityType EntityType;
50 void rebuild()
const {}
51 void operator()(
const DiscreteFunctionType& arg, DiscreteFunctionType& result)
const {}
52 void constrain(DiscreteFunctionType& w)
const {}
53 void zeroConstrain(DiscreteFunctionType& w)
const {}
54 size_t size()
const {
return 0; }
56 LocalOperatorType localOperator(
const EntityType& entity)
const
58 return LocalOperatorType();
61 LocalOperatorType localOperator()
const
63 return LocalOperatorType();
68 template<
class DiscreteFunction>
69 class LocalEmptyBlockConstraints
73 typedef typename OperatorType::EntityType EntityType;
76 LocalEmptyBlockConstraints() {}
78 typedef typename OperatorType::DiscreteFunctionType::LocalFunctionType LocalFunctionType;
80 void init(
const EntityType& entity) {}
81 void operator()(
const LocalFunctionType& u, LocalFunctionType& w)
const {}
82 void constrain(LocalFunctionType& u)
const {}
83 void zeroConstrain(LocalFunctionType& u)
const {}
84 size_t numConstrained() {
return 0; }
85 bool unconstrained() {
return true; }
86 bool totallyConstrained() {
return false; }
90 template<
class JacobianOperator>
91 class DifferentiableEmptyBlockConstraints;
93 template<
class JacobianOperator>
94 class LocalDifferentiableEmptyBlockConstraints;
96 template<
class JacobianOperator>
97 struct DifferentiableEmptyBlockConstraintsTraits
98 :
public BlockConstraintsDefaultTraits<DifferentiableEmptyBlockConstraints<JacobianOperator>,
99 LocalDifferentiableEmptyBlockConstraints<JacobianOperator> >
104 template<
class JacobianOperator>
107 DifferentiableEmptyBlockConstraintsTraits<JacobianOperator> >,
113 typedef DifferentiableEmptyBlockConstraintsTraits<JacobianOperator> TraitsType;
114 typedef typename BaseType::DiscreteFunctionType DiscreteFunctionType;
115 typedef typename TraitsType::LocalOperatorType LocalOperatorType;
116 typedef JacobianOperator JacobianOperatorType;
117 typedef typename DiscreteFunctionType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType;
118 typedef typename DiscreteFunctionSpaceType::GridPartType GridPartType;
119 typedef typename DiscreteFunctionSpaceType::EntityType EntityType;
124 template <
typename ...Args>
127 void operator()(
const DiscreteFunctionType& arg, DiscreteFunctionType& result)
const {}
128 void jacobian(
const DiscreteFunctionType& u, JacobianOperatorType& jOp)
const {}
130 LocalOperatorType localOperator(
const EntityType& entity)
const
132 return LocalOperatorType();
135 LocalOperatorType localOperator()
const
137 return LocalOperatorType();
140 using BaseType::size;
141 using BaseType::rebuild;
142 using BaseType::constrain;
143 using BaseType::zeroConstrain;
146 template<
class JacobianOperator>
147 class LocalDifferentiableEmptyBlockConstraints
148 :
public LocalEmptyBlockConstraints<typename JacobianOperator::DomainFunctionType>
150 typedef JacobianOperator JacobianOperatorType;
151 typedef LocalEmptyBlockConstraints<typename JacobianOperator::DomainFunctionType> BaseType;
154 typedef typename OperatorType::EntityType EntityType;
157 LocalDifferentiableEmptyBlockConstraints()
160 typedef typename OperatorType::DiscreteFunctionType::LocalFunctionType LocalFunctionType;
162 using BaseType::init;
163 using BaseType::operator();
164 using BaseType::constrain;
165 using BaseType::zeroConstrain;
167 template<
class LocalMatrix>
168 void jacobian(
const LocalFunctionType& u , LocalMatrix& jOpLocal)
const {}
Interface class for a block-constraints-operator.
Definition: blockconstraintsoperator.hh:75
Interface class for a differentiable block-constraints-operator.
Definition: blockconstraintsoperator.hh:182
A class modelling differentiable do-nothing constraints.
Definition: emptyblockconstraints.hh:109
A class modelling do-nothing constraints.
Definition: emptyblockconstraints.hh:40