DUNE-ACFEM (2.5.1)

boundaryfunctionexpression.hh
1#ifndef __DUNE_ACFEM_BOUNDARYFUNCTIONEXPRESSION_HH__
2#define __DUNE_ACFEM_BOUNDARYFUNCTIONEXPRESSION_HH__
3
4#include "../functions/boundarysupportedfunction.hh"
5#include "../functions/gridfunctionexpression.hh"
6#include "../expressions/parameterinterface.hh"
7#include "../expressions/parameterexpression.hh"
8
9namespace Dune
10{
11
12 namespace ACFem
13 {
14
46 namespace {
47
49 template<class F>
50 static inline
51 BoundarySupportedFunction<F>
52 asBndryFct(const Fem::Function<typename F::FunctionSpaceType, F>& f_)
53 {
54 return BoundarySupportedFunction<F>(f_, EntireBoundaryIndicatorType());
55 }
56
58 template<class F, class FInd>
59 BoundarySupportedFunction<F>
60 asBndryFct(const BoundarySupportedFunction<F, EntireBoundaryIndicatorType>& f_)
61 {
62 return f_;
63 }
64
66 template<class F>
67 auto asBndryFct(const BoundarySupportedFunction<F, EmptyBoundaryIndicatorType>& f_)
68 -> BoundarySupportedFunction<decltype(zeroFunction(f_)), EmptyBoundaryIndicatorType>
69 {
70 typedef
71 BoundarySupportedFunction<decltype(zeroFunction(f_)), EmptyBoundaryIndicatorType>
72 ResultType;
73
74 return ResultType(zeroFunction(f_), EmptyBoundaryIndicatorType());
75 }
76
82 template<class GridFunction>
83 struct EssBndryFct
84 {
85 typedef GridFunction Type;
86 static const Type& construct(const Type& arg)
87 {
88 return arg;
89 }
90 };
91
92 template<class GridFunction, class Indicator>
93 struct EssBndryFct<BoundarySupportedFunction<GridFunction, Indicator> >
94 {
95 typedef BoundarySupportedFunction<GridFunction, Indicator> Type;
96 static const Type& construct(const Type& arg)
97 {
98 return arg;
99 }
100 };
101
103 template<class GridFunction>
104 struct EssBndryFct<BoundarySupportedFunction<GridFunction, EntireBoundaryIndicatorType> >
105 {
106 typedef BoundarySupportedFunction<GridFunction, EntireBoundaryIndicatorType> BndryFctType;
107 typedef GridFunction Type;
108 static const Type& construct(const BndryFctType& arg)
109 {
110 return arg.function();
111 }
112 };
113
116 template<class GridFunction>
117 struct EssBndryFct<BoundarySupportedFunction<GridFunction, EmptyBoundaryIndicatorType> >
118 {
119 typedef BoundarySupportedFunction<GridFunction, EmptyBoundaryIndicatorType> BndryFctType;
120 typedef ZeroGridFunction<typename GridFunction::FunctionSpaceType,
121 typename GridFunction::GridPartType> Type;
122 static Type construct(const BndryFctType& arg)
123 {
124 return Type(arg.gridPart());
125 }
126 };
127
129 template<class GridFunction>
130 auto asEssBndryFct(const GridFunction& arg)
131 -> decltype(EssBndryFct<GridFunction>::construct(arg))
132 {
133 return EssBndryFct<GridFunction>::construct(arg);
134 }
135
138 template<class GridFunction, class Indicator>
139 auto
140 asExprArg(const BoundarySupportedFunction<GridFunction, Indicator>& arg)
141 -> decltype(asExprFunction(asEssBndryFct(arg)))
142 {
143 return asExprFunction(asEssBndryFct(arg));
144 }
145
149 template<class GridFunction>
150 auto
151 asExprArg(const BoundarySupportedFunction<GridFunction, EmptyBoundaryIndicatorType>& arg)
152 -> decltype(asEssBndryFct(arg))
153 {
154 return asEssBndryFct(arg);
155 }
156
157 } // anonymous namespace
158
160 template<class Function, class Indicator>
161 static inline
163 -> BoundarySupportedFunction<decltype(-f_.function()), Indicator>
164 {
165 typedef decltype(-f_.function()) InnerExpressionType;
167
168 return ExpressionType(-f_.function(), f_.outerIndicator());
169 }
170
172 template<class Function, class Indicator>
173 static inline
176 {
177 return f_;
178 }
179
180 template<class Left, class Right, class LeftInd, class RightInd>
181 static inline
182 auto operator+(const BoundarySupportedFunction<Left, LeftInd>& f_,
183 const BoundarySupportedFunction<Right, RightInd>& g_)
184 -> decltype(asBndryFct(asExprArg(f_) + asExprArg(g_)))
185 {
186 return asBndryFct(asExprArg(f_) + asExprArg(g_));
187 }
188
190 template<class Left, class Right, class LeftInd>
191 static inline
193 const Fem::Function<typename Right::FunctionSpaceType, Right>& g_)
194 -> decltype(asBndryFct(asExprArg(f_) + g_))
195 {
196 return asBndryFct(asExprArg(f_) + g_);
197 }
198
200 template<class Left, class Right, class RightInd>
201 static inline
202 auto operator+(const Fem::Function<typename Left::FunctionSpaceType, Left>& f_,
204 -> decltype(asBndryFct(f_ + asExprArg(g_)))
205 {
206 return asBndryFct(f_ + asExprArg(g_));
207 }
208
214 template<class ZeroExpression, class Left, class LeftInd>
215 static inline
218 -> decltype(asBndryFct(asExprArg(f_) + g_))
219 {
220 return asBndryFct(asExprArg(f_) + g_);
221 }
222
228 template<class ZeroExpression, class Right, class RightInd>
229 static inline
232 -> decltype(asBndryFct(f_ + asExprArg(g_)))
233 {
234 return asBndryFct(f_ + asExprArg(g_));
235 }
236
238 template<class F, class FC, class Z>
239 static inline
240 auto operator+(const BoundarySupportedFunction<F, FC>& f_,
243 {
244 return f_;
245 }
246
248 template<class F, class FC, class Z>
249 static inline
253 {
254 return f_;
255 }
256
258 template<class Z1, class Z2>
259 static inline
260 BoundarySupportedFunction<ZeroGridFunction<typename Z1::FunctionSpaceType,
261 typename Z1::GridPartType>,
262 EmptyBoundaryIndicatorType>
265 {
266 // don't use decltype & friends here in order to have one well-defined end-point.
267 typedef
269 ZeroFunction;
270 typedef
272 ResultType;
273
274 return ResultType(ZeroFunction(z1_.gridPart()), EmptyBoundaryIndicatorType());
275 }
276
278 template<class Left, class Right, class LeftInd, class RightInd>
279 static inline
282 -> decltype(asBndryFct(asExprArg(f_) - asExprArg(g_)))
283 {
284 return asBndryFct(asExprArg(f_) - asExprArg(g_));
285 }
286
288 template<class Left, class Right, class LeftInd>
289 static inline
291 const Fem::Function<typename Right::FunctionSpaceType, Right>& g_)
292 -> decltype(asBndryFct(asExprArg(f_) - g_))
293 {
294 return asBndryFct(asExprArg(f_) - g_);
295 }
296
298 template<class Left, class Right, class RightInd>
299 static inline
300 auto operator-(const Fem::Function<typename Left::FunctionSpaceType, Left>& f_,
302 -> decltype(asBndryFct(f_ - asExprArg(g_)))
303 {
304 return asBndryFct(f_ - asExprArg(g_));
305 }
306
308 template<class F, class FC, class Z>
309 static inline
310 auto operator-(const BoundarySupportedFunction<F, FC>& f_,
313 {
314 return f_;
315 }
316
318 template<class F, class FC, class Z>
319 static inline
322 -> decltype(-f_)
323 {
324 return -f_;
325 }
326
328 template<class Z1, class Z2>
329 static inline
330 BoundarySupportedFunction<ZeroGridFunction<typename Z1::FunctionSpaceType,
331 typename Z1::GridPartType>,
332 EmptyBoundaryIndicatorType>
335 {
336 // don't use decltype & friends here in order to have one well-defined end-point.
337 typedef
339 ZeroFunction;
340 typedef
342 ResultType;
343
344 return ResultType(ZeroFunction(z1_.gridPart()), EmptyBoundaryIndicatorType());
345 }
346
348 template<class Function, class Indicator>
349 static inline
350 auto operator*(const typename Function::RangeFieldType& s_,
352 -> decltype(asBndryFct(asEssBndryFct(s_ * asExprArg(f_))))
353 {
354 return asBndryFct(asEssBndryFct(s_ * asExprArg(f_)));
355 }
356
358 template<class Function>
359 static inline
360 BoundarySupportedFunction<ZeroGridFunction<typename Function::FunctionSpaceType,
361 typename Function::GridPartType>,
362 EmptyBoundaryIndicatorType>
363 operator*(const typename Function::RangeFieldType& s_,
365 {
366 typedef
367 ZeroGridFunction<typename Function::FunctionSpaceType,
368 typename Function::GridPartType>
369 ZeroType;
370 typedef EmptyBoundaryIndicatorType IndicatorType;
372
373 return ExpressionType(ZeroType(f_.gridPart()), IndicatorType());
374 }
375
377 template<class Function, class Indicator>
378 static inline
380 const typename Function::RangeFieldType& s_)
381 -> decltype(s_ * f_)
382 {
383 return s_ * f_;
384 }
385
387 template<class Parameter, class Function, class Indicator>
388 static inline
391 -> decltype(asBndryFct(asEssBndryFct(asImp(p_) * asExprArg(f_))))
392 {
393 return asBndryFct(asEssBndryFct(asImp(p_) * asExprArg(f_)));
394 }
395
397 template<class Parameter, class Function>
398 static inline
399 BoundarySupportedFunction<ZeroGridFunction<typename Function::FunctionSpaceType,
400 typename Function::GridPartType>,
401 EmptyBoundaryIndicatorType>
404 {
405 typedef
406 ZeroGridFunction<typename Function::FunctionSpaceType,
407 typename Function::GridPartType>
408 ZeroType;
409 typedef EmptyBoundaryIndicatorType IndicatorType;
411
412 return ExpressionType(ZeroType(f_.gridPart()), IndicatorType());
413 }
414
415 template<class Parameter, class Function, class Indicator>
416 static inline
417 auto operator*(const BoundarySupportedFunction<Function, Indicator>& f_,
418 const ParameterInterface<Parameter>& p_)
419 -> decltype(asImp(p_) * f_)
420 {
421 return asImp(p_) * f_;
422 }
423
425 template<class Field, class Parameter, class Function, class Indicator>
426 static inline
427 auto operator*(const BinaryParameterExpression<SMultiplyOperation, Field, Parameter>& p_,
429 -> decltype(p_.left() * (p_.right() * f_))
430 {
431 return p_.left() * (p_.right() * f_);
432 }
433
435 template<class Left, class Right, class LeftInd, class RightInd>
436 static inline
439 -> decltype(asBndryFct(asEssBndryFct(asExprArg(f_) * asExprArg(g_))))
440 {
441 return asBndryFct(asEssBndryFct(asExprArg(f_) * asExprArg(g_)));
442 }
443
448 template<class Zero, class F, class FInd>
449 static inline
452 -> BoundarySupportedFunction<decltype(zeroProduct(z_, f_)), EmptyBoundaryIndicatorType>
453 {
454 typedef decltype(zeroProduct(z_, f_)) InnerExpressionType;
455 typedef EmptyBoundaryIndicatorType IndicatorType;
457
458 return ExpressionType(zeroProduct(z_, f_), IndicatorType());
459 }
460
465 template<class F, class Zero, class FInd>
466 static inline
469 -> BoundarySupportedFunction<decltype(zeroProduct(z_, f_)), EmptyBoundaryIndicatorType>
470 {
471 typedef decltype(zeroProduct(z_, f_)) InnerExpressionType;
472 typedef EmptyBoundaryIndicatorType IndicatorType;
474
475 return ExpressionType(zeroProduct(f_, z_), IndicatorType());
476 }
477
482 template<class Left, class Right>
483 static inline
486 -> BoundarySupportedFunction<decltype(zeroProduct(z1_, z2_)), EmptyBoundaryIndicatorType>
487 {
488 typedef decltype(zeroProduct(z1_, z2_)) InnerExpressionType;
489 typedef EmptyBoundaryIndicatorType IndicatorType;
491
492 return ExpressionType(zeroProduct(z1_, z2_), IndicatorType());
493 }
494
495 /***********************************************
496 *
497 * f * Wrapped(g)
498 *
499 */
500
502 template<class Left, class Right, class RightInd>
503 static inline
504 auto operator*(const Fem::Function<typename Left::FunctionSpaceType, Left>& f_,
506 -> BoundarySupportedFunction<typename EssBndryFct<decltype(asImp(f_) * g_.function())>::Type,
508 {
509 typedef EssBndryFct<decltype(asImp(f_) * g_.function())> EssBndryTraits;
510 typedef typename EssBndryTraits::Type InnerExpressionType;
511 typedef
513 IndicatorType;
515
516 return ExpressionType(asEssBndryFct(asImp(f_) * g_.function()), g_.indicator());
517 }
518
520 template<class Left, class Right>
521 static inline
522 auto operator*(const Fem::Function<typename Left::FunctionSpaceType, Left>& f_,
524 -> BoundarySupportedFunction<decltype(zeroProduct(asImp(f_), g_)), EmptyBoundaryIndicatorType>
525 {
526 typedef decltype(zeroProduct(asImp(f_), g_)) InnerExpressionType;
527 typedef EmptyBoundaryIndicatorType IndicatorType;
529
530 return ExpressionType(InnerExpressionType(g_.gridPart()), IndicatorType());
531 }
532
534 template<class ZeroExpression, class Function, class Indicator>
535 static inline
538 -> BoundarySupportedFunction<decltype(zeroProduct(*z_, b_)),
540 {
541 typedef decltype(zeroProduct(*z_, b_)) InnerExpressionType;
544
545 return ExpressionType(*z_, b_.indicator());
546 }
547
549 template<class ZeroExpression, class Right>
550 static inline
553 -> BoundarySupportedFunction<decltype(zeroProduct(*f_, g_)), EmptyBoundaryIndicatorType>
554 {
555 typedef decltype(zeroProduct(*f_, g_)) InnerExpressionType;
556 typedef EmptyBoundaryIndicatorType IndicatorType;
558
559 return ExpressionType(InnerExpressionType((*f_).gridPart()), IndicatorType());
560 }
561
562 /***********************************************
563 *
564 * Wrapped(g) * f
565 *
566 */
567
569 template<class Function, class Wrapped, class Indicator>
570 static inline
572 const Fem::Function<typename Function::FunctionSpaceType, Function>& f_)
573 -> BoundarySupportedFunction<typename EssBndryFct<decltype(b_.function() * asImp(f_))>::Type,
575 {
576 typedef EssBndryFct<decltype(b_.function() * asImp(f_))> EssBndryTraits;
577 typedef typename EssBndryTraits::Type InnerExpressionType;
578 typedef
580 IndicatorType;
582
583 return ExpressionType(asEssBndryFct(b_.function() * asImp(f_)), b_.indicator());
584 }
585
587 template<class Function, class Wrapped>
588 static inline
590 const Fem::Function<typename Function::FunctionSpaceType, Function>& f_)
591 -> BoundarySupportedFunction<decltype(zeroProduct(b_, asImp(f_))), EmptyBoundaryIndicatorType>
592 {
593 typedef decltype(zeroProduct(b_, asImp(f_))) InnerExpressionType;
594 typedef EmptyBoundaryIndicatorType IndicatorType;
596
597 return ExpressionType(InnerExpressionType(b_.gridPart()), IndicatorType());
598 }
599
601 template<class ZeroExpression, class Wrapped, class Indicator>
602 static inline
605 -> BoundarySupportedFunction<decltype(zeroProduct(b_, *z_)),
607 {
608 typedef decltype(zeroProduct(b_, *z_)) InnerExpressionType;
611
612 return ExpressionType(InnerExpressionType(b_.gridPart()), b_.indicator());
613 }
614
616 template<class ZeroExpression, class Wrapped>
617 static inline
620 -> BoundarySupportedFunction<decltype(zeroProduct(b_, *z_)), EmptyBoundaryIndicatorType>
621 {
622 typedef decltype(zeroProduct(b_, *z_)) InnerExpressionType;
623 typedef EmptyBoundaryIndicatorType IndicatorType;
625
626 return ExpressionType(InnerExpressionType(b_.gridPart()), IndicatorType());
627 }
628
629 /*
630 *
631 *
632 **********************************************/
633
635 template<class Function, class Indicator>
636 static inline
637 BoundarySupportedFunction<Function, Indicator>
638 operator*(const decltype(oneFunction(std::declval<Function>()))& one,
640 {
641 return f_;
642 }
643
645 template<class Function, class Indicator>
646 static inline
647 BoundarySupportedFunction<Function, Indicator>
649 const decltype(oneFunction(std::declval<Function>()))& one)
650 {
651 return f_;
652 }
653
655 template<class Left, class Right, class RightInd>
656 static inline
657 auto operator/(const Fem::Function<typename Left::FunctionSpaceType, Left>& f_,
659 -> decltype(asBndryFct(asEssBndryFct(f_ / asExprArg(g_))))
660 {
661 return asBndryFct(asEssBndryFct(f_ / asExprArg(g_)));
662 }
663
665 template<class Function, class Indicator>
666 static inline
667 auto operator/(const typename Function::RangeFieldType& s_,
669 -> decltype(asBndryFct(asEssBndryFct(s_ / asExprArg(f_))))
670 {
671 return asBndryFct(asEssBndryFct(s_ / asExprArg(f_)));
672 }
673
675 template<class Parameter, class Function, class Indicator>
676 static inline
679 -> decltype(asBndryFct(asEssBndryFct(asImp(p_) / asExprArg(f_))))
680 {
681 return asBndryFct(asEssBndryFct(asImp(p_) / asExprArg(f_)));
682 }
683
684#if 0
685 // UNIMPLEMENTED, usually we want those BoundarySupportedFunction
686 // expression in order to form Model-expressions.
687
689 template<class Function, class GridPart>
690 static inline
691 GridFunctionWrapper<UnaryFunctionExpression<ExpOperation, Function>, GridPart>
692 exp(const GridFunctionWrapper<Function, GridPart>& f)
693 {
694 typedef
695 UnaryBoundaryFunctionExpressionTraits<ExpOperation, Function, GridPart>
696 TraitsType;
697
698 return TraitsType::wrap(f);
699 }
700
702 template<class Function, class GridPart>
703 static inline
704 GridFunctionWrapper<UnaryFunctionExpression<LogOperation, Function>, GridPart>
705 log(const GridFunctionWrapper<Function, GridPart>& f)
706 {
707 typedef
708 UnaryBoundaryFunctionExpressionTraits<LogOperation, Function, GridPart>
709 TraitsType;
710
711 return TraitsType::wrap(f);
712 }
713
715 template<class Function, class GridPart>
716 static inline
717 GridFunctionWrapper<UnaryFunctionExpression<SqrtOperation, Function>, GridPart>
718 sqrt(const GridFunctionWrapper<Function, GridPart>& f)
719 {
720 typedef
721 UnaryBoundaryFunctionExpressionTraits<SqrtOperation, Function, GridPart>
722 TraitsType;
723
724 return TraitsType::wrap(f);
725 }
726
728 template<class Function, class GridPart>
729 static inline
730 GridFunctionWrapper<UnaryFunctionExpression<SquareOperation, Function>, GridPart>
731 sqr(const GridFunctionWrapper<Function, GridPart>& f)
732 {
733 typedef
734 UnaryBoundaryFunctionExpressionTraits<SquareOperation, Function, GridPart>
735 TraitsType;
736
737 return TraitsType::wrap(f);
738 }
739
741 template<class Function, class GridPart>
742 static inline
743 GridFunctionWrapper<UnaryFunctionExpression<SinOperation, Function>, GridPart>
744 sin(const GridFunctionWrapper<Function, GridPart>& f)
745 {
746 typedef
747 UnaryBoundaryFunctionExpressionTraits<SinOperation, Function, GridPart>
748 TraitsType;
749
750 return TraitsType::wrap(f);
751 }
752
754 template<class Function, class GridPart>
755 static inline
756 GridFunctionWrapper<UnaryFunctionExpression<CosOperation, Function>, GridPart>
757 cos(const GridFunctionWrapper<Function, GridPart>& f)
758 {
759 typedef
760 UnaryBoundaryFunctionExpressionTraits<CosOperation, Function, GridPart>
761 TraitsType;
762
763 return TraitsType::wrap(f);
764 }
765
767 template<class Function, class GridPart>
768 static inline
769 GridFunctionWrapper<UnaryFunctionExpression<TanOperation, Function>, GridPart>
770 tan(const GridFunctionWrapper<Function, GridPart>& f)
771 {
772 typedef
773 UnaryBoundaryFunctionExpressionTraits<TanOperation, Function, GridPart>
774 TraitsType;
775
776 return TraitsType::wrap(f);
777 }
778
780 template<class Function, class GridPart>
781 static inline
782 GridFunctionWrapper<UnaryFunctionExpression<AtanOperation, Function>, GridPart>
783 atan(const GridFunctionWrapper<Function, GridPart>& f)
784 {
785 typedef
786 UnaryBoundaryFunctionExpressionTraits<AtanOperation, Function, GridPart>
787 TraitsType;
788
789 return TraitsType::wrap(f);
790 }
791
793 template<class Function, class GridPart>
794 static inline
795 GridFunctionWrapper<UnaryFunctionExpression<AsinOperation, Function>, GridPart>
796 asin(const GridFunctionWrapper<Function, GridPart>& f)
797 {
798 typedef
799 UnaryBoundaryFunctionExpressionTraits<AsinOperation, Function, GridPart>
800 TraitsType;
801
802 return TraitsType::wrap(f);
803 }
804
806 template<class Function, class GridPart>
807 static inline
808 GridFunctionWrapper<UnaryFunctionExpression<AcosOperation, Function>, GridPart>
809 acos(const GridFunctionWrapper<Function, GridPart>& f)
810 {
811 typedef
812 UnaryBoundaryFunctionExpressionTraits<AcosOperation, Function, GridPart>
813 TraitsType;
814
815 return TraitsType::wrap(f);
816 }
817#endif
818
820
836 template<class Indicator, class Function>
837 static inline
839 const Fem::Function<typename Function::FunctionSpaceType, Function>& f)
840 -> decltype(boundarySupportedFunction(f, chi))
841 {
842 return boundarySupportedFunction(f, chi);
843 }
844
846 template<class Indicator, class Function>
847 static inline
848 auto operator*(const Fem::Function<typename Function::FunctionSpaceType, Function>& f,
850 -> decltype(asImp(chi) * asImp(f))
851 {
852 return asImp(chi) * asImp(f);
853 }
854
856 template<class Function>
857 static inline
858 BoundarySupportedFunction<ZeroGridFunction<typename Function::FunctionSpaceType,
859 typename Function::GridParType>,
860 EmptyBoundaryIndicatorType>
861 operator*(const EmptyBoundaryIndicatorType& chi,
862 const Fem::Function<typename Function::FunctionSpaceType, Function>& f)
863 {
864 typedef
865 ZeroGridFunction<typename Function::FunctionSpaceType,
866 typename Function::GridParType>
867 ZeroFunction;
868 typedef
870 BoundaryFunction;
871
872 return BoundaryFunction(ZeroFunction(f.gridPart), EmptyBoundaryIndicatorType());
873 }
874
876 template<class Function, class Indicator>
877 static inline
878 BoundarySupportedFunction<ZeroGridFunction<typename Function::FunctionSpaceType,
879 typename Function::GridParType>,
880 EmptyBoundaryIndicatorType>
881 operator*(const EmptyBoundaryIndicatorType& chi,
883 {
884 typedef
885 ZeroGridFunction<typename Function::FunctionSpaceType,
886 typename Function::GridParType>
887 ZeroFunction;
888 typedef
890 BoundaryFunction;
891
892 return BoundaryFunction(ZeroFunction(f.gridPart), EmptyBoundaryIndicatorType());
893 }
894
896 template<class Function, class Indicator>
897 static inline
898 BoundarySupportedFunction<Function, Indicator>
899 operator*(const EntireBoundaryIndicatorType& chi,
901 {
902 return f;
903 }
904
906
908
910
911 } // ACFem::
912
913 namespace Fem {
914 using ACFem::operator+;
915 using ACFem::operator-;
916 using ACFem::operator*;
917 using ACFem::operator/;
918 }
919
920} // Dune::
921
922#endif // __DUNE_ACFEM_GRIDFUNCTIONWRAPPEREXPRESSION_HH__
A simple interface class for a boundary-indicator.
Definition: boundaryindicator.hh:41
A function with potentially partial support on the boundary.
Definition: boundarysupportedfunction.hh:234
Parameters are quasi-constant quantities, like the time-step size in one time-step when solving trans...
Definition: parameterinterface.hh:80
A base class for zero function expression.
Definition: gridfunctionexpressionbase.hh:110
A grid-function always returning 0.
Definition: constantfunction.hh:352
static auto operator/(const Fem::Function< typename Left::FunctionSpaceType, Left > &f_, const BoundarySupportedFunction< Right, RightInd > &g_) -> decltype(asBndryFct(asEssBndryFct(f_/asExprArg(g_))))
f / Wrapped(g) = Wrapped(f / g)
Definition: boundaryfunctionexpression.hh:657
const Implementation & asImp(const Fem::BartonNackmanInterface< Interface, Implementation > &arg)
Up-cast to the implementation for any Fem::BartonNackmanInterface.
Definition: expressionoperations.hh:71
static ZeroGridFunction< typename FunctionMultiplicationResultTraits< typename F1::FunctionSpaceType, typename F2::FunctionSpaceType >::FunctionSpaceType, typename F1::GridPartType > zeroProduct(const F1 &f1, const F2 &f2)
Generate the proper zero-functions for products evaluating to zero.
Definition: gridfunctionexpression.hh:116
static UnaryGridFunctionExpression< LogOperation, Function > log(const Fem::Function< typename Function::FunctionSpaceType, Function > &f_)
Component-wise logarithm, log(f)(x) = [log(f(x)_0),...,log(f(x)_N].
Definition: gridfunctionexpression.hh:2844
static const Fem::Function< typename GridFunction::FunctionSpaceType, GridFunction > & asExprFunction(const GridFunction &arg)
Cast to the proper underlying expression class; for the generic case this is just the underlying Fem:...
Definition: gridfunctionexpression.hh:61
auto zeroFunction(const Fem::Function< typename F::FunctionSpaceType, F > &f_) -> ZeroGridFunction< typename F::FunctionSpaceType, typename F::GridPartType >
Generate a ZeroGridFunction on the same function space.
Definition: gridfunctionexpression.hh:183
FractionGridFunction< typename FunctionSpace::FunctionSpaceType::ScalarFunctionSpaceType, GridPart, 1L, 1UL > oneFunction(const FunctionSpace &space, const GridPart &gridPart)
Generate a proper constant-one function from the given Fem::FunctionSpace and Fem::GridPart.
Definition: gridfunctionexpression.hh:157
BoundarySupportedFunction< GridFunction, Indicator > boundarySupportedFunction(const Fem::Function< typename GridFunction::FunctionSpaceType, GridFunction > &f, const BoundaryIndicatorInterface< Indicator > &c=EntireBoundaryIndicatorType())
Generate a function with partial support on the boundary.
Definition: boundarysupportedfunction.hh:604
std::decay< decltype(*std::declval< Indicator >()&&*std::declval< InnerIndicatorType >())>::type IndicatorType
Resulting Boundary indicator type.
Definition: boundarysupportedfunction.hh:253
BinaryParameterExpression< MultiplyOperation, Left, Right > operator*(const ParameterInterface< Left > &left, const ParameterInterface< Right > &right)
Scalar product between parameters.
Definition: parameterexpression.hh:321
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Mar 12, 23:28, 2025)