Loading [MathJax]/extensions/TeX/AMSsymbols.js

DUNE-ACFEM (unstable)

meshpenalty.hh
1#ifndef __DUNE_ACFEM_FUNCTIONS_MODULES_MESHPENALTY_HH__
2#define __DUNE_ACFEM_FUNCTIONS_MODULES_MESHPENALTY_HH__
3
4#include "../expressions.hh"
5#include "elementmeasure.hh"
6
7namespace Dune {
8
9 namespace ACFem {
10
11 namespace GridFunction {
12
20 template<class GridPart>
21 auto meshPenalty(const GridPart& gridPart)
22 {
23 auto exponent = -intFraction<1, GridPart::dimension>();
24 return pow(elementMeasure(gridPart), exponent);
25 }
26
28
29 } // NS GridFunction
30
32
33 } // NS ACFem
34
35} // NS Dune
36
37#endif // __DUNE_ACFEM_FUNCTIONS_MODULES_MESHPENALTY_HH__
auto meshPenalty(const GridPart &gridPart)
Create a penalty function diverging with the inverse element diameter towards infinity.
Definition: meshpenalty.hh:21
auto pow(T1 &&t1, T2 &&t2)
Power operations with scalar exponents are promoted to component-wise power operations by multiplying...
Definition: expressions.hh:525
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Mar 12, 23:28, 2025)