-
Notifications
You must be signed in to change notification settings - Fork 17
Final 3d fixes - Compiling and solving.... #1297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
…art2-generate_wavefield
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This helper function looks like its dimension independent. Should it be a single implementaiton for 2D/3D?
core/specfem/assembly/boundaries.cpp
Outdated
| #include "boundaries/dim2/boundaries.tpp" | ||
| #include "boundaries/dim2/impl/acoustic_free_surface.tpp" | ||
| #include "boundaries/dim2/impl/stacey.tpp" | ||
| // TODO: Implement dim3 boundaries - requires adapting to different mesh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // TODO: Implement dim3 boundaries - requires adapting to different mesh | |
| // TODO(Lucas : DIM3_BOUNDARIES_UPDATE): Implement dim3 boundaries - requires adapting to different mesh |
Just to make it easier to grep
| template <typename MappingType, typename IndexType> | ||
| KOKKOS_FORCEINLINE_FUNCTION | ||
| std::enable_if_t<IndexType::dimension_tag == specfem::dimension::type::dim2, | ||
| std::size_t> | ||
| get_flat_index(const MappingType &mapping, const IndexType &index) { | ||
| return mapping(index.ispec, index.iz, index.ix); | ||
| } | ||
|
|
||
| // Helper function to get flat index from mapping for dim3 | ||
| template <typename MappingType, typename IndexType> | ||
| KOKKOS_FORCEINLINE_FUNCTION | ||
| std::enable_if_t<IndexType::dimension_tag == specfem::dimension::type::dim3, | ||
| std::size_t> | ||
| get_flat_index(const MappingType &mapping, const IndexType &index) { | ||
| return mapping(index.ispec, index.iz, index.iy, index.ix); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be inside an impl namespace.
…an into assembly jacobian
Issue 1295 - Implements the seismogram writer for 3D seismograms
…ent. Updated locate point to match the specfem3d algo. Updated t0 update in specfem3d
- fixes jacobian reading and population - fixes wrong use of index in the gradient calculation - Updates source stations and specfem_config to fully match the fortran simulation - updates plot_seismograms and includes reference seismograms
also: - fixes issue related to local running of snakemakes that was introduced with the nightly benchmarks - UPDATES UV.LOCK which should have been updated in Kentaro's PR for gmeshlayer builder
Updated the receivers and the force
Issue 1289 - Implements 3D VTK writing.
…EMPP into final-3d-fixes
Final bug fixes for 3D simulation
…EMPP into final-3d-fixes
commit ba84272ec61d28be7eca5eefb41494a655f0c989 Author: Lucas Sawade <[email protected]> Date: Thu Oct 30 14:34:17 2025 -0400 Updated the Mesh generation to be <100MB commit 7cd4035191ffdb82ce770c812d3d36b7cc31ddd5 Author: Lucas Sawade <[email protected]> Date: Wed Oct 29 17:16:24 2025 -0400 This moves channel file generator from utilities to io/seismogram/impl note that in newmark_tests.cpp I'm explicitly creating one since writer output directory and trace reader directory are not necessarily the same. The alternativ is static_casting the writer to seismogram_writer and making the writer output directory the same as the reference trace directory. Either way writer now inherits from the channelgenerator making file naming in the writer easier. commit 2abbdeb8e66a516cc8533f50501d19bede30bff5 Author: Lucas Sawade <[email protected]> Date: Wed Oct 29 14:42:33 2025 -0400 This commit does a bunch of things to make the first 3D displacement test pass - [x] Enables reading of seismograms - [x] Creates a new set of functions - get_band_code to use the timestep interval to figure out the FDSN seismometer band code - get_channel_code defines the channel to from component and timestep (0.011, 'X') -> 'BXX' - get_file_extension -> uses wavefield::type to return, e.g. `semd` for displacement - get_seismogram_file_names which combines output_directory, network, and station with the above three to return a vector of appropriate filenames. - [x] Update the mesh/source-station geometry and hence traces to minimize the simulation time yet still have an ok simulation without reflections
Rohit-Kakodkar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a couple of TODO tags, that can be addressed soonish
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | ||
| constexpr bool using_simd = false; | ||
| #else | ||
| constexpr bool using_simd = true; | ||
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | |
| constexpr bool using_simd = false; | |
| #else | |
| constexpr bool using_simd = true; | |
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | |
| #endif | |
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | |
| constexpr bool using_simd = false; | |
| #else | |
| // TODO(Rohit : DIM3_SIMD) Enable simd implementation for dim3 solver | |
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | |
| #endif |
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | ||
| constexpr bool using_simd = false; | ||
| #else | ||
| constexpr bool using_simd = true; | ||
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | |
| constexpr bool using_simd = false; | |
| #else | |
| constexpr bool using_simd = true; | |
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | |
| #endif | |
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | |
| constexpr bool using_simd = false; | |
| #else | |
| // TODO(Rohit : DIM3_SIMD) Enable simd execution for dim3 solver | |
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | |
| #endif |
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | ||
| constexpr bool using_simd = false; | ||
| #else | ||
| constexpr bool using_simd = true; | ||
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | |
| constexpr bool using_simd = false; | |
| #else | |
| constexpr bool using_simd = true; | |
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | |
| #endif | |
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | |
| constexpr bool using_simd = false; | |
| #else | |
| // TODO(Rohit : DIM3_SIMD) | |
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | |
| #endif |
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | ||
| constexpr bool using_simd = false; | ||
| #else | ||
| constexpr bool using_simd = true; | ||
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | |
| constexpr bool using_simd = false; | |
| #else | |
| constexpr bool using_simd = true; | |
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | |
| #endif | |
| #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) | |
| constexpr bool using_simd = false; | |
| #else | |
| // TODO (Rohit : DIM3_SIMD) | |
| constexpr bool using_simd = (DimensionTag == specfem::dimension::type::dim2) ? true : false; | |
| #endif |
| #include "enumerations/medium.hpp" | ||
| #include <boost/preprocessor.hpp> | ||
|
|
||
| namespace specfem::medium::impl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a look at this merge conflict coming from PR #1329
Issue 1321 - Displacement Test for 3D
Description
... now we just need to figure out whether it's garbage
Uses: #1292 so that will need updating down the line
Issue Number
Not a specific number...
Checklist
Please make sure to check developer documentation on specfem docs.