|
| | CCPoissonBoxRelaxationFACOperator (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, std::string default_options_prefix) |
| | Constructor. More...
|
| |
| | ~CCPoissonBoxRelaxationFACOperator () |
| | Destructor. More...
|
| |
| virtual void | setPoissonSpecifications (const SAMRAI::solv::PoissonSpecifications &poisson_spec) |
| | Set the SAMRAI::solv::PoissonSpecifications object used to specify the coefficients for the scalar-valued or vector-valued Laplace operator. More...
|
| |
| virtual void | setPhysicalBcCoef (SAMRAI::solv::RobinBcCoefStrategy< NDIM > *bc_coef) |
| | Set the SAMRAI::solv::RobinBcCoefStrategy object used to specify physical boundary conditions. More...
|
| |
| virtual void | setPhysicalBcCoefs (const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &bc_coefs) |
| | Set the SAMRAI::solv::RobinBcCoefStrategy objects used to specify physical boundary conditions. More...
|
| |
| const std::string & | getName () const |
| | Return the object name. More...
|
| |
| virtual bool | getIsInitialized () const |
| | Return whether the operator is initialized. More...
|
| |
| virtual void | setFACPreconditioner (SAMRAI::tbox::ConstPointer< FACPreconditioner > preconditioner) |
| | Method to allow the FACPreconditioner object to register itself with the concrete FACPreconditionerStrategy. More...
|
| |
| virtual void | setHomogeneousBc (bool homogeneous_bc) |
| | Set whether the solver should use homogeneous boundary conditions. More...
|
| |
| virtual bool | getHomogeneousBc () const |
| | Return whether the solver is using homogeneous boundary conditions. More...
|
| |
| virtual void | setSolutionTime (double solution_time) |
| | Set the time at which the solution is to be evaluated. More...
|
| |
| virtual double | getSolutionTime () const |
| | Get the time at which the solution is being evaluated. More...
|
| |
| virtual void | setTimeInterval (double current_time, double new_time) |
| | Set the current time interval. More...
|
| |
| virtual std::pair< double, double > | getTimeInterval () const |
| | Get the current time interval. More...
|
| |
| virtual double | getDt () const |
| | Get the current time step size. More...
|
| |
| virtual void | allocateScratchData () |
| | Allocate scratch data. More...
|
| |
| virtual void | deallocateScratchData () |
| | Deallocate scratch data. More...
|
| |
|
| void | setSmootherType (const std::string &smoother_type) override |
| | Specify the smoother type. More...
|
| |
| void | setCoarseSolverType (const std::string &coarse_solver_type) override |
| | Specify the coarse level solver. More...
|
| |
|
| void | setResetLevels (int coarsest_ln, int finest_ln) |
| | Specify the levels that need to be reset the next time the operator is re-initialized. More...
|
| |
| void | setCoarseSolverMaxIterations (int coarse_solver_max_iterations) |
| | Set the maximum number of iterations for the coarse level solve. More...
|
| |
| void | setCoarseSolverAbsoluteTolerance (double coarse_solver_abs_residual_tol) |
| | Set the absolute residual tolerance for convergence for coarse level solve. More...
|
| |
| void | setCoarseSolverRelativeTolerance (double coarse_solver_rel_residual_tol) |
| | Set the relative residual tolerance for convergence for coarse level solve. More...
|
| |
| void | setProlongationMethod (const std::string &prolongation_method) |
| | Set the name of the prolongation method. More...
|
| |
| void | setRestrictionMethod (const std::string &restriction_method) |
| | Set the name of the restriction method. More...
|
| |
|
| void | setToZero (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &vec, int level_num) override |
| | Zero the supplied vector. More...
|
| |
| void | restrictResidual (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &src, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &dst, int dst_ln) override |
| | Restrict the residual quantity to the specified level from the next finer level. More...
|
| |
| void | prolongError (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &src, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &dst, int dst_ln) override |
| | Prolong the error quantity to the specified level from the next coarser level. More...
|
| |
| void | prolongErrorAndCorrect (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &src, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &dst, int dst_ln) override |
| | Prolong the error quantity to the specified level from the next coarser level and apply the correction to the fine-level error. More...
|
| |
| void | initializeOperatorState (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &solution, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &rhs) override |
| | Compute hierarchy-dependent data. More...
|
| |
| void | deallocateOperatorState () override |
| | Remove all hierarchy-dependent data. More...
|
| |
|
| SAMRAI::tbox::Pointer< PoissonSolver > | d_coarse_solver |
| |
| SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > | d_coarse_solver_db |
| |
| std::string | d_petsc_options_prefix = "cc_poisson_fac_" |
| |
| std::vector< std::vector< Vec > > | d_patch_vec_e |
| |
| std::vector< std::vector< Vec > > | d_patch_vec_f |
| |
| std::vector< std::vector< Mat > > | d_patch_mat |
| |
| std::vector< std::vector< KSP > > | d_patch_ksp |
| |
| std::vector< std::vector< SAMRAI::hier::BoxList< NDIM > > > | d_patch_bc_box_overlap |
| |
| std::vector< std::vector< std::map< int, SAMRAI::hier::Box< NDIM > > > > | d_patch_neighbor_overlap |
| |
| void | smoothError (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &error, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &residual, int level_num, int num_sweeps, bool performing_pre_sweeps, bool performing_post_sweeps) override |
| | Perform a given number of relaxations on the error. More...
|
| |
| bool | solveCoarsestLevel (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &error, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &residual, int coarsest_ln) override |
| | Solve the residual equation Ae=r on the coarsest level of the patch hierarchy. More...
|
| |
| void | computeResidual (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &residual, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &solution, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &rhs, int coarsest_level_num, int finest_level_num) override |
| | Compute composite grid residual on a range of levels. More...
|
| |
| void | initializeOperatorStateSpecialized (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &solution, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &rhs, int coarsest_reset_ln, int finest_reset_ln) override |
| | Compute implementation-specific hierarchy-dependent data. More...
|
| |
| void | deallocateOperatorStateSpecialized (int coarsest_reset_ln, int finest_reset_ln) override |
| | Remove implementation-specific hierarchy-dependent data. More...
|
| |
| | CCPoissonBoxRelaxationFACOperator ()=delete |
| | Default constructor. More...
|
| |
| | CCPoissonBoxRelaxationFACOperator (const CCPoissonBoxRelaxationFACOperator &from)=delete |
| | Copy constructor. More...
|
| |
| CCPoissonBoxRelaxationFACOperator & | operator= (const CCPoissonBoxRelaxationFACOperator &that)=delete |
| | Assignment operator. More...
|
| |
| static void | buildPatchLaplaceOperator (Mat &A, const SAMRAI::solv::PoissonSpecifications &poisson_spec, SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM >> patch, const SAMRAI::hier::IntVector< NDIM > &ghost_cell_width) |
| | Construct a matrix corresponding to a Laplace operator restricted to a single patch. More...
|
| |
| static void | buildPatchLaplaceOperator_aligned (Mat &A, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellData< NDIM, double >> C_data, SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double >> D_data, SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM >> patch, const SAMRAI::hier::IntVector< NDIM > &ghost_cell_width) |
| | Construct a matrix corresponding to a Laplace operator restricted to a single patch with grid aligned anisotropy. More...
|
| |
| static void | buildPatchLaplaceOperator_nonaligned (Mat &A, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellData< NDIM, double >> C_data, SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double >> D_data, SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM >> patch, const SAMRAI::hier::IntVector< NDIM > &ghost_cell_width) |
| | Construct a matrix corresponding to a Laplace operator restricted to a single patch with non-grid aligned anisotropy. More...
|
| |
This class provides operators that are used by class FACPreconditioner to solve scalar Poisson-type equations of the form
\[ (C I + \nabla \cdot D \nabla) u = f \]
using a cell-centered, globally second-order accurate finite-volume discretization, where
- \( C \), \( D \) and \( f \) are independent of \( u \),
- \( C \) is a cell-centered scalar field,
- \( D \) is a side-centered scalar field of diffusion coefficients, and
- \( f \) is a cell-centered scalar function.
Robin boundary conditions may be specified at physical boundaries; see class SAMRAI::solv::RobinBcCoefStrategy.
By default, the class is configured to solve the Poisson problem \( -\nabla^2 u = f \), subject to homogeneous Dirichlet boundary conditions.
Sample parameters for initialization from database (and their default values):
smoother_type = "PATCH_GAUSS_SEIDEL" // see setSmootherType()
prolongation_method = "LINEAR_REFINE" // see setProlongationMethod()
restriction_method = "CONSERVATIVE_COARSEN" // see setRestrictionMethod()
coarse_solver_type = "HYPRE_LEVEL_SOLVER" // see setCoarseSolverType()
coarse_solver_rel_residual_tol = 1.0e-5 // see setCoarseSolverRelativeTolerance()
coarse_solver_abs_residual_tol = 1.0e-50 // see setCoarseSolverAbsoluteTolerance()
coarse_solver_max_iterations = 1 // see setCoarseSolverMaxIterations()
coarse_solver_db { // SAMRAI::tbox::Database for initializing coarse
level solver
solver_type = "PFMG"
num_pre_relax_steps = 0
num_post_relax_steps = 2
}