Issue 1594 part 3 - Implements Assembly::Attenuation and Assembly::FieldDerivativeStorage#1765
Issue 1594 part 3 - Implements Assembly::Attenuation and Assembly::FieldDerivativeStorage#1765
Conversation
| specfem::element::medium_tag::elastic_psv, PropertyTag, | ||
| specfem::element::attenuation_tag::constant_isotropic>(mesh_ispec); | ||
|
|
||
| material.compute_attenuation_properties(fc.raw(), f0.raw(), band, tau_sigma); |
There was a problem hiding this comment.
Why are you passing raw values directly? I should that function not have information on units?
The function could return the view tau_sigma
| specfem::element::dimension_tag D, specfem::element::medium_tag M, | ||
| specfem::element::property_tag P, specfem::element::attenuation_tag A, |
There was a problem hiding this comment.
Just want to use typename FieldDerivatives ? and create a container class for field derivatives?
| view_type du_storage; | ||
| typename view_type::HostMirror h_du_storage; |
There was a problem hiding this comment.
| view_type du_storage; | |
| typename view_type::HostMirror h_du_storage; | |
| view_type du; | |
| typename view_type::HostMirror h_du; |
| @@ -14,7 +15,8 @@ specfem::assembly::impl::domain_properties<specfem::element::dimension_tag::dim2 | |||
| const bool has_gll_model, | |||
| const Kokkos::View<int *, Kokkos::LayoutRight, | |||
| Kokkos::DefaultHostExecutionSpace> | |||
| property_index_mapping) | |||
| property_index_mapping, | |||
| std::integral_constant<specfem::element::attenuation_tag, AttenuationTag>) | |||
There was a problem hiding this comment.
| template <specfem::element::medium_tag MediumTag, | |
| specfem::element::property_tag PropertyTag, specfem::element::attenuation_tag AttenuationTag> | |
| specfem::assembly::impl::domain_properties<specfem::element::dimension_tag::dim2, MediumTag, | |
| PropertyTag>:: | |
| domain_properties( | |
| const Kokkos::View<int *, Kokkos::DefaultHostExecutionSpace> elements, | |
| const specfem::assembly::mesh<dimension_tag> &mesh, const int ngllz, | |
| const int ngllx, | |
| const specfem::mesh::materials<dimension_tag> &materials, | |
| const bool has_gll_model, | |
| const Kokkos::View<int *, Kokkos::LayoutRight, | |
| Kokkos::DefaultHostExecutionSpace> | |
| property_index_mapping) |
Can attenuation tag be directly passed to domain_properties?
| template <specfem::element::attenuation_tag T = AttenuationTag, | ||
| typename = | ||
| std::enable_if_t<T == specfem::element::attenuation_tag::none> > | ||
| template < |
There was a problem hiding this comment.
Seems like this definition is completely changed. Before it was for none, Now its for constant_isotropic
|
|
||
| public: | ||
| // Getters for computed properties with error handling | ||
| type_real get_kappa_scale() const { |
There was a problem hiding this comment.
Do you require all these values at the same location. Can there be just a single get call?
I find it hard to generalize this interface across different media.
|
The material interface is very verbose. It would be hard to generalize across different media. Other than that, the comments are minor, consistency-related. |
Description
Implements first iteration of
assembly::Attenuationassembly::FieldDerivativeStorageThese are not being used/constructed in the assembly yet. I will create 2 follow up PRs
compute_attenuation(...)to be called inside gradient callback in compute_stiffnessIssue Number
Closes #1594 and closes #1599
Checklist
Please make sure to check developer documentation on specfem docs.