Second Coupling Integral (times d tilde/dn)#1589
Second Coupling Integral (times d tilde/dn)#1589int-ptr-ptr wants to merge 16 commits intoPrincetonUniversity:develfrom
Conversation
|
It looks like you're making updates unrelated to the coupling integral in this PR, unless I've missed something. Would you mind updating this PR to include just the coupling integral and its test? I'm unsure where the nonconforming fixture is used—please correct me if I'm wrong. Thanks! |
| typename IndexType, typename IntersectionFieldViewType, | ||
| typename IntersectionFactor, typename IntersectionJacobianType, | ||
| typename TransferFunctionDerivativeType, typename CallableType> | ||
| KOKKOS_FUNCTION void coupling_integral_dnshape( |
There was a problem hiding this comment.
Precomputing edge-related values and storing them in the assembly can clean up this code, improve readability, and facilitate integration into coupling_integral.
There was a problem hiding this comment.
Is it alright if we do this in a future PR? I was waiting for this one to go through before updating my work on #1342 in order to put the first coupling_integral in the same test executable.
Precomputation and storage would require changes to nonconforming_interfaces that will bloat this PR even further.
There was a problem hiding this comment.
That sounds good. Can you create another issue for that refactor and link it here?
Also, see my other comment.
lsawade
left a comment
There was a problem hiding this comment.
I'm not quite understanding why you are rewriting GLL routines here.
See: core/specfem/quadrature/gll/lagrange_poly.cpp
I had not seen that, as I overlooked the |
|
@int-ptr-ptr, how are your notes coming along? |
|
I forgot to re-issue the reviews. Apologies! |
| #include "utilities/include/fixture/nonconforming_interface/quadrature.hpp" | ||
| #include <gtest/gtest.h> | ||
|
|
||
| template <typename EdgeTypesView> |
There was a problem hiding this comment.
? Why do you not use ChunkEdgeIterator? Or, if ChunkEdgeiterator does not fit your usage, why not template it the way you are doing it here, and adapt the chunkedge iterator. This seems like a lit of redundant code (that is not tested)
specfem::execution::ChunkEdgeIterator?
| // specfem::execution::for_each_level( | ||
| // chunk_index.get_iterator(), | ||
| // [&](const typename ChunkIndexType::iterator_type::index_type | ||
| // &iterator_index) { | ||
| // const auto index = iterator_index.get_index(); | ||
| // const auto index_local = iterator_index.get_local_index(); | ||
|
|
||
| // index.ielem | ||
| // }); |
| // using ParallelConfig = | ||
| // specfem::parallel_configuration::default_chunk_config< | ||
| // dimension_tag, specfem::datatype::simd<type_real, false | ||
| // /*using_simd*/>, Kokkos::DefaultExecutionSpace>; | ||
| // specfem::execution::ChunkedDomainIterator chunk( | ||
| // ParallelConfig(), self_edges.element_index, element_grid); | ||
|
|
| const bool ipoint_n_is_ix = | ||
| edge_index.edge_type == | ||
| specfem::mesh_entity::dim2::type::left || | ||
| edge_index.edge_type == | ||
| specfem::mesh_entity::dim2::type::right; | ||
| const int ipoint_s = ipoint_n_is_ix ? iz : ix; | ||
| int ipoint_n = ipoint_n_is_ix ? ix : iz; | ||
| const int ngll_n = ipoint_n_is_ix ? ngllx : ngllz; | ||
| const int ngll_s = ipoint_n_is_ix ? ngllz : ngllx; | ||
|
|
||
| if (edge_index.edge_type == | ||
| specfem::mesh_entity::dim2::type::right || | ||
| edge_index.edge_type == | ||
| specfem::mesh_entity::dim2::type::top) { | ||
| // we want 0 to be on the edge | ||
| ipoint_n = ngll_n - 1 - ipoint_n; | ||
| } | ||
|
|
||
| const type_real dlagrange_dn = -hprime(0, ipoint_n); | ||
|
|
There was a problem hiding this comment.
There must be a more elegant way to do this.
Description
Please describe the changes/features in this pull request.
Issue Number
If there is an issue created for these changes, link it here
solves #1550
Checklist
Please make sure to check developer documentation on specfem docs.