Skip to content

Commit

Permalink
Refactor point_peroperties.
Browse files Browse the repository at this point in the history
  • Loading branch information
icui committed Feb 19, 2025
1 parent c5d4792 commit 7f24080
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 283 deletions.
14 changes: 7 additions & 7 deletions include/medium/material_properties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ struct material_properties
const int ispec = elements(i);
property_index_mapping(ispec) = count;
if (!has_gll_model) {
// Get the material at index from mesh::materials
const auto material =
std::get<specfem::medium::material<type, property> >(
materials[ispec]);

// Assign the material property to the property container
const auto point_property = material.get_properties();
for (int iz = 0; iz < ngllz; ++iz) {
for (int ix = 0; ix < ngllx; ++ix) {
// Get the material at index from mesh::materials
auto material =
std::get<specfem::medium::material<type, property> >(
materials[ispec]);

// Assign the material property to the property container
auto point_property = material.get_properties();
this->assign(specfem::point::index<dimension>(count, iz, ix),
point_property);
}
Expand Down
Loading

0 comments on commit 7f24080

Please sign in to comment.