From 39512518ddc50ebd0f082598b6ae1683d63fc893 Mon Sep 17 00:00:00 2001 From: tbeltzun <129868353+tbeltzun@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:31:49 +0100 Subject: [PATCH] allow empty source and receivers (#2818) * make source / receivers optional * update schema * update `.rst` files --------- Co-authored-by: acitrain <60715545+acitrain@users.noreply.github.com> --- .../wavePropagation/WaveSolverBase.cpp | 8 ++------ .../schema/docs/AcousticFirstOrderSEM.rst | 4 ++-- .../schema/docs/AcousticSEM.rst | 4 ++-- .../schema/docs/AcousticVTISEM.rst | 4 ++-- .../schema/docs/ElasticFirstOrderSEM.rst | 4 ++-- src/coreComponents/schema/docs/ElasticSEM.rst | 4 ++-- src/coreComponents/schema/schema.xsd | 20 +++++++++---------- 7 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/coreComponents/physicsSolvers/wavePropagation/WaveSolverBase.cpp b/src/coreComponents/physicsSolvers/wavePropagation/WaveSolverBase.cpp index 78d6cb1006a..239426e6dc9 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/WaveSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/WaveSolverBase.cpp @@ -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" ); @@ -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 ). diff --git a/src/coreComponents/schema/docs/AcousticFirstOrderSEM.rst b/src/coreComponents/schema/docs/AcousticFirstOrderSEM.rst index a5100a7e2f7..6d025dbc5dc 100644 --- a/src/coreComponents/schema/docs/AcousticFirstOrderSEM.rst +++ b/src/coreComponents/schema/docs/AcousticFirstOrderSEM.rst @@ -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 diff --git a/src/coreComponents/schema/docs/AcousticSEM.rst b/src/coreComponents/schema/docs/AcousticSEM.rst index a5100a7e2f7..6d025dbc5dc 100644 --- a/src/coreComponents/schema/docs/AcousticSEM.rst +++ b/src/coreComponents/schema/docs/AcousticSEM.rst @@ -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 diff --git a/src/coreComponents/schema/docs/AcousticVTISEM.rst b/src/coreComponents/schema/docs/AcousticVTISEM.rst index a5100a7e2f7..6d025dbc5dc 100644 --- a/src/coreComponents/schema/docs/AcousticVTISEM.rst +++ b/src/coreComponents/schema/docs/AcousticVTISEM.rst @@ -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 diff --git a/src/coreComponents/schema/docs/ElasticFirstOrderSEM.rst b/src/coreComponents/schema/docs/ElasticFirstOrderSEM.rst index a5100a7e2f7..6d025dbc5dc 100644 --- a/src/coreComponents/schema/docs/ElasticFirstOrderSEM.rst +++ b/src/coreComponents/schema/docs/ElasticFirstOrderSEM.rst @@ -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 diff --git a/src/coreComponents/schema/docs/ElasticSEM.rst b/src/coreComponents/schema/docs/ElasticSEM.rst index 6f0646af044..10af5428725 100644 --- a/src/coreComponents/schema/docs/ElasticSEM.rst +++ b/src/coreComponents/schema/docs/ElasticSEM.rst @@ -16,11 +16,11 @@ linearDASGeometry real64_array2d {{0}} Geometry parameters for a 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 sourceForce R1Tensor {0,0,0} Force of the source: 3 real values for a vector source, and 6 real values for a tensor source (in Voigt notation).The default value is { 0, 0, 0 } (no net force). sourceMoment R2SymTensor {1,1,1,0,0,0} Moment of the source: 6 real values describing a symmetric tensor in Voigt notation.The default value is { 1, 1, 1, 0, 0, 0 } (diagonal moment, corresponding to a pure explosion). 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. diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 5ddf72c1c6a..8d0b5220fb9 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -2042,7 +2042,7 @@ the relative residual norm satisfies: - + @@ -2050,7 +2050,7 @@ the relative residual norm satisfies: - + @@ -2090,7 +2090,7 @@ the relative residual norm satisfies: - + @@ -2098,7 +2098,7 @@ the relative residual norm satisfies: - + @@ -2138,7 +2138,7 @@ the relative residual norm satisfies: - + @@ -2146,7 +2146,7 @@ the relative residual norm satisfies: - + @@ -2401,7 +2401,7 @@ Equal to 1 for surface conditions, and to 0 for reservoir conditions--> - + @@ -2409,7 +2409,7 @@ Equal to 1 for surface conditions, and to 0 for reservoir conditions--> - + @@ -2449,7 +2449,7 @@ Equal to 1 for surface conditions, and to 0 for reservoir conditions--> - + @@ -2457,7 +2457,7 @@ Equal to 1 for surface conditions, and to 0 for reservoir conditions--> - +