nlfem
Functions
model.cpp File Reference

Go to the source code of this file.

Functions

void kernel_constant (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_theta (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_sparsetheta (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_convdiff (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_constantLinf2D (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_convdiffLinf2D (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_constantTruncated (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_constant1D (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_convdiff1D (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_constant3D (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_linearPrototypeMicroelastic (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernel_fractional (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernelField_linearPrototypeMicroelastic (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void kernelField_linearPrototypeMicroelastic3D (const double *x, const ElementType &aT, const double *y, const ElementType &bT, const MeshType &mesh, double *kernel_val)
 
void fField_linear (const double *x, const MeshType &mesh, double *forcing_out)
 
void f_linear (const double *x, const MeshType &mesh, double *forcing_out)
 

Detailed Description

Contains kernel and forcing functions which are used in the assembly. Different additional kernels can be added here.

All kernel functions share the same function signature.

Parameters
xPhysical point of the outer integration region.
bTouter triangle.
yPhysical point of the inner integration region.
aTinner triangle.
meshMesh
kernel_valValue of the the kernel. Pointer to double in case of diffusion. Pointer to a array of shape d x d in case of peridynamics.

Similarly, all forcing terms share a singature.

Parameters
xPhysical point of the integration region.
forcing_outPointer to a storage for the output value.
Author
Manuel Klar

Definition in file model.cpp.

Function Documentation

◆ f_linear()

void f_linear ( const double *  x,
const MeshType mesh,
double *  forcing_out 
)

Linear scalar valued forcing function $f = -2 (x_1 + 1)$. Used for computation of rates.

Parameters
x
forcing_out

Definition at line 217 of file model.cpp.

◆ fField_linear()

void fField_linear ( const double *  x,
const MeshType mesh,
double *  forcing_out 
)

Linear vector valued forcing function $f = (1 + 2 x_1, x_2 ) \frac{\pi}{2} $. This function is used for checking rates. The corresponding solution reads as

\[ u(x) = (x_2^2, x_1^2 x_2) \frac{2}{5}. \]

Parameters
x
forcing_out

Definition at line 181 of file model.cpp.

◆ kernel_constant()

void kernel_constant ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Constant kernel in 2D case with Euclidean truncation. The constant is chosen such that the operator is equivalent to the Laplacian for polynomials of degree less or equal to 2.

Definition at line 17 of file model.cpp.

◆ kernel_constant1D()

void kernel_constant1D ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Constant kernel in 1D. The constant is chosen such that the operator is equivalent to the laplacian for polynomials of degree less or equal to 2.

Definition at line 75 of file model.cpp.

◆ kernel_constant3D()

void kernel_constant3D ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Constant kernel in 3D truncated by the Euclidean ball. The constant is chosen such that the operator is equivalent to the laplacian for polynomials of degree less or equal to 2.

Definition at line 88 of file model.cpp.

◆ kernel_constantLinf2D()

void kernel_constantLinf2D ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Constant kernel in 2D case with truncation. The constant is chosen such that the operator is equivalent to the laplacian for polynomials of degree less or equal to 2.

Definition at line 49 of file model.cpp.

◆ kernel_constantTruncated()

void kernel_constantTruncated ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Constant kernel in 2D case which truncates itself. This means that the kernel returns 0, if $ |x-y| > \delta $. It is used to simulate a specific ball approximation. The constant is chosen such that the operator is equivalent to the laplacian for polynomials of degree less or equal to 2.

Definition at line 66 of file model.cpp.

◆ kernel_convdiff()

void kernel_convdiff ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

This kernel models a convection diffusion setting for the L-2 ball in 2d.

Definition at line 40 of file model.cpp.

◆ kernel_convdiff1D()

void kernel_convdiff1D ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

1D convection-diffusion kernel. $ \gamma(x,y) = c_\delta (1 + \frac{(x-y)}{2})$, where $c_\delta = \frac{3}{2\delta}$.

Definition at line 80 of file model.cpp.

◆ kernel_convdiffLinf2D()

void kernel_convdiffLinf2D ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

This kernel models a convection diffusion setting for the L-infinity ball.

Definition at line 54 of file model.cpp.

◆ kernel_fractional()

void kernel_fractional ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Kernel for truncated fractional-type operator. The scalar valued singular kernel reads as

\[ \gamma(x,y) = \frac{1}{\| x - y \|^{d+2s} }\frac{2-2s}{\pi \delta^{2-2s}}. \]

The constant is chosen such that the operator is equivalent to the Laplacian for polynomials of degree less or equal to 2. The degree of the singularity depends on the choice of s (0,1)

Definition at line 103 of file model.cpp.

◆ kernel_linearPrototypeMicroelastic()

void kernel_linearPrototypeMicroelastic ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Kernel for peridynamics diffusion model. The scalar valued, weakly singular kernel reads as

\[ \gamma(x,y) = \frac{1}{\| x - y \|} \frac{3}{\pi \delta ^3}. \]

The constant is chosen such that the operator is equivalent to the Laplacian for polynomials of degree less or equal to 2.

Definition at line 93 of file model.cpp.

◆ kernel_sparsetheta()

void kernel_sparsetheta ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

This constant kernel $\gamma(x,y) = c (1-\Theta(x,y))$ models a diffusion setting for the L-2 ball in 2d and can evaluate varying coefficients (1 - Theta(aT, bT)) (which are constant on an element T).

Definition at line 31 of file model.cpp.

◆ kernel_theta()

void kernel_theta ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

This constant kernel $\gamma(x,y) = c\Theta(x,y)$ models a diffusion setting for the L-2 ball in 2d and can evaluate varying coefficients Theta(aT, bT) (which are constant on an element T).

Definition at line 22 of file model.cpp.

◆ kernelField_linearPrototypeMicroelastic()

void kernelField_linearPrototypeMicroelastic ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Kernel for the linear peridynamics model in 2D. The matrix valued weakly singular kernel reads as

\[ \gamma(x,y) = (x-y) \otimes (x-y) \frac{1}{\| x - y \|^3} \frac{12}{\pi \delta ^3}. \]

The constant is chosen such that the operator is equivalent to linear elasticity for polynomials of degree less or equal to 2 and lame paramter $\mu = \lambda = \frac{\pi}{4}$.

Definition at line 117 of file model.cpp.

◆ kernelField_linearPrototypeMicroelastic3D()

void kernelField_linearPrototypeMicroelastic3D ( const double *  x,
const ElementType aT,
const double *  y,
const ElementType bT,
const MeshType mesh,
double *  kernel_val 
)

Kernel for the peridynamics model in 3D. The matrix valued weakly singular kernel reads as

\[ \gamma(x,y) = (x-y) \otimes (x-y) \frac{1}{\| x - y \|^3} \frac{3}{\delta ^3}. \]

Definition at line 132 of file model.cpp.