Skip to content

Commit

Permalink
allow empty source and receivers (#2818)
Browse files Browse the repository at this point in the history
* make source / receivers optional

* update schema

* update `.rst` files

---------

Co-authored-by: acitrain <[email protected]>
  • Loading branch information
2 people authored and ouassimkh committed Feb 16, 2024
1 parent 0616af8 commit 3951251
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ WaveSolverBase::WaveSolverBase( const std::string & name,
{

registerWrapper( viewKeyStruct::sourceCoordinatesString(), &m_sourceCoordinates ).
setInputFlag( InputFlags::REQUIRED ).
setInputFlag( InputFlags::OPTIONAL ).
setSizedFromParent( 0 ).
setDescription( "Coordinates (x,y,z) of the sources" );

registerWrapper( viewKeyStruct::receiverCoordinatesString(), &m_receiverCoordinates ).
setInputFlag( InputFlags::REQUIRED ).
setInputFlag( InputFlags::OPTIONAL ).
setSizedFromParent( 0 ).
setDescription( "Coordinates (x,y,z) of the receivers" );

Expand All @@ -56,10 +56,6 @@ WaveSolverBase::WaveSolverBase( const std::string & name,
setSizedFromParent( 0 ).
setDescription( "Source Value of the sources" );

registerWrapper( viewKeyStruct::timeSourceFrequencyString(), &m_timeSourceFrequency ).
setInputFlag( InputFlags::REQUIRED ).
setDescription( "Central frequency for the time source" );

registerWrapper( viewKeyStruct::timeSourceDelayString(), &m_timeSourceDelay ).
setInputFlag( InputFlags::OPTIONAL ).
setApplyDefaultValue( -1 ).
Expand Down
4 changes: 2 additions & 2 deletions src/coreComponents/schema/docs/AcousticFirstOrderSEM.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ linearDASGeometry real64_array2d {{0}} Geometry parameters for a li
logLevel integer 0 Log level
name string required A name is required for any non-unique nodes
outputSeismoTrace integer 0 Flag that indicates if we write the seismo trace in a file .txt, 0 no output, 1 otherwise
receiverCoordinates real64_array2d required Coordinates (x,y,z) of the receivers
receiverCoordinates real64_array2d 0 Coordinates (x,y,z) of the receivers
rickerOrder integer 2 Flag that indicates the order of the Ricker to be used o, 1 or 2. Order 2 by default
saveFields integer 0 Set to 1 to save fields during forward and restore them during backward
shotIndex integer 0 Set the current shot for temporary files
sourceCoordinates real64_array2d required Coordinates (x,y,z) of the sources
sourceCoordinates real64_array2d 0 Coordinates (x,y,z) of the sources
targetRegions string_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager.
timeSourceDelay real32 -1 Source time delay (1 / f0 by default)
timeSourceFrequency real32 0 Central frequency for the time source
Expand Down
4 changes: 2 additions & 2 deletions src/coreComponents/schema/docs/AcousticSEM.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ linearDASGeometry real64_array2d {{0}} Geometry parameters for a li
logLevel integer 0 Log level
name string required A name is required for any non-unique nodes
outputSeismoTrace integer 0 Flag that indicates if we write the seismo trace in a file .txt, 0 no output, 1 otherwise
receiverCoordinates real64_array2d required Coordinates (x,y,z) of the receivers
receiverCoordinates real64_array2d 0 Coordinates (x,y,z) of the receivers
rickerOrder integer 2 Flag that indicates the order of the Ricker to be used o, 1 or 2. Order 2 by default
saveFields integer 0 Set to 1 to save fields during forward and restore them during backward
shotIndex integer 0 Set the current shot for temporary files
sourceCoordinates real64_array2d required Coordinates (x,y,z) of the sources
sourceCoordinates real64_array2d 0 Coordinates (x,y,z) of the sources
targetRegions string_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager.
timeSourceDelay real32 -1 Source time delay (1 / f0 by default)
timeSourceFrequency real32 0 Central frequency for the time source
Expand Down
4 changes: 2 additions & 2 deletions src/coreComponents/schema/docs/AcousticVTISEM.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ linearDASGeometry real64_array2d {{0}} Geometry parameters for a li
logLevel integer 0 Log level
name string required A name is required for any non-unique nodes
outputSeismoTrace integer 0 Flag that indicates if we write the seismo trace in a file .txt, 0 no output, 1 otherwise
receiverCoordinates real64_array2d required Coordinates (x,y,z) of the receivers
receiverCoordinates real64_array2d 0 Coordinates (x,y,z) of the receivers
rickerOrder integer 2 Flag that indicates the order of the Ricker to be used o, 1 or 2. Order 2 by default
saveFields integer 0 Set to 1 to save fields during forward and restore them during backward
shotIndex integer 0 Set the current shot for temporary files
sourceCoordinates real64_array2d required Coordinates (x,y,z) of the sources
sourceCoordinates real64_array2d 0 Coordinates (x,y,z) of the sources
targetRegions string_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager.
timeSourceDelay real32 -1 Source time delay (1 / f0 by default)
timeSourceFrequency real32 0 Central frequency for the time source
Expand Down
Loading

0 comments on commit 3951251

Please sign in to comment.