Rheolef  7.1
an efficient C++ finite element environment
projection.h
Go to the documentation of this file.
1 #include "phi.h"
26 // p(x) = phi(|x|-a)*sgn(x)
27 struct projection {
28  Float operator() (const Float& x) const {
29  if (fabs(x) <= a) return 0;
30  return (x > 0) ? _phi(x-a) : -_phi(-x-a);
31  }
32  projection (Float a1, Float n=1, Float c=1, Float r=0)
33  : a(a1), _phi(n,c,r) {}
36 };
see the Float page for the full documentation
The Mossolov problem – the phi function.
Definition: phi.h:25
projection(Float a1, Float n=1, Float c=1, Float r=0)
Definition: projection.h:32
Float a
Definition: projection.h:34
Float operator()(const Float &x) const
Definition: projection.h:28