Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
Poisson Struct Reference

#include <poisson.h>

Collaboration diagram for Poisson:
[legend]

Data Fields

scalar a
 
scalar b
 
const vector alpha
 
const scalar lambda
 
double tolerance
 
int nrelax
 
int minlevel
 
scalarres
 

Detailed Description

Application to the Poisson–Helmholtz equation

We now apply the generic multigrid solver to the Poisson–Helmholtz equation

\[ \nabla\cdot (\alpha\nabla a) + \lambda a = b \]

We first setup the data structure required to pass the extra parameters \(\alpha\) and \(\lambda\). We define \(\alpha\) as a face vector field because we need values at the face locations corresponding to the face gradients of field \(a\).

alpha* and lambda are declared as *(const)* to indicate that the function works also when alpha and lambda are constant vector (resp. scalar) fields. If tolerance is set, it supersedes the default TOLERANCE of the multigrid solver, nrelax controls the initial number of relaxations (default is one), minlevel controls the minimum level of the hierarchy (default is one) and res is an optional list of fields used to store the final residual (which can be useful to monitor convergence).

Definition at line 256 of file poisson.h.

Field Documentation

◆ a

scalar Poisson::a

Definition at line 257 of file poisson.h.

◆ alpha

const vector Poisson::alpha

Definition at line 258 of file poisson.h.

◆ b

scalar Poisson::b

Definition at line 257 of file poisson.h.

◆ lambda

const scalar Poisson::lambda

Definition at line 259 of file poisson.h.

◆ minlevel

int Poisson::minlevel

Definition at line 261 of file poisson.h.

◆ nrelax

int Poisson::nrelax

Definition at line 261 of file poisson.h.

Referenced by project().

◆ res

scalar* Poisson::res

Definition at line 262 of file poisson.h.

Referenced by residual().

◆ tolerance

double Poisson::tolerance

Definition at line 260 of file poisson.h.

Referenced by project().


The documentation for this struct was generated from the following file: