Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -101,11 +101,7 @@ class MultiphasePoromechanics : public PoromechanicsSolver< FLOW_SOLVER, MECHANI

protected:

virtual void setMGRStrategy() override
{
if( this->m_linearSolverParameters.get().preconditionerType == LinearSolverParameters::PreconditionerType::mgr )
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}", this->getName(), this->getCatalogName()));
}
GEOS_MGR_STRATEGY_NOT_SUPPORTED()

/**
* @brief Helper function to recompute the bulk density
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
namespace geos
{

template< template< typename, typename > class POROMECHANICS_BASE, typename FLOW_SOLVER >
class PoromechanicsConformingFractures : public POROMECHANICS_BASE< FLOW_SOLVER, SolidMechanicsLagrangeContact >
template< template< typename, typename > class POROMECHANICS_BASE, typename FLOW_SOLVER , typename CONTACT_SOLVER = SolidMechanicsLagrangeContact >
class PoromechanicsConformingFractures : public POROMECHANICS_BASE< FLOW_SOLVER, CONTACT_SOLVER >
{
public:
using Base = POROMECHANICS_BASE< FLOW_SOLVER, SolidMechanicsLagrangeContact >;
using Base = POROMECHANICS_BASE< FLOW_SOLVER, CONTACT_SOLVER >;

PoromechanicsConformingFractures( const string & name,
dataRepository::Group * const parent )
Expand Down Expand Up @@ -181,6 +181,11 @@ class PoromechanicsConformingFractures : public POROMECHANICS_BASE< FLOW_SOLVER,

NumericalMethodsManager const & numericalMethodManager = domain.getNumericalMethodManager();
FiniteVolumeManager const & fvManager = numericalMethodManager.getFiniteVolumeManager();

//TODO (jafranc) - remove once ALM-bubble is frame as a stab method - tmp runtime is fine as it is tmp
if(this->solidMechanicsSolver()->hasStabilization())
{

FluxApproximationBase const & stabilizationMethod = fvManager.getFluxApproximation( this->solidMechanicsSolver()->getStabilizationName() );

stabilizationMethod.forStencils< SurfaceElementStencil >( mesh, [&]( SurfaceElementStencil const & stencil )
Expand Down Expand Up @@ -224,6 +229,7 @@ class PoromechanicsConformingFractures : public POROMECHANICS_BASE< FLOW_SOLVER,
}
}
} );
}
} );
}

Expand Down Expand Up @@ -431,7 +437,7 @@ class PoromechanicsConformingFractures : public POROMECHANICS_BASE< FLOW_SOLVER,
} );
} );

this->solidMechanicsSolver()->assembleContact( domain, dofManager, localMatrix, localRhs );
this->solidMechanicsSolver()->assembleContact( time_n, dt, domain, dofManager, localMatrix, localRhs );
}

virtual void assembleCouplingTerms( real64 const time_n,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ ENUM_STRINGS( StabilizationType,
"Local" );
}

#define GEOS_MGR_STRATEGY_NOT_SUPPORTED() \
virtual void setMGRStrategy() override \
{ \
if( this->m_linearSolverParameters.get().preconditionerType == LinearSolverParameters::PreconditionerType::mgr ) \
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}", this->getName(), this->getCatalogName() ) ); \
}

template< typename FLOW_SOLVER, typename MECHANICS_SOLVER = SolidMechanicsLagrangianFEM >
class PoromechanicsSolver : public CoupledSolver< FLOW_SOLVER, MECHANICS_SOLVER >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,8 @@ class SinglePhasePoromechanics : public PoromechanicsSolver< FLOW_SOLVER, MECHAN

virtual void initializePostInitialConditionsPreSubGroups() override;

virtual void setMGRStrategy() override
{
if( this->m_linearSolverParameters.get().preconditionerType == LinearSolverParameters::PreconditionerType::mgr )
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}", this->getName(), this->getCatalogName()));
}

GEOS_MGR_STRATEGY_NOT_SUPPORTED()

virtual void mapSolutionBetweenSolvers( DomainPartition & domain, integer const solverType ) override
{
GEOS_MARK_FUNCTION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,7 @@ class SinglePhasePoromechanicsConformingFractures : public PoromechanicsConformi
* These functions provide the primary interface that is required for derived classes
*/
/**@{*/

virtual void setMGRStrategy() override
{
if( this->m_linearSolverParameters.get().preconditionerType == LinearSolverParameters::PreconditionerType::mgr )
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}", this->getName(), this->getCatalogName()));
}
GEOS_MGR_STRATEGY_NOT_SUPPORTED()

virtual void assembleSystem( real64 const time_n,
real64 const dt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,16 @@ template< typename FLOW_SOLVER >
void SinglePhasePoromechanicsConformingFracturesALM< FLOW_SOLVER >::postInputInitialization()
{
Base::postInputInitialization();

GEOS_WARNING_IF( this->getNonlinearSolverParameters().couplingType() == NonlinearSolverParameters::CouplingType::FullyImplicit,
"FullyImplicit coupling not implemented for this solver. A sequential coupling approach will be used." );

this->getNonlinearSolverParameters().m_couplingType = NonlinearSolverParameters::CouplingType::Sequential;
forceSequential();
}

template< typename FLOW_SOLVER >
void SinglePhasePoromechanicsConformingFracturesALM< FLOW_SOLVER >::setupCoupling( DomainPartition const & domain,
DofManager & dofManager ) const
void SinglePhasePoromechanicsConformingFracturesALM< FLOW_SOLVER >::forceSequential()
{
GEOS_MARK_FUNCTION;

Base::setupCoupling( domain, dofManager );

dofManager.addCoupling( this->getFlowDofKey(),
fields::contact::traction::key(),
DofManager::Connector::Elem );
GEOS_WARNING_IF( this->getNonlinearSolverParameters().couplingType() == NonlinearSolverParameters::CouplingType::FullyImplicit,
"FullyImplicit coupling not implemented for this solver. A sequential coupling approach will be used." );

this->getNonlinearSolverParameters().m_couplingType = NonlinearSolverParameters::CouplingType::Sequential;
}


Expand Down Expand Up @@ -137,19 +128,6 @@ void SinglePhasePoromechanicsConformingFracturesALM< FLOW_SOLVER >::assembleCoup
}
}

template< typename FLOW_SOLVER >
void SinglePhasePoromechanicsConformingFracturesALM< FLOW_SOLVER >::updateState( DomainPartition & domain )
{
GEOS_MARK_FUNCTION;

Base::updateState( domain );
this->solidMechanicsSolver()->updateState( domain );

this->flowSolver()->prepareStencilWeights( domain );
updateHydraulicApertureAndFracturePermeability( domain );
this->flowSolver()->updateStencilWeights( domain );
}

template< typename FLOW_SOLVER >
void SinglePhasePoromechanicsConformingFracturesALM< FLOW_SOLVER >::
setUpDflux_dApertureMatrix( DomainPartition & domain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@
#ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_SINGLEPHASEPOROMECHANICSCONFORMINGFRACTURESALM_HPP_
#define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_SINGLEPHASEPOROMECHANICSCONFORMINGFRACTURESALM_HPP_

#include "physicsSolvers/multiphysics/SinglePhasePoromechanics.hpp"
#include "common/logger/Logger.hpp"
#include "physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFracturesALM.hpp"
#include "physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp"
#include "physicsSolvers/multiphysics/PoromechanicsConformingFractures.hpp"
#include "physicsSolvers/multiphysics/SinglePhasePoromechanics.hpp"

namespace geos
{

template< typename FLOW_SOLVER = SinglePhaseBase >
class SinglePhasePoromechanicsConformingFracturesALM : public SinglePhasePoromechanics< FLOW_SOLVER, SolidMechanicsAugmentedLagrangianContact >
class SinglePhasePoromechanicsConformingFracturesALM : public PoromechanicsConformingFractures< SinglePhasePoromechanics, FLOW_SOLVER, SolidMechanicsAugmentedLagrangianContact >
{
public:

using Base = SinglePhasePoromechanics< FLOW_SOLVER, SolidMechanicsAugmentedLagrangianContact >;
using Base = PoromechanicsConformingFractures< SinglePhasePoromechanics, FLOW_SOLVER , SolidMechanicsAugmentedLagrangianContact >;
using Base::m_solvers;
using Base::m_dofManager;
using Base::m_localMatrix;
Expand Down Expand Up @@ -82,8 +85,8 @@ class SinglePhasePoromechanicsConformingFracturesALM : public SinglePhasePoromec
*/
/**@{*/

virtual void setupCoupling( DomainPartition const & domain,
DofManager & dofManager ) const override final;
// virtual void setupCoupling( DomainPartition const & domain,
// DofManager & dofManager ) const override final;

virtual void setupSystem( DomainPartition & domain,
DofManager & dofManager,
Expand All @@ -99,16 +102,13 @@ class SinglePhasePoromechanicsConformingFracturesALM : public SinglePhasePoromec
CRSMatrixView< real64, globalIndex const > const & localMatrix,
arrayView1d< real64 > const & localRhs ) override final;

virtual void updateState( DomainPartition & domain ) override final;

virtual void setMGRStrategy() override final
{
if( this->m_linearSolverParameters.get().preconditionerType == LinearSolverParameters::PreconditionerType::mgr )
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}", this->getName(), this->getCatalogName()));
}
// GEOS_MGR_STRATEGY_NOT_SUPPORTED()

/**@}*/




private:

struct viewKeyStruct : public Base::viewKeyStruct
Expand Down Expand Up @@ -183,6 +183,11 @@ class SinglePhasePoromechanicsConformingFracturesALM : public SinglePhasePoromec
DofManager const & dofManager,
CRSMatrix< real64, globalIndex > & localMatrix );

/**
* @brief Force sequential mode with warning on explicit fully-implicit - temporary
*/
void forceSequential();

virtual void mapSolutionBetweenSolvers( DomainPartition & domain,
integer const solverType ) override;

Expand Down Expand Up @@ -211,6 +216,16 @@ class SinglePhasePoromechanicsConformingFracturesALM : public SinglePhasePoromec

virtual void postInputInitialization() override final;

//- to be overloaded.
virtual void assembleFluidMassResidualDerivativeWrtDisplacement( MeshLevel const & GEOS_UNUSED_PARAM(mesh),
string_array const & GEOS_UNUSED_PARAM(regionNames),
DofManager const & GEOS_UNUSED_PARAM(dofManager),
CRSMatrixView< real64, globalIndex const > const & GEOS_UNUSED_PARAM(localMatrix),
arrayView1d< real64 > const & GEOS_UNUSED_PARAM(localRhs) ) override
{ GEOS_ERROR("Sequential implementation only."); };

virtual integer numFluidComponents() const { return 1; }

};

} /* namespace geos */
Expand Down
Loading
Loading