DEPRECATED, Matrix class that represents a more general Helmholtz-type operator.
More...
|
| Helmholtz2 () |
| empty object ( no memory allocation) More...
|
|
| Helmholtz2 (const Geometry &g, value_type alpha=1., direction dir=dg::forward, value_type jfactor=1.) |
| Construct Helmholtz2 operator. More...
|
|
| Helmholtz2 (const Geometry &g, bc bcx, bc bcy, value_type alpha=1., direction dir=dg::forward, value_type jfactor=1.) |
| Construct Helmholtz2 operator. More...
|
|
void | construct (const Geometry &g, bc bcx, bc bcy, value_type alpha=1, direction dir=dg::forward, value_type jfactor=1.) |
| Construct Helmholtz2 operator. More...
|
|
void | construct (const Geometry &g, value_type alpha=1, direction dir=dg::forward, value_type jfactor=1.) |
| Construct Helmholtz2 operator. More...
|
|
void | symv (const Container &x, Container &y) |
| apply operator More...
|
|
const Container & | weights () const |
| Return the weights making the operator self-adjoint. More...
|
|
const Container & | precond () const |
| Preconditioner to use in conjugate gradient solvers. More...
|
|
value_type & | alpha () |
| Change alpha. More...
|
|
value_type | alpha () const |
| Access alpha. More...
|
|
void | set_chi (const Container &chi) |
| Set Chi in the above formula. More...
|
|
const Container & | chi () const |
| Access chi. More...
|
|
template<class Geometry, class Matrix, class Container>
struct dg::Helmholtz2< Geometry, Matrix, Container >
DEPRECATED, Matrix class that represents a more general Helmholtz-type operator.
Discretization of
\[ \left[ \chi +2 \alpha\Delta + \alpha^2\Delta \left(\chi^{-1}\Delta \right)\right] \]
where \( \chi\) is a function and \(\alpha\) a scalar.
- Template Parameters
-
Geometry | A type that is or derives from one of the abstract geometry base classes ( aGeometry2d , aGeometry3d , aMPIGeometry2d , ...). Geometry determines which Matrix and Container types can be used: |
Matrix | A class for which the dg::blas2::symv functions are callable in connection with the Container class and to which the return type of dg::create::dx() can be converted using dg::blas2::transfer . The Matrix type can be one of:
|
Container | A data container class for which the blas1 functionality is overloaded and to which the return type of blas1::subroutine() can be converted using dg::assign . We assume that Container is copyable/assignable and has a swap member function. In connection with Geometry this is one of
|
- Note
- The Laplacian in this formula is positive as opposed to the negative sign in the
Elliptic
operator
- Attention
- It is MUCH better to solve the normal
Helmholtz
operator twice, consecutively, than solving the Helmholtz2
operator once. The following code snippet shows how to do it: std::cout << "Alternative test with two Helmholtz operators\n";
t.tic();
unsigned number1 = pcgO.solve( gamma1inv, phi, rholap, 1., w2d, eps/100);
unsigned number2 = pcgOO.solve( gamma1inv, x, phi, 1., w2d, eps/100);
t.toc();
Preconditioned conjugate gradient method to solve .
Definition: pcg.h:57
void axpby(get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, ContainerType &y)
Definition: blas1.h:231
void pointwiseDot(get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, get_value_type< ContainerType > beta, ContainerType &y)
Definition: blas1.h:336
@ centered
centered derivative (cell to the left and right and current cell)
Definition: enums.h:100
A general Helmholtz-type operator .
Definition: helmholtz.h:34
void set_chi(const ContainerType0 &chi)
Set Chi in the above formula.
Definition: helmholtz.h:109
const Container & chi() const
Access chi.
Definition: helmholtz.h:258
value_type & alpha()
Change alpha.
Definition: helmholtz.h:241