LinearSolvers
There are five examples in the ExampleCodes/LinearSolvers
directory.
ABecLaplacian_C
demonstrates how to solve with cell-centered data in a C++ framework.
This example shows how to use either hypre or PETSc as a bottom-solver (or to solve
the equation at the finest level if you set the “max coarsening level” to 0.
Step-by-step instructions for configuring AMReX to use HYPRE for this example are available here.
ABecLaplacian_F
demonstrates how to solve with cell-centered data using the Fortran interfaces.
NodalPoisson
demonstrates how to set up and solve a variable coefficient Poisson equation
with the rhs and solution data on nodes.
MultiComponent
demonstrates how to solve using a multi-component operator with nodal data.
The operator is of the form \(D(\mathbf{\phi})_i = \alpha_{ij}\nabla^2\phi_j\), where \(\mathbf{\phi}\) is the multi-component solution variable and \(\alpha_{ij}\) is a matrix of coefficients.
The operator (MCNodalLinOp
) is implemented using the “reflux-free” method.
NodeTensorLap
solves the equation \(\nabla \cdot ( \sigma \nabla \phi ) = \text{RHS}\), where
\(\phi\) and \(\text{RHS}\) are nodal MultiFabs and \(\sigma\) is a tensor constant. It is
assumed that the tensor is symmetric with rank equal to AMREX_SPACEDIM
.