File hypre3d_laplace.hxx#
-
class LaplaceHypre3d : public Laplacian#
Public Functions
-
LaplaceHypre3d(Options *opt = nullptr, const CELL_LOC loc = CELL_CENTRE, Mesh *mesh_in = nullptr, Solver *solver = nullptr)#
-
~LaplaceHypre3d() override#
-
inline virtual void setCoefA(const Field2D &val) override#
Set coefficients for inversion. Re-builds matrices if necessary.
-
bout::HypreMatrix<Field3D> &getMatrix3D()#
-
inline IndexerPtr<Field3D> getIndexer()#
-
virtual Field3D solve(const Field3D &b_in, const Field3D &x0) override#
Performs the laplacian inversion y-slice by y-slice
- Parameters:
b – [in] All the y-slices of b_slice, which is the right hand side of the equation A*x_slice = b_slice
x0 – [in] All the y-slices of the variable eventually used to set BC
- Returns:
x All the y-slices of x_slice in the equation A*x_slice = b_slice
-
void updateMatrix3D()#
-
void outputVars(Options &output_options, const std::string &time_dimension) const override#
Save performance metrics This is called by LaplacianMonitor, that is enabled if Laplacian::savePerformance(Solver&, string&) is called.
Example
Saves the following variables to the output:// Create a Laplacian solver using "phiSolver" options phiSolver = Laplacian::create(&Options::root()["phiSolver"]); // Enable output diagnostics with "phiSolver" prefix phiSolver->savePerformance(solver, "phiSolver");
phiSolver_mean_its Mean number of solver iterations taken
phiSolver_mean_amg_its Mean number of BoomerAMG preconditioner iterations
phiSolver_rel_res_norm The final solver relative residual norm
Public Members
-
bool issetD = false#
-
bool issetC = false#
-
bool issetE = false#
-
bool updateRequired = true#
-
int lower_boundary_flags#
-
int upper_boundary_flags#
-
RangeIterator lowerY#
-
RangeIterator upperY#
-
IndexerPtr<Field3D> indexer#
-
bout::HypreMatrix<Field3D> operator3D#
-
bout::HypreVector<Field3D> solution#
-
bout::HypreVector<Field3D> rhs#
-
bout::HypreSystem<Field3D> linearSystem#
-
int n_solves = 0#
-
int cumulative_iterations = 0#
-
int cumulative_amg_iterations = 0#
-
bool print_matrix#
Print matrix coefficients.
Public Static Functions
-
static OperatorStencil<Ind3D> getStencil(Mesh *localmesh, const RangeIterator &lowerYBound, const RangeIterator &upperYBound)#
Public Static Attributes
-
static constexpr int implemented_flags = INVERT_START_NEW#
-
static constexpr int implemented_boundary_flags = INVERT_AC_GRAD + INVERT_SET + INVERT_RHS#
-
LaplaceHypre3d(Options *opt = nullptr, const CELL_LOC loc = CELL_CENTRE, Mesh *mesh_in = nullptr, Solver *solver = nullptr)#