Skip to content

Issue 1810 - Attenuation property IO#1986

Open
lsawade wants to merge 6 commits into
develfrom
issue-1810-alt
Open

Issue 1810 - Attenuation property IO#1986
lsawade wants to merge 6 commits into
develfrom
issue-1810-alt

Conversation

@lsawade

@lsawade lsawade commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Description

Here we go again!

Should address the original comments and is not modifying the medium_writer.

The properties IO tests have also been simplified compared to the original Attenuation IO implementation.

Issue Number

Closes #1810

Checklist

Please make sure to check developer documentation on specfem docs.

  • I ran the code through pre-commit to check style
  • THE DOCUMENTATION BUILDS WITHOUT WARNINGS/ERRORS
  • I have added labels to the PR (see right hand side of the PR page)
  • My code passes all the integration tests
  • I have added sufficient unittests to test my changes
  • I have added/updated documentation for the changes I am proposing
  • I have updated CMakeLists to ensure my code builds
  • My code builds across all platforms

@lsawade
lsawade requested review from Rohit-Kakodkar and icui July 7, 2026 23:25
@Rohit-Kakodkar Rohit-Kakodkar added the enhancement New feature or request label Jul 13, 2026
@lsawade

lsawade commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Retest this please

@@ -122,7 +130,8 @@ int specfem::io::impl::write_medium_group(
const int n_elements = element_indices.size();

using DomainView3d =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is wrong. It should be derived from data containers.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a miss on my end. Cannot tell you how many times I interrupted claude to please not edit the medium_writer. I should have checked at the end a last time...


using DomainView =
typename DataContainerType::domain_view_type::host_mirror_type;
specfem::datatype::DomainView<specfem::element::dimension_tag::dim2,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same here

const int count = element_range.size();

impl::write_coordinates(group, assembly.mesh, element_range);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this is still confusing. I suggest attenuation return names of properties that are attenuated. i.e. "kappa" & "mu". Any transformations that happen to the view kappa & mu should happen in this file so its easy to follow. I suggest that attenuation could return scaling factors that can be used here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The reason I set it up like this is that this one way of performing the scaling. For a different attenuation type that scaling may be different. So, if we make hardcode the scaling here, we would have to run scaling here every time.

I agree that this bit is confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants