#include <kernel.h>
Inheritance diagram for Kernel:
Public Member Functions | |
Kernel (const int d, const double h, const double alpha_d) | |
virtual | ~Kernel () |
double | get_h () const |
int | get_d () const |
double | operator() (const double r) const |
double | dW (const double r) const |
const Particle::vector_t | grad_r (const Particle::vector_t &r1, const Particle::vector_t &r2) const |
const Particle::vector_t | grad_r (const Particle::vector_t &r1, const Particle::vector_t &r2, const double &r12) const |
const Particle::vector_t & | grad_r (const Particle::vector_t &r1, const Particle::vector_t &r2, const double &r12, Particle::vector_t &g) const |
virtual double | w (const double x) const=0 |
virtual double | dw (const double x) const=0 |
Protected Attributes | |
int | d |
double | h |
double | c_d |
Base class for all kernels.
|
Constructs a kernel for a dimension d and smoothing length h. The parameter alpha_d is a scaling factor dependent on the dimension. |
|
Virtual destructor. |
|
Returns the derivative dw(x)/dx of the form function w. Implemented in Cusp_Kernel, Lucy_Kernel, and Poly5_Kernel. |
|
Returns dW(r)/dr. |
|
Returns the dimension of the kernel. |
|
Returns the smoothing length (radius) of the kernel. |
|
Writes grad r1 W(|r1-r2|) into vector g and returns a reference to it. Precondition: r12=|r1-r2|. |
|
Returns grad r1 W(|r1-r2|). Precondition: r12=|r1-r2|. |
|
Returns grad r1 W(|r1-r2|). |
|
Returns W(r) = alpha_d/h^d * w(r/h). |
|
Returns the form function w(x). The precondition int alpha_d w(|r|) dV = 1 must hold. Implemented in Cusp_Kernel, Lucy_Kernel, and Poly5_Kernel. |