Skip to content

Commit

Permalink
Different improvements for AMS (#1253)
Browse files Browse the repository at this point in the history
setup: compute weights during initialization and convert indices from global to local
add timers
reused smoother preconditioner instances
  • Loading branch information
peterrum authored Aug 23, 2024
1 parent 5885806 commit 8767433
Show file tree
Hide file tree
Showing 2 changed files with 184 additions and 62 deletions.
13 changes: 13 additions & 0 deletions include/solvers/fluid_dynamics_matrix_free.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,15 @@ class MFNavierStokesPreconditionGMG
const MGLevelObject<std::shared_ptr<OperatorType>> &
get_mg_operators() const;


/**
* @brief Getter function for all level smoother preconditioners.
*
* @return Multigrid object that contains all level smoother preconditioners.
*/
const MGLevelObject<std::shared_ptr<PreconditionBase<VectorType>>> &
get_mg_smoother_preconditioners() const;

private:
/**
* @brief Set up AMG object needed for coarse-grid solver or
Expand Down Expand Up @@ -173,6 +182,10 @@ class MFNavierStokesPreconditionGMG
MGLevelObject<MatrixFreeOperators::MGInterfaceOperator<OperatorType>>
ls_mg_interface_in;

/// Preconditioners associated to smoothers
mutable MGLevelObject<std::shared_ptr<PreconditionBase<VectorType>>>
mg_smoother_preconditioners;

/// Smoother object
std::shared_ptr<
MGSmootherPrecondition<OperatorType, SmootherType, VectorType>>
Expand Down
Loading

0 comments on commit 8767433

Please sign in to comment.