Skip to main content
MultiphaseStaggeredStokesBoxRelaxationFACOperator is a concrete IBTK::FACPreconditionerStrategy that provides the level-smoothing, restriction, and prolongation operations used inside FullFACPreconditioner. It implements a Red-Black Gauss–Seidel (RBGS) box-relaxation smoother for the coupled two-fluid staggered Stokes system. Namespace: multiphase
Header: multiphase/MultiphaseStaggeredStokesBoxRelaxationFACOperator.h
This class is not used directly by most users. It is constructed internally by MultiphaseStaggeredHierarchyIntegrator and passed as the fac_strategy argument to FullFACPreconditioner. See FullFACPreconditioner for higher-level usage.

Constructor

string
required
Unique name for this strategy object, used in logging and the SAMRAI object registry.
string
required
Prefix used when constructing default PETSc option names for the coarse-level solver.
const MultiphaseParameters&
required
Physical parameters struct (eta_n, eta_s, xi, nu_n, nu_s) used to assemble the local box systems during smoothing. See MultiphaseParameters.

Configuration methods

setUnderRelaxationParameter

Sets the under-relaxation (damping) factor for the box-relaxation smoother. The default value is 0.75. This corresponds to the W parameter in the simulation input file.
double
required
Under-relaxation factor. Values in (0, 1] are stable; 0.75 is the recommended default from the input file.

setCandDCoefficients

Sets the C (mass-like diagonal) and D (viscous/drag scaling) coefficients used when assembling the local patch systems during smoothing. These must match the coefficients set on the associated MultiphaseStaggeredStokesOperator.
double
required
Coefficient multiplying the mass-like diagonal block (C * thn, C * ths).
double
required
Coefficient scaling the viscous and drag terms. Corresponds to D_u in the operator.

setThnIdx

Sets the patch data index for the network volume fraction thn. Must be called before smoothing operations are performed.
int
required
SAMRAI variable–context index for the cell-centered volume fraction field.

setPhysicalBcCoefs

Registers physical boundary condition objects for all solution components. Any pointer may be nullptr, in which case homogeneous conditions are applied.
std::vector<RobinBcCoefStrategy<NDIM>*>
required
Robin BC coefficients for the network velocity, one per spatial dimension.
std::vector<RobinBcCoefStrategy<NDIM>*>
required
Robin BC coefficients for the solvent velocity, one per spatial dimension.
RobinBcCoefStrategy<NDIM>*
required
Robin BC coefficient for the pressure. Pass nullptr for homogeneous Neumann.
RobinBcCoefStrategy<NDIM>*
required
Robin BC coefficient for the volume fraction. Pass nullptr for linear extrapolation.

FAC strategy interface

These methods implement IBTK::FACPreconditionerStrategy and are called by FullFACPreconditioner during the multigrid cycle. You do not call them directly.

smoothError

Performs num_sweeps box-relaxation sweeps on the specified level. The RBGS smoother is implemented in src/RBGS.f.

restrictResidual

Restricts the residual from the fine level to dest_level_num using the cached restriction schedules.

prolongError / prolongErrorAndCorrect

Prolongs the error from the coarse level to dest_level_num. prolongErrorAndCorrect additionally adds the prolongated correction to the existing fine-level error.

solveCoarsestLevel

Solves the coarse-level system exactly using a PETSc level solver. Returns true on convergence.

computeResidual

Computes the composite-grid residual r = rhs - A*solution on the specified range of levels.

initializeOperatorState / deallocateOperatorState

Allocates and frees all hierarchy-dependent data (prolongation/restriction schedules, ghost-fill algorithms, scratch variables). Called automatically by FullFACPreconditioner::initializeSolverState and deallocateSolverState.

Relation to W input parameter

The under-relaxation factor w is exposed in the simulation input file as the top-level parameter W:
input2d
This value is read by MultiphaseStaggeredHierarchyIntegrator and forwarded to setUnderRelaxationParamater before each solve.