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

feat: Add Taper Layers in wave solvers #3224

Open
wants to merge 92 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
b7576aa
Start implementation for taper
acitrain May 2, 2024
445fc32
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain May 3, 2024
22d1fea
Move Taper file after merge with develop
acitrain May 3, 2024
856729e
Finalize first implementation for taper layers
acitrain May 3, 2024
da036c2
Fix bug in taperCoef computation
acitrain May 22, 2024
3112903
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain May 22, 2024
2aa98da
Fix little bug when taking elemCenter
acitrain May 23, 2024
2ddb746
Fix typo
acitrain May 23, 2024
ec144d8
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jun 6, 2024
0d19cdd
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jun 11, 2024
694f1e8
Put Taper on nodes and not on element (need to be tested)
acitrain Jun 11, 2024
6dd686b
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jun 14, 2024
a83a20a
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jun 24, 2024
84a3501
Last version of Taper
acitrain Jun 24, 2024
dec32be
Change taper coefficient
acitrain Jun 24, 2024
88dc6e2
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jun 27, 2024
cd4776d
Add taper for elastic solver
acitrain Jun 27, 2024
acdc85a
New profile for Taper (test)
acitrain Jun 28, 2024
b11b74d
Bugfix
acitrain Jun 28, 2024
135590d
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 1, 2024
42c5362
Remove some comments + add calls for second order elastic solver
acitrain Jul 2, 2024
3185e2b
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 2, 2024
748df92
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 3, 2024
a101d33
Add function to get global maximum velocity on the mesh (test)
acitrain Jul 4, 2024
fa603f7
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 4, 2024
f5dc110
Bugfix
acitrain Jul 8, 2024
f26f48f
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 8, 2024
d0db4f1
Populate method to find global max wavespeed to every wave solvers
acitrain Jul 8, 2024
8b8a738
uncrustify
acitrain Jul 8, 2024
5891242
Add LEVEl_0 to write taper layers inside vtk outputs
acitrain Jul 8, 2024
b99c589
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 11, 2024
6765f1b
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 12, 2024
51f026e
Fix compilation bug in CI
acitrain Jul 12, 2024
bc933f3
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 15, 2024
d1c2e22
Add documantation + change variable name for consistency
acitrain Jul 15, 2024
653022a
Remove unused files
acitrain Jul 15, 2024
2447b1c
uncrustify
acitrain Jul 15, 2024
71e9410
Add unit test with Taper
acitrain Jul 16, 2024
7c7abda
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 18, 2024
898aa16
Schema.xsd file missing in last commit
acitrain Jul 18, 2024
eebf455
Merge branch 'feature/AddTaperForWaveSolvers' of https://github.com/G…
acitrain Jul 18, 2024
3e26c26
Bug fix
acitrain Jul 19, 2024
4ac1d30
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 22, 2024
5779fe0
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 24, 2024
07c6115
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Jul 25, 2024
5d6e9b7
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Sep 6, 2024
76d2d22
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Sep 6, 2024
7c50c78
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Sep 9, 2024
d2752ab
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Sep 12, 2024
5377bd6
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Oct 4, 2024
4efc1e0
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Oct 7, 2024
a8b6ec9
uncrustify
acitrain Oct 7, 2024
c3e2ef1
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Oct 8, 2024
7a94f61
Bugfix
acitrain Oct 8, 2024
1baceb8
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Oct 14, 2024
dd2f39c
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Oct 16, 2024
a95bb38
New way of computing taper
acitrain Oct 16, 2024
30a36bd
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Oct 18, 2024
9f3c34f
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Oct 21, 2024
3be61b3
uncrustify
acitrain Oct 21, 2024
738eded
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 4, 2024
a63ba3f
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 5, 2024
1541425
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 7, 2024
d34083f
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 8, 2024
96276fb
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 12, 2024
c465fcc
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 13, 2024
fc22c75
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 15, 2024
ce0509e
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 18, 2024
ecac047
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 22, 2024
dedfe65
Cleanup + change routine to take max wavespeed into routine to take m…
acitrain Nov 28, 2024
7c9ea08
Remove unused variable + change type for taper thickness (array to real)
acitrain Nov 28, 2024
b4971b6
Fix unit tests
acitrain Nov 28, 2024
0773ec0
Fix in unit test
acitrain Nov 28, 2024
f28d2c9
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Nov 29, 2024
e1eb273
uncrustify
acitrain Nov 29, 2024
a045681
Remove unused variable
acitrain Nov 29, 2024
7e0e72f
Remove unused variable
acitrain Nov 29, 2024
b118ee2
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 2, 2024
177d4d3
Docs
acitrain Dec 2, 2024
ceff86b
uncrustify
acitrain Dec 2, 2024
45ffc18
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 3, 2024
1580a55
Fix submodule tag
acitrain Dec 3, 2024
6845cac
Change docs
acitrain Dec 3, 2024
9be77e3
uncrustify
acitrain Dec 3, 2024
13fb539
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 4, 2024
6df812b
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 6, 2024
76639fb
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 9, 2024
83d073b
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 10, 2024
8bc4980
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 12, 2024
06c5e96
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 13, 2024
f84dc47
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 16, 2024
c68bbd3
Merge branch 'develop' into feature/AddTaperForWaveSolvers
acitrain Dec 17, 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 @@ -4,6 +4,7 @@ set( physicsSolvers_headers
wavePropagation/shared/WaveSolverBase.hpp
wavePropagation/shared/WaveSolverUtils.hpp
wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp
wavePropagation/shared/TaperKernel.hpp
wavePropagation/sem/acoustic/shared/AcousticFields.hpp
wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.hpp
wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEMKernel.hpp
Expand All @@ -27,7 +28,7 @@ set( physicsSolvers_headers
wavePropagation/sem/acoustoelastic/secondOrderEqn/isotropic/AcoustoElasticFields.hpp
wavePropagation/sem/acoustoelastic/secondOrderEqn/isotropic/AcoustoElasticTimeSchemeSEMKernel.hpp
wavePropagation/sem/acoustoelastic/secondOrderEqn/isotropic/AcousticElasticWaveEquationSEM.hpp
wavePropagation/sem/acoustoelastic/secondOrderEqn/isotropic/AcousticElasticWaveEquationSEMKernel.hpp
wavePropagation/sem/acoustoelastic/secondOrderEqn/isotropic/AcousticElasticWaveEquationSEMKernel.hpp
PARENT_SCOPE )

# Specify solver sources
Expand All @@ -39,5 +40,5 @@ set( physicsSolvers_sources
wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp
wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp
wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp
wavePropagation/sem/acoustoelastic/secondOrderEqn/isotropic/AcousticElasticWaveEquationSEM.cpp
wavePropagation/sem/acoustoelastic/secondOrderEqn/isotropic/AcousticElasticWaveEquationSEM.cpp
PARENT_SCOPE)
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,28 @@
m_receiverRegion.resize( numReceiversGlobal );
}

real32 AcousticFirstOrderWaveEquationSEM::getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames )

Check warning on line 157 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp#L157

Added line #L157 was not covered by tests
{

real32 localMinWavespeed = 1e8;

Check warning on line 160 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp#L160

Added line #L160 was not covered by tests

mesh.getElemManager().forElementSubRegions< CellElementSubRegion >( regionNames, [&]( localIndex const,

Check warning on line 162 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp#L162

Added line #L162 was not covered by tests
CellElementSubRegion & elementSubRegion )
{
arrayView1d< real32 const > const velocity = elementSubRegion.getField< acousticfields::AcousticVelocity >();
real32 subRegionMinWavespeed = *std::min_element( velocity.begin(), velocity.end());
if( localMinWavespeed > subRegionMinWavespeed )

Check warning on line 167 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp#L165-L167

Added lines #L165 - L167 were not covered by tests
{
localMinWavespeed = subRegionMinWavespeed;

Check warning on line 169 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp#L169

Added line #L169 was not covered by tests
}
} );

Check warning on line 171 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp#L171

Added line #L171 was not covered by tests

real32 const globalMinWavespeed = MpiWrapper::min( localMinWavespeed );

Check warning on line 173 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp#L173

Added line #L173 was not covered by tests

return globalMinWavespeed;

Check warning on line 175 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/firstOrderEqn/isotropic/AcousticFirstOrderWaveEquationSEM.cpp#L175

Added line #L175 was not covered by tests

}

void AcousticFirstOrderWaveEquationSEM::precomputeSourceAndReceiverTerm( MeshLevel & baseMesh, MeshLevel & mesh, arrayView1d< string const > const & regionNames )
{
GEOS_MARK_FUNCTION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ class AcousticFirstOrderWaveEquationSEM : public WaveSolverBase
DomainPartition & domain,
bool const computeGradient ) override;

/**
* @brief Get the minimum wavespeed on a mesh
*/
virtual real32 getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames ) override;

/**
* @brief Initialize Perfectly Matched Layer (PML) information
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
} );
}


void AcousticVTIWaveEquationSEM::postInputInitialization()
{

Expand All @@ -113,6 +112,28 @@
m_pressureNp1AtReceivers.resize( m_nsamplesSeismoTrace, numReceiversGlobal + 1 );
}

real32 AcousticVTIWaveEquationSEM::getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames )

Check warning on line 115 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp#L115

Added line #L115 was not covered by tests
{

real32 localMinWavespeed = 1e8;

Check warning on line 118 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp#L118

Added line #L118 was not covered by tests

mesh.getElemManager().forElementSubRegions< CellElementSubRegion >( regionNames, [&]( localIndex const,

Check warning on line 120 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp#L120

Added line #L120 was not covered by tests
CellElementSubRegion & elementSubRegion )
{
arrayView1d< real32 const > const velocity = elementSubRegion.getField< acousticfields::AcousticVelocity >();
real32 subRegionMinWavespeed = *std::min_element( velocity.begin(), velocity.end());
if( localMinWavespeed > subRegionMinWavespeed )

Check warning on line 125 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp#L123-L125

Added lines #L123 - L125 were not covered by tests
{
localMinWavespeed = subRegionMinWavespeed;

Check warning on line 127 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp#L127

Added line #L127 was not covered by tests
}
} );

Check warning on line 129 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp#L129

Added line #L129 was not covered by tests

real32 const globalMinWavespeed = MpiWrapper::min( localMinWavespeed );

Check warning on line 131 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp#L131

Added line #L131 was not covered by tests

return globalMinWavespeed;

Check warning on line 133 in src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp#L133

Added line #L133 was not covered by tests

}

void AcousticVTIWaveEquationSEM::precomputeSourceAndReceiverTerm( MeshLevel & baseMesh, MeshLevel & mesh,
arrayView1d< string const > const & regionNames )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ class AcousticVTIWaveEquationSEM : public WaveSolverBase
DomainPartition & GEOS_UNUSED_PARAM( domain ),
bool const GEOS_UNUSED_PARAM( computeGradient ) ) override;

/**
* @brief Get the minimum wavespeed on a mesh
*/
virtual real32 getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames ) override;

/**@}*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "physicsSolvers/wavePropagation/sem/acoustic/shared/AcousticMatricesSEMKernel.hpp"
#include "events/EventManager.hpp"
#include "AcousticPMLSEMKernel.hpp"
#include "physicsSolvers/wavePropagation/shared/TaperKernel.hpp"
#include "physicsSolvers/wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp"

namespace geos
Expand Down Expand Up @@ -120,9 +121,32 @@ void AcousticWaveEquationSEM::postInputInitialization()
m_pressureNp1AtReceivers.resize( m_nsamplesSeismoTrace, m_receiverCoordinates.size( 0 ) + 1 );
}

real32 AcousticWaveEquationSEM::getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames )
{

real32 localMinWavespeed = 1e8;

mesh.getElemManager().forElementSubRegions< CellElementSubRegion >( regionNames, [&]( localIndex const,
CellElementSubRegion & elementSubRegion )
{
arrayView1d< real32 const > const velocity = elementSubRegion.getField< acousticfields::AcousticVelocity >();
real32 subRegionMinWavespeed = *std::min_element( velocity.begin(), velocity.end());
if( localMinWavespeed > subRegionMinWavespeed )
{
localMinWavespeed = subRegionMinWavespeed;
}
} );

real32 const globalMinWavespeed = MpiWrapper::min( localMinWavespeed );

return globalMinWavespeed;

}

void AcousticWaveEquationSEM::precomputeSourceAndReceiverTerm( MeshLevel & baseMesh, MeshLevel & mesh,
arrayView1d< string const > const & regionNames )
{

GEOS_MARK_FUNCTION;

arrayView1d< globalIndex const > const nodeLocalToGlobalMap = baseMesh.getNodeManager().localToGlobalMap().toViewConst();
Expand Down Expand Up @@ -328,15 +352,38 @@ void AcousticWaveEquationSEM::initializePostInitialConditionsPreSubGroups()

} );
} );
if( m_timestepStabilityLimit==1 )
{
real64 dtOut = 0.0;
computeTimeStep( dtOut );
m_timestepStabilityLimit = 0;
m_timeStep=dtOut;
}
else
{
EventManager const & event = getGroupByPath< EventManager >( "/Problem/Events" );
for( localIndex numSubEvent = 0; numSubEvent < event.numSubGroups(); ++numSubEvent )
{
EventBase const * subEvent = static_cast< EventBase const * >( event.getSubGroups()[numSubEvent] );
if( subEvent->getEventName() == "/Solvers/" + getName() )
{
m_timeStep = subEvent->getReference< real64 >( EventBase::viewKeyStruct::forceDtString() );
}
}

}

if( m_useTaper==1 )
{
real32 vMin;
vMin = getGlobalMinWavespeed( mesh, regionNames );

arrayView1d< real32 > const taperCoeff = nodeManager.getField< fields::taperCoeff >();
TaperKernel::computeTaperCoeff< EXEC_POLICY >( nodeManager.size(), nodeCoords, m_thicknessTaper, m_timeStep, vMin, m_reflectivityCoeff,
taperCoeff );
}
} );

if( m_timestepStabilityLimit==1 )
{
real64 dtOut = 0.0;
computeTimeStep( dtOut );
m_timestepStabilityLimit = 0;
m_timeStep=dtOut;
}


WaveSolverUtils::initTrace( "seismoTraceReceiver", getName(), m_outputSeismoTrace, m_receiverConstants.size( 0 ), m_receiverIsLocal );
Expand Down Expand Up @@ -1089,6 +1136,8 @@ void AcousticWaveEquationSEM::computeUnknowns( real64 const & time_n,
arrayView1d< real32 > const p_n = nodeManager.getField< acousticfields::Pressure_n >();
arrayView1d< real32 > const p_np1 = nodeManager.getField< acousticfields::Pressure_np1 >();

arrayView1d< real32 > const taperCoeff = nodeManager.getField< fields::taperCoeff >();

arrayView1d< localIndex const > const freeSurfaceNodeIndicator = nodeManager.getField< acousticfields::AcousticFreeSurfaceNodeIndicator >();
arrayView1d< real32 > const stiffnessVector = nodeManager.getField< acousticfields::StiffnessVector >();
arrayView1d< real32 > const rhs = nodeManager.getField< acousticfields::ForcingRHS >();
Expand All @@ -1115,6 +1164,13 @@ void AcousticWaveEquationSEM::computeUnknowns( real64 const & time_n,
GEOS_MARK_SCOPE ( updateP );
AcousticTimeSchemeSEM::LeapFrogWithoutPML( dt, p_np1, p_n, p_nm1, mass, stiffnessVector, damping,
rhs, freeSurfaceNodeIndicator, solverTargetNodesSet );


if( m_useTaper==1 )
{
TaperKernel::multiplyByTaperCoeff< EXEC_POLICY >( nodeManager.size(), taperCoeff, p_np1 );
TaperKernel::multiplyByTaperCoeff< EXEC_POLICY >( nodeManager.size(), taperCoeff, p_n );
}
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ class AcousticWaveEquationSEM : public WaveSolverBase
DomainPartition & domain,
bool const computeGradient ) override;

/**
* @brief Get the minimum wavespeed on a mesh
*/
virtual real32 getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames ) override;

/**@}*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ DECLARE_FIELD( AuxiliaryVar4PML,
NOPLOT,
WRITE_AND_READ,
"PML scalar auxiliary variable 4." );

}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,27 @@
m_sigmayzNp1AtReceivers.resize( m_nsamplesSeismoTrace, numReceiversGlobal + 1 );
}

real32 ElasticFirstOrderWaveEquationSEM::getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames )

Check warning on line 205 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp#L205

Added line #L205 was not covered by tests
{

real32 localMinWavespeed = 1e8;

Check warning on line 208 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp#L208

Added line #L208 was not covered by tests

mesh.getElemManager().forElementSubRegions< CellElementSubRegion >( regionNames, [&]( localIndex const,

Check warning on line 210 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp#L210

Added line #L210 was not covered by tests
CellElementSubRegion & elementSubRegion )
{
arrayView1d< real32 const > const velocity = elementSubRegion.getField< elasticfields::ElasticVelocityVs >();
real32 subRegionMinWavespeed = *std::min_element( velocity.begin(), velocity.end());
if( localMinWavespeed > subRegionMinWavespeed )

Check warning on line 215 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp#L213-L215

Added lines #L213 - L215 were not covered by tests
{
localMinWavespeed = subRegionMinWavespeed;

Check warning on line 217 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp#L217

Added line #L217 was not covered by tests
}
} );

Check warning on line 219 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp#L219

Added line #L219 was not covered by tests

real32 const globalMinWavespeed = MpiWrapper::min( localMinWavespeed );

Check warning on line 221 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp#L221

Added line #L221 was not covered by tests

return globalMinWavespeed;

Check warning on line 223 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/firstOrderEqn/isotropic/ElasticFirstOrderWaveEquationSEM.cpp#L223

Added line #L223 was not covered by tests

}

void ElasticFirstOrderWaveEquationSEM::precomputeSourceAndReceiverTerm( MeshLevel & baseMesh, MeshLevel & mesh, arrayView1d< string const > const & regionNames )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ class ElasticFirstOrderWaveEquationSEM : public WaveSolverBase
DomainPartition & domain,
bool const computeGradient ) override;

/**
* @brief Get the minimum wavespeed on a mesh (S-wavespeed in the elastic case)
*/
virtual real32 getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames ) override;


/**
* @brief Initialize Perfectly Matched Layer (PML) information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "physicsSolvers/wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp"
#include "physicsSolvers/wavePropagation/sem/elastic/shared/ElasticTimeSchemeSEMKernel.hpp"
#include "physicsSolvers/wavePropagation/sem/elastic/shared/ElasticMatricesSEMKernel.hpp"
#include "physicsSolvers/wavePropagation/shared/TaperKernel.hpp"
#include "events/EventManager.hpp"

namespace geos
Expand Down Expand Up @@ -223,6 +224,27 @@
}
}

real32 ElasticWaveEquationSEM::getGlobalMinWavespeed( MeshLevel & mesh, arrayView1d< string const > const & regionNames )

Check warning on line 227 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L227

Added line #L227 was not covered by tests
{

real32 localMinWavespeed = 1e8;

Check warning on line 230 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L230

Added line #L230 was not covered by tests

mesh.getElemManager().forElementSubRegions< CellElementSubRegion >( regionNames, [&]( localIndex const,

Check warning on line 232 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L232

Added line #L232 was not covered by tests
CellElementSubRegion & elementSubRegion )
{
arrayView1d< real32 const > const velocity = elementSubRegion.getField< elasticfields::ElasticVelocityVs >();
real32 subRegionMinWavespeed = *std::min_element( velocity.begin(), velocity.end());
if( localMinWavespeed > subRegionMinWavespeed )

Check warning on line 237 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L235-L237

Added lines #L235 - L237 were not covered by tests
{
localMinWavespeed = subRegionMinWavespeed;

Check warning on line 239 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L239

Added line #L239 was not covered by tests
}
} );

Check warning on line 241 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L241

Added line #L241 was not covered by tests

real32 const globalMinWavespeed = MpiWrapper::min( localMinWavespeed );

Check warning on line 243 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L243

Added line #L243 was not covered by tests

return globalMinWavespeed;

Check warning on line 245 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L245

Added line #L245 was not covered by tests

}

void ElasticWaveEquationSEM::precomputeSourceAndReceiverTerm( MeshLevel & baseMesh, MeshLevel & mesh, arrayView1d< string const > const & regionNames )
{
Expand Down Expand Up @@ -457,15 +479,40 @@
GEOS_WARNING_IF( ySum > minQVal, "The anelasticity parameters are too high for the given quality factor. This could lead to solution artifacts such as zero-velocity waves." );
}

if( m_timestepStabilityLimit==1 )
{
real64 dtOut = 0.0;
computeTimeStep( dtOut );
m_timestepStabilityLimit = 0;
m_timeStep=dtOut;
}
else
{
EventManager const & event = getGroupByPath< EventManager >( "/Problem/Events" );
for( localIndex numSubEvent = 0; numSubEvent < event.numSubGroups(); ++numSubEvent )
{
EventBase const * subEvent = static_cast< EventBase const * >( event.getSubGroups()[numSubEvent] );
if( subEvent->getEventName() == "/Solvers/" + getName() )
{
m_timeStep = subEvent->getReference< real64 >( EventBase::viewKeyStruct::forceDtString() );
}
}

}

if( m_useTaper==1 )
{
real32 vMin;
vMin = getGlobalMinWavespeed( mesh, regionNames );

Check warning on line 506 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L506

Added line #L506 was not covered by tests

arrayView1d< real32 > const taperCoeff = nodeManager.getField< fields::taperCoeff >();
TaperKernel::computeTaperCoeff< EXEC_POLICY >( nodeManager.size(), nodeCoords, m_thicknessTaper, m_timeStep, vMin, m_reflectivityCoeff,

Check warning on line 509 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L508-L509

Added lines #L508 - L509 were not covered by tests
taperCoeff );
}

} );

if( m_timestepStabilityLimit==1 )
{
real64 dtOut = 0.0;
computeTimeStep( dtOut );
m_timestepStabilityLimit = 0;
m_timeStep=dtOut;
}


WaveSolverUtils::initTrace( "seismoTraceReceiver", getName(), m_outputSeismoTrace, m_receiverConstants.size( 0 ), m_receiverIsLocal );
WaveSolverUtils::initTrace( "dasTraceReceiver", getName(), m_outputSeismoTrace, m_linearDASGeometry.size( 0 ), m_receiverIsLocal );
Expand Down Expand Up @@ -778,6 +825,8 @@
arrayView1d< real32 > const uy_np1 = nodeManager.getField< elasticfields::Displacementy_np1 >();
arrayView1d< real32 > const uz_np1 = nodeManager.getField< elasticfields::Displacementz_np1 >();

arrayView1d< real32 > const taperCoeff = nodeManager.getField< fields::taperCoeff >();

arrayView1d< real32 > const rhsx = nodeManager.getField< elasticfields::ForcingRHSx >();
arrayView1d< real32 > const rhsy = nodeManager.getField< elasticfields::ForcingRHSy >();
arrayView1d< real32 > const rhsz = nodeManager.getField< elasticfields::ForcingRHSz >();
Expand Down Expand Up @@ -846,6 +895,18 @@
mass, dampingx, dampingy, dampingz, stiffnessVectorx, stiffnessVectory,
stiffnessVectorz, rhsx, rhsy, rhsz, solverTargetNodesSet );
}

if( m_useTaper==1 )
{
TaperKernel::multiplyByTaperCoeff< EXEC_POLICY >( nodeManager.size(), taperCoeff, ux_np1 );
TaperKernel::multiplyByTaperCoeff< EXEC_POLICY >( nodeManager.size(), taperCoeff, ux_n );
TaperKernel::multiplyByTaperCoeff< EXEC_POLICY >( nodeManager.size(), taperCoeff, uy_np1 );
TaperKernel::multiplyByTaperCoeff< EXEC_POLICY >( nodeManager.size(), taperCoeff, uy_n );
TaperKernel::multiplyByTaperCoeff< EXEC_POLICY >( nodeManager.size(), taperCoeff, uz_np1 );
TaperKernel::multiplyByTaperCoeff< EXEC_POLICY >( nodeManager.size(), taperCoeff, uz_n );

Check warning on line 906 in src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/wavePropagation/sem/elastic/secondOrderEqn/isotropic/ElasticWaveEquationSEM.cpp#L901-L906

Added lines #L901 - L906 were not covered by tests
}


}

void ElasticWaveEquationSEM::synchronizeUnknowns( real64 const & time_n,
Expand Down
Loading
Loading