Rheolef  7.1
an efficient C++ finite element environment
d_projection_dx.h
Go to the documentation of this file.
1 #include "projection.h"
27  Float operator() (const Float& x) const {
28  if (fabs(x) <= a) return 0;
29  if (n == 1) return 1/(c + r);
30  if (r == 0) return pow(fabs(x)-a,-1+1/n)/(n*pow(c,1/n));
31  return 1/(r + n*c*pow(_phi(fabs(x)-a),-1+n));
32  }
33  d_projection_dx (Float a1, Float n1=1, Float c1=1, Float r1=0)
34  : a(a1), n(n1), c(c1), r(r1), _phi(n1,c1,r1) {}
35  Float a,n,c,r;
37 };
d_projection_dx::c
Float c
Definition: d_projection_dx.h:35
d_projection_dx::d_projection_dx
d_projection_dx(Float a1, Float n1=1, Float c1=1, Float r1=0)
Definition: d_projection_dx.h:33
phi
Definition: phi.h:25
rheolef::pow
space_mult_list< T, M > pow(const space_basic< T, M > &X, size_t n)
Definition: space_mult.h:120
d_projection_dx::_phi
phi _phi
Definition: d_projection_dx.h:36
projection.h
The projection for yield-stress rheologies e.g. the yield slip problem.
d_projection_dx::r
Float r
Definition: d_projection_dx.h:35
d_projection_dx::a
Float a
Definition: d_projection_dx.h:35
a
Definition: diffusion_isotropic.h:25
Float
see the Float page for the full documentation
d_projection_dx
Definition: d_projection_dx.h:26
d_projection_dx::operator()
Float operator()(const Float &x) const
Definition: d_projection_dx.h:27
d_projection_dx::n
Float n
Definition: d_projection_dx.h:35