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

fix: Add source value array for fwi in wave solvers #3502

Merged
merged 35 commits into from
Feb 5, 2025

Conversation

acitrain
Copy link
Contributor

This PR is adding an array to store the values of the sources in time.
This array is useful for FWI and pygeos

@acitrain acitrain added ci: run CUDA builds Allows to triggers (costly) CUDA jobs flag: ready for review flag: requires rebaseline Requires rebaseline branch in integratedTests ci: run code coverage enables running of the code coverage CI jobs labels Dec 20, 2024
@acitrain acitrain self-assigned this Dec 20, 2024
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 96.22642% with 2 lines in your changes missing coverage. Please review.

Project coverage is 56.75%. Comparing base (9cfb92a) to head (2cb6c9d).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...erEqn/isotropic/AcousticElasticWaveEquationSEM.cpp 0.00% 1 Missing ⚠️
...ion/shared/PrecomputeSourcesAndReceiversKernel.hpp 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3502      +/-   ##
===========================================
+ Coverage    56.74%   56.75%   +0.01%     
===========================================
  Files         1169     1169              
  Lines       101546   101582      +36     
===========================================
+ Hits         57621    57653      +32     
- Misses       43925    43929       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acitrain acitrain added the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Jan 22, 2025
@@ -222,18 +222,10 @@
</xsd:unique>
</xsd:element>
<xsd:element name="Functions" type="FunctionsType" maxOccurs="1">
<xsd:unique name="FunctionsCompositeFunctionUniqueName">
Copy link
Contributor

Choose a reason for hiding this comment

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

There seem to be some spurious changes in the schema.xsd and schema.xsd.other file. Maybe you used an out-of-date version? Try regenerating after merging the latest develop branch, it should fix the issue

Copy link
Member

@rrsettgast rrsettgast left a comment

Choose a reason for hiding this comment

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

Just a few suggestions.

Comment on lines 259 to 262
//real64 const srcValue =
// useSourceWaveletTables ? sourceWaveletTableWrappers[ isrc ].compute( &time_n ) : WaveSolverUtils::evaluateRicker( time_n,
// timeSourceFrequency, timeSourceDelay, rickerOrder );

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//real64 const srcValue =
// useSourceWaveletTables ? sourceWaveletTableWrappers[ isrc ].compute( &time_n ) : WaveSolverUtils::evaluateRicker( time_n,
// timeSourceFrequency, timeSourceDelay, rickerOrder );

for( localIndex inode = 0; inode < sourceConstants.size( 1 ); ++inode )
{
real32 const localIncrement = sourceConstants[isrc][inode] * srcValue;
real32 const localIncrement = sourceConstants[isrc][inode] * sourceValue[cycleNumber][isrc];
//real32 const localIncrement = sourceConstants[isrc][inode] * srcValue;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//real32 const localIncrement = sourceConstants[isrc][inode] * srcValue;

MeshLevel & mesh,
arrayView1d< string const > const & regionNames )
{
MeshLevel & baseMesh = domain.getMeshBodies().getGroup< MeshBody >( meshBodyName ).getBaseDiscretization();
precomputeSourceAndReceiverTerm( baseMesh, mesh, regionNames );

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
GEOS_UNUSED_VAR( meshBodyName );

@@ -252,12 +288,10 @@ void AcousticWaveEquationSEM::initializePostInitialConditionsPreSubGroups()



forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const & meshBodyName,
forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &,
forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const & meshBodyName,

setInputFlag( InputFlags::FALSE ).
setRestartFlags( RestartFlags::NO_WRITE ).
setSizedFromParent( 0 ).
setDescription( "Source Value of the sources" );
Copy link
Member

Choose a reason for hiding this comment

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

maybe a better description?

@sframba sframba merged commit 0b8a7e2 into develop Feb 5, 2025
26 of 27 checks passed
@sframba sframba deleted the fix/AddSourceValueTableForFWI branch February 5, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run code coverage enables running of the code coverage CI jobs ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: ready for review flag: requires rebaseline Requires rebaseline branch in integratedTests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants