Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 .integrated_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baselines:
bucket: geosx
baseline: integratedTests/baseline_integratedTests-pr3349-13555-41d98d4
baseline: integratedTests/baseline_integratedTests-pr3776-13573-694fc29

allow_fail:
all: ''
Expand Down
4 changes: 4 additions & 0 deletions BASELINE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This file is designed to track changes to the integrated test baselines.
Any developer who updates the baseline ID in the .integrated_tests.yaml file is expected to create an entry in this file with the pull request number, date, and their justification for rebaselining.
These notes should be in reverse-chronological order, and use the following time format: (YYYY-MM-DD).

PR #3776 (2025-09-13) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr3776-13560-88bd98b.tar.gz>
=====================
Constitutive cleanup: rebaseline due to technical diffs, no real results changes.

PR #3349 (2025-09-13) <https://storage.googleapis.com/geosx/integratedTests/baseline_integratedTests-pr3349-13555-41d98d4.tar.gz>
=====================
Configuration loop acceleration for SolidMechanicsLagrangeContact.
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/constitutive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,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
5 changes: 2 additions & 3 deletions src/coreComponents/constitutive/ConstitutiveBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ ConstitutiveBase::CatalogInterface::CatalogType & ConstitutiveBase::getCatalog()
return catalog;
}

void ConstitutiveBase::allocateConstitutiveData( dataRepository::Group & parent,
localIndex const numConstitutivePointsPerParentIndex )
void ConstitutiveBase::allocateConstitutiveData( Group & parent, localIndex const numPts )
{
m_numQuadraturePoints = numConstitutivePointsPerParentIndex;
m_numQuadraturePoints = numPts;

for( auto & group : this->getSubGroups() )
{
Expand Down
15 changes: 7 additions & 8 deletions src/coreComponents/constitutive/ConstitutiveBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ class ConstitutiveBase : public dataRepository::Group
/**
* @brief Allocate constitutive data and make views to data on parent objects
* @param[in] parent reference to the group that holds the constitutive relation
* @param[in] numConstitutivePointsPerParentIndex number of quadrature points
* @param[in] numPts number of quadrature points
*
* This function does 2 things:
* 1) Allocate data according to the size of parent and numConstitutivePointsPerParentIndex
* 1) Allocate data according to the size of parent and numPts
* 2) Create wrappers to the constitutive data in the parent for easier access
*/
virtual void allocateConstitutiveData( dataRepository::Group & parent,
localIndex const numConstitutivePointsPerParentIndex );
localIndex const numPts );

struct viewKeyStruct
{};
Expand All @@ -129,14 +129,13 @@ class ConstitutiveBase : public dataRepository::Group
* TODO: Remove duplicated code with ObjectManagerBase
*/
template< typename FIELD_TRAIT >
dataRepository::Wrapper< typename FIELD_TRAIT::type > & registerField( FIELD_TRAIT const & fieldTrait,
typename FIELD_TRAIT::type * newObject )
dataRepository::Wrapper< typename FIELD_TRAIT::type > & registerField( typename FIELD_TRAIT::type * newObject )
{
if( FIELD_TRAIT::plotLevel != dataRepository::PlotLevel::NOPLOT )
m_userFields.emplace_back( fieldTrait.key() );
m_userFields.emplace_back( FIELD_TRAIT::key() );

return registerWrapper( fieldTrait.key(), newObject ).
setApplyDefaultValue( fieldTrait.defaultValue() ).
return registerWrapper( FIELD_TRAIT::key(), newObject ).
setApplyDefaultValue( FIELD_TRAIT::defaultValue() ).
setPlotLevel( FIELD_TRAIT::plotLevel ).
setRestartFlags( FIELD_TRAIT::restartFlag ).
setDescription( FIELD_TRAIT::description );
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 @@ -44,9 +44,8 @@ CapillaryPressureBase::CapillaryPressureBase( string const & name,
registerWrapper( viewKeyStruct::phaseOrderString(), &m_phaseOrder ).
setSizedFromParent( 0 );

registerField( fields::cappres::phaseCapPressure{}, &m_phaseCapPressure );
registerField( fields::cappres::dPhaseCapPressure_dPhaseVolFraction{}, &m_dPhaseCapPressure_dPhaseVolFrac );

registerField< fields::cappres::phaseCapPressure >( &m_phaseCapPressure );
registerField< fields::cappres::dPhaseCapPressure_dPhaseVolFraction >( &m_dPhaseCapPressure_dPhaseVolFrac );
}

void CapillaryPressureBase::postInputInitialization()
Expand Down Expand Up @@ -81,20 +80,18 @@ void CapillaryPressureBase::postInputInitialization()
m_phaseOrder[m_phaseTypes[ip]] = ip;
}

// call to correctly set member array tertiary sizes on the 'main' material object
resizeFields( 0, 0 );

// set labels on array wrappers for plottable fields
setLabels();
}

void CapillaryPressureBase::resizeFields( localIndex const size,
localIndex const numPts )
void CapillaryPressureBase::allocateConstitutiveData( Group & parent, localIndex const numPts )
{
integer const NP = numFluidPhases();

m_phaseCapPressure.resize( size, numPts, NP );
m_dPhaseCapPressure_dPhaseVolFrac.resize( size, numPts, NP, NP );
m_phaseCapPressure.resize( 0, numPts, NP );
m_dPhaseCapPressure_dPhaseVolFrac.resize( 0, numPts, NP, NP );

ConstitutiveBase::allocateConstitutiveData( parent, numPts );
}

void CapillaryPressureBase::setLabels()
Expand All @@ -103,13 +100,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 @@ -105,7 +105,7 @@ class CapillaryPressureBase : public ConstitutiveBase
dataRepository::Group * const parent );

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

/**
* @brief Initialize the capillary pressure state (needed when capillary pressure depends on porosity and permeability)
Expand Down Expand Up @@ -163,13 +163,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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,7 @@ JFunctionCapillaryPressure::JFunctionCapillaryPressure( std::string const & name
toString( PermeabilityDirection::Y ) + " - only use the permeability in the y direction,\n" +
toString( PermeabilityDirection::Z ) + " - only use the permeability in the z direction." );

registerField( fields::cappres::jFuncMultiplier{}, &m_jFuncMultiplier );

registerWrapper( viewKeyStruct::jFunctionWrappersString(), &m_jFuncKernelWrappers ).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need this for the deliverClone to work properly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't break anything after I removed it, but I can revert since I am not exactly sure what is going on here

setSizedFromParent( 0 ).
setRestartFlags( RestartFlags::NO_WRITE );
registerField< fields::cappres::jFuncMultiplier >( &m_jFuncMultiplier );
}

void JFunctionCapillaryPressure::postInputInitialization()
Expand Down Expand Up @@ -340,11 +336,11 @@ JFunctionCapillaryPressure::createKernelWrapper()
m_dPhaseCapPressure_dPhaseVolFrac );
}

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

CapillaryPressureBase::allocateConstitutiveData( parent, numPts );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class JFunctionCapillaryPressure : public CapillaryPressureBase
JFunctionCapillaryPressure( std::string const & name, dataRepository::Group * const parent );

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

virtual void initializeRockState( arrayView2d< real64 const > const & initialPorosity,
arrayView3d< real64 const > const & initialPermeability ) const override;
Expand Down Expand Up @@ -112,7 +112,6 @@ class JFunctionCapillaryPressure : public CapillaryPressureBase
static constexpr char const * porosityExponentString() { return "porosityExponent"; }
static constexpr char const * permeabilityExponentString() { return "permeabilityExponent"; }
static constexpr char const * permeabilityDirectionString() { return "permeabilityDirection"; }
static constexpr char const * jFunctionWrappersString() { return "jFunctionWrappers"; }
};

/**
Expand All @@ -126,7 +125,6 @@ class JFunctionCapillaryPressure : public CapillaryPressureBase
Z, ///< use permz only
};


private:

virtual void postInputInitialization() override;
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
14 changes: 3 additions & 11 deletions src/coreComponents/constitutive/contact/CoulombFriction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ namespace constitutive
{

CoulombFriction::CoulombFriction( string const & name, Group * const parent ):
FrictionBase( name, parent ),
m_cohesion(),
m_frictionCoefficient(),
m_elasticSlip()
FrictionBase( name, parent )
{
registerWrapper( viewKeyStruct::shearStiffnessString(), &m_shearStiffness ).
setInputFlag( InputFlags::OPTIONAL ).
Expand All @@ -52,9 +49,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 +57,13 @@ void CoulombFriction::postInputInitialization()

}

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

FrictionBase::allocateConstitutiveData( parent, numConstitutivePointsPerParentIndex );
FrictionBase::allocateConstitutiveData( parent, numPts );
}


CoulombFrictionUpdates CoulombFriction::createKernelUpdates() const
{
return CoulombFrictionUpdates( m_displacementJumpThreshold,
Expand Down
43 changes: 19 additions & 24 deletions src/coreComponents/constitutive/contact/CoulombFriction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,14 @@ 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;
localIndex const numPts ) override final;

/// Type of kernel wrapper for in-kernel update
using KernelWrapper = CoulombFrictionUpdates;
Expand All @@ -187,6 +182,24 @@ 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;
Expand All @@ -205,24 +218,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
Loading
Loading