Skip to content

Commit

Permalink
Merge branch 'develop' into feature/sframbat/viscoacoustic
Browse files Browse the repository at this point in the history
  • Loading branch information
sframba authored Dec 11, 2024
2 parents bff1d2a + 7e2c33b commit 0d0a713
Show file tree
Hide file tree
Showing 46 changed files with 2,115 additions and 344 deletions.
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-pr3361-9139-2fc4131
baseline: integratedTests/baseline_integratedTests-pr3450-9221-37d940c
allow_fail:
all: ''
streak: ''
12 changes: 12 additions & 0 deletions BASELINE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ 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 #3450 (2024-12-08)
=====================
Added test for explicit runge kutta sprinslider.

PR #3480 (2024-12-06)
=====================
Add "logLevel" parameter under /Problem/Outputs in baseline files

PR #3361 (2024-12-03)
=====================
Revert default gravity treatment to old version. Make the way introduced in #3337 optional.

PR #3361 (2024-12-03)
=====================
Baseline diffs after reimplementation of wave equation acoustic gradient for velocity and density parameters: new field "partialGradient2" and "pressureForward" field replacing "pressureDoubleDerivative".
Expand Down
167 changes: 167 additions & 0 deletions inputFiles/inducedSeismicity/SpringSliderExplicit_base.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?xml version="1.0" ?>
<Problem>
<Solvers>
<QuasiDynamicEQRK32
name="SpringSlider"
targetRegions="{ Fault }"
shearImpedance="4.41"
initialDt="1e-5"
logLevel="1"
discretization="FE1">
</QuasiDynamicEQRK32>

<SurfaceGenerator
name="SurfaceGen"
targetRegions="{ Domain }"
rockToughness="1.0"
mpiCommOrder="1"
fractureRegion="Fault"/>
</Solvers>

<NumericalMethods>
<FiniteElements>
<FiniteElementSpace
name="FE1"
order="1"/>
</FiniteElements>
</NumericalMethods>

<Mesh>
<InternalMesh
name="mesh"
elementTypes="{ C3D8 }"
xCoords="{ 0, 1 }"
yCoords="{ 0, 2 }"
zCoords="{ 0, 1 }"
nx="{ 1 }"
ny="{ 2 }"
nz="{ 1 }"
cellBlockNames="{ cb1 }"/>
</Mesh>

<Geometry>
<ThickPlane
name="faultPlane"
normal="{ 0, 1, 0 }"
origin="{ 0, 1, 0 }"
thickness="0.1"/>
</Geometry>

<ElementRegions>
<CellElementRegion
name="Domain"
cellBlocks="{ cb1 }"
materialList="{}"/>

<SurfaceElementRegion
name="Fault"
materialList="{frictionLaw}"
defaultAperture="1e-3"/>
</ElementRegions>

<Constitutive>
<RateAndStateFriction
name="frictionLaw"
defaultA="0.01"
defaultB="0.015"
defaultDc="1.0e-5"
defaultReferenceVelocity="1.0e-6"
defaultReferenceFrictionCoefficient="0.6"/>
</Constitutive>

<FieldSpecifications>
<FieldSpecification
name="fault"
fieldName="ruptureState"
initialCondition="1"
objectPath="faceManager"
scale="1"
setNames="{ faultPlane }"/>

<FieldSpecification
name="normalTraction"
fieldName="traction"
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
component="0"
scale="50"
setNames="{all}"/>

<FieldSpecification
name="shearTraction1"
fieldName="traction"
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
component="1"
scale="21.2132034356"
setNames="{all}"/>
<FieldSpecification
name="shearTraction2"
fieldName="traction"
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
component="2"
scale="21.2132034356"
setNames="{all}"/>
<FieldSpecification
name="stateVariable"
fieldName="stateVariable"
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
scale="0.6"
setNames="{all}"/>
<FieldSpecification
name="slipRate"
fieldName="slipRate"
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
scale="1.0e-6"
setNames="{all}"/>
<FieldSpecification
name="slipVelocity1"
fieldName="slipVelocity"
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
component="0"
scale="0.70710678118e-6"
setNames="{all}"/>
<FieldSpecification
name="slipVelocity2"
fieldName="slipVelocity"
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
component="1"
scale="0.70710678118e-6"
setNames="{all}"/>
</FieldSpecifications>

<Outputs>
<VTK
name="vtkOutput"
plotFileRoot="springSliderExplicit"/>
<Restart
name="restart"/>

<TimeHistory
name="timeHistoryOutput"
sources="{/Tasks/slipCollection,/Tasks/slipRateCollection,/Tasks/stateVariableCollection}"
filename="springSliderExplicit"/>
</Outputs>

<Tasks>
<PackCollection
name="slipCollection"
objectPath="ElementRegions/Fault/FractureSubRegion"
fieldName="displacementJump"/>

<PackCollection
name="slipRateCollection"
objectPath="ElementRegions/Fault/FractureSubRegion"
fieldName="slipRate"/>

<PackCollection
name="stateVariableCollection"
objectPath="ElementRegions/Fault/FractureSubRegion"
fieldName="stateVariable"/>
</Tasks>
</Problem>
32 changes: 32 additions & 0 deletions inputFiles/inducedSeismicity/SpringSliderExplicit_smoke.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" ?>
<Problem>
<Included>
<File
name="./SpringSliderExplicit_base.xml"/>
</Included>

<Events
maxTime="4.5e4">

<SoloEvent
name="generateFault"
target="/Solvers/SurfaceGen"/>

<PeriodicEvent
name="vtkOutput"
cycleFrequency="1"
targetExactTimestep="0"
target="/Outputs/vtkOutput"/>

<PeriodicEvent
name="solverApplications"
maxEventDt="1e4"
target="/Solvers/SpringSlider"/>

<PeriodicEvent
name="resarts"
timeFrequency="2e4"
targetExactTimestep="0"
target="/Outputs/restart"/>
</Events>
</Problem>
4 changes: 2 additions & 2 deletions inputFiles/inducedSeismicity/SpringSlider_base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
component="0"
scale="0."
scale="0.70710678118e-6"
setNames="{all}"/>
<FieldSpecification
name="slipVelocity2"
fieldName="slipVelocity"
initialCondition="1"
objectPath="ElementRegions/Fault/FractureSubRegion"
component="1"
scale="0."
scale="0.70710678118e-6"
setNames="{all}"/>
</FieldSpecifications>

Expand Down
9 changes: 8 additions & 1 deletion inputFiles/inducedSeismicity/inducedSeismicity.ats
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ decks = [
partitions=((1, 1, 1), ),
restart_step=0,
check_step=3262,
restartcheck_params=RestartcheckParameters(atol=1e-4, rtol=1e-3))
restartcheck_params=RestartcheckParameters(atol=1e-4, rtol=1e-3)),
TestDeck(
name="SpringSliderExplicit_smoke",
description="Spring slider 0D system",
partitions=((1, 1, 1), ),
restart_step=0,
check_step=532,
restartcheck_params=RestartcheckParameters(atol=1e-4, rtol=1e-3))
]
generate_geos_tests(decks)
84 changes: 50 additions & 34 deletions src/coreComponents/fileIO/Outputs/BlueprintOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,53 +129,57 @@ BlueprintOutput::BlueprintOutput( string const & name,
}

///////////////////////////////////////////////////////////////////////////////////////////////////
bool BlueprintOutput::execute( real64 const time,
real64 const,
integer const cycle,
integer const,
real64 const,
bool BlueprintOutput::execute( real64 const time_n,
real64 const GEOS_UNUSED_PARAM( dt ),
integer const cycleNumber,
integer const GEOS_UNUSED_PARAM( eventCounter ),
real64 const GEOS_UNUSED_PARAM( eventProgress ),
DomainPartition & domain )
{
GEOS_MARK_FUNCTION;

MeshLevel const & meshLevel = domain.getMeshBody( 0 ).getBaseDiscretization();
{
Timer timer( m_outputTimer );

conduit::Node meshRoot;
conduit::Node & mesh = meshRoot[ "mesh" ];
conduit::Node & coordset = mesh[ "coordsets/nodes" ];
conduit::Node & topologies = mesh[ "topologies" ];
MeshLevel const & meshLevel = domain.getMeshBody( 0 ).getBaseDiscretization();

mesh[ "state/time" ] = time;
mesh[ "state/cycle" ] = cycle;
conduit::Node meshRoot;
conduit::Node & mesh = meshRoot[ "mesh" ];
conduit::Node & coordset = mesh[ "coordsets/nodes" ];
conduit::Node & topologies = mesh[ "topologies" ];

addNodalData( meshLevel.getNodeManager(), coordset, topologies, mesh[ "fields" ] );
mesh[ "state/time" ] = time_n;
mesh[ "state/cycle" ] = cycleNumber;

dataRepository::Group averagedElementData( "averagedElementData", this );
addElementData( meshLevel.getElemManager(), coordset, topologies, mesh[ "fields" ], averagedElementData );
addNodalData( meshLevel.getNodeManager(), coordset, topologies, mesh[ "fields" ] );

/// The Blueprint will complain if the fields node is present but empty.
if( mesh[ "fields" ].number_of_children() == 0 )
{
mesh.remove( "fields" );
}
dataRepository::Group averagedElementData( "averagedElementData", this );
addElementData( meshLevel.getElemManager(), coordset, topologies, mesh[ "fields" ], averagedElementData );

/// The Blueprint will complain if the fields node is present but empty.
if( mesh[ "fields" ].number_of_children() == 0 )
{
mesh.remove( "fields" );
}

/// Verify that the mesh conforms to the Blueprint.
conduit::Node info;
GEOS_ASSERT_MSG( conduit::blueprint::verify( "mesh", meshRoot, info ), info.to_json() );
/// Verify that the mesh conforms to the Blueprint.
conduit::Node info;
GEOS_ASSERT_MSG( conduit::blueprint::verify( "mesh", meshRoot, info ), info.to_json() );

/// Generate the Blueprint index.
conduit::Node fileRoot;
conduit::Node & index = fileRoot[ "blueprint_index/mesh" ];
conduit::blueprint::mesh::generate_index( mesh, "mesh", MpiWrapper::commSize(), index );
/// Generate the Blueprint index.
conduit::Node fileRoot;
conduit::Node & index = fileRoot[ "blueprint_index/mesh" ];
conduit::blueprint::mesh::generate_index( mesh, "mesh", MpiWrapper::commSize(), index );

/// Verify that the index conforms to the Blueprint.
info.reset();
GEOS_ASSERT_MSG( conduit::blueprint::mesh::index::verify( index, info ), info.to_json() );
/// Verify that the index conforms to the Blueprint.
info.reset();
GEOS_ASSERT_MSG( conduit::blueprint::mesh::index::verify( index, info ), info.to_json() );

/// Write out the root index file, then write out the mesh.
string const completePath = GEOS_FMT( "{}/blueprintFiles/cycle_{:07}", OutputBase::getOutputDirectory(), cycle );
string const filePathForRank = dataRepository::writeRootFile( fileRoot, completePath );
conduit::relay::io::save( meshRoot, filePathForRank, "hdf5" );
/// Write out the root index file, then write out the mesh.
string const completePath = GEOS_FMT( "{}/blueprintFiles/cycle_{:07}", OutputBase::getOutputDirectory(), cycleNumber );
string const filePathForRank = dataRepository::writeRootFile( fileRoot, completePath );
conduit::relay::io::save( meshRoot, filePathForRank, "hdf5" );
}

return false;
}
Expand Down Expand Up @@ -307,7 +311,19 @@ void BlueprintOutput::writeOutConstitutiveData( dataRepository::Group const & co
} );
}

namespace logInfo
{
struct BlueprintOutputTimer : public OutputTimerBase
{
std::string_view getDescription() const override { return "Blueprint output timing"; }
};
}

logInfo::OutputTimerBase const & BlueprintOutput::getTimerCategory() const
{
static logInfo::BlueprintOutputTimer timer;
return timer;
}

REGISTER_CATALOG_ENTRY( OutputBase, BlueprintOutput, string const &, dataRepository::Group * const )

Expand Down
6 changes: 6 additions & 0 deletions src/coreComponents/fileIO/Outputs/BlueprintOutput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ class ElementRegionManager;
*/
class BlueprintOutput : public OutputBase
{
protected:
/**
* @copydoc OutputBase::getTimerCategory
*/
logInfo::OutputTimerBase const & getTimerCategory() const override;

public:

/**
Expand Down
Loading

0 comments on commit 0d0a713

Please sign in to comment.