8 #ifndef SRC_APPS_CHEM_MASKS_AND_BOXES_H_
9 #define SRC_APPS_CHEM_MASKS_AND_BOXES_H_
27 static double compute_factor(
const double& r,
const double& tightness,
const double& rmax) {
32 const double beta=1.0;
35 const double C=2.0*
c/tightness;
37 const double f=rmax * (
A +
B*r/rmax +
C*log(1.0+exp(-tightness*(r/rmax-
beta))));
38 const double factor=(r>1.e-10) ?
f/r : 1.0;
45 static double compute_tightness(
const double deviation_at_dot_8_radius,
const double rmax) {
46 const double a=-1.0577335859862533;
47 const double b=-1.0/0.09618399253086536;
48 return (log10(deviation_at_dot_8_radius/rmax)-
a)*
b;
56 template<std::
size_t NDIM>
67 const coordT o={0.0,0.0,0.0},
const coordT B_dir={0.0,0.0,1.0}) :
73 const double inner=tmp[0]+tmp[1]+tmp[2];
75 double r=proj.
normf();
82 return 5.0/3.0*log((1.0-deviation_at_dot_8_radius)/deviation_at_dot_8_radius);
Definition: test_ar.cc:118
Definition: test_ar.cc:141
Definition: test_ar.cc:170
T normf() const
Calculate the 2-norm of the vector elements.
Definition: vector.h:400
const double beta
Definition: gygi_soltion.cc:62
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
NDIM & f
Definition: mra.h:2416
double inner(response_space &a, response_space &b)
Definition: response_functions.h:442
static const double b
Definition: nonlinschro.cc:119
static const double a
Definition: nonlinschro.cc:118
static const double c
Definition: relops.cc:10
Definition: masks_and_boxes.h:19
static double compute_tightness(const double deviation_at_dot_8_radius, const double rmax)
compute the tightness parameter given the deviation at 0.8 radius
Definition: masks_and_boxes.h:45
static double compute_factor(const double &r, const double &tightness, const double &rmax)
return a smooth transition of linear r to a constant at radius r
Definition: masks_and_boxes.h:27
an 2-dimensional smooth mask that is 1 inside the radius and 0 outside
Definition: masks_and_boxes.h:57
static double compute_tightness(const double deviation_at_dot_8_radius)
compute the tightness parameter given the deviation at 0.8 radius
Definition: masks_and_boxes.h:81
const coordT B_direction
Definition: masks_and_boxes.h:64
double operator()(const coordT &xyz) const
Definition: masks_and_boxes.h:70
spherical_box(const double r, const double deviation, const coordT o={0.0, 0.0, 0.0}, const coordT B_dir={0.0, 0.0, 1.0})
Definition: masks_and_boxes.h:66
const double tightness
Definition: masks_and_boxes.h:62
const double radius
Definition: masks_and_boxes.h:61
Vector< double, NDIM > coordT
Definition: masks_and_boxes.h:59
const coordT offset
Definition: masks_and_boxes.h:63
Implement the madness:Vector class, an extension of std::array that supports some mathematical operat...