-
Notifications
You must be signed in to change notification settings - Fork 116
Point source merge #866
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
Open
rwalkerlewis
wants to merge
65
commits into
geodynamics:main
Choose a base branch
from
rwalkerlewis:point_source_merge
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Point source merge #866
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
c1861f1
Initial commit. Adding in source class.
rwalkerlewis 559e175
Rebased on new upstream
rwalkerlewis a0584a9
Fixed STF nomenclature and added files to makefile
rwalkerlewis 8327dfd
Issue with identifing point for source in parallel
rwalkerlewis 458b224
Added Square Wavelet for testing
rwalkerlewis ab046c0
Added listing for squarewavelet classes
rwalkerlewis 6766e72
Added lumped LHS mass matrix for MT source
rwalkerlewis 67f3626
removed local source label functions
rwalkerlewis 0057d4d
Removed other label function from source
rwalkerlewis 7976afa
Moved coordinate to label assignment to function in Source.cc
rwalkerlewis 5ab9a4c
First work on user selectable subfields for moment tensor sources
rwalkerlewis 323823e
Fixed variable issue
rwalkerlewis 2596703
Parallel works now
rwalkerlewis b6d84c5
Removed comments
rwalkerlewis a2f4368
Field is now selectable for MT
rwalkerlewis 1d5c8fb
Changed square pulse to user selected subfield
rwalkerlewis 61da8ed
Updated to new location function
rwalkerlewis d37a8e5
Array source input works for parallel
rwalkerlewis 529f041
Passes libtest for source
rwalkerlewis a08a9e3
Intermediate update for unit tests
rwalkerlewis c793863
Minor changes
rwalkerlewis 236ba38
Cleanup of testing loose ends, still not passing source check. See th…
rwalkerlewis 77db4ad
added point force header to makefile
rwalkerlewis ef6d3cf
Point Force libtest fails on factory assertion
rwalkerlewis 1d8421d
Libtests pass, moving to implement timehistorydb
rwalkerlewis 7699459
Added change to allow moment tensor force STFs to use time history db
rwalkerlewis ff96de9
Added fekernel for timehistorywavelet
rwalkerlewis a819d5d
need to find out how to pass _dbtimehistory
rwalkerlewis db18b1d
Kicked dbtimehistory down a level
cpstutorials a233ff9
first pass for libsrc finished
rwalkerlewis 815e4e4
Updated modulesrc
rwalkerlewis faf8972
Gave up and returned everything to AuxiliaryFactoryMomentTensorForce
rwalkerlewis 2600227
Moved time history from an aux field
rwalkerlewis 0c833da
Added explanation of wellbore character
rwalkerlewis cf29a6f
Added ability to set r_e constant
rwalkerlewis cd38123
TimeHistoryWavelet compiles
rwalkerlewis 6fa9226
Updated for MPI
rwalkerlewis fbc9bd6
remembered r_e constant
rwalkerlewis 2fea53c
Added squarepulsesource, still issues
rwalkerlewis 3a2e759
Updated to ensure compilation
rwalkerlewis 808a7c3
Midway through timehistory source
rwalkerlewis 05158fb
Mesh: Fix for empty labels
knepley 58a722c
Allow data that is not from timestepping in HDF5
knepley b166df2
added point source example
cpstutorials 54454f2
Updated to fix input units
cpstutorials 4096792
Added ability to time shift wavelet to zero phase
cpstutorials 5766b29
Parallel fix
knepley e4944ba
Added cfg for petsc test
cpstutorials f015c2c
MeshIOPetsc: Allow creation from command line
knepley 3b8d922
Added break to switch statement
cpstutorials 2a10bbe
Restricted branch to point source only.
cpstutorials 598e695
Adjustments to permit compilation
cpstutorials ee33790
Fixed install files so that it runs
cpstutorials caf6d6a
Removed unrelated tests
cpstutorials 875856d
Added makefile back
cpstutorials 57fdecc
Removed vestigal parts of test makefile
cpstutorials 6568888
just removing source tests
cpstutorials 4493475
Just removing source tests
cpstutorials a3ce73d
Update configure.ac
rwalkerlewis 0daf65a
Added functioning MMS tests to moment tensor source
cpstutorials b9330e9
Updated docs to include source components
cpstutorials 3e047e1
Fixed old include
cpstutorials 26203b4
fixes to ensure CI tests work
cpstutorials cb7867c
source mms test passes
cpstutorials 1e8d4e1
Believed to pass with no failures
cpstutorials File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
docs/user/components/sources/AuxSubfieldsMomentTensorForce.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # AuxSubfieldsMomentTensorForce | ||
|
|
||
| % WARNING: Do not edit; this is a generated file! | ||
| :Full name: `pylith.sources.AuxSubfieldsMomentTensorForce` | ||
| :Journal name: `auxsubfieldsmomenttensorforce` | ||
|
|
||
| Container for moment tensor force auxiliary subfields. | ||
|
|
||
| This component defines the discretization for the moment tensor and time delay auxiliary subfields. | ||
|
|
||
| ## Pyre Facilities | ||
|
|
||
| * `moment_tensor`: Moment tensor subfield. | ||
| - **current value**: 'subfield', from {default} | ||
| - **configurable as**: subfield, moment_tensor | ||
| * `time_delay`: Time delay subfield. | ||
| - **current value**: 'subfield', from {default} | ||
| - **configurable as**: subfield, time_delay | ||
|
|
||
| ## Example | ||
|
|
||
| Example of setting `AuxSubfieldsMomentTensorForce` Pyre properties and facilities in a parameter file. | ||
|
|
||
| :::{code-block} cfg | ||
| [pylithapp.problem.sources.source] | ||
| auxiliary_subfields.moment_tensor.basis_order = 0 | ||
| auxiliary_subfields.time_delay.basis_order = 0 | ||
| ::: | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # AuxSubfieldsSourceTime | ||
|
|
||
| % WARNING: Do not edit; this is a generated file! | ||
| :Full name: `pylith.sources.AuxSubfieldsSourceTime` | ||
| :Journal name: `auxsubfieldssourcetime` | ||
|
|
||
| Container for source time function auxiliary subfields. | ||
|
|
||
| This component defines the discretization for the center frequency auxiliary subfield used by wavelet source time functions. | ||
|
|
||
| ## Pyre Facilities | ||
|
|
||
| * `center_frequency`: Center frequency subfield. | ||
| - **current value**: 'subfield', from {default} | ||
| - **configurable as**: subfield, center_frequency | ||
|
|
||
| ## Example | ||
|
|
||
| Example of setting `AuxSubfieldsSourceTime` Pyre properties and facilities in a parameter file. | ||
|
|
||
| :::{code-block} cfg | ||
| [pylithapp.problem.sources.source] | ||
| source_time_function.auxiliary_subfields.center_frequency.basis_order = 0 | ||
| ::: | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # GaussianWavelet | ||
|
|
||
| % WARNING: Do not edit; this is a generated file! | ||
| :Full name: `pylith.sources.GaussianWavelet` | ||
| :Journal name: `gaussianwavelet` | ||
|
|
||
| Gaussian wavelet source time function. | ||
|
|
||
| The Gaussian wavelet provides a smooth pulse. | ||
|
|
||
| The wavelet is defined as: | ||
|
|
||
| $S(t) = \frac{1}{2\pi^2 f_0^2} \exp\left(-\pi^2 f_0^2 (t-t_d)^2\right)$ | ||
|
|
||
| where $f_0$ is the center frequency and $t_d$ is the time delay. | ||
|
|
||
| Implements `SourceTimeFunctionMomentTensorForce`. | ||
|
|
||
| ## Pyre Facilities | ||
|
|
||
| * `auxiliary_subfields`: Discretization information for source time function parameters. | ||
| - **current value**: 'auxiliary_subfields', from {file='...', line=..., function='__set__'} | ||
| - **configurable as**: auxiliary_subfields | ||
|
|
||
| ## Example | ||
|
|
||
| Example of setting `GaussianWavelet` Pyre properties and facilities in a parameter file. | ||
|
|
||
| :::{code-block} cfg | ||
| [pylithapp.problem.sources.source] | ||
| source_time_function = pylith.sources.GaussianWavelet | ||
|
|
||
| # Center frequency specified in the auxiliary field database | ||
| db_auxiliary_field = spatialdata.spatialdb.UniformDB | ||
| db_auxiliary_field.description = Source properties | ||
| db_auxiliary_field.values = [moment_tensor_xx, moment_tensor_yy, moment_tensor_xy, moment_tensor_zz, time_delay, center_frequency] | ||
| db_auxiliary_field.data = [1.0e12*Pa*s, 1.0e12*Pa*s, 0.0*Pa*s, 1.0e12*Pa*s, 0.0*s, 5.0] | ||
|
|
||
| source_time_function.auxiliary_subfields.center_frequency.basis_order = 0 | ||
| ::: | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # MomentTensorForce | ||
|
|
||
| % WARNING: Do not edit; this is a generated file! | ||
| :Full name: `pylith.sources.MomentTensorForce` | ||
| :Journal name: `momenttensorforce` | ||
|
|
||
| Moment tensor point source. | ||
|
|
||
| This component implements a point source using a moment tensor representation. | ||
| The moment tensor describes the equivalent body forces of a seismic source. | ||
| The temporal evolution of the source is controlled by a source time function. | ||
|
|
||
| Implements `Source`. | ||
|
|
||
| ## Pyre Facilities | ||
|
|
||
| * `auxiliary_subfields`: Discretization information for auxiliary subfields. | ||
| - **current value**: 'auxiliary_subfields', from {file='...', line=..., function='__set__'} | ||
| - **configurable as**: auxiliary_subfields | ||
| * `db_auxiliary_field`: Database for source parameters. | ||
| - **current value**: 'simpledb', from {default} | ||
| - **configurable as**: simpledb, db_auxiliary_field | ||
| * `derived_subfields`: Discretization of derived subfields. | ||
| - **current value**: 'emptybin', from {default} | ||
| - **configurable as**: emptybin, derived_subfields | ||
| * `observers`: Observers (e.g., output). | ||
| - **current value**: 'singlephysicsobserver', from {default} | ||
| - **configurable as**: singlephysicsobserver, observers | ||
| * `reader`: Reader for source points list. | ||
| - **current value**: 'pointslist', from {default} | ||
| - **configurable as**: pointslist, reader | ||
| * `source_time_function`: Source time function for moment tensor force. | ||
| - **current value**: 'timehistorywavelet', from {default} | ||
| - **configurable as**: timehistorywavelet, source_time_function | ||
|
|
||
| ## Pyre Properties | ||
|
|
||
| * `description`=\<str\>: Descriptive label for source. | ||
| - **default value**: '' | ||
| - **current value**: '', from {default} | ||
| - **validator**: <function validateDescription at ...> | ||
| * `field`=\<str\>: Solution subfield associated with source. | ||
| - **default value**: 'displacement' | ||
| - **current value**: 'displacement', from {default} | ||
| * `label`=\<str\>: Name of label for source. | ||
| - **default value**: 'source-id' | ||
| - **current value**: 'source-id', from {default} | ||
| * `label_value`=\<int\>: Value of label identifying source. | ||
| - **default value**: 1 | ||
| - **current value**: 1, from {default} | ||
|
|
||
| ## Example | ||
|
|
||
| Example of setting `MomentTensorForce` Pyre properties and facilities in a parameter file. | ||
|
|
||
| :::{code-block} cfg | ||
| [pylithapp.problem] | ||
| sources = [source] | ||
| sources.source = pylith.sources.MomentTensorForce | ||
|
|
||
| [pylithapp.problem.sources.source] | ||
| description = Earthquake source | ||
| label_value = 2 | ||
|
|
||
| # Specify source locations | ||
| reader.filename = source_sites.txt | ||
| reader.coordsys = spatialdata.geocoords.CSCart | ||
| reader.coordsys.space_dim = 2 | ||
|
|
||
| # Use Ricker wavelet source time function | ||
| source_time_function = pylith.sources.RickerWavelet | ||
|
|
||
| # Source parameters (moment tensor and time delay) | ||
| db_auxiliary_field = spatialdata.spatialdb.UniformDB | ||
| db_auxiliary_field.description = Source properties | ||
| db_auxiliary_field.values = [moment_tensor_xx, moment_tensor_yy, moment_tensor_xy, moment_tensor_zz, time_delay, center_frequency] | ||
| db_auxiliary_field.data = [1.0e12*Pa*s, 1.0e12*Pa*s, 0.0*Pa*s, 1.0e12*Pa*s, 0.0*s, 5.0] | ||
|
|
||
| # Discretization of auxiliary subfields | ||
| auxiliary_subfields.moment_tensor.basis_order = 0 | ||
| auxiliary_subfields.time_delay.basis_order = 0 | ||
| source_time_function.auxiliary_subfields.center_frequency.basis_order = 0 | ||
| ::: | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # RickerWavelet | ||
|
|
||
| % WARNING: Do not edit; this is a generated file! | ||
| :Full name: `pylith.sources.RickerWavelet` | ||
| :Journal name: `rickerwavelet` | ||
|
|
||
| Ricker wavelet source time function. | ||
|
|
||
| The Ricker wavelet (Mexican hat wavelet) is the negative normalized second derivative of a Gaussian. | ||
| It is commonly used as a source time function in seismic wave propagation studies. | ||
|
|
||
| The wavelet is defined as: | ||
|
|
||
| $S(t) = \left(1 - 2\pi^2 f_0^2 (t-t_d)^2\right) \exp\left(-\pi^2 f_0^2 (t-t_d)^2\right)$ | ||
|
|
||
| where $f_0$ is the center frequency and $t_d$ is the time delay. | ||
|
|
||
| Implements `SourceTimeFunctionMomentTensorForce`. | ||
|
|
||
| ## Pyre Facilities | ||
|
|
||
| * `auxiliary_subfields`: Discretization information for source time function parameters. | ||
| - **current value**: 'auxiliary_subfields', from {file='...', line=..., function='__set__'} | ||
| - **configurable as**: auxiliary_subfields | ||
|
|
||
| ## Example | ||
|
|
||
| Example of setting `RickerWavelet` Pyre properties and facilities in a parameter file. | ||
|
|
||
| :::{code-block} cfg | ||
| [pylithapp.problem.sources.source] | ||
| source_time_function = pylith.sources.RickerWavelet | ||
|
|
||
| # Center frequency specified in the auxiliary field database | ||
| db_auxiliary_field = spatialdata.spatialdb.UniformDB | ||
| db_auxiliary_field.description = Source properties | ||
| db_auxiliary_field.values = [moment_tensor_xx, moment_tensor_yy, moment_tensor_xy, moment_tensor_zz, time_delay, center_frequency] | ||
| db_auxiliary_field.data = [1.0e12*Pa*s, 1.0e12*Pa*s, 0.0*Pa*s, 1.0e12*Pa*s, 0.0*s, 5.0] | ||
|
|
||
| source_time_function.auxiliary_subfields.center_frequency.basis_order = 0 | ||
| ::: | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Source | ||
|
|
||
| % WARNING: Do not edit; this is a generated file! | ||
| :Full name: `pylith.sources.Source` | ||
| :Journal name: `source` | ||
|
|
||
| Abstract base class for point sources. | ||
|
|
||
| This is the base class for all point source implementations in PyLith. | ||
| Point sources are used to specify internal forcing terms at discrete points within the domain. | ||
|
|
||
| ## Pyre Facilities | ||
|
|
||
| * `auxiliary_subfields`: Discretization information for auxiliary subfields. | ||
| - **current value**: 'emptybin', from {default} | ||
| - **configurable as**: emptybin, auxiliary_subfields | ||
| * `db_auxiliary_field`: Database for source parameters. | ||
| - **current value**: 'simpledb', from {default} | ||
| - **configurable as**: simpledb, db_auxiliary_field | ||
| * `derived_subfields`: Discretization of derived subfields. | ||
| - **current value**: 'emptybin', from {default} | ||
| - **configurable as**: emptybin, derived_subfields | ||
| * `observers`: Observers (e.g., output). | ||
| - **current value**: 'singlephysicsobserver', from {default} | ||
| - **configurable as**: singlephysicsobserver, observers | ||
| * `reader`: Reader for source points list. | ||
| - **current value**: 'pointslist', from {default} | ||
| - **configurable as**: pointslist, reader | ||
|
|
||
| ## Pyre Properties | ||
|
|
||
| * `description`=\<str\>: Descriptive label for source. | ||
| - **default value**: '' | ||
| - **current value**: '', from {default} | ||
| - **validator**: <function validateDescription at ...> | ||
| * `field`=\<str\>: Solution subfield associated with source. | ||
| - **default value**: 'displacement' | ||
| - **current value**: 'displacement', from {default} | ||
| * `label`=\<str\>: Name of label for source. | ||
| - **default value**: 'source-id' | ||
| - **current value**: 'source-id', from {default} | ||
| * `label_value`=\<int\>: Value of label identifying source. | ||
| - **default value**: 1 | ||
| - **current value**: 1, from {default} | ||
|
|
17 changes: 17 additions & 0 deletions
17
docs/user/components/sources/SourceTimeFunctionMomentTensorForce.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # SourceTimeFunctionMomentTensorForce | ||
|
|
||
| % WARNING: Do not edit; this is a generated file! | ||
| :Full name: `pylith.sources.SourceTimeFunctionMomentTensorForce` | ||
| :Journal name: `sourcetimefunctionmomenttensorforce` | ||
|
|
||
| Abstract base class for source time functions. | ||
|
|
||
| This is the base class for source time functions used with moment tensor force sources. | ||
| Derived classes implement specific wavelet types. | ||
|
|
||
| ## Pyre Facilities | ||
|
|
||
| * `auxiliary_subfields`: Discretization information for physical properties and state variables. | ||
| - **current value**: 'emptybin', from {default} | ||
| - **configurable as**: emptybin, auxiliary_subfields | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # SquareWavelet | ||
|
|
||
| % WARNING: Do not edit; this is a generated file! | ||
| :Full name: `pylith.sources.SquareWavelet` | ||
| :Journal name: `squarewavelet` | ||
|
|
||
| Square wavelet (step function) source time function. | ||
|
|
||
| The square wavelet is a Heaviside step function that activates the source at the time delay. | ||
|
|
||
| The wavelet is defined as: | ||
|
|
||
| $S(t) = \begin{cases} 0 & t < t_d \\ 1 & t \geq t_d \end{cases}$ | ||
|
|
||
| where $t_d$ is the time delay. | ||
|
|
||
| Implements `SourceTimeFunctionMomentTensorForce`. | ||
|
|
||
| ## Pyre Facilities | ||
|
|
||
| * `auxiliary_subfields`: Discretization information for source time function parameters. | ||
| - **current value**: 'auxiliary_subfields', from {file='...', line=..., function='__set__'} | ||
| - **configurable as**: auxiliary_subfields | ||
|
|
||
| ## Example | ||
|
|
||
| Example of setting `SquareWavelet` Pyre properties and facilities in a parameter file. | ||
|
|
||
| :::{code-block} cfg | ||
| [pylithapp.problem.sources.source] | ||
| source_time_function = pylith.sources.SquareWavelet | ||
|
|
||
| # Source parameters specified in the auxiliary field database | ||
| db_auxiliary_field = spatialdata.spatialdb.UniformDB | ||
| db_auxiliary_field.description = Source properties | ||
| db_auxiliary_field.values = [moment_tensor_xx, moment_tensor_yy, moment_tensor_xy, moment_tensor_zz, time_delay, center_frequency] | ||
| db_auxiliary_field.data = [1.0e12*Pa*s, 1.0e12*Pa*s, 0.0*Pa*s, 1.0e12*Pa*s, 0.5*s, 1.0] | ||
|
|
||
| source_time_function.auxiliary_subfields.center_frequency.basis_order = 0 | ||
| ::: | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to this file are not relevant. Please remove.