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.

GMRES/Poisson demonstrates how to solve the Poisson equation using GMRES with Jacobi preconditioning.

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(ϕ)i=αij2ϕj, where ϕ is the multi-component solution variable and αij is a matrix of coefficients. The operator (MCNodalLinOp) is implemented using the “reflux-free” method.

NodeTensorLap solves the equation (σϕ)=RHS, where ϕ and RHS are nodal MultiFabs and σ is a tensor constant. It is assumed that the tensor is symmetric with rank equal to AMREX_SPACEDIM.