https://mooseframework.inl.gov
Functions
NavierStokesProblem.C File Reference

Go to the source code of this file.

Functions

 registerMooseObject ("NavierStokesApp", NavierStokesProblem)
 
 _commute_lsc (getParam< bool >("commute_lsc"))
 
 _mass_matrix (getParam< TagName >("mass_matrix"))
 
 _L_matrix (getParam< TagName >("L_matrix"))
 
 _have_mass_matrix (!_mass_matrix.empty())
 
 _have_L_matrix (!_L_matrix.empty())
 
 _set_schur_pre ((getParam< MooseEnum >("set_schur_pre").getEnum< SetSchurPreType >()))
 
 _schur_fs_index (getParam< std::vector< unsigned int >>("schur_fs_index"))
 
PetscErrorCode navierStokesKSPPreSolve (KSP root_ksp, Vec, Vec, void *context)
 

Function Documentation

◆ _commute_lsc()

_commute_lsc ( getParam< bool >  "commute_lsc")

Referenced by _schur_fs_index().

◆ _have_L_matrix()

_have_L_matrix ( !_L_matrix.  empty())

Referenced by _schur_fs_index().

◆ _have_mass_matrix()

_have_mass_matrix ( !_mass_matrix.  empty())

Referenced by _schur_fs_index().

◆ _L_matrix()

_L_matrix ( getParam< TagName >  "L_matrix")

◆ _mass_matrix()

_mass_matrix ( getParam< TagName >  "mass_matrix")

◆ _schur_fs_index()

_schur_fs_index ( getParam< std::vector< unsigned int >>  "schur_fs_index")

Definition at line 63 of file NavierStokesProblem.C.

64 {
65  if (_commute_lsc)
66  {
67  if (!_have_mass_matrix)
68  paramError("mass_matrix",
69  "A pressure mass matrix must be provided if we are commuting the LSC commutator.");
70  if (!_have_L_matrix)
71  paramError("L_matrix",
72  "A matrix corresponding to the viscous component of the momentum equation must be "
73  "provided if we are commuting the LSC commutator.");
74  }
75  else if (_have_L_matrix)
76  paramError("L_matrix",
77  "If not commuting the LSC commutator, then the 'L_matrix' should not be provided "
78  "because it will not be used. For Elman LSC preconditioning, L will be computed "
79  "automatically using system matrix data (e.g. the off-diagonal blocks in the "
80  "velocity-pressure system).");
81 
82  if ((_set_schur_pre != SetSchurPreType::FALSE) && !_have_mass_matrix)
83  paramError(
84  "mass_matrix",
85  "If requesting to use the mass matrix as part of the Schur complement preconditioner via "
86  "'set_schur_pre', then a pressure 'mass_matrix' must be provided");
87 }

◆ _set_schur_pre()

_set_schur_pre ( (getParam< MooseEnum >("set_schur_pre").getEnum< SetSchurPreType >())  )

Referenced by _schur_fs_index().

◆ navierStokesKSPPreSolve()

PetscErrorCode navierStokesKSPPreSolve ( KSP  root_ksp,
Vec  ,
Vec  ,
void context 
)

Definition at line 383 of file NavierStokesProblem.C.

Referenced by NavierStokesProblem::initPetscOutputAndSomeSolverSettings().

384 {
386 
387  auto * ns_problem = static_cast<NavierStokesProblem *>(context);
388  ns_problem->clearIndexSets();
389  auto schur_ksp = ns_problem->findSchurKSP(root_ksp, 0);
390  ns_problem->setupLSCMatrices(schur_ksp);
391 
392  PetscFunctionReturn(PETSC_SUCCESS);
393 }
void clearIndexSets()
Clear the field split index sets.
PetscFunctionBegin
A problem that handles Schur complement preconditioning of the incompressible Navier-Stokes equations...
PetscFunctionReturn(LIBMESH_PETSC_SUCCESS)

◆ registerMooseObject()

registerMooseObject ( "NavierStokesApp"  ,
NavierStokesProblem   
)