Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
766daa3
refactor: constitutive cleanup
Aug 14, 2025
a571ba0
code style and build fix
Aug 14, 2025
3033701
fix unit tests
Aug 15, 2025
6883847
unused
Aug 15, 2025
3767103
revert for hydrofrac
Aug 15, 2025
5646aa2
trying to avoid diffs
Aug 15, 2025
f823319
Merge branch 'develop' into pt/constitutive-cleanup
paveltomin Aug 15, 2025
dd30886
Update testInvariantImmiscibleFluid.cpp
paveltomin Aug 15, 2025
201abf8
Update src/coreComponents/constitutive/solid/InvariantDecompositions.hpp
paveltomin Aug 15, 2025
56db8a1
Update InvariantDecompositions.hpp
paveltomin Aug 15, 2025
b9b9a00
Update src/coreComponents/constitutive/solid/ElasticIsotropicPressure…
paveltomin Aug 15, 2025
6060796
Update src/coreComponents/constitutive/solid/ElasticIsotropicPressure…
paveltomin Aug 15, 2025
e47c74a
Update src/coreComponents/constitutive/solid/ElasticIsotropicPressure…
paveltomin Aug 15, 2025
b77d58b
Update ElasticIsotropicPressureDependent.hpp
paveltomin Aug 15, 2025
af0c74d
Update src/coreComponents/constitutive/solid/ElasticIsotropicPressure…
paveltomin Aug 15, 2025
bc447e6
Update src/coreComponents/constitutive/solid/ElasticIsotropicPressure…
paveltomin Aug 15, 2025
5eada73
Update ElasticIsotropicPressureDependent.hpp
paveltomin Aug 15, 2025
922e0c4
Merge branch 'develop' into pt/constitutive-cleanup
paveltomin Aug 15, 2025
3a0a5f2
Update Damage.cpp
paveltomin Aug 16, 2025
d2f24a1
unify registerField
Aug 19, 2025
4f2b194
Merge branch 'develop' into pt/constitutive-cleanup
paveltomin Aug 19, 2025
978851c
fix commit mistake
Aug 21, 2025
a8df789
Merge remote-tracking branch 'origin/develop' into pt/constitutive-cl…
Aug 22, 2025
a943abc
step back
Aug 22, 2025
3282e6f
Remove unused include in CapillaryPressureBase.cpp
paveltomin Aug 22, 2025
259e10c
.
Aug 22, 2025
2863cd1
Merge branch 'pt/constitutive-cleanup' of https://github.com/GEOS-DEV…
Aug 22, 2025
31b80be
fix unit test
Aug 22, 2025
1ebe215
Merge branch 'develop' into pt/constitutive-cleanup
paveltomin Aug 22, 2025
136ff17
last touch
Aug 22, 2025
415cb86
cleanup TODO
Aug 22, 2025
cb02533
missign override
Aug 23, 2025
2ab59e7
Merge remote-tracking branch 'origin/develop' into pt/constitutive-cl…
Aug 25, 2025
8183462
Merge branch 'develop' into pt/constitutive-cleanup
paveltomin Aug 25, 2025
c16b996
remove redundant
Aug 25, 2025
02b467c
fix unit test
Aug 25, 2025
ea50171
Merge branch 'develop' into pt/constitutive-cleanup
paveltomin Sep 8, 2025
cbd6f2c
Merge remote-tracking branch 'origin/develop' into pt/constitutive-cl…
Sep 12, 2025
705becc
this should look better
Sep 12, 2025
f6da3db
restore initializeState
Sep 12, 2025
0ac4044
Merge remote-tracking branch 'origin/develop' into pt/constitutive-cl…
Sep 13, 2025
adbdd4c
Replace fluid.saveConvergedState with fluid.initializeState
paveltomin Sep 13, 2025
17417fe
Change fluid state saving to initialization
paveltomin Sep 13, 2025
47d9edb
Add initializeState method to SingleFluidBase
paveltomin Sep 13, 2025
e0222df
Add initializeState method to SingleFluidBase
paveltomin Sep 13, 2025
39c1251
Replace saveConvergedState with initializeState
paveltomin Sep 13, 2025
e0513aa
Replace saveConvergedState with initializeState
paveltomin Sep 13, 2025
88bd98b
Merge branch 'develop' into pt/constitutive-cleanup
paveltomin Sep 13, 2025
381a723
Update baseline path in integrated tests configuration
paveltomin Sep 14, 2025
08e6914
Update baseline notes with recent PR entries
paveltomin Sep 14, 2025
c268d0c
Update baseline path in integrated tests configuration
paveltomin Sep 14, 2025
f2b24b9
fix hyst cases
Sep 14, 2025
5b9caf6
fix pressure perm
Sep 14, 2025
694fc29
fix damage
Sep 14, 2025
5d0d5f0
Update baseline path in integrated tests configuration
paveltomin Sep 14, 2025
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
2 changes: 1 addition & 1 deletion src/coreComponents/constitutive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ set( constitutive_headers
solid/SolidUtilities.hpp
solid/SolidInternalEnergy.hpp
solid/SolidModelDiscretizationOps.hpp
solid/SolidModelDiscretizationOpsFullyAnisotroipic.hpp
solid/SolidModelDiscretizationOpsFullyAnisotropic.hpp
solid/SolidModelDiscretizationOpsIsotropic.hpp
solid/SolidModelDiscretizationOpsTransverseIsotropic.hpp
solid/SolidModelDiscretizationOpsOrthotropic.hpp
Expand Down
2 changes: 2 additions & 0 deletions src/coreComponents/constitutive/ConstitutiveBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ void ConstitutiveBase::allocateConstitutiveData( dataRepository::Group & parent,
{
m_numQuadraturePoints = numConstitutivePointsPerParentIndex;

resizeFields( parent.size(), numConstitutivePointsPerParentIndex );

for( auto & group : this->getSubGroups() )
{
for( auto & wrapper : group.second->wrappers() )
Expand Down
13 changes: 13 additions & 0 deletions src/coreComponents/constitutive/ConstitutiveBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,19 @@ class ConstitutiveBase : public dataRepository::Group
return m_userFields;
}

protected:

/**
* @brief Function called internally to resize member arrays
* @param size primary dimension (e.g. number of cells)
* @param numPts secondary dimension (e.g. number of gauss points per cell)
*/
virtual void resizeFields( localIndex const GEOS_UNUSED_PARAM( size ),
localIndex const GEOS_UNUSED_PARAM( numPts ) )
{
// Nothing to do
}

private:

/**
Expand Down
3 changes: 0 additions & 3 deletions src/coreComponents/constitutive/NullModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ NullModel::NullModel( string const & name,
ConstitutiveBase( name, parent )
{}

NullModel::~NullModel()
{}

REGISTER_CATALOG_ENTRY( ConstitutiveBase, NullModel, string const &, dataRepository::Group * const )

} // constitutive
Expand Down
8 changes: 1 addition & 7 deletions src/coreComponents/constitutive/NullModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,10 @@ class NullModel : public constitutive::ConstitutiveBase
NullModel( string const & name,
Group * const parent );

/// Destrutor
virtual ~NullModel();

/// string name to use for this class in the catalog
static constexpr auto m_catalogNameString = "NullModel";

/**
* @return A string that is used to register/lookup this class in the registry
*/
static string catalogName() { return m_catalogNameString; }
static string catalogName() { return "NullModel"; }

virtual string getCatalogName() const override { return catalogName(); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void CapillaryPressureBase::postInputInitialization()
}

// call to correctly set member array tertiary sizes on the 'main' material object
resizeFields( 0, 0 );
resizeFields( 0, 0 ); // TODO figure out why this is really needed

// set labels on array wrappers for plottable fields
setLabels();
Expand All @@ -103,13 +103,6 @@ void CapillaryPressureBase::setLabels()
setDimLabels( 2, m_phaseNames );
}

void CapillaryPressureBase::allocateConstitutiveData( dataRepository::Group & parent,
localIndex const numConstitutivePointsPerParentIndex )
{
resizeFields( parent.size(), numConstitutivePointsPerParentIndex );
ConstitutiveBase::allocateConstitutiveData( parent, numConstitutivePointsPerParentIndex );
}

} // namespace constitutive

} // namespace geos
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ class CapillaryPressureBase : public ConstitutiveBase
CapillaryPressureBase( string const & name,
dataRepository::Group * const parent );

virtual void allocateConstitutiveData( dataRepository::Group & parent,
localIndex const numConstitutivePointsPerParentIndex ) override;

/**
* @brief Initialize the capillary pressure state (needed when capillary pressure depends on porosity and permeability)
* @param[in] initialPorosity the initial porosity field after reservoir initialization
Expand Down Expand Up @@ -163,13 +160,6 @@ class CapillaryPressureBase : public ConstitutiveBase

private:

/**
* @brief Function called internally to resize member arrays
* @param size primary dimension (e.g. number of cells)
* @param numPts secondary dimension (e.g. number of gauss points per cell)
*/
void resizeFields( localIndex const size, localIndex const numPts );

/**
* @brief Called internally to set array dim labels.
*/
Expand All @@ -179,6 +169,13 @@ class CapillaryPressureBase : public ConstitutiveBase

virtual void postInputInitialization() override;

/**
* @brief Function called internally to resize member arrays
* @param size primary dimension (e.g. number of cells)
* @param numPts secondary dimension (e.g. number of gauss points per cell)
*/
virtual void resizeFields( localIndex const size, localIndex const numPts ) override;
Comment thread
paveltomin marked this conversation as resolved.
Outdated

// phase names read from input
string_array m_phaseNames;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ JFunctionCapillaryPressure::createKernelWrapper()
m_dPhaseCapPressure_dPhaseVolFrac );
}

void JFunctionCapillaryPressure::allocateConstitutiveData( dataRepository::Group & parent,
localIndex const numConstitutivePointsPerParentIndex )
void JFunctionCapillaryPressure::resizeFields( localIndex const size, localIndex const numPts )
{
m_jFuncMultiplier.resize( parent.size(), numFluidPhases()-1 );
CapillaryPressureBase::allocateConstitutiveData( parent, numConstitutivePointsPerParentIndex );
CapillaryPressureBase::resizeFields( size, numPts );

m_jFuncMultiplier.resize( size, numFluidPhases()-1 );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ class JFunctionCapillaryPressure : public CapillaryPressureBase

JFunctionCapillaryPressure( std::string const & name, dataRepository::Group * const parent );

virtual void allocateConstitutiveData( dataRepository::Group & parent,
localIndex const numConstitutivePointsPerParentIndex ) override;

virtual void initializeRockState( arrayView2d< real64 const > const & initialPorosity,
arrayView3d< real64 const > const & initialPermeability ) const override;

Expand Down Expand Up @@ -126,6 +123,14 @@ class JFunctionCapillaryPressure : public CapillaryPressureBase
Z, ///< use permz only
};

protected:

/**
* @brief Function called internally to resize member arrays
* @param size primary dimension (e.g. number of cells)
* @param numPts secondary dimension (e.g. number of gauss points per cell)
*/
virtual void resizeFields( localIndex const size, localIndex const numPts ) override;

private:

Expand Down
3 changes: 0 additions & 3 deletions src/coreComponents/constitutive/contact/BartonBandis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ BartonBandis::BartonBandis( string const & name, Group * const parent ):
setDescription( " Reference normal stress." );
}

BartonBandis::~BartonBandis()
{}

void BartonBandis::postInputInitialization()
{
GEOS_THROW_IF( m_referenceNormalStress <= 0.0,
Expand Down
16 changes: 6 additions & 10 deletions src/coreComponents/constitutive/contact/BartonBandis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ class BartonBandis : public HydraulicApertureBase
BartonBandis( string const & name,
Group * const parent );

/**
* @brief default destructor
*/
virtual ~BartonBandis() override;

static string catalogName() { return "BartonBandis"; }

virtual string getCatalogName() const override { return catalogName(); }
Expand All @@ -118,17 +113,18 @@ class BartonBandis : public HydraulicApertureBase
*/
KernelWrapper createKernelWrapper() const;

struct viewKeyStruct : public HydraulicApertureBase::viewKeyStruct
{
/// string/key for reference normal stress
static constexpr char const * referenceNormalStressString() { return "referenceNormalStress"; }
};

protected:

virtual void postInputInitialization() override;

private:

struct viewKeyStruct : public HydraulicApertureBase::viewKeyStruct
{
/// string/key for reference normal stress
static constexpr char const * referenceNormalStressString() { return "referenceNormalStress"; }
};
/// Reference normal stress
real64 m_referenceNormalStress;
};
Expand Down
11 changes: 3 additions & 8 deletions src/coreComponents/constitutive/contact/CoulombFriction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ CoulombFriction::CoulombFriction( string const & name, Group * const parent ):
setDescription( "Elastic Slip" );
}

CoulombFriction::~CoulombFriction()
{}

void CoulombFriction::postInputInitialization()
{
GEOS_THROW_IF( m_frictionCoefficient < 0.0,
Expand All @@ -63,15 +60,13 @@ void CoulombFriction::postInputInitialization()

}

void CoulombFriction::allocateConstitutiveData( Group & parent,
localIndex const numConstitutivePointsPerParentIndex )
void CoulombFriction::resizeFields( localIndex const size, localIndex const numPts )
{
m_elasticSlip.resize( 0, 2 );
FrictionBase::resizeFields( size, numPts );

FrictionBase::allocateConstitutiveData( parent, numConstitutivePointsPerParentIndex );
m_elasticSlip.resize( 0, 2 ); // 0 to resize and assign default value later
}


CoulombFrictionUpdates CoulombFriction::createKernelUpdates() const
{
return CoulombFrictionUpdates( m_displacementJumpThreshold,
Expand Down
51 changes: 25 additions & 26 deletions src/coreComponents/constitutive/contact/CoulombFriction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,12 @@ class CoulombFriction : public FrictionBase
*/
CoulombFriction( string const & name, Group * const parent );

/**
* Default Destructor
*/
virtual ~CoulombFriction() override;

static string catalogName() { return "Coulomb"; }

virtual string getCatalogName() const override { return catalogName(); }

///@}

virtual void allocateConstitutiveData( dataRepository::Group & parent,
localIndex const numConstitutivePointsPerParentIndex ) override final;

/// Type of kernel wrapper for in-kernel update
using KernelWrapper = CoulombFrictionUpdates;

Expand All @@ -187,10 +179,35 @@ class CoulombFriction : public FrictionBase
*/
KernelWrapper createKernelUpdates() const;

/**
* @struct Set of "char const *" and keys for data specified in this class.
*/
struct viewKeyStruct : public FrictionBase::viewKeyStruct
{
/// string/key for shear stiffness
static constexpr char const * shearStiffnessString() { return "shearStiffness"; }

/// string/key for cohesion
static constexpr char const * cohesionString() { return "cohesion"; }

/// string/key for friction coefficient
static constexpr char const * frictionCoefficientString() { return "frictionCoefficient"; }

/// string/key for the elastic slip
static constexpr char const * elasticSlipString() { return "elasticSlip"; }
};

protected:

virtual void postInputInitialization() override;

/**
* @brief Function called internally to resize member arrays
* @param size primary dimension (e.g. number of cells)
* @param numPts secondary dimension (e.g. number of gauss points per cell)
*/
virtual void resizeFields( localIndex const size, localIndex const numPts ) override;

private:

/// The shear stiffness
Expand All @@ -205,24 +222,6 @@ class CoulombFriction : public FrictionBase
/// Elastic slip
array2d< real64 > m_elasticSlip;

/**
* @struct Set of "char const *" and keys for data specified in this class.
*/
struct viewKeyStruct : public FrictionBase::viewKeyStruct
{
/// string/key for shear stiffness
static constexpr char const * shearStiffnessString() { return "shearStiffness"; }

/// string/key for cohesion
static constexpr char const * cohesionString() { return "cohesion"; }

/// string/key for friction coefficient
static constexpr char const * frictionCoefficientString() { return "frictionCoefficient"; }

/// string/key for the elastic slip
static constexpr char const * elasticSlipString() { return "elasticSlip"; }
};

};


Expand Down
3 changes: 0 additions & 3 deletions src/coreComponents/constitutive/contact/FrictionBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ FrictionBase::FrictionBase( string const & name,
setDescription( "A threshold valued to determine whether a fracture is open or not." );
}

FrictionBase::~FrictionBase()
{}

FrictionBaseUpdates FrictionBase::createKernelWrapper() const
{
return FrictionBaseUpdates( m_displacementJumpThreshold );
Expand Down
5 changes: 0 additions & 5 deletions src/coreComponents/constitutive/contact/FrictionBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,6 @@ class FrictionBase : public ConstitutiveBase
FrictionBase( string const & name,
Group * const parent );

/**
* @brief default destructor
*/
virtual ~FrictionBase() override;

/// Type of kernel wrapper for in-kernel update
using KernelWrapper = FrictionBaseUpdates;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ FrictionlessContact::FrictionlessContact( string const & name,
FrictionBase( name, parent )
{}

FrictionlessContact::~FrictionlessContact()
{}

FrictionlessContactUpdates FrictionlessContact::createKernelUpdates() const
{
return FrictionlessContactUpdates( m_displacementJumpThreshold );
Expand Down
13 changes: 0 additions & 13 deletions src/coreComponents/constitutive/contact/FrictionlessContact.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ class FrictionlessContact : public FrictionBase
FrictionlessContact( string const & name,
Group * const parent );

/**
* @brief default destructor
*/
virtual ~FrictionlessContact() override;

/**
* @return A string that is used to register/lookup this class in the registry
*/
Expand All @@ -106,14 +101,6 @@ class FrictionlessContact : public FrictionBase
*/
KernelWrapper createKernelUpdates() const;

/**
* @struct Structure to hold scoped key names
*/
struct viewKeyStruct : public ConstitutiveBase::viewKeyStruct
{};

protected:

};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ HydraulicApertureBase::HydraulicApertureBase( string const & name,
setDescription( "Reference hydraulic aperture. It is the aperture at zero normal stress." );
}

HydraulicApertureBase::~HydraulicApertureBase()
{}



} /* namespace constitutive */

} /* namespace geos */
Loading
Loading