34 const unsigned int select,
35 const bool integrate_to_one,
36 const double unitary_integral_value)
41 , integrate_to_one(integrate_to_one)
42 , unitary_integral_value(unitary_integral_value)
43 , rescaling(integrate_to_one ? 1. / (unitary_integral_value *
95 1. / (unitary_integral_value * Utilities::fixed_power<dim>(radius));
115 return integrate_to_one;
125 const unsigned int select,
126 const bool integrate_to_one)
142 for (
unsigned int i = 0; i < dim; ++i)
143 base[i]->set_center(
Point<1>(p[i]));
154 for (
unsigned int i = 0; i < dim; ++i)
155 base[i]->set_radius(r);
164 const unsigned int component)
const
168 for (
unsigned int i = 0; i < dim; ++i)
178 const unsigned int component)
const
182 for (
unsigned int i = 0; i < dim; ++i)
183 ret[i] = base[i]->gradient(
Point<1>(p[i]), component)[0];
194 const double integral_Linfty[] = {2.0,
195 3.14159265358979323846264338328,
196 4.18879020478639098461685784437};
200 const double integral_W1[] = {1.0,
201 1.04719755119659774615421446109,
202 1.04719755119659774615421446109};
206 const double integral_Cinfty[] = {1.20690032243787617533623799633,
207 1.26811216112759608094632335664,
208 1.1990039070192139033798473858};
212 const double integral_C1[] = {1.0,
213 0.93417655442731527615578663815,
214 0.821155557658032806157358815206};
223 const unsigned int select,
224 const bool integrate_to_one)
230 integral_Linfty[dim - 1])
237 const unsigned int component)
const
240 component == this->selected)
241 return ((this->
center.
distance(p) < this->radius) ? this->rescaling : 0.);
249 std::vector<double> & values,
250 const unsigned int component)
const
252 Assert(values.size() == points.size(),
258 component == this->selected)
259 for (
unsigned int k = 0; k < values.size(); ++k)
264 std::fill(values.begin(), values.end(), 0.);
274 Assert(values.size() == points.size(),
277 for (
unsigned int k = 0; k < values.size(); ++k)
279 const double val = (this->
center.
distance(points[k]) < this->radius) ?
287 values[k](this->selected) = val;
296 const unsigned int select,
297 const bool integrate_to_one)
303 integral_W1[dim - 1])
310 const unsigned int component)
const
313 component == this->selected)
316 return ((d < this->radius) ?
317 (this->radius -
d) / this->radius * this->rescaling :
327 std::vector<double> & values,
328 const unsigned int component)
const
330 Assert(values.size() == points.size(),
334 component == this->selected)
335 for (
unsigned int i = 0; i < values.size(); ++i)
338 values[i] = ((
d < this->radius) ?
339 (this->radius -
d) / this->radius * this->rescaling :
343 std::fill(values.begin(), values.end(), 0.);
354 Assert(values.size() == points.size(),
357 for (
unsigned int k = 0; k < values.size(); ++k)
362 (this->radius -
d) / this->radius * this->rescaling :
369 values[k](this->selected) = val;
380 const unsigned int select,
381 bool integrate_to_one)
387 integral_Cinfty[dim - 1])
394 const unsigned int component)
const
397 component == this->selected)
400 const double r = this->radius;
403 const double e = -r * r / (r * r -
d *
d);
404 return ((
e < -50) ? 0. :
numbers::E * std::exp(
e) * this->rescaling);
413 std::vector<double> & values,
414 const unsigned int component)
const
416 Assert(values.size() == points.size(),
419 const double r = this->radius;
422 component == this->selected)
423 for (
unsigned int i = 0; i < values.size(); ++i)
432 const double e = -r * r / (r * r -
d *
d);
434 (
e < -50) ? 0. :
numbers::E * std::exp(
e) * this->rescaling;
438 std::fill(values.begin(), values.end(), 0.);
448 Assert(values.size() == points.size(),
451 for (
unsigned int k = 0; k < values.size(); ++k)
454 const double r = this->radius;
456 if (d < this->radius)
458 const double e = -r * r / (r * r -
d *
d);
468 values[k](this->selected) = val;
478 const unsigned int)
const
481 const double r = this->radius;
484 const double e = -
d *
d / (r -
d) / (r +
d);
487 (-2.0 * r * r / std::pow(-r * r +
d *
d, 2.0) *
d *
498 const unsigned int select,
499 bool integrate_to_one)
505 integral_C1[dim - 1])
512 const unsigned int component)
const
515 component == this->selected)
518 const double r = this->radius;
521 return .5 * (std::cos(
numbers::PI *
d / r) + 1) * this->rescaling;
530 std::vector<double> & values,
531 const unsigned int component)
const
533 Assert(values.size() == points.size(),
536 const double r = this->radius;
539 component == this->selected)
540 for (
unsigned int i = 0; i < values.size(); ++i)
550 .5 * (std::cos(
numbers::PI *
d / r) + 1) * this->rescaling;
554 std::fill(values.begin(), values.end(), 0.);
564 Assert(values.size() == points.size(),
567 for (
unsigned int k = 0; k < values.size(); ++k)
570 const double r = this->radius;
572 if (d < this->radius)
574 val = .5 * (std::cos(
numbers::PI *
d / r) + 1) * this->rescaling;
582 values[k](this->selected) = val;
594 const double r = this->radius;
598 (p - this->
center) / d * this->rescaling;