-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: mgr strategy for lagrangeContactBubbleStabilization
- Loading branch information
Showing
7 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
...rAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* | ||
* ------------------------------------------------------------------------------------------------------------ | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
* | ||
* Copyright (c) 2016-2024 Lawrence Livermore National Security LLC | ||
* Copyright (c) 2018-2024 TotalEnergies | ||
* Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University | ||
* Copyright (c) 2023-2024 Chevron | ||
* Copyright (c) 2019- GEOS/GEOSX Contributors | ||
* All rights reserved | ||
* | ||
* See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. | ||
* ------------------------------------------------------------------------------------------------------------ | ||
*/ | ||
|
||
/** | ||
* @file LagrangianContactMechanicsBubbleStabilization.hpp | ||
*/ | ||
|
||
#ifndef GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRLAGRANGIACONTACTMECHANICSBUBBLESTAB_HPP_ | ||
#define GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRLAGRANGIACONTACTMECHANICSBUBBLESTAB_HPP_ | ||
|
||
#include "linearAlgebra/interfaces/hypre/HypreMGR.hpp" | ||
|
||
namespace geos | ||
{ | ||
|
||
namespace hypre | ||
{ | ||
|
||
namespace mgr | ||
{ | ||
|
||
/** | ||
* @brief LagrangianContactMechanicsBubbleStabilization strategy | ||
* | ||
* Contact mechanics with face-centered lagrangian multipliers | ||
* | ||
* dofLabel: 0 = displacement, x-component | ||
* dofLabel: 1 = displacement, y-component | ||
* dofLabel: 2 = displacement, z-component | ||
* dofLabel: 3 = displacement bubble function, x-component | ||
* dofLabel: 4 = displacement bubble function, y-component | ||
* dofLabel: 5 = displacement bubble function, z-component | ||
* dofLabel: 6 = face-centered lagrange multiplier (tn) | ||
* dofLabel: 7 = face-centered lagrange multiplier (tt1) | ||
* dofLabel: 8 = face-centered lagrange multiplier (tt2) | ||
* | ||
* Ingredients: | ||
* 1. F-points displacement (0,1,2), C-points (3,4,5) | ||
* 2. F-points smoother: AMG, single V-cycle, separate displacemente components | ||
* 3. C-points coarse-grid/Schur complement solver: boomer AMG | ||
* 4. Global smoother: none | ||
* | ||
*/ | ||
class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 1 > | ||
{ | ||
public: | ||
|
||
/** | ||
* @brief Constructor. | ||
*/ | ||
explicit LagrangianContactMechanicsBubbleStabilization( arrayView1d< int const > const & ) | ||
: MGRStrategyBase( 9 ) | ||
{ | ||
// Level 0: we keep all three displacement | ||
m_labels[0] = { 6, 7, 8 }; | ||
|
||
setupLabels(); | ||
|
||
// Level 0 | ||
m_levelFRelaxType[0] = MGRFRelaxationType::amgVCycle; | ||
m_levelFRelaxIters[0] = 1; | ||
m_levelInterpType[0] = MGRInterpolationType::blockJacobi; | ||
m_levelRestrictType[0] = MGRRestrictionType::injection; | ||
m_levelCoarseGridMethod[0] = MGRCoarseGridMethod::galerkin; | ||
m_levelGlobalSmootherType[0] = MGRGlobalSmootherType::none; | ||
} | ||
|
||
/** | ||
* @brief Setup the MGR strategy. | ||
* @param mgrParams MGR configuration parameters | ||
* @param precond preconditioner wrapper | ||
* @param mgrData auxiliary MGR data | ||
*/ | ||
void setup( LinearSolverParameters::MGR const & mgrParams, | ||
HyprePrecWrapper & precond, | ||
HypreMGRData & mgrData ) | ||
{ | ||
setReduction( precond, mgrData ); | ||
|
||
// Configure the BoomerAMG solver used as F-relaxation for the first level | ||
setMechanicsFSolver( precond, mgrData, mgrParams.separateComponents ); | ||
|
||
// Configure ILU) as a coarse solver | ||
setILUCoarseSolver( mgrData.coarseSolver ); | ||
} | ||
}; | ||
|
||
} // namespace mgr | ||
|
||
} // namespace hypre | ||
|
||
} // namespace geos | ||
|
||
#endif /*GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRLAGRANGIACONTACTMECHANICSBUBBLESTAB_HPP_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters