1678 cosserat time marching#1768
Open
maxlchien wants to merge 7 commits intoPrincetonUniversity:1675-cosserat-meshfrom
Open
1678 cosserat time marching#1768maxlchien wants to merge 7 commits intoPrincetonUniversity:1675-cosserat-meshfrom
maxlchien wants to merge 7 commits intoPrincetonUniversity:1675-cosserat-meshfrom
Conversation
lsawade
requested changes
Apr 1, 2026
Collaborator
lsawade
left a comment
There was a problem hiding this comment.
Some changes. Getting really close!
| (DIMENSION_TAG(DIM2), | ||
| MEDIUM_TAG(ELASTIC_PSV, ELASTIC_SH, ACOUSTIC, POROELASTIC, | ||
| ELASTIC_PSV_T), | ||
| ELASTIC_PSV_T, ELASTIC_SPIN), |
Collaborator
There was a problem hiding this comment.
This will have no effect.
because:
DIMENSION_TAG(DIM2)
| FOR_EACH_IN_PRODUCT( | ||
| (DIMENSION_TAG(DIM2), MEDIUM_TAG(ELASTIC_PSV, ELASTIC_PSV_T, ELASTIC_SH, | ||
| ACOUSTIC, POROELASTIC)), | ||
| ACOUSTIC, ELASTIC_SPIN, POROELASTIC)), |
Collaborator
There was a problem hiding this comment.
This will have no effect.
because:
DIMENSION_TAG(DIM2)
Same here.
Comment on lines
32
to
38
| int ngroups = 0; | ||
| FOR_EACH_IN_PRODUCT( | ||
| (DIMENSION_TAG(DIM2), MEDIUM_TAG(ELASTIC_PSV, ELASTIC_PSV_T, ELASTIC_SH, | ||
| ACOUSTIC, POROELASTIC)), | ||
| ACOUSTIC, ELASTIC_SPIN, POROELASTIC)), | ||
| { | ||
| if (forward.get_nglob<_medium_tag_>() > 0) { | ||
| ngroups++; |
Comment on lines
49
to
53
| FOR_EACH_IN_PRODUCT( | ||
| (DIMENSION_TAG(DIM2), MEDIUM_TAG(ELASTIC_PSV, ELASTIC_PSV_T, ELASTIC_SH, | ||
| ACOUSTIC, POROELASTIC)), | ||
| ACOUSTIC, ELASTIC_SPIN, POROELASTIC)), | ||
| { | ||
| // Get the number of GLL points in the medium |
Comment on lines
125
to
128
| FOR_EACH_IN_PRODUCT( | ||
| (DIMENSION_TAG(DIM2), MEDIUM_TAG(ELASTIC_PSV, ELASTIC_SH, ACOUSTIC, | ||
| POROELASTIC, ELASTIC_PSV_T)), | ||
| POROELASTIC, ELASTIC_PSV_T, ELASTIC_SPIN)), | ||
| { |
| MACRO(8, dimension_tag::dim2, field_type::forward, medium_tag::elastic_sh) \ | ||
| MACRO(8, dimension_tag::dim2, field_type::forward, \ | ||
| medium_tag::elastic_psv_t) \ | ||
| MACRO(8, dimension_tag::dim2, field_type::forward, medium_tag::elastic_spin) \ |
Collaborator
There was a problem hiding this comment.
Suggested change
| MACRO(8, dimension_tag::dim2, field_type::forward, medium_tag::elastic_spin) \ |
| MACRO(5, dimension_tag::dim2, field_type::forward, medium_tag::elastic_sh) \ | ||
| MACRO(5, dimension_tag::dim2, field_type::forward, \ | ||
| medium_tag::elastic_psv_t) \ | ||
| MACRO(5, dimension_tag::dim2, field_type::forward, medium_tag::elastic_spin) \ |
Collaborator
There was a problem hiding this comment.
Suggested change
| MACRO(5, dimension_tag::dim2, field_type::forward, medium_tag::elastic_spin) \ |
|
|
||
| bool internal = | ||
| specfem::utilities::is_close(this->f, other_source->f) && | ||
| specfem::utilities::is_close(this->fc, other_source->fc) && |
Rohit-Kakodkar
approved these changes
Apr 1, 2026
Collaborator
Rohit-Kakodkar
left a comment
There was a problem hiding this comment.
No comments other than things @lsawade already pointed out.
icui
approved these changes
Apr 2, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds elastic spin elements to time marching and wavefield computation. Adds cosserat-force as a possible source type in 3D. Cosserat forces are specified by
in contrast to the
f, f_c, anglesetup for 2D sources.Adds unit testing for the cosserat sources, and adds a cosserat source to the multiple source test.
Issue Number
#1678
Checklist
Please make sure to check developer documentation on specfem docs.