Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: cleanup setMGRStrategy a bit #3422

Merged
merged 28 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
220fa52
keep well variables constant during poromech init
Oct 2, 2024
fc9b41a
cleanup setMGRStrategy a bit
Oct 3, 2024
ff67658
missing setMGRStrategy and add log messages
Oct 4, 2024
3a2e268
final pass
Oct 4, 2024
0606617
Merge branch 'pt/wells-seq-poromech-init' into pt/set-mgr-strategy
Oct 4, 2024
74aef74
clarify
Oct 4, 2024
a71d594
Merge branch 'develop' into pt/wells-seq-poromech-init
paveltomin Oct 4, 2024
5d52aad
Merge branch 'pt/wells-seq-poromech-init' into pt/set-mgr-strategy
paveltomin Oct 4, 2024
bff5314
Update SolidMechanicsEmbeddedFractures.cpp
paveltomin Oct 4, 2024
d10f4d2
Update WellSolverBase.cpp
paveltomin Oct 14, 2024
a0f4c63
Merge branch 'develop' into pt/wells-seq-poromech-init
paveltomin Oct 15, 2024
77e93bf
Merge branch 'pt/wells-seq-poromech-init' into pt/set-mgr-strategy
paveltomin Oct 25, 2024
56db5f5
Merge branch 'develop' into pt/wells-seq-poromech-init
paveltomin Oct 25, 2024
87e589d
Merge branch 'pt/wells-seq-poromech-init' into pt/set-mgr-strategy
paveltomin Oct 25, 2024
0f1efa0
Merge branch 'develop' into pt/wells-seq-poromech-init
paveltomin Oct 28, 2024
1c67dc6
bug fix
Oct 28, 2024
49166d4
Merge branch 'pt/wells-seq-poromech-init' into pt/set-mgr-strategy
paveltomin Oct 28, 2024
a5b1931
Update CoupledReservoirAndWellsBase.hpp
paveltomin Oct 29, 2024
5cb58fb
Update SinglePhasePoromechanicsConformingFractures.hpp
paveltomin Oct 29, 2024
20a5f92
build fix
Oct 29, 2024
2e637ae
Merge remote-tracking branch 'origin/develop' into pt/set-mgr-strategy
Nov 6, 2024
5398dcf
Merge branch 'develop' into pt/set-mgr-strategy
paveltomin Nov 7, 2024
a321039
Merge remote-tracking branch 'origin/develop' into pt/set-mgr-strategy
Nov 14, 2024
5b6ac85
code style and missing changes
Nov 14, 2024
e9e4fbb
Merge branch 'develop' into pt/set-mgr-strategy
paveltomin Nov 17, 2024
48208f6
Merge branch 'develop' into pt/set-mgr-strategy
paveltomin Nov 22, 2024
80e0eb5
Merge branch 'develop' into pt/set-mgr-strategy
paveltomin Dec 12, 2024
ba14408
Merge branch 'develop' into pt/set-mgr-strategy
paveltomin Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,37 @@

void SolidMechanicsEmbeddedFractures::postInputInitialization()
{
SolidMechanicsLagrangianFEM::postInputInitialization();
ContactSolverBase::postInputInitialization();

Check warning on line 67 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L67

Added line #L67 was not covered by tests

LinearSolverParameters & linParams = m_linearSolverParameters.get();

linParams.dofsPerNode = 3;
LinearSolverParameters & linearSolverParameters = m_linearSolverParameters.get();

Check warning on line 69 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L69

Added line #L69 was not covered by tests
if( m_useStaticCondensation )
{
linParams.isSymmetric = true;
linParams.amg.separateComponents = true;
// configure AMG
linearSolverParameters.isSymmetric = true;
linearSolverParameters.amg.separateComponents = true;
linearSolverParameters.dofsPerNode = 3;

Check warning on line 75 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L73-L75

Added lines #L73 - L75 were not covered by tests
}
else
{
linParams.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures;
linParams.mgr.separateComponents = true;
setMGRStrategy();

Check warning on line 79 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L79

Added line #L79 was not covered by tests
}
}

void SolidMechanicsEmbeddedFractures::setMGRStrategy()

Check warning on line 83 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L83

Added line #L83 was not covered by tests
{
LinearSolverParameters & linearSolverParameters = m_linearSolverParameters.get();

Check warning on line 85 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L85

Added line #L85 was not covered by tests

if( linearSolverParameters.preconditionerType != LinearSolverParameters::PreconditionerType::mgr )
return;

Check warning on line 88 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L87-L88

Added lines #L87 - L88 were not covered by tests

linearSolverParameters.mgr.separateComponents = true;
linearSolverParameters.dofsPerNode = 3;

Check warning on line 91 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L90-L91

Added lines #L90 - L91 were not covered by tests

linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures;
GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(),

Check warning on line 94 in src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp#L93-L94

Added lines #L93 - L94 were not covered by tests
EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy )));
}

void SolidMechanicsEmbeddedFractures::registerDataOnMesh( dataRepository::Group & meshBodies )
{
ContactSolverBase::registerDataOnMesh( meshBodies );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ class SolidMechanicsEmbeddedFractures : public ContactSolverBase

virtual void postInputInitialization() override final;

void setMGRStrategy();

private:

void updateJump( DofManager const & dofManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,28 @@
setDescription( "It be used to increase the scale of the stabilization entries. A value < 1.0 results in larger entries in the stabilization matrix." );

addLogLevel< logInfo::Configuration >();
}

Check warning on line 76 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L76

Added line #L76 was not covered by tests

void SolidMechanicsLagrangeContact::postInputInitialization()

Check warning on line 78 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L78

Added line #L78 was not covered by tests
{
ContactSolverBase::postInputInitialization();

Check warning on line 80 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L80

Added line #L80 was not covered by tests

setMGRStrategy();
}

Check warning on line 83 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L82-L83

Added lines #L82 - L83 were not covered by tests

void SolidMechanicsLagrangeContact::setMGRStrategy()

Check warning on line 85 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L85

Added line #L85 was not covered by tests
{
LinearSolverParameters & linearSolverParameters = m_linearSolverParameters.get();

Check warning on line 87 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L87

Added line #L87 was not covered by tests

if( linearSolverParameters.preconditionerType != LinearSolverParameters::PreconditionerType::mgr )
return;

Check warning on line 90 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L89-L90

Added lines #L89 - L90 were not covered by tests

linearSolverParameters.mgr.separateComponents = true;
linearSolverParameters.dofsPerNode = 3;

Check warning on line 93 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L92-L93

Added lines #L92 - L93 were not covered by tests

LinearSolverParameters & linSolParams = m_linearSolverParameters.get();
linSolParams.mgr.strategy = LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanics;
linSolParams.mgr.separateComponents = true;
linSolParams.dofsPerNode = 3;
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanics;
GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(),

Check warning on line 96 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L95-L96

Added lines #L95 - L96 were not covered by tests
EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy )));
}

void SolidMechanicsLagrangeContact::registerDataOnMesh( Group & meshBodies )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class NumericalMethodsManager;
class SolidMechanicsLagrangeContact : public ContactSolverBase
{
public:

SolidMechanicsLagrangeContact( const string & name,
Group * const parent );

Expand Down Expand Up @@ -179,6 +178,10 @@ class SolidMechanicsLagrangeContact : public ContactSolverBase
DofManager const & dofManager,
arrayView1d< real64 const > const & localRhs );

virtual void postInputInitialization() override final;

void setMGRStrategy();

private:
string m_stabilizationName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,48 +77,65 @@
CompositionalMultiphaseReservoirAndWells<>::
setMGRStrategy()
{
LinearSolverParameters & linearSolverParameters = this->m_linearSolverParameters.get();
LinearSolverParameters & linearSolverParameters = m_linearSolverParameters.get();

if( linearSolverParameters.preconditionerType != LinearSolverParameters::PreconditionerType::mgr )
return;

linearSolverParameters.mgr.separateComponents = true;
linearSolverParameters.dofsPerNode = 3;

if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseHybridFVM )
{
// add Reservoir
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirHybridFVM;
}
else if( isThermal() )
if( dynamic_cast< CompositionalMultiphaseHybridFVM * >( this->flowSolver() ) )

Check warning on line 88 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L88

Added line #L88 was not covered by tests
{
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::thermalCompositionalMultiphaseReservoirFVM;

if( isThermal() )

Check warning on line 90 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L90

Added line #L90 was not covered by tests
{
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for thermal {}/{}",

Check warning on line 92 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L92

Added line #L92 was not covered by tests
this->getName(), this->getCatalogName(), this->flowSolver()->getCatalogName()));
}
else
{
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirHybridFVM;

Check warning on line 97 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L97

Added line #L97 was not covered by tests
}
}
else
{
// add Reservoir
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirFVM;
if( isThermal() )

Check warning on line 102 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L102

Added line #L102 was not covered by tests
{
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::thermalCompositionalMultiphaseReservoirFVM;

Check warning on line 104 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L104

Added line #L104 was not covered by tests
}
else
{
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirFVM;

Check warning on line 108 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L108

Added line #L108 was not covered by tests
}
}
GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(),

Check warning on line 111 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L111

Added line #L111 was not covered by tests
EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy )));
}

template<>
void
CompositionalMultiphaseReservoirAndWells< MultiphasePoromechanics<> >::
setMGRStrategy()
{
LinearSolverParameters & linearSolverParameters = this->m_linearSolverParameters.get();
LinearSolverParameters & linearSolverParameters = m_linearSolverParameters.get();

Check warning on line 120 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L120

Added line #L120 was not covered by tests

if( linearSolverParameters.preconditionerType != LinearSolverParameters::PreconditionerType::mgr )
return;

Check warning on line 123 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L122-L123

Added lines #L122 - L123 were not covered by tests

linearSolverParameters.mgr.separateComponents = true;
linearSolverParameters.dofsPerNode = 3;

// flow solver here is indeed flow solver, not poromechanics solver
if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseHybridFVM )
if( dynamic_cast< CompositionalMultiphaseHybridFVM * >( this->flowSolver() ) )

Check warning on line 128 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L128

Added line #L128 was not covered by tests
{
GEOS_ERROR( "The poromechanics MGR strategy for hybrid FVM is not implemented" );
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}/{}",

Check warning on line 130 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L130

Added line #L130 was not covered by tests
this->getName(), this->getCatalogName(), this->flowSolver()->getCatalogName() ) );
}
else
{
// add Reservoir
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanicsReservoirFVM;
}
GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(),

Check warning on line 137 in src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp#L137

Added line #L137 was not covered by tests
EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy )));
}

template< typename RESERVOIR_SOLVER >
Expand All @@ -140,15 +157,6 @@
InputError );
}

template< typename RESERVOIR_SOLVER >
void
CompositionalMultiphaseReservoirAndWells< RESERVOIR_SOLVER >::
initializePostInitialConditionsPreSubGroups()
{
Base::initializePostInitialConditionsPreSubGroups();
setMGRStrategy();
}

template< typename RESERVOIR_SOLVER >
void
CompositionalMultiphaseReservoirAndWells< RESERVOIR_SOLVER >::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ class CompositionalMultiphaseReservoirAndWells : public CoupledReservoirAndWells

virtual void initializePreSubGroups() override;

virtual void initializePostInitialConditionsPreSubGroups() override;
virtual void setMGRStrategy() override;

private:

CompositionalMultiphaseBase * flowSolver() const;

void setMGRStrategy();

};

} /* namespace geos */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,18 @@
// Validate well perforations: Ensure that each perforation is in a region targeted by the solver
if( !validateWellPerforations( domain ))
{
return;
GEOS_ERROR( GEOS_FMT( "{}: well perforations validation failed, bad perforations found", this->getName()));

Check warning on line 204 in src/coreComponents/physicsSolvers/multiphysics/CoupledReservoirAndWellsBase.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CoupledReservoirAndWellsBase.hpp#L204

Added line #L204 was not covered by tests
}
}

virtual void
postInputInitialization() override
{
Base::postInputInitialization();

setMGRStrategy();
}

virtual void
implicitStepSetup( real64 const & time_n,
real64 const & dt,
Expand Down Expand Up @@ -298,6 +306,12 @@
DofManager const & dofManager,
SparsityPatternView< globalIndex > const & pattern ) const = 0;

virtual void setMGRStrategy()

Check warning on line 309 in src/coreComponents/physicsSolvers/multiphysics/CoupledReservoirAndWellsBase.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CoupledReservoirAndWellsBase.hpp#L309

Added line #L309 was not covered by tests
{
if( this->m_linearSolverParameters.get().preconditionerType == LinearSolverParameters::PreconditionerType::mgr )
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}", this->getName(), this->getCatalogName()));
}

Check warning on line 313 in src/coreComponents/physicsSolvers/multiphysics/CoupledReservoirAndWellsBase.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/CoupledReservoirAndWellsBase.hpp#L311-L313

Added lines #L311 - L313 were not covered by tests

/// Flag to determine whether the well transmissibility needs to be computed
bool m_isWellTransmissibilityComputed;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,23 @@
setDescription( "Flag to determine whether or not to apply lagging update for the fracture stencil weights. " );

m_numResolves[0] = 0;
}

Check warning on line 84 in src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp#L84

Added line #L84 was not covered by tests

// This may need to be different depending on whether poroelasticity is on or not.
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::hydrofracture;
m_linearSolverParameters.get().mgr.separateComponents = true;
m_linearSolverParameters.get().dofsPerNode = 3;
template< typename POROMECHANICS_SOLVER >
void HydrofractureSolver< POROMECHANICS_SOLVER >::setMGRStrategy()

Check warning on line 87 in src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp#L87

Added line #L87 was not covered by tests
{
LinearSolverParameters & linearSolverParameters = this->m_linearSolverParameters.get();

Check warning on line 89 in src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp#L89

Added line #L89 was not covered by tests

if( linearSolverParameters.preconditionerType != LinearSolverParameters::PreconditionerType::mgr )
return;

Check warning on line 92 in src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp#L91-L92

Added lines #L91 - L92 were not covered by tests

linearSolverParameters.mgr.separateComponents = true;
linearSolverParameters.dofsPerNode = 3;

Check warning on line 95 in src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp#L94-L95

Added lines #L94 - L95 were not covered by tests

// This may need to be different depending on whether poroelasticity is on or not.
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::hydrofracture;
GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(),

Check warning on line 99 in src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp#L98-L99

Added lines #L98 - L99 were not covered by tests
EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy )));
}

template< typename POROMECHANICS_SOLVER >
Expand Down Expand Up @@ -157,6 +168,8 @@
{
Base::postInputInitialization();

setMGRStrategy();

Check warning on line 171 in src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp#L171

Added line #L171 was not covered by tests

static const std::set< integer > binaryOptions = { 0, 1 };
GEOS_ERROR_IF( binaryOptions.count( m_isMatrixPoroelastic ) == 0, viewKeyStruct::isMatrixPoroelasticString() << " option can be either 0 (false) or 1 (true)" );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class HydrofractureSolver : public POROMECHANICS_SOLVER
DofManager const & dofManager,
CRSMatrix< real64, globalIndex > & localMatrix );

virtual void setMGRStrategy() override;

private:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "constitutive/fluid/multifluid/MultiFluidBase.hpp"
#include "constitutive/solid/PorousSolid.hpp"
#include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp"
#include "physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.hpp"
#include "physicsSolvers/multiphysics/poromechanicsKernels/MultiphasePoromechanics.hpp"
#include "physicsSolvers/multiphysics/poromechanicsKernels/ThermalMultiphasePoromechanics.hpp"
#include "physicsSolvers/solidMechanics/SolidMechanicsFields.hpp"
Expand All @@ -45,18 +46,15 @@
MultiphasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >::MultiphasePoromechanics( const string & name,
Group * const parent )
: Base( name, parent )
{
LinearSolverParameters & linearSolverParameters = this->m_linearSolverParameters.get();
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanics;
linearSolverParameters.mgr.separateComponents = true;
linearSolverParameters.dofsPerNode = 3;
}
{}

Check warning on line 49 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L49

Added line #L49 was not covered by tests

template< typename FLOW_SOLVER, typename MECHANICS_SOLVER >
void MultiphasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >::postInputInitialization()
{
Base::postInputInitialization();

setMGRStrategy();

Check warning on line 56 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L56

Added line #L56 was not covered by tests

GEOS_ERROR_IF( this->flowSolver()->getCatalogName() == "CompositionalMultiphaseReservoir" &&
this->getNonlinearSolverParameters().couplingType() != NonlinearSolverParameters::CouplingType::Sequential,
GEOS_FMT( "{}: {} solver is only designed to work for {} = {}",
Expand Down Expand Up @@ -244,11 +242,37 @@
getCatalogName(), this->getDataContext(), poromechanicsTargetRegionNames[i], this->flowSolver()->getDataContext() ),
InputError );
}
}

Check warning on line 245 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L245

Added line #L245 was not covered by tests

template<>
void MultiphasePoromechanics<>::setMGRStrategy()

Check warning on line 248 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L248

Added line #L248 was not covered by tests
{
LinearSolverParameters & linearSolverParameters = this->m_linearSolverParameters.get();

Check warning on line 250 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L250

Added line #L250 was not covered by tests

if( linearSolverParameters.preconditionerType != LinearSolverParameters::PreconditionerType::mgr )
return;

Check warning on line 253 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L252-L253

Added lines #L252 - L253 were not covered by tests

if( this->m_isThermal )
linearSolverParameters.mgr.separateComponents = true;
linearSolverParameters.dofsPerNode = 3;

Check warning on line 256 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L255-L256

Added lines #L255 - L256 were not covered by tests

if( dynamic_cast< CompositionalMultiphaseHybridFVM * >( this->flowSolver() ) )

Check warning on line 258 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L258

Added line #L258 was not covered by tests
{
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}/{}",

Check warning on line 260 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L260

Added line #L260 was not covered by tests
this->getName(), this->getCatalogName(), this->flowSolver()->getCatalogName()));
}
else
{
this->m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::thermalMultiphasePoromechanics;
if( this->m_isThermal )

Check warning on line 265 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L265

Added line #L265 was not covered by tests
{
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::thermalMultiphasePoromechanics;

Check warning on line 267 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L267

Added line #L267 was not covered by tests
}
else
{
linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanics;

Check warning on line 271 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L271

Added line #L271 was not covered by tests
}
}
GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(),

Check warning on line 274 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp#L274

Added line #L274 was not covered by tests
EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy )));
}

template< typename FLOW_SOLVER, typename MECHANICS_SOLVER >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@

virtual void initializePostInitialConditionsPreSubGroups() override;

virtual void setMGRStrategy()

Check warning on line 110 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.hpp#L110

Added line #L110 was not covered by tests
{
if( this->m_linearSolverParameters.get().preconditionerType == LinearSolverParameters::PreconditionerType::mgr )
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}", this->getName(), this->getCatalogName()));
}

Check warning on line 114 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.hpp#L112-L114

Added lines #L112 - L114 were not covered by tests

/**
* @brief Helper function to recompute the bulk density
* @param[in] subRegion the element subRegion
Expand Down
Loading
Loading