1#ifndef DUNE_FEM_LOCALOPERATORS_HH
2#define DUNE_FEM_LOCALOPERATORS_HH
29 template <
class FstPType,
class SecPType,
class SType ,
30 class LocalOperatorImp>
46 asImp().prepareGlobal(pa,pb);
52 asImp().prepareGlobal();
58 asImp().finalizeGlobal();
62 template<
class EntityType>
65 asImp().prepareLocal(en);
69 template<
class EntityType>
72 asImp().finalizeLocal(en);
76 template<
class EntityType>
79 asImp().prepareLocal(en1,en2);
83 template<
class EntityType>
86 asImp().finalizeLocal(en1,en2);
90 template<
class EntityType>
93 asImp().applyLocal(en);
97 template<
class EntityType>
100 asImp().applyLocal(en1,en2);
104 LocalOperatorImp & asImp()
106 return static_cast<LocalOperatorImp &
> (*this);
118 template <
class FstPType,
class SecPType,
class SType ,
119 class LocalOperatorImp>
122 SType,LocalOperatorImp>
150 template<
class EntityType>
154 template<
class EntityType>
158 template<
class EntityType>
162 template<
class EntityType>
186 template <
class A,
class B >
197 : _a ( a ) , _b ( b ) , printMSG_ ( printMsg )
200 std::cout <<
"Create CombinedLocalOperator " <<
this << std::endl;
207 std::cout <<
"Delete CombinedLocalOperator " <<
this << std::endl;
211 template <
class ScalarType>
212 void scaleIt(
const ScalarType scalar);
219 template <
class FirstParamType,
class SecondParamType>
220 void prepareGlobal(
const FirstParamType &pa, SecondParamType &pb);
233 template<
class EntityType>
237 template<
class EntityType>
241 template<
class EntityType>
245 template<
class EntityType>
257 template<
class EntityType>
261 template<
class EntityType>
262 void applyLocal(EntityType & en1, EntityType &en2);
283 template <
class A,
class B >
284 template <
class ScalarType>
286 scaleIt(
const ScalarType scalar)
291 template <
class A,
class B >
292 template <
class FirstParamType,
class SecondParamType>
298 _b.prepareGlobal(pa,pb);
299 _a.prepareGlobal(pa,pb);
302 template <
class A,
class B >
310 template <
class A,
class B >
311 template <
class EntityType>
318 template <
class A,
class B >
319 template <
class EntityType>
322 _b.finalizeLocal(en);
323 _a.finalizeLocal(en);
326 template <
class A,
class B >
327 template <
class EntityType>
335 template <
class A,
class B >
336 template <
class EntityType>
339 _b.prepareLocal(en1,en2);
340 _a.prepareLocal(en1,en2);
343 template <
class A,
class B >
344 template <
class EntityType>
347 _b.applyLocal(en1,en2);
348 _a.applyLocal(en1,en2);
351 template <
class A,
class B >
352 template <
class EntityType>
355 _b.finalizeLocal(en1,en2);
356 _a.finalizeLocal(en1,en2);
369 template <
class A,
class ScalarType>
376 bool printMsg =
false)
381 std::cout <<
"Create ScaledLocalOperator " <<
this << std::endl;
387 std::cout <<
"Delete ScaledLocalOperator " <<
this << std::endl;
390 void scaleIt (
const ScalarType & scalar);
397 template <
class FirstParamType,
class SecondParamType>
398 void prepareGlobal(
const FirstParamType &pa, SecondParamType &pb);
410 template<
class EntityType>
414 template<
class EntityType>
418 template<
class EntityType>
422 template<
class EntityType>
433 template<
class EntityType>
437 template<
class EntityType>
438 void applyLocal(EntityType & en1, EntityType &en2);
454 template <
class A,
class ScalarType>
456 scaleIt (
const ScalarType & scalar )
458 tmpScalar_ = scalar_ * scalar;
461 template <
class A,
class ScalarType>
462 template <
class FirstParamType,
class SecondParamType>
466 _a.scaleIt(tmpScalar_);
467 _a.prepareGlobal(pa,pb);
470 template <
class A,
class ScalarType>
476 template <
class A,
class ScalarType>
477 template <
class EntityType>
483 template <
class A,
class ScalarType>
484 template <
class EntityType>
487 _a.prepareLocal(en1,en2);
490 template <
class A,
class ScalarType>
491 template <
class EntityType>
494 _a.finalizeLocal(en);
497 template <
class A,
class ScalarType>
498 template <
class EntityType>
501 _a.finalizeLocal(en1,en2);
504 template <
class A,
class ScalarType>
505 template <
class EntityType>
511 template <
class A,
class ScalarType>
512 template <
class EntityType>
515 _a.applyLocal(en1,en2);
Definition: bindguard.hh:11
Definition: localoperator.hh:32
void finalizeGlobal()
finalize the walktrough
Definition: localoperator.hh:56
void applyLocal(EntityType &en1, EntityType &en2)
things to do on two entity
Definition: localoperator.hh:98
SType ScalarType
Definition: localoperator.hh:37
void prepareLocal(EntityType &en1, EntityType &en2)
two entities
Definition: localoperator.hh:77
void prepareGlobal(const FirstParamType &pa, SecondParamType &pb)
prepareGlobal is called before the grid walktrough
Definition: localoperator.hh:44
void finalizeLocal(EntityType &en)
Definition: localoperator.hh:70
SecPType SecondParamType
Definition: localoperator.hh:36
FstPType FirstParamType
remember the parameter types
Definition: localoperator.hh:35
void finalizeLocal(EntityType &en1, EntityType &en2)
Definition: localoperator.hh:84
void applyLocal(EntityType &en)
things to do on one entity
Definition: localoperator.hh:91
void prepareGlobal()
prepare for grid walktrough
Definition: localoperator.hh:50
void prepareLocal(EntityType &en)
one entity
Definition: localoperator.hh:63
Default implementation of a local operator A local operator works on entities only and is used by a D...
Definition: localoperator.hh:123
void prepareGlobal()
Definition: localoperator.hh:144
ScalarType scalar_
Definition: localoperator.hh:168
void finalizeGlobal()
Definition: localoperator.hh:147
void scaleIt(const ScalarType scalar)
scale operator , for inheritance
Definition: localoperator.hh:134
SecPType SecondParamType
Definition: localoperator.hh:127
LocalOperatorDefault()
no default implementation at the moement
Definition: localoperator.hh:131
void prepareLocal(EntityType &en1, EntityType &en2)
Definition: localoperator.hh:159
void prepareLocal(EntityType &en)
Definition: localoperator.hh:151
void finalizeLocal(EntityType &en1, EntityType &en2)
Definition: localoperator.hh:163
FstPType FirstParamType
remember the parameter types
Definition: localoperator.hh:126
SType ScalarType
Definition: localoperator.hh:128
void finalizeLocal(EntityType &en)
Definition: localoperator.hh:155
Definition: localoperator.hh:189
~CombinedLocalOperator()
Destructor.
Definition: localoperator.hh:204
A FirstOperatorType
The type of the operators exported.
Definition: localoperator.hh:192
void scaleIt(const ScalarType scalar)
method to scale the belonging operators
Definition: localoperator.hh:286
B SecondOperatorType
Definition: localoperator.hh:193
void finalizeGlobal()
finalizeGlobal is called after the grid walktrough
Definition: localoperator.hh:303
void prepareGlobal(const FirstParamType &pa, SecondParamType &pb)
prepareGlobal is called before the grid walktrough
Definition: localoperator.hh:294
void applyLocal(EntityType &en)
Definition: localoperator.hh:328
void finalizeLocal(EntityType &en)
Definition: localoperator.hh:320
void prepareLocal(EntityType &en)
Definition: localoperator.hh:312
CombinedLocalOperator(A &a, B &b, bool printMsg=false)
Constructor for combinations storing the two operators.
Definition: localoperator.hh:196
Definition: localoperator.hh:372
void applyLocal(EntityType &en)
Definition: localoperator.hh:506
void scaleIt(const ScalarType &scalar)
Definition: localoperator.hh:456
bool printMSG_
Definition: localoperator.hh:448
~ScaledLocalOperator()
Definition: localoperator.hh:384
const ScalarType scalar_
scale factor for operator _a
Definition: localoperator.hh:444
ScalarType tmpScalar_
Definition: localoperator.hh:445
void finalizeLocal(EntityType &en)
Definition: localoperator.hh:492
void prepareLocal(EntityType &en)
Definition: localoperator.hh:478
void prepareGlobal(const FirstParamType &pa, SecondParamType &pb)
prepareGlobal is called before the grid walktrough
Definition: localoperator.hh:464
A & _a
reference to local operator A
Definition: localoperator.hh:441
ScaledLocalOperator(A &a, const ScalarType scalar, bool printMsg=false)
Constructor for combinations with factors.
Definition: localoperator.hh:375
void finalizeGlobal()
finalizeGlobal is called after the grid walktrough
Definition: localoperator.hh:471
Definition: objpointer.hh:42