Extension: Matrix functions
#include "dg/matrix/matrix.h"
|
EXPERIMENTAL polarization solver class for N. More...
Public Types | |
using | geometry_type = Geometry |
using | matrix_type = Matrix |
using | container_type = Container |
using | value_type = get_value_type<Container> |
Public Member Functions | |
PolChargeN () | |
empty object ( no memory allocation) | |
PolChargeN (const Geometry &g, direction dir=forward, value_type jfactor=1.) | |
Construct from Grid. | |
PolChargeN (const Geometry &g, bc bcx, bc bcy, direction dir=forward, value_type jfactor=1.) | |
Construct from grid and boundary conditions. | |
template<class ... Params> | |
void | construct (Params &&...ps) |
Perfect forward parameters to one of the constructors. | |
template<class ContainerType0 > | |
void | set_phi (const ContainerType0 &phi) |
template<class ContainerType0 > | |
void | set_dxphi (const ContainerType0 &dxphi) |
template<class ContainerType0 > | |
void | set_dyphi (const ContainerType0 &dyphi) |
template<class ContainerType0 > | |
void | set_lapphi (const ContainerType0 &lapphi) |
const Container & | weights () const |
Return the vector making the matrix symmetric. | |
const Container & | precond () const |
Return the default preconditioner to use in conjugate gradient. | |
template<class ContainerType0 , class ContainerType1 > | |
void | operator() (const ContainerType0 &x, ContainerType1 &y) |
Compute elliptic term and store in output. | |
template<class ContainerType0 , class ContainerType1 > | |
void | symv (const ContainerType0 &x, ContainerType1 &y) |
Compute elliptic term and store in output. | |
EXPERIMENTAL polarization solver class for N.
Try to solve N
\( -\nabla \cdot ( N \nabla \phi) = \rho\) for given phi
and rho
using dg::mat::PolChargeN< Geometry, Matrix, Container >::container_type = Container |
using dg::mat::PolChargeN< Geometry, Matrix, Container >::geometry_type = Geometry |
using dg::mat::PolChargeN< Geometry, Matrix, Container >::matrix_type = Matrix |
using dg::mat::PolChargeN< Geometry, Matrix, Container >::value_type = get_value_type<Container> |
|
inline |
empty object ( no memory allocation)
|
inline |
Construct from Grid.
g | The Grid, boundary conditions are taken from here |
dir | Direction of the right first derivative in x and y (i.e. dg::forward , dg::backward or dg::centered ), |
jfactor | ( \( = \alpha \) ) scale jump terms (1 is a good value but in some cases 0.1 or 0.01 might be better) |
|
inline |
Construct from grid and boundary conditions.
g | The Grid |
bcx | boundary condition in x |
bcy | boundary contition in y |
dir | Direction of the right first derivative in x and y (i.e. dg::forward , dg::backward or dg::centered ), |
jfactor | ( \( = \alpha \) ) scale jump terms (1 is a good value but in some cases 0.1 or 0.01 might be better) |
|
inline |
Perfect forward parameters to one of the constructors.
Params | deduced by the compiler |
ps | parameters forwarded to constructors |
|
inline |
Compute elliptic term and store in output.
i.e. \( y=f(x) = - \nabla \cdot (x \nabla_\perp \phi) \) or \( y=f(x) = x + (1+ \alpha \Delta_\perp )\nabla \cdot (x \nabla_\perp \phi) \)
x | left-hand-side |
y | result |
ContainerTypes | must be usable with Container in The dg dispatch system |
|
inline |
Return the default preconditioner to use in conjugate gradient.
Currently returns the inverse weights without volume elment divided by the scalar part of \( \chi\). This is especially good when \( \chi\) exhibits large amplitudes or variations
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Compute elliptic term and store in output.
i.e. \( y=M(phi) x \)
x | left-hand-side |
y | result |
ContainerTypes | must be usable with Container in The dg dispatch system |
|
inline |
Return the vector making the matrix symmetric.
i.e. the volume form