OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
AmrMultiGrid Class Referenceabstract

#include <AmrMultiGrid.h>

Inheritance diagram for AmrMultiGrid:
Collaboration diagram for AmrMultiGrid:

Public Types

enum  Interpolater { TRILINEAR = 0 , LAGRANGE , PIECEWISE_CONST }
 Supported interpolaters for prolongation operation. More...
enum  BaseSolver {
  BICGSTAB , MINRES , PCPG , CG ,
  GMRES , STOCHASTIC_CG , RECYCLING_CG , RECYCLING_GMRES ,
  SA
}
 Supported bottom solvers. More...
enum  Boundary { DIRICHLET = 0 , OPEN , PERIODIC }
 Supported physical boundaries. More...
enum  Norm { L1 , L2 , LINF }
 Supported convergence criteria. More...
typedef amr::matrix_t matrix_t
typedef amr::vector_t vector_t
typedef amr::multivector_t mv_t
typedef amr::dmap_t dmap_t
typedef amr::comm_t comm_t
typedef amr::local_ordinal_t lo_t
typedef amr::global_ordinal_t go_t
typedef amr::scalar_t scalar_t
typedef AmrMultiGridLevel< matrix_t, vector_tAmrMultiGridLevel_t
typedef AmrMultiGridLevel_t::AmrField_t AmrField_t
typedef AmrMultiGridLevel_t::AmrGeometry_t AmrGeometry_t
typedef AmrMultiGridLevel_t::AmrField_u AmrField_u
typedef AmrMultiGridLevel_t::AmrField_s AmrField_s
typedef AmrMultiGridLevel_t::AmrIntVect_t AmrIntVect_t
typedef AmrMultiGridLevel_t::indices_t indices_t
typedef AmrMultiGridLevel_t::coefficients_t coefficients_t
typedef AmrMultiGridLevel_t::umap_t umap_t
typedef AmrMultiGridLevel_t::boundary_t boundary_t
typedef BottomSolver< Teuchos::RCP< matrix_t >, Teuchos::RCP< mv_t >, AmrMultiGridLevel_tbsolver_t
typedef BelosBottomSolver< AmrMultiGridLevel_tBelosSolver_t
typedef Amesos2BottomSolver< AmrMultiGridLevel_tAmesos2Solver_t
typedef MueLuBottomSolver< AmrMultiGridLevel_tMueLuSolver_t
typedef AmrPreconditioner< matrix_t, AmrMultiGridLevel_tpreconditioner_t
typedef Ifpack2Preconditioner< AmrMultiGridLevel_tIfpack2Preconditioner_t
typedef MueLuPreconditioner< AmrMultiGridLevel_tMueLuPreconditioner_t
typedef amrex::BoxArray boxarray_t
typedef amrex::Box box_t
typedef amrex::BaseFab< int > basefab_t
typedef amrex::FArrayBox farraybox_t
typedef AmrSmoother::Smoother Smoother
typedef amr::Preconditioner Preconditioner

Public Member Functions

 AmrMultiGrid (AmrBoxLib *itsAmrObject_p, const std::string &bsolver, const std::string &prec, const bool &rebalance, const std::string &reuse, const std::string &bcx, const std::string &bcy, const std::string &bcz, const std::string &smoother, const std::size_t &nSweeps, const std::string &interp, const std::string &norm)
void solve (AmrScalarFieldContainer_t &rho, AmrScalarFieldContainer_t &phi, AmrVectorFieldContainer_t &efield, unsigned short baseLevel, unsigned short finestLevel, bool prevAsGuess=true)
void setNumberOfSweeps (const std::size_t &nSweeps)
void setMaxNumberOfIterations (const std::size_t &maxiter)
std::size_t getNumIters ()
scalar_t getLevelResidualNorm (lo_t level)
void setVerbose (bool verbose)
void setTolerance (const scalar_t &eps)
double getXRangeMin (unsigned short level=0)
double getXRangeMax (unsigned short level=0)
double getYRangeMin (unsigned short level=0)
double getYRangeMax (unsigned short level=0)
double getZRangeMin (unsigned short level=0)
double getZRangeMax (unsigned short level=0)
Informprint (Inform &os) const
void computePotential (Field_t &, Vector_t)
virtual void computePotential (Field_t &rho, Vector_t hr, double zshift)=0
void test (PartBunchBase< double, 3 > *)
void hasToRegrid ()
virtual void resizeMesh (Vector_t &, Vector_t &, const Vector_t &, const Vector_t &, double)
virtual double getinteractionRadius () const
virtual void calculatePairForces (PartBunchBase< double, 3 > *, double)

Protected Types

typedef Field< int, 3, Mesh_t, Center_tIField_t
typedef Field< std::complex< double >, 3, Mesh_t, Center_tCxField_t

Protected Attributes

AmrBoxLibitsAmrObject_mp
bool regrid_m
 is set to true by itsAmrObject_mp and reset to false by solver

Private Member Functions

void initPhysicalBoundary_m (const Boundary *bc)
void initLevels_m (const amrex::Vector< AmrField_u > &rho, const amrex::Vector< AmrGeometry_t > &geom, bool regrid)
void clearMasks_m ()
void initGuess_m (bool reset)
scalar_t iterate_m ()
bool isConverged_m (std::vector< scalar_t > &rhsNorms, std::vector< scalar_t > &resNorms)
void residual_m (const lo_t &level, Teuchos::RCP< vector_t > &r, const Teuchos::RCP< vector_t > &b, const Teuchos::RCP< vector_t > &x)
void relax_m (const lo_t &level)
void residual_no_fine_m (const lo_t &level, Teuchos::RCP< vector_t > &result, const Teuchos::RCP< vector_t > &rhs, const Teuchos::RCP< vector_t > &crs_rhs, const Teuchos::RCP< vector_t > &b)
scalar_t evalNorm_m (const Teuchos::RCP< const vector_t > &x)
void initResidual_m (std::vector< scalar_t > &rhsNorms, std::vector< scalar_t > &resNorms)
void computeEfield_m (AmrVectorFieldContainer_t &efield)
void setup_m (const amrex::Vector< AmrField_u > &rho, const amrex::Vector< AmrField_u > &phi, const bool &matrices=true)
void buildSingleLevel_m (const amrex::Vector< AmrField_u > &rho, const amrex::Vector< AmrField_u > &phi, const bool &matrices=true)
void buildMultiLevel_m (const amrex::Vector< AmrField_u > &rho, const amrex::Vector< AmrField_u > &phi, const bool &matrices=true)
void open_m (const lo_t &level, const bool &matrices)
void close_m (const lo_t &level, const bool &matrices)
void buildNoFinePoissonMatrix_m (const lo_t &level, const go_t &gidx, const AmrIntVect_t &iv, const basefab_t &mfab, const scalar_t *invdx2)
void buildCompositePoissonMatrix_m (const lo_t &level, const go_t &gidx, const AmrIntVect_t &iv, const basefab_t &mfab, const basefab_t &rfab, const scalar_t *invdx2)
void buildRestrictionMatrix_m (const lo_t &level, const go_t &gidx, const AmrIntVect_t &iv, D_DECL(const go_t &ii, const go_t &jj, const go_t &kk), const basefab_t &rfab)
void buildInterpolationMatrix_m (const lo_t &level, const go_t &gidx, const AmrIntVect_t &iv, const basefab_t &cfab)
void buildCrseBoundaryMatrix_m (const lo_t &level, const go_t &gidx, const AmrIntVect_t &iv, const basefab_t &mfab, const basefab_t &cfab, const scalar_t *invdx2)
void buildFineBoundaryMatrix_m (const lo_t &level, const go_t &gidx, const AmrIntVect_t &iv, const basefab_t &mfab, const basefab_t &rfab)
void buildDensityVector_m (const lo_t &level, const AmrField_t &rho)
void buildPotentialVector_m (const lo_t &level, const AmrField_t &phi)
void buildGradientMatrix_m (const lo_t &level, const go_t &gidx, const AmrIntVect_t &iv, const basefab_t &mfab, const scalar_t *invdx)
void amrex2trilinos_m (const lo_t &level, const lo_t &comp, const AmrField_t &mf, Teuchos::RCP< vector_t > &mv)
void trilinos2amrex_m (const lo_t &level, const lo_t &comp, AmrField_t &mf, const Teuchos::RCP< vector_t > &mv)
void map2vector_m (umap_t &map, indices_t &indices, coefficients_t &values)
void smooth_m (const lo_t &level, Teuchos::RCP< vector_t > &e, Teuchos::RCP< vector_t > &r)
void restrict_m (const lo_t &level)
void prolongate_m (const lo_t &level)
void averageDown_m (const lo_t &level)
void initInterpolater_m (const Interpolater &interp)
void initCrseFineInterp_m (const Interpolater &interface)
void initBaseSolver_m (const BaseSolver &solver, const bool &rebalance, const std::string &reuse)
void initPrec_m (const Preconditioner &prec, const std::string &reuse)
Boundary convertToEnumBoundary_m (const std::string &bc)
Interpolater convertToEnumInterpolater_m (const std::string &interp)
BaseSolver convertToEnumBaseSolver_m (const std::string &bsolver)
Preconditioner convertToEnumPreconditioner_m (const std::string &prec)
Smoother convertToEnumSmoother_m (const std::string &smoother)
Norm convertToEnumNorm_m (const std::string &norm)
void writeSDDSHeader_m (std::ofstream &outfile)
void writeSDDSData_m (const scalar_t &error)

Private Attributes

Teuchos::RCP< comm_tcomm_mp
 communicator
std::unique_ptr< AmrInterpolater< AmrMultiGridLevel_t > > interp_mp
 interpolater without coarse-fine interface
std::unique_ptr< AmrInterpolater< AmrMultiGridLevel_t > > interface_mp
 interpolater for coarse-fine interface
std::size_t nIter_m
 number of iterations till convergence
std::size_t bIter_m
 number of iterations of bottom solver
std::size_t maxiter_m
 maximum number of iterations allowed
std::size_t nSweeps_m
 number of smoothing iterations
Smoother smootherType_m
 type of smoother
std::vector< std::unique_ptr< AmrMultiGridLevel_t > > mglevel_m
 container for levels
std::shared_ptr< bsolver_tsolver_mp
 bottom solver
std::vector< std::shared_ptr< AmrSmoother > > smoother_m
 error smoother
std::shared_ptr< preconditioner_tprec_mp
 preconditioner for bottom solver
int lbase_m
 base level (currently only 0 supported)
int lfine_m
 fineste level
int nlevel_m
 number of levelss
boundary_t bc_m [AMREX_SPACEDIM]
 boundary conditions
int nBcPoints_m
 maximum number of stencils points for BC
Norm norm_m
 norm for convergence criteria (l1, l2, linf)
std::string snorm_m
 norm for convergence criteria
scalar_t eps_m
 rhs scale for convergence
bool verbose_m
 If true, a SDDS file is written.
std::string fname_m
 SDDS filename.
std::ios_base::openmode flag_m
 std::ios::out or std::ios::app

Detailed Description

Definition at line 44 of file AmrMultiGrid.h.

Member Typedef Documentation

◆ Amesos2Solver_t

◆ AmrField_s

◆ AmrField_t

◆ AmrField_u

◆ AmrGeometry_t

◆ AmrIntVect_t

◆ AmrMultiGridLevel_t

◆ basefab_t

typedef amrex::BaseFab<int> AmrMultiGrid::basefab_t

Definition at line 85 of file AmrMultiGrid.h.

◆ BelosSolver_t

◆ boundary_t

◆ box_t

typedef amrex::Box AmrMultiGrid::box_t

Definition at line 84 of file AmrMultiGrid.h.

◆ boxarray_t

typedef amrex::BoxArray AmrMultiGrid::boxarray_t

Definition at line 83 of file AmrMultiGrid.h.

◆ bsolver_t

typedef BottomSolver< Teuchos::RCP<matrix_t>, Teuchos::RCP<mv_t>, AmrMultiGridLevel_t > AmrMultiGrid::bsolver_t

Definition at line 72 of file AmrMultiGrid.h.

◆ coefficients_t

◆ comm_t

Definition at line 51 of file AmrMultiGrid.h.

◆ CxField_t

typedef Field<std::complex<double>, 3, Mesh_t, Center_t> PoissonSolver::CxField_t
protectedinherited

Definition at line 20 of file PoissonSolver.h.

◆ dmap_t

Definition at line 50 of file AmrMultiGrid.h.

◆ farraybox_t

typedef amrex::FArrayBox AmrMultiGrid::farraybox_t

Definition at line 86 of file AmrMultiGrid.h.

◆ go_t

Definition at line 53 of file AmrMultiGrid.h.

◆ IField_t

typedef Field<int, 3, Mesh_t, Center_t> PoissonSolver::IField_t
protectedinherited

Definition at line 19 of file PoissonSolver.h.

◆ Ifpack2Preconditioner_t

◆ indices_t

◆ lo_t

Definition at line 52 of file AmrMultiGrid.h.

◆ matrix_t

Definition at line 47 of file AmrMultiGrid.h.

◆ MueLuPreconditioner_t

◆ MueLuSolver_t

◆ mv_t

Definition at line 49 of file AmrMultiGrid.h.

◆ Preconditioner

◆ preconditioner_t

◆ scalar_t

Definition at line 54 of file AmrMultiGrid.h.

◆ Smoother

Definition at line 88 of file AmrMultiGrid.h.

◆ umap_t

◆ vector_t

Definition at line 48 of file AmrMultiGrid.h.

Member Enumeration Documentation

◆ BaseSolver

Supported bottom solvers.

Enumerator
BICGSTAB 
MINRES 
PCPG 
CG 
GMRES 
STOCHASTIC_CG 
RECYCLING_CG 
RECYCLING_GMRES 
SA 

Definition at line 100 of file AmrMultiGrid.h.

◆ Boundary

Supported physical boundaries.

Enumerator
DIRICHLET 
OPEN 
PERIODIC 

Definition at line 135 of file AmrMultiGrid.h.

◆ Interpolater

Supported interpolaters for prolongation operation.

Enumerator
TRILINEAR 
LAGRANGE 
PIECEWISE_CONST 

Definition at line 93 of file AmrMultiGrid.h.

◆ Norm

Supported convergence criteria.

Enumerator
L1 
L2 
LINF 

Definition at line 142 of file AmrMultiGrid.h.

Constructor & Destructor Documentation

◆ AmrMultiGrid()

AmrMultiGrid::AmrMultiGrid ( AmrBoxLib * itsAmrObject_p,
const std::string & bsolver,
const std::string & prec,
const bool & rebalance,
const std::string & reuse,
const std::string & bcx,
const std::string & bcy,
const std::string & bcz,
const std::string & smoother,
const std::size_t & nSweeps,
const std::string & interp,
const std::string & norm )

Instantiation used in Structure/FieldSolver.cpp

Parameters
itsAmrObject_phas information about refinemen ratios, etc.
bsolverbottom solver
precpreconditioner for bottom solver
rebalanceof preconditioner (SA only)
bcxboundary condition in x
bcyboundary condition in y
bczboundary condition in z
smootherfor level solution
nSweepswhen smoothing
interpinterpolater between levels
normfor convergence criteria

Definition at line 43 of file AmrMultiGrid.cpp.

References AmrPoissonSolver< AmrBoxLib >::AmrPoissonSolver(), bIter_m, comm_mp, convertToEnumBaseSolver_m(), convertToEnumBoundary_m(), convertToEnumInterpolater_m(), convertToEnumNorm_m(), convertToEnumPreconditioner_m(), convertToEnumSmoother_m(), endl(), eps_m, flag_m, fname_m, INFOMSG, initBaseSolver_m(), initCrseFineInterp_m(), initInterpolater_m(), initPhysicalBoundary_m(), initPrec_m(), LAGRANGE, lbase_m, lfine_m, maxiter_m, mglevel_m, nBcPoints_m, nIter_m, nlevel_m, norm_m, nSweeps_m, smootherType_m, snorm_m, and verbose_m.

Here is the call graph for this function:

Member Function Documentation

◆ amrex2trilinos_m()

void AmrMultiGrid::amrex2trilinos_m ( const lo_t & level,
const lo_t & comp,
const AmrField_t & mf,
Teuchos::RCP< vector_t > & mv )
private

Data transfer from AMReX to Trilinos.

Parameters
mfis the multifab of a level
compcomponent to copy
mvis the vector to be filled
levelwhere to perform

Definition at line 1649 of file AmrMultiGrid.cpp.

References mglevel_m.

Referenced by buildDensityVector_m(), and buildPotentialVector_m().

◆ averageDown_m()

void AmrMultiGrid::averageDown_m ( const lo_t & level)
private

Average data from fine level to coarse

Parameters
levelfinest level is omitted

Definition at line 1837 of file AmrMultiGrid.cpp.

References lfine_m, mglevel_m, IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by solve().

Here is the call graph for this function:

◆ buildCompositePoissonMatrix_m()

void AmrMultiGrid::buildCompositePoissonMatrix_m ( const lo_t & level,
const go_t & gidx,
const AmrIntVect_t & iv,
const basefab_t & mfab,
const basefab_t & rfab,
const scalar_t * invdx2 )
private

Build the Poisson matrix for a level that got refined (it does not take the covered cells (covered by fine cells) into account). The finest level does not build such a matrix. It takes care of physical boundaries (i.e. mesh boundary). Internal boundaries (i.e. boundaries due to crse-fine interfaces) are treated by the boundary matrix.

Parameters
ivis the current cell
mfabis the mask (internal cell, boundary cell, ...) of that level
rfabis the mask between levels
levelfor which we build the special Poisson matrix

Definition at line 1104 of file AmrMultiGrid.cpp.

References AmrMultiGridLevel< matrix_t, vector_t >::BNDRY, AmrMultiGridLevel< matrix_t, vector_t >::COVERED, interface_mp, AmrMultiGridLevel< matrix_t, vector_t >::INTERIOR, lbase_m, map2vector_m(), mglevel_m, AmrMultiGridLevel< matrix_t, vector_t >::PHYSBNDRY, and AmrMultiGridLevel< matrix_t, vector_t >::YES.

Referenced by buildMultiLevel_m().

Here is the call graph for this function:

◆ buildCrseBoundaryMatrix_m()

void AmrMultiGrid::buildCrseBoundaryMatrix_m ( const lo_t & level,
const go_t & gidx,
const AmrIntVect_t & iv,
const basefab_t & mfab,
const basefab_t & cfab,
const scalar_t * invdx2 )
private

The boundary values at the crse-fine-interface need to be taken into account properly. This matrix is used to update the fine boundary values from the coarse values, i.e.

\[ x^{(l)} = B_{crse}\cdot x^{(l-1)} \]

Dirichlet boundary condition

Parameters
ivis the current cell
mfabis the mask (internal cell, boundary cell, ...) of that level
cellsall fine cells that are at the crse-fine interface
levelthe base level is omitted

Definition at line 1351 of file AmrMultiGrid.cpp.

References AmrMultiGridLevel< matrix_t, vector_t >::BNDRY, interface_mp, lbase_m, map2vector_m(), mglevel_m, and AmrMultiGridLevel< matrix_t, vector_t >::PHYSBNDRY.

Referenced by buildMultiLevel_m().

Here is the call graph for this function:

◆ buildDensityVector_m()

void AmrMultiGrid::buildDensityVector_m ( const lo_t & level,
const AmrField_t & rho )
inlineprivate

Copy data from AMReX to Trilinos

Parameters
rhois the charge density
levelfor which to copy

Definition at line 1557 of file AmrMultiGrid.cpp.

References amrex2trilinos_m(), and mglevel_m.

Referenced by buildMultiLevel_m(), and buildSingleLevel_m().

Here is the call graph for this function:

◆ buildFineBoundaryMatrix_m()

void AmrMultiGrid::buildFineBoundaryMatrix_m ( const lo_t & level,
const go_t & gidx,
const AmrIntVect_t & iv,
const basefab_t & mfab,
const basefab_t & rfab )
private

The boundary values at the crse-fine-interface need to be taken into account properly. This matrix is used to update the coarse boundary values from fine values, i.e.

\[ x^{(l)} = B_{fine}\cdot x^{(l+1)} \]

Dirichlet boundary condition. Flux matching.

Parameters
levelthe finest level is omitted
gidxthe global index
ivis the current cell
mfabis the mask (internal cell, boundary cell, ...) of that level
rfabis the mask between levels

Definition at line 1416 of file AmrMultiGrid.cpp.

References begin(), end(), interface_mp, lfine_m, map2vector_m(), mglevel_m, AmrMultiGridLevel< matrix_t, vector_t >::PHYSBNDRY, and AmrMultiGridLevel< matrix_t, vector_t >::YES.

Referenced by buildMultiLevel_m().

Here is the call graph for this function:

◆ buildGradientMatrix_m()

void AmrMultiGrid::buildGradientMatrix_m ( const lo_t & level,
const go_t & gidx,
const AmrIntVect_t & iv,
const basefab_t & mfab,
const scalar_t * invdx )
private

Gradient matrix is used to compute the electric field

Parameters
ivis the current cell
mfabis the mask (internal cell, boundary cell, ...) of that level
levelfor which to compute

Definition at line 1571 of file AmrMultiGrid.cpp.

References AmrMultiGridLevel< matrix_t, vector_t >::BNDRY, AmrMultiGridLevel< matrix_t, vector_t >::COVERED, AmrMultiGridLevel< matrix_t, vector_t >::INTERIOR, lbase_m, map2vector_m(), mglevel_m, and AmrMultiGridLevel< matrix_t, vector_t >::PHYSBNDRY.

Referenced by buildMultiLevel_m(), and buildSingleLevel_m().

Here is the call graph for this function:

◆ buildInterpolationMatrix_m()

void AmrMultiGrid::buildInterpolationMatrix_m ( const lo_t & level,
const go_t & gidx,
const AmrIntVect_t & iv,
const basefab_t & cfab )
private

Interpolate data from coarse cells to appropriate refined cells. The interpolation scheme is allowed only to have local cells in the stencil, i.e. 2D --> 4, 3D --> 8.

\[ x^{(l)} = I\cdot x^{(l-1)} \]

Parameters
ivis the current cell
levelfor which to build the interpolation matrix. The finest level does not build such a matrix.

Definition at line 1314 of file AmrMultiGrid.cpp.

References interp_mp, lbase_m, map2vector_m(), and mglevel_m.

Referenced by buildMultiLevel_m().

Here is the call graph for this function:

◆ buildMultiLevel_m()

void AmrMultiGrid::buildMultiLevel_m ( const amrex::Vector< AmrField_u > & rho,
const amrex::Vector< AmrField_u > & phi,
const bool & matrices = true )
private

Build all matrices and vectors needed for multi-level computation

Definition at line 779 of file AmrMultiGrid.cpp.

References buildCompositePoissonMatrix_m(), buildCrseBoundaryMatrix_m(), buildDensityVector_m(), buildFineBoundaryMatrix_m(), buildGradientMatrix_m(), buildInterpolationMatrix_m(), buildNoFinePoissonMatrix_m(), buildRestrictionMatrix_m(), close_m(), lbase_m, mglevel_m, nlevel_m, nSweeps_m, open_m(), smoother_m, smootherType_m, and solver_mp.

Referenced by setup_m().

Here is the call graph for this function:

◆ buildNoFinePoissonMatrix_m()

void AmrMultiGrid::buildNoFinePoissonMatrix_m ( const lo_t & level,
const go_t & gidx,
const AmrIntVect_t & iv,
const basefab_t & mfab,
const scalar_t * invdx2 )
private

Build the Poisson matrix for a level assuming no finer level (i.e. the whole fine mesh is taken into account). It takes care of physical boundaries (i.e. mesh boundary). Internal boundaries (i.e. boundaries due to crse-fine interfaces) are treated by the boundary matrix.

Parameters
ivis the current cell
mfabis the mask (internal cell, boundary cell, ...) of that level
levelfor which we build the Poisson matrix

Definition at line 1023 of file AmrMultiGrid.cpp.

References AmrMultiGridLevel< matrix_t, vector_t >::BNDRY, AmrMultiGridLevel< matrix_t, vector_t >::COVERED, interface_mp, AmrMultiGridLevel< matrix_t, vector_t >::INTERIOR, lbase_m, map2vector_m(), mglevel_m, and AmrMultiGridLevel< matrix_t, vector_t >::PHYSBNDRY.

Referenced by buildMultiLevel_m(), and buildSingleLevel_m().

Here is the call graph for this function:

◆ buildPotentialVector_m()

void AmrMultiGrid::buildPotentialVector_m ( const lo_t & level,
const AmrField_t & phi )
inlineprivate

Copy data from AMReX to Trilinos

Parameters
phiis the potential
levelfor which to copy

Definition at line 1564 of file AmrMultiGrid.cpp.

References amrex2trilinos_m(), and mglevel_m.

Here is the call graph for this function:

◆ buildRestrictionMatrix_m()

void AmrMultiGrid::buildRestrictionMatrix_m ( const lo_t & level,
const go_t & gidx,
const AmrIntVect_t & iv,
D_DECL(const go_t &ii, const go_t &jj, const go_t &kk) ,
const basefab_t & rfab )
private

Build a matrix that averages down the data of the fine cells down to the corresponding coarse cells. The base level does not build such a matrix.

\[ x^{(l)} = R\cdot x^{(l+1)} \]

Parameters
ivis the current cell
rfabis the mask between levels
levelfor which to build restriction matrix

Definition at line 1262 of file AmrMultiGrid.cpp.

References lfine_m, mglevel_m, AmrMultiGridLevel< matrix_t, vector_t >::NO, and serialize().

Referenced by buildMultiLevel_m().

Here is the call graph for this function:

◆ buildSingleLevel_m()

void AmrMultiGrid::buildSingleLevel_m ( const amrex::Vector< AmrField_u > & rho,
const amrex::Vector< AmrField_u > & phi,
const bool & matrices = true )
private

Build all matrices and vectors needed for single-level computation

Definition at line 718 of file AmrMultiGrid.cpp.

References buildDensityVector_m(), buildGradientMatrix_m(), buildNoFinePoissonMatrix_m(), close_m(), lbase_m, mglevel_m, open_m(), and solver_mp.

Referenced by setup_m().

Here is the call graph for this function:

◆ calculatePairForces()

virtual void PoissonSolver::calculatePairForces ( PartBunchBase< double, 3 > * ,
double  )
inlinevirtualinherited

Reimplemented in P3MPoissonSolver.

Definition at line 74 of file PoissonSolver.h.

◆ clearMasks_m()

void AmrMultiGrid::clearMasks_m ( )
private

Clear masks (required to build matrices) no longer needed.

Definition at line 318 of file AmrMultiGrid.cpp.

References mglevel_m, and nlevel_m.

Referenced by setup_m().

◆ close_m()

void AmrMultiGrid::close_m ( const lo_t & level,
const bool & matrices )
private

Call fill complete

Parameters
levelfor which we filled matrix
matricesif we set matrices as well.

Definition at line 985 of file AmrMultiGrid.cpp.

References lbase_m, lfine_m, mglevel_m, and solver_mp.

Referenced by buildMultiLevel_m(), and buildSingleLevel_m().

◆ computeEfield_m()

void AmrMultiGrid::computeEfield_m ( AmrVectorFieldContainer_t & efield)
private
Parameters
efieldto compute

Definition at line 665 of file AmrMultiGrid.cpp.

References lbase_m, mglevel_m, nlevel_m, IpplTimings::startTimer(), IpplTimings::stopTimer(), and trilinos2amrex_m().

Referenced by solve().

Here is the call graph for this function:

◆ computePotential() [1/2]

void AmrPoissonSolver< AmrBoxLib >::computePotential ( Field_t & ,
Vector_t  )
inlinevirtualinherited

Implements PoissonSolver.

Definition at line 42 of file AmrPoissonSolver.h.

◆ computePotential() [2/2]

virtual void PoissonSolver::computePotential ( Field_t & rho,
Vector_t hr,
double zshift )
pure virtualinherited

◆ convertToEnumBaseSolver_m()

AmrMultiGrid::BaseSolver AmrMultiGrid::convertToEnumBaseSolver_m ( const std::string & bsolver)
private

Converts string to enum BaseSolver

Parameters
bsolverbottom solver

Definition at line 2034 of file AmrMultiGrid.cpp.

References BICGSTAB, CG, GMRES, MINRES, PCPG, RECYCLING_GMRES, SA, and STOCHASTIC_CG.

Referenced by AmrMultiGrid().

◆ convertToEnumBoundary_m()

AmrMultiGrid::Boundary AmrMultiGrid::convertToEnumBoundary_m ( const std::string & bc)
private

Convertstring to enum Boundary

Parameters
bcboundary condition

Definition at line 2001 of file AmrMultiGrid.cpp.

References DIRICHLET, OPEN, and PERIODIC.

Referenced by AmrMultiGrid().

◆ convertToEnumInterpolater_m()

AmrMultiGrid::Interpolater AmrMultiGrid::convertToEnumInterpolater_m ( const std::string & interp)
private

Converts string to enum Interpolater

Parameters
interpinterpolater

Definition at line 2017 of file AmrMultiGrid.cpp.

References LAGRANGE, PIECEWISE_CONST, and TRILINEAR.

Referenced by AmrMultiGrid().

◆ convertToEnumNorm_m()

AmrMultiGrid::Norm AmrMultiGrid::convertToEnumNorm_m ( const std::string & norm)
private

Converts string to enum Norm

Parameters
normeither L1, L2, LInf

Definition at line 2100 of file AmrMultiGrid.cpp.

References L1, L2, and LINF.

Referenced by AmrMultiGrid().

◆ convertToEnumPreconditioner_m()

AmrMultiGrid::Preconditioner AmrMultiGrid::convertToEnumPreconditioner_m ( const std::string & prec)
private

Converts string to enum Preconditioner

Parameters
precpreconditioner

Definition at line 2075 of file AmrMultiGrid.cpp.

References Ifpack2Preconditioner< AmrMultiGridLevel_t >::fillMap(), and MueLuPreconditioner< AmrMultiGridLevel_t >::fillMap().

Referenced by AmrMultiGrid().

Here is the call graph for this function:

◆ convertToEnumSmoother_m()

AmrMultiGrid::Smoother AmrMultiGrid::convertToEnumSmoother_m ( const std::string & smoother)
private

Converts string to enum Smoother

Parameters
smootherof level solution

Definition at line 2094 of file AmrMultiGrid.cpp.

References AmrSmoother::convertToEnumSmoother().

Referenced by AmrMultiGrid().

Here is the call graph for this function:

◆ evalNorm_m()

AmrMultiGrid::scalar_t AmrMultiGrid::evalNorm_m ( const Teuchos::RCP< const vector_t > & x)
private

Vector norm computation.

Parameters
xis the vector for which we compute the norm
Returns
the evaluated norm of a level

Definition at line 596 of file AmrMultiGrid.cpp.

References L1, L2, LINF, and norm_m.

Referenced by getLevelResidualNorm(), and initResidual_m().

◆ getinteractionRadius()

virtual double PoissonSolver::getinteractionRadius ( ) const
inlinevirtualinherited

Reimplemented in P3MPoissonSolver.

Definition at line 72 of file PoissonSolver.h.

◆ getLevelResidualNorm()

AmrMultiGrid::scalar_t AmrMultiGrid::getLevelResidualNorm ( lo_t level)

Obtain the residual norm of a level

Parameters
levelfor which error is requested
Returns
the norm of the residual

Definition at line 185 of file AmrMultiGrid.cpp.

References evalNorm_m(), and mglevel_m.

Referenced by iterate_m().

Here is the call graph for this function:

◆ getNumIters()

std::size_t AmrMultiGrid::getNumIters ( )

Obtain some convergence info

Returns
the number of iterations till convergence

Definition at line 180 of file AmrMultiGrid.cpp.

References nIter_m.

◆ getXRangeMax()

double AmrMultiGrid::getXRangeMax ( unsigned short level = 0)
virtual

Implements PoissonSolver.

Definition at line 2234 of file AmrMultiGrid.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

◆ getXRangeMin()

double AmrMultiGrid::getXRangeMin ( unsigned short level = 0)
virtual

Implements PoissonSolver.

Definition at line 2229 of file AmrMultiGrid.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

◆ getYRangeMax()

double AmrMultiGrid::getYRangeMax ( unsigned short level = 0)
virtual

Implements PoissonSolver.

Definition at line 2244 of file AmrMultiGrid.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

◆ getYRangeMin()

double AmrMultiGrid::getYRangeMin ( unsigned short level = 0)
virtual

Implements PoissonSolver.

Definition at line 2239 of file AmrMultiGrid.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

◆ getZRangeMax()

double AmrMultiGrid::getZRangeMax ( unsigned short level = 0)
virtual

Implements PoissonSolver.

Definition at line 2254 of file AmrMultiGrid.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

◆ getZRangeMin()

double AmrMultiGrid::getZRangeMin ( unsigned short level = 0)
virtual

Implements PoissonSolver.

Definition at line 2249 of file AmrMultiGrid.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

◆ hasToRegrid()

void AmrPoissonSolver< AmrBoxLib >::hasToRegrid ( )
inlinevirtualinherited

Tell solver to regrid

Reimplemented from PoissonSolver.

Definition at line 56 of file AmrPoissonSolver.h.

◆ initBaseSolver_m()

void AmrMultiGrid::initBaseSolver_m ( const BaseSolver & solver,
const bool & rebalance,
const std::string & reuse )
private

Instantiate a bottom solver

Parameters
solvertype
rebalancesolver (SA only)
reusetypes of SA hierarchy

Definition at line 1897 of file AmrMultiGrid.cpp.

References BICGSTAB, CG, MueLuBottomSolver< AmrMultiGridLevel_t >::convertToMueLuReuseOption(), GMRES, MINRES, PCPG, prec_mp, RECYCLING_CG, RECYCLING_GMRES, SA, solver_mp, and STOCHASTIC_CG.

Referenced by AmrMultiGrid().

Here is the call graph for this function:

◆ initCrseFineInterp_m()

void AmrMultiGrid::initCrseFineInterp_m ( const Interpolater & interface)
private

Instantiate interface interpolater

Parameters
interfacehandler

Definition at line 1878 of file AmrMultiGrid.cpp.

References interface_mp, LAGRANGE, PIECEWISE_CONST, AmrLagrangeInterpolater< Level >::QUADRATIC, and TRILINEAR.

Referenced by AmrMultiGrid().

◆ initGuess_m()

void AmrMultiGrid::initGuess_m ( bool reset)
private

Reset potential to zero (currently)

Parameters
resetsolution to initial guess (zero)

Definition at line 327 of file AmrMultiGrid.cpp.

References mglevel_m, and nlevel_m.

Referenced by solve().

◆ initInterpolater_m()

void AmrMultiGrid::initInterpolater_m ( const Interpolater & interp)
private

Instantiate interpolater

Parameters
interpinterpolater type

Definition at line 1860 of file AmrMultiGrid.cpp.

References interp_mp, LAGRANGE, PIECEWISE_CONST, and TRILINEAR.

Referenced by AmrMultiGrid().

◆ initLevels_m()

void AmrMultiGrid::initLevels_m ( const amrex::Vector< AmrField_u > & rho,
const amrex::Vector< AmrGeometry_t > & geom,
bool regrid )
private

Instantiate all levels and set boundary conditions

Parameters
rhois the charge density
geomis the geometry
regridwas performed

Definition at line 228 of file AmrMultiGrid.cpp.

References bc_m, comm_mp, AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp, lbase_m, mglevel_m, nlevel_m, AmrMultiGridLevel< matrix_t, vector_t >::NO, AmrMultiGridLevel< matrix_t, vector_t >::PHYSBNDRY, and AmrMultiGridLevel< matrix_t, vector_t >::YES.

Referenced by solve().

◆ initPhysicalBoundary_m()

void AmrMultiGrid::initPhysicalBoundary_m ( const Boundary * bc)
private

Instantiate boundary object

Parameters
bcboundary conditions @precondition length must be equal to AMREX_SPACEDIM

Definition at line 200 of file AmrMultiGrid.cpp.

References bc_m, DIRICHLET, nBcPoints_m, OPEN, and PERIODIC.

Referenced by AmrMultiGrid().

◆ initPrec_m()

void AmrMultiGrid::initPrec_m ( const Preconditioner & prec,
const std::string & reuse )
private

Instantiate a preconditioner for the bottom solver

Parameters
precondtype
reusetypes of SA hierarchy

Definition at line 1971 of file AmrMultiGrid.cpp.

References MueLuPreconditioner< AmrMultiGridLevel_t >::convertToMueLuReuseOption(), and prec_mp.

Referenced by AmrMultiGrid().

Here is the call graph for this function:

◆ initResidual_m()

void AmrMultiGrid::initResidual_m ( std::vector< scalar_t > & rhsNorms,
std::vector< scalar_t > & resNorms )
private

Initial convergence criteria values.

Parameters
rhsNormsper level of right-hand side (is filled)
resNormsper level of residual (is filled)

Definition at line 624 of file AmrMultiGrid.cpp.

References comm_mp, evalNorm_m(), mglevel_m, nlevel_m, and residual_m().

Referenced by iterate_m().

Here is the call graph for this function:

◆ isConverged_m()

bool AmrMultiGrid::isConverged_m ( std::vector< scalar_t > & rhsNorms,
std::vector< scalar_t > & resNorms )
private

Compute norms / level and check convergence

Returns
true if converged

Definition at line 392 of file AmrMultiGrid.cpp.

Referenced by iterate_m().

◆ iterate_m()

AmrMultiGrid::scalar_t AmrMultiGrid::iterate_m ( )
private

Actual solve.

Returns
the the max. residual

Definition at line 337 of file AmrMultiGrid.cpp.

References bIter_m, getLevelResidualNorm(), initResidual_m(), isConverged_m(), lfine_m, maxiter_m, mglevel_m, nIter_m, nlevel_m, relax_m(), residual_m(), and solver_mp.

Referenced by solve().

Here is the call graph for this function:

◆ map2vector_m()

void AmrMultiGrid::map2vector_m ( umap_t & map,
indices_t & indices,
coefficients_t & values )
inlineprivate

Some indices might occur several times due to boundary conditions, etc. We avoid this by filling a map and then copying the data to a vector for filling the matrices. The map gets cleared inside the function.

Parameters
indicesin matrix
valuesare the coefficients

Definition at line 1718 of file AmrMultiGrid.cpp.

Referenced by buildCompositePoissonMatrix_m(), buildCrseBoundaryMatrix_m(), buildFineBoundaryMatrix_m(), buildGradientMatrix_m(), buildInterpolationMatrix_m(), and buildNoFinePoissonMatrix_m().

◆ open_m()

void AmrMultiGrid::open_m ( const lo_t & level,
const bool & matrices )
private

Set matrix and vector pointer

Parameters
levelfor which we fill matrix + vector
matricesif we need to set matrices as well or only vectors.

Definition at line 877 of file AmrMultiGrid.cpp.

References interface_mp, interp_mp, lbase_m, lfine_m, mglevel_m, nBcPoints_m, and solver_mp.

Referenced by buildMultiLevel_m(), and buildSingleLevel_m().

◆ print()

Inform & AmrMultiGrid::print ( Inform & os) const

Print information abour tolerances.

Parameters
osoutput stream where to write to

Definition at line 2259 of file AmrMultiGrid.cpp.

References endl().

Here is the call graph for this function:

◆ prolongate_m()

void AmrMultiGrid::prolongate_m ( const lo_t & level)
private

Update error of fine level based on error of coarse level

Parameters
levelto update

Definition at line 1820 of file AmrMultiGrid.cpp.

References mglevel_m, IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by relax_m().

Here is the call graph for this function:

◆ relax_m()

void AmrMultiGrid::relax_m ( const lo_t & level)
private

Recursive call.

Parameters
levelto relax

Definition at line 464 of file AmrMultiGrid.cpp.

References lbase_m, lfine_m, mglevel_m, prolongate_m(), relax_m(), residual_no_fine_m(), restrict_m(), smooth_m(), solver_mp, IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by iterate_m(), and relax_m().

Here is the call graph for this function:

◆ residual_m()

void AmrMultiGrid::residual_m ( const lo_t & level,
Teuchos::RCP< vector_t > & r,
const Teuchos::RCP< vector_t > & b,
const Teuchos::RCP< vector_t > & x )
private

Compute composite residual of a level

Parameters
ris the residual to compute
bis the right-hand side
xis the left-hand side
levelto solve for

Definition at line 401 of file AmrMultiGrid.cpp.

References lfine_m, and mglevel_m.

Referenced by initResidual_m(), and iterate_m().

◆ residual_no_fine_m()

void AmrMultiGrid::residual_no_fine_m ( const lo_t & level,
Teuchos::RCP< vector_t > & result,
const Teuchos::RCP< vector_t > & rhs,
const Teuchos::RCP< vector_t > & crs_rhs,
const Teuchos::RCP< vector_t > & b )
private

Compute the residual of a level without considering refined level.

Parameters
resultis computed
rhsis the right-hand side
crs_rhsis the coarse right-hand side for internal boundary
bis the left-hand side
levelto solver for

Definition at line 551 of file AmrMultiGrid.cpp.

References mglevel_m.

Referenced by relax_m(), and restrict_m().

◆ resizeMesh()

virtual void PoissonSolver::resizeMesh ( Vector_t & ,
Vector_t & ,
const Vector_t & ,
const Vector_t & ,
double  )
inlinevirtualinherited

Definition at line 68 of file PoissonSolver.h.

◆ restrict_m()

void AmrMultiGrid::restrict_m ( const lo_t & level)
private

Restrict coarse level residual based on fine level residual

Parameters
levelto restrict

Definition at line 1763 of file AmrMultiGrid.cpp.

References mglevel_m, residual_no_fine_m(), IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by relax_m().

Here is the call graph for this function:

◆ setMaxNumberOfIterations()

void AmrMultiGrid::setMaxNumberOfIterations ( const std::size_t & maxiter)

Specify the maximum number of iterations

Parameters
maxiter\( [0, \infty[ \)

Definition at line 171 of file AmrMultiGrid.cpp.

References maxiter_m.

◆ setNumberOfSweeps()

void AmrMultiGrid::setNumberOfSweeps ( const std::size_t & nSweeps)

Specify the number of smoothing steps

Parameters
nSweepsfor each smoothing step

Definition at line 166 of file AmrMultiGrid.cpp.

References nSweeps_m.

◆ setTolerance()

void AmrMultiGrid::setTolerance ( const scalar_t & eps)

Change accuracy of solver

Definition at line 195 of file AmrMultiGrid.cpp.

References eps_m.

◆ setup_m()

void AmrMultiGrid::setup_m ( const amrex::Vector< AmrField_u > & rho,
const amrex::Vector< AmrField_u > & phi,
const bool & matrices = true )
private

Build all matrices and vectors, i.e. AMReX to Trilinos

Parameters
matricesif we need to build matrices as well or only vectors.

Definition at line 689 of file AmrMultiGrid.cpp.

References buildMultiLevel_m(), buildSingleLevel_m(), clearMasks_m(), lbase_m, lfine_m, mglevel_m, solver_mp, IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by solve().

Here is the call graph for this function:

◆ setVerbose()

void AmrMultiGrid::setVerbose ( bool verbose)

Enable solver info dumping into SDDS file

Definition at line 190 of file AmrMultiGrid.cpp.

References verbose_m.

◆ smooth_m()

void AmrMultiGrid::smooth_m ( const lo_t & level,
Teuchos::RCP< vector_t > & e,
Teuchos::RCP< vector_t > & r )
private

Perform one smoothing step

Parameters
eerror to update (left-hand side)
rresidual (right-hand side)
levelon which to relax

Definition at line 1746 of file AmrMultiGrid.cpp.

References smoother_m, IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by relax_m().

Here is the call graph for this function:

◆ solve()

void AmrMultiGrid::solve ( AmrScalarFieldContainer_t & rho,
AmrScalarFieldContainer_t & phi,
AmrVectorFieldContainer_t & efield,
unsigned short baseLevel,
unsigned short finestLevel,
bool prevAsGuess = true )
virtual

Used in OPAL

Parameters
rhoright-hand side charge density on grid [C / m]
phielectrostatic potential (unknown) [V]
efieldelectric field [V / m]
baseLevelfor solve
finestLevelfor solve
prevAsGuessuse of previous solution as initial guess

Reimplemented from PoissonSolver.

Definition at line 111 of file AmrMultiGrid.cpp.

References averageDown_m(), computeEfield_m(), initGuess_m(), initLevels_m(), iterate_m(), AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp, lbase_m, lfine_m, mglevel_m, nlevel_m, AmrPoissonSolver< AmrBoxLib >::regrid_m, setup_m(), trilinos2amrex_m(), verbose_m, and writeSDDSData_m().

Here is the call graph for this function:

◆ test()

void AmrPoissonSolver< AmrBoxLib >::test ( PartBunchBase< double, 3 > * )
inlinevirtualinherited

Implements PoissonSolver.

Definition at line 52 of file AmrPoissonSolver.h.

◆ trilinos2amrex_m()

void AmrMultiGrid::trilinos2amrex_m ( const lo_t & level,
const lo_t & comp,
AmrField_t & mf,
const Teuchos::RCP< vector_t > & mv )
private

Data transfer from Trilinos to AMReX.

Parameters
levelto copy
compcomponent to copy
mfis the multifab to be filled
mvis the corresponding Trilinos vector

Definition at line 1683 of file AmrMultiGrid.cpp.

References mglevel_m.

Referenced by computeEfield_m(), and solve().

◆ writeSDDSData_m()

void AmrMultiGrid::writeSDDSData_m ( const scalar_t & error)
private

SDDS data write (done by root core)

Parameters
errorto write

Definition at line 2185 of file AmrMultiGrid.cpp.

References bIter_m, comm_mp, flag_m, fname_m, AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp, nIter_m, AmrPoissonSolver< AmrBoxLib >::regrid_m, Units::s2ns, IpplTimings::startTimer(), IpplTimings::stopTimer(), and writeSDDSHeader_m().

Referenced by solve().

Here is the call graph for this function:

◆ writeSDDSHeader_m()

void AmrMultiGrid::writeSDDSHeader_m ( std::ofstream & outfile)
private

SDDS header is written by root core

Parameters
outfileoutput stream

Definition at line 2116 of file AmrMultiGrid.cpp.

References comm_mp, OPALTimer::Timer::date(), Util::getGitRevision(), OpalData::getInputFn(), OpalData::getInstance(), OpalData::isInOPALCyclMode(), OpalData::isInOPALTMode(), snorm_m, and OPALTimer::Timer::time().

Referenced by writeSDDSData_m().

Here is the call graph for this function:

Member Data Documentation

◆ bc_m

boundary_t AmrMultiGrid::bc_m[AMREX_SPACEDIM]
private

boundary conditions

Definition at line 693 of file AmrMultiGrid.h.

Referenced by initLevels_m(), and initPhysicalBoundary_m().

◆ bIter_m

std::size_t AmrMultiGrid::bIter_m
private

number of iterations of bottom solver

Definition at line 672 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), iterate_m(), and writeSDDSData_m().

◆ comm_mp

Teuchos::RCP<comm_t> AmrMultiGrid::comm_mp
private

communicator

Definition at line 663 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), initLevels_m(), initResidual_m(), writeSDDSData_m(), and writeSDDSHeader_m().

◆ eps_m

scalar_t AmrMultiGrid::eps_m
private

rhs scale for convergence

Definition at line 699 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), and setTolerance().

◆ flag_m

std::ios_base::openmode AmrMultiGrid::flag_m
private

std::ios::out or std::ios::app

Definition at line 703 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), and writeSDDSData_m().

◆ fname_m

std::string AmrMultiGrid::fname_m
private

SDDS filename.

Definition at line 702 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), and writeSDDSData_m().

◆ interface_mp

std::unique_ptr<AmrInterpolater<AmrMultiGridLevel_t> > AmrMultiGrid::interface_mp
private

◆ interp_mp

std::unique_ptr<AmrInterpolater<AmrMultiGridLevel_t> > AmrMultiGrid::interp_mp
private

interpolater without coarse-fine interface

Definition at line 666 of file AmrMultiGrid.h.

Referenced by buildInterpolationMatrix_m(), initInterpolater_m(), and open_m().

◆ itsAmrObject_mp

◆ lbase_m

◆ lfine_m

int AmrMultiGrid::lfine_m
private

◆ maxiter_m

std::size_t AmrMultiGrid::maxiter_m
private

maximum number of iterations allowed

Definition at line 673 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), iterate_m(), and setMaxNumberOfIterations().

◆ mglevel_m

◆ nBcPoints_m

int AmrMultiGrid::nBcPoints_m
private

maximum number of stencils points for BC

Definition at line 694 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), initPhysicalBoundary_m(), and open_m().

◆ nIter_m

std::size_t AmrMultiGrid::nIter_m
private

number of iterations till convergence

Definition at line 671 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), getNumIters(), iterate_m(), and writeSDDSData_m().

◆ nlevel_m

int AmrMultiGrid::nlevel_m
private

◆ norm_m

Norm AmrMultiGrid::norm_m
private

norm for convergence criteria (l1, l2, linf)

Definition at line 696 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), and evalNorm_m().

◆ nSweeps_m

std::size_t AmrMultiGrid::nSweeps_m
private

number of smoothing iterations

Definition at line 674 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), buildMultiLevel_m(), and setNumberOfSweeps().

◆ prec_mp

std::shared_ptr<preconditioner_t> AmrMultiGrid::prec_mp
private

preconditioner for bottom solver

Definition at line 687 of file AmrMultiGrid.h.

Referenced by initBaseSolver_m(), and initPrec_m().

◆ regrid_m

bool AmrPoissonSolver< AmrBoxLib >::regrid_m
protectedinherited

is set to true by itsAmrObject_mp and reset to false by solver

Definition at line 64 of file AmrPoissonSolver.h.

Referenced by AmrMultiGrid::solve(), and AmrMultiGrid::writeSDDSData_m().

◆ smoother_m

std::vector<std::shared_ptr<AmrSmoother> > AmrMultiGrid::smoother_m
private

error smoother

Definition at line 684 of file AmrMultiGrid.h.

Referenced by buildMultiLevel_m(), and smooth_m().

◆ smootherType_m

Smoother AmrMultiGrid::smootherType_m
private

type of smoother

Definition at line 675 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), and buildMultiLevel_m().

◆ snorm_m

std::string AmrMultiGrid::snorm_m
private

norm for convergence criteria

Definition at line 697 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), and writeSDDSHeader_m().

◆ solver_mp

std::shared_ptr<bsolver_t> AmrMultiGrid::solver_mp
private

◆ verbose_m

bool AmrMultiGrid::verbose_m
private

If true, a SDDS file is written.

Definition at line 701 of file AmrMultiGrid.h.

Referenced by AmrMultiGrid(), setVerbose(), and solve().


The documentation for this class was generated from the following files: