diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ae59fe3e..da5ef804 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,6 @@ # Description -Please describe the changes/features in this pull request. +Please describe the changes/features in this pull request. # Issue Number @@ -8,11 +8,11 @@ If there is an issue created for these changes, link it here # Checklist -Please make sure to check developer documentation on specfem docs. +Please make sure to check developer documentation on specfem docs. -[] I ran the code through pre-commit to check style -[] 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 +- [ ] I ran the code through pre-commit to check style +- [ ] 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 diff --git a/.gitignore b/.gitignore index ad703ba3..c28ec6b4 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ firebase*.yml *.out debug.sh output.log +output.txt results/ timing.sh examples/*/*_config.yaml diff --git a/.jenkins/gnu_compiler_checks.gvy b/.jenkins/gnu_compiler_checks.gvy index 68c0d911..29a7d3c4 100644 --- a/.jenkins/gnu_compiler_checks.gvy +++ b/.jenkins/gnu_compiler_checks.gvy @@ -68,8 +68,8 @@ pipeline{ sh """ module load boost/1.73.0 module load ${GNU_COMPILER_MODULE} - cmake3 -S . -B build_cpu_${GNU_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.GIT_COMMIT} -DCMAKE_BUILD_TYPE=Release ${CMAKE_HOST_FLAGS} ${SIMD_FLAGS} -DBUILD_TESTS=ON - cmake3 --build build_cpu_${GNU_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.GIT_COMMIT} + cmake3 -S . -B build_cpu_${GNU_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.BUILD_TAG} -DCMAKE_BUILD_TYPE=Release ${CMAKE_HOST_FLAGS} ${SIMD_FLAGS} -DBUILD_TESTS=ON + cmake3 --build build_cpu_${GNU_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.BUILD_TAG} """ echo ' Build completed ' } @@ -80,7 +80,7 @@ pipeline{ sh """ module load boost/1.73.0 module load ${GNU_COMPILER_MODULE} - cd build_cpu_${GNU_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.GIT_COMMIT}/tests/unit-tests + cd build_cpu_${GNU_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.BUILD_TAG}/tests/unit-tests srun -N 1 -t 00:20:00 ${HOST_RUN_FLAGS} --constraint=skylake bash -c 'export OMP_PROC_BIND=spread; export OMP_THREADS=places; ctest --verbose;' """ echo ' Testing completed ' @@ -90,7 +90,7 @@ pipeline{ post { always { echo ' Cleaning ' - sh "rm -rf build_cpu_${GNU_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.GIT_COMMIT}" + sh "rm -rf build_cpu_${GNU_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.BUILD_TAG}" } } } diff --git a/.jenkins/intel_compiler_checks.gvy b/.jenkins/intel_compiler_checks.gvy index f3fa66cd..a3244452 100644 --- a/.jenkins/intel_compiler_checks.gvy +++ b/.jenkins/intel_compiler_checks.gvy @@ -69,8 +69,8 @@ pipeline{ module load ${INTEL_MODULE} export CC=icx export CXX=icpx - cmake3 -S . -B build_cpu_${INTEL_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.GIT_COMMIT} -DCMAKE_BUILD_TYPE=Release ${CMAKE_HOST_FLAGS} ${SIMD_FLAGS} -D BUILD_TESTS=ON - cmake3 --build build_cpu_${INTEL_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.GIT_COMMIT} + cmake3 -S . -B build_cpu_${INTEL_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.BUILD_TAG} -DCMAKE_BUILD_TYPE=Release ${CMAKE_HOST_FLAGS} ${SIMD_FLAGS} -D BUILD_TESTS=ON + cmake3 --build build_cpu_${INTEL_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.BUILD_TAG} """ echo ' Build completed ' } @@ -81,7 +81,7 @@ pipeline{ sh """ module load boost/1.73.0 module load ${INTEL_MODULE} - cd build_cpu_${INTEL_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.GIT_COMMIT}/tests/unit-tests + cd build_cpu_${INTEL_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.BUILD_TAG}/tests/unit-tests srun -N 1 -t 00:20:00 ${HOST_RUN_FLAGS} --constraint=skylake bash -c 'export OMP_PROC_BIND=spread; export OMP_THREADS=places; ctest --verbose;' """ echo ' Testing completed ' @@ -91,7 +91,7 @@ pipeline{ post { always { echo ' Cleaning ' - sh "rm -rf build_cpu_${INTEL_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.GIT_COMMIT}" + sh "rm -rf build_cpu_${INTEL_COMPILER_NAME}_${CMAKE_HOST_NAME}_${SIMD_NAME}_${env.BUILD_TAG}" } } } diff --git a/.jenkins/nvidia_compiler_checks.gvy b/.jenkins/nvidia_compiler_checks.gvy index fff1db9e..423c78bb 100644 --- a/.jenkins/nvidia_compiler_checks.gvy +++ b/.jenkins/nvidia_compiler_checks.gvy @@ -83,8 +83,8 @@ pipeline{ sh """ module load boost/1.73.0 module load ${CUDA_MODULE} - cmake3 -S . -B build_cuda_${CUDA_COMPILER_NAME}_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${SIMD_NAME}_${env.GIT_COMMIT} -DCMAKE_BUILD_TYPE=Release ${CMAKE_HOST_FLAGS} ${CMAKE_DEVICE_FLAGS} ${SIMD_FLAGS} -D BUILD_TESTS=ON - cmake3 --build build_cuda_${CUDA_COMPILER_NAME}_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${SIMD_NAME}_${env.GIT_COMMIT} + cmake3 -S . -B build_cuda_${CUDA_COMPILER_NAME}_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${SIMD_NAME}_${env.BUILD_TAG} -DCMAKE_BUILD_TYPE=Release ${CMAKE_HOST_FLAGS} ${CMAKE_DEVICE_FLAGS} ${SIMD_FLAGS} -D BUILD_TESTS=ON + cmake3 --build build_cuda_${CUDA_COMPILER_NAME}_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${SIMD_NAME}_${env.BUILD_TAG} """ echo ' Build completed ' } @@ -95,7 +95,7 @@ pipeline{ sh """ module load boost/1.73.0 module load ${CUDA_MODULE} - cd build_cuda_${CUDA_COMPILER_NAME}_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${SIMD_NAME}_${env.GIT_COMMIT}/tests/unit-tests + cd build_cuda_${CUDA_COMPILER_NAME}_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${SIMD_NAME}_${env.BUILD_TAG}/tests/unit-tests srun -N 1 -t 00:20:00 ${HOST_RUN_FLAGS} ${DEVICE_RUN_FLAGS} bash -c 'export OMP_PROC_BIND=spread; export OMP_THREADS=places; ctest --verbose;' """ echo ' Testing completed ' @@ -105,7 +105,7 @@ pipeline{ post { always { echo ' Cleaning ' - sh "rm -rf build_cuda_${CUDA_COMPILER_NAME}_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${SIMD_NAME}_${env.GIT_COMMIT}" + sh "rm -rf build_cuda_${CUDA_COMPILER_NAME}_${CMAKE_HOST_NAME}_${CMAKE_DEVICE_NAME}_${SIMD_NAME}_${env.BUILD_TAG}" } } } diff --git a/CMakeLists.txt b/CMakeLists.txt index 20ba188f..7c318a33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(specfem2d_kokkos VERSION 0.1.0) set(CMAKE_CXX_STANDARD 17) option(HDF5_CXX_BUILD "Build HDF5 C++" ON) +option(VTK_CXX_BUILD "Build VTK C++" ON) option(MPI_PARALLEL "MPI enabled" OFF) option(BUILD_TESTS "Tests included" OFF) option(BUILD_EXAMPLES "Examples included" OFF) @@ -48,6 +49,26 @@ FetchContent_MakeAvailable(yaml) include_directories(BEFORE SYSTEM ${yaml_BINARY_DIR} ${yaml_SOURCE_DIR}/include) +find_package(VTK COMPONENTS +CommonColor +CommonCore +FiltersSources +InteractionStyle +RenderingContextOpenGL2 +RenderingCore +RenderingFreeType +RenderingGL2PSOpenGL2 +RenderingOpenGL2 +) + +if (NOT VTK_FOUND) + message("VTK not found: ${VTK_NOT_FOUND_MESSAGE}") + set(VTK_CXX_BUILD OFF) +else () + message(STATUS " VTK: ${VTK_LIBRARIES}") +endif() + + # Try finding boost and if not found install. find_package(Boost 1.73.0 COMPONENTS program_options filesystem system) @@ -107,7 +128,16 @@ add_library( IO src/IO/fortranio/fortran_io.cpp src/IO/HDF5/native_type.cpp - src/IO/ASCII/native_type.cpp + # src/IO/ASCII/native_type.cpp + src/IO/mesh/read_mesh.cpp + src/IO/mesh/impl/fortran/read_boundaries.cpp + src/IO/mesh/impl/fortran/read_elements.cpp + src/IO/mesh/impl/fortran/read_material_properties.cpp + src/IO/mesh/impl/fortran/read_mesh_database.cpp + src/IO/mesh/impl/fortran/read_interfaces.cpp + src/IO/mesh/impl/fortran/read_properties.cpp + src/IO/sources/read_sources.cpp + src/IO/receivers/read_receivers.cpp ) if (NOT HDF5_CXX_BUILD) @@ -130,6 +160,21 @@ else() ) endif() +target_link_libraries( + IO + mesh +) + +target_link_libraries( + IO + source_class +) + +target_link_libraries( + IO + receiver_class +) + add_library( point src/point/coordinates.cpp @@ -141,6 +186,11 @@ target_link_libraries( Kokkos::kokkos ) +add_library( + enumerations + src/enumerations/medium.cpp +) + add_library( edge src/edge/interface.cpp @@ -180,14 +230,12 @@ endif(MPI_PARALLEL) add_library( mesh - src/mesh/IO/fortran/read_mesh_database.cpp src/mesh/boundaries/forcing_boundaries.cpp src/mesh/boundaries/absorbing_boundaries.cpp src/mesh/boundaries/acoustic_free_surface.cpp src/mesh/elements/tangential_elements.cpp src/mesh/elements/axial_elements.cpp - src/mesh/properties/properties.cpp - src/mesh/mpi_interfaces/mpi_interfaces.cpp + # src/mesh/mpi_interfaces/mpi_interfaces.cpp src/mesh/materials/materials.cpp src/mesh/coupled_interfaces/interface_container.cpp src/mesh/coupled_interfaces/coupled_interfaces.cpp @@ -200,7 +248,6 @@ target_link_libraries( Kokkos::kokkos specfem_mpi # material_class - IO yaml-cpp ) @@ -228,16 +275,26 @@ target_link_libraries( # specfem_mpi # ) +add_library( + read_seismogram + src/reader/seismogram.cpp +) + +target_link_libraries( + read_seismogram + Kokkos::kokkos + ) + add_library( reader src/reader/wavefield.cpp - src/reader/seismogram.cpp ) target_link_libraries( reader compute IO + read_seismogram ) add_library( @@ -261,7 +318,7 @@ add_library( target_link_libraries( source_time_function - reader + read_seismogram Kokkos::kokkos point ) @@ -273,7 +330,6 @@ add_library( src/source/moment_tensor_source.cpp src/source/adjoint_source.cpp src/source/external.cpp - src/source/read_sources.cpp ) target_link_libraries( @@ -292,7 +348,6 @@ target_link_libraries( add_library( receiver_class src/receiver/receiver.cpp - src/receiver/read_receiver.cpp ) target_link_libraries( @@ -319,7 +374,8 @@ add_library( src/compute/boundaries/boundaries.cpp src/compute/fields/fields.cpp src/compute/compute_boundary_values.cpp - src/compute/compute_assembly.cpp + src/compute/assembly/assembly.cpp + src/compute/assembly/compute_wavefield.cpp ) target_link_libraries( @@ -359,6 +415,7 @@ add_library( target_link_libraries( domain Kokkos::kokkos + enumerations ) add_library(coupled_interface @@ -448,6 +505,29 @@ target_link_libraries( IO ) +add_library( + plotter + src/plotter/plot_wavefield.cpp +) + +if (NOT VTK_CXX_BUILD) + target_compile_definitions( + plotter + PUBLIC -DNO_VTK + ) + + target_link_libraries( + plotter + compute + ) +else () + target_link_libraries( + plotter + compute + ${VTK_LIBRARIES} + ) +endif() + add_library( parameter_reader src/parameter_parser/run_setup.cpp @@ -460,6 +540,7 @@ add_library( src/parameter_parser/writer/seismogram.cpp src/parameter_parser/setup.cpp src/parameter_parser/writer/wavefield.cpp + src/parameter_parser/writer/plot_wavefield.cpp src/parameter_parser/writer/kernel.cpp ) @@ -482,6 +563,8 @@ add_executable( src/specfem2d.cpp ) + + target_link_libraries( specfem2d specfem_mpi @@ -493,6 +576,7 @@ target_link_libraries( parameter_reader receiver_class writer + plotter reader domain coupled_interface diff --git a/docs/api/IO/Libraries/index.rst b/docs/api/IO/Libraries/index.rst index 4ec1b5a3..78332661 100644 --- a/docs/api/IO/Libraries/index.rst +++ b/docs/api/IO/Libraries/index.rst @@ -39,5 +39,7 @@ The snippet below shows how to use these modules to write and read a Kokkos::Vie .. toctree:: :maxdepth: 1 + sources/index + mesh/index ASCII/index HDF5/index diff --git a/docs/api/IO/Libraries/mesh/index.rst b/docs/api/IO/Libraries/mesh/index.rst new file mode 100644 index 00000000..8b798162 --- /dev/null +++ b/docs/api/IO/Libraries/mesh/index.rst @@ -0,0 +1,31 @@ +.. _mesh_reader: + +Mesh Reader +=========== + + +The below functions are helper functions for the Fortran binary mesh database +reader. The functions are called in :cpp:func:`specfem::IO::read_mesh` +in sequential order and faciliate the reading of the mesh database. + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_mesh_database_header + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_coorg_elements + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_properties + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_mesh_database_attenuation + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_material_properties + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_boundaries + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_coupled_interfaces + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_tangential_elements + +.. doxygenfunction:: specfem::IO::mesh::impl::fortran::read_axial_elements + +Finally, we add tags to the :cpp:struct:`specfem::mesh::mesh` using the +:cpp:struct:`specfem::mesh::tags` struct. The description of which can be found +here: :ref:`mesh_tags`. diff --git a/docs/api/IO/index.rst b/docs/api/IO/index.rst index 65a8267b..8f4332a1 100644 --- a/docs/api/IO/index.rst +++ b/docs/api/IO/index.rst @@ -2,10 +2,39 @@ Input/Output modules ==================== +There are three high-level functions that are essential for the SPECFEM++ +codebase: :cpp:func:`specfem::IO::read_mesh`, +:cpp:func:`specfem::IO::read_sources`, and +:cpp:func:`specfem::IO::read_receivers`. These functions are +used to read the mesh, sources and receivers from disk. The underlying +implementations are not exposed to the user. Currently supported +formats for the reading of the mesh is binary, and for sources and receivers it +is yaml. + +In addition to these basic read functions, there are also the two +reader and writer classes, :cpp:class:`specfem::reader::wavefield` and +:cpp:class:`specfem::writer::wavefield`, which support both HDF5 and ASCII I/O. +And, to write seismograms, we can use :cpp:class:`specfem::writer::seismogram`. +Seismogram I/O is only supported in ASCII format thus far. + +The slightly-lower level functionality to read and write data to and from disk +are exposed through the following modules: + .. toctree:: :maxdepth: 2 + Libraries/index fortran_io - Library/index writer/index reader/index + + +Read Mesh, Sources and Receivers +-------------------------------- + + +.. doxygenfunction:: specfem::IO::read_mesh + +.. doxygenfunction:: specfem::IO::read_sources + +.. doxygenfunction:: specfem::IO::read_receivers diff --git a/docs/api/enumerations/wavefield/index.rst b/docs/api/enumerations/wavefield/index.rst index acdff670..a0aee6fb 100644 --- a/docs/api/enumerations/wavefield/index.rst +++ b/docs/api/enumerations/wavefield/index.rst @@ -4,4 +4,9 @@ Wavefield definitions --------------------- +.. doxygenenum:: specfem::wavefield::simulation_field + .. doxygenenum:: specfem::wavefield::type + +.. doxygenclass:: specfem::wavefield::wavefield + :members: diff --git a/docs/api/index.rst b/docs/api/index.rst index 3704a2fb..622e4d7b 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -16,7 +16,9 @@ API documentation datatypes/index assembly/index policies/index + IO/index operators/index + medium/index compute_kernels/index coupling_physics/coupled_interface timescheme/index diff --git a/docs/api/medium/index.rst b/docs/api/medium/index.rst new file mode 100644 index 00000000..c90872a8 --- /dev/null +++ b/docs/api/medium/index.rst @@ -0,0 +1,9 @@ +.. _medium:: + +Medium modules +============== + +Functions within medium modules define the physics related to a particular medium. + +.. doxygengroup:: MediumPhysics + :content-only: diff --git a/docs/api/setup_parameters/display.rst b/docs/api/setup_parameters/display.rst new file mode 100644 index 00000000..8cfbf005 --- /dev/null +++ b/docs/api/setup_parameters/display.rst @@ -0,0 +1,8 @@ + +Display Parameters +================== + +Plotting parameters for the wavefield. + +.. doxygenclass:: specfem::runtime_configuration::plot_wavefield + :members: diff --git a/docs/api/setup_parameters/index.rst b/docs/api/setup_parameters/index.rst index 31dae51c..ee7ef4fd 100644 --- a/docs/api/setup_parameters/index.rst +++ b/docs/api/setup_parameters/index.rst @@ -16,4 +16,6 @@ Methods used to read the runtime configuration file and set up the simulation. E run_setup database_configuration seismogram + wavefield_writer + display setup diff --git a/docs/api/setup_parameters/wavefield_writer.rst b/docs/api/setup_parameters/wavefield_writer.rst new file mode 100644 index 00000000..a8714c55 --- /dev/null +++ b/docs/api/setup_parameters/wavefield_writer.rst @@ -0,0 +1,6 @@ + +Wavefield Writer/Reader Parameters +================================== + +.. doxygenclass:: specfem::runtime_configuration::wavefield + :members: diff --git a/docs/api/sources/index.rst b/docs/api/sources/index.rst index f6937bc9..460b2da0 100644 --- a/docs/api/sources/index.rst +++ b/docs/api/sources/index.rst @@ -19,8 +19,3 @@ Types of sources force_source moment_tensor_source - -Auxiliary functions -------------------- - -.. doxygenfunction:: specfem::sources::read_sources diff --git a/docs/developer_documentation/tutorials/tutorial1/Chapter1/index.rst b/docs/developer_documentation/tutorials/tutorial1/Chapter1/index.rst index 4ed9ec50..e3236b6e 100644 --- a/docs/developer_documentation/tutorials/tutorial1/Chapter1/index.rst +++ b/docs/developer_documentation/tutorials/tutorial1/Chapter1/index.rst @@ -2,7 +2,7 @@ .. _Chapter1: Chapter 1: Generating the mesh, sources and receivers -==================================================== +===================================================== Before we start writing the solver, we need to generate an hexahedral mesh, and define our sources and receivers. To do this we will use the Fortran package ``MESHFEM2D``. @@ -11,7 +11,7 @@ Before we start writing the solver, we need to generate an hexahedral mesh, and Since ``MESHFEM2D`` is a dependency for SPECFEM++, it is should already be installed as part of the SPECFEM++ installation. Defining the MESHFEM2D Parameter File --------------------------------------- +------------------------------------- Let us generate a Hex mesh for 2D elastic domain using the following parameter file. You will also need a topography file to define the surface topography of the mesh, see :ref:`Topgraphy File ` diff --git a/docs/developer_documentation/tutorials/tutorial1/Chapter11/index.rst b/docs/developer_documentation/tutorials/tutorial1/Chapter11/index.rst index b3a4a5e8..b9823d04 100644 --- a/docs/developer_documentation/tutorials/tutorial1/Chapter11/index.rst +++ b/docs/developer_documentation/tutorials/tutorial1/Chapter11/index.rst @@ -29,7 +29,7 @@ Finally, we have all the components that we need to put together to create a com specfem::mesh::mesh mesh("OUTPUT_FILES/database.bin", mpi); // Read the sources - const auto sources = specfem::sources::read_sources( + const auto sources = specfem::IO::sources::read_sources( "OUTPUT_FILES/sources.yaml", simulation_params.nsteps, simulation_params.t0, diff --git a/docs/developer_documentation/tutorials/tutorial1/Chapter2/index.rst b/docs/developer_documentation/tutorials/tutorial1/Chapter2/index.rst index 6cfee49b..5c6857ca 100644 --- a/docs/developer_documentation/tutorials/tutorial1/Chapter2/index.rst +++ b/docs/developer_documentation/tutorials/tutorial1/Chapter2/index.rst @@ -44,7 +44,7 @@ Next we will read the sources and receivers generated in :ref:`Chapter1 @@ -61,7 +61,7 @@ Next we will read the sources and receivers generated in :ref:`Chapter1 `_. Below are the recommended build recipes for different architectures: +SPECFEM++ inherits several architecure specific cmake configuration keywords +from `Kokkos `_. +Below are the recommended build recipes for different architectures: * CPU Serial version @@ -122,12 +131,18 @@ SPECFEM++ inherits several architecure specific cmake configuration keywords fro .. note:: - Specify the architecture flag ``-D Kokkos_ARCH_`` based on the GPU architecture you are using. For example, for NVIDIA Ampere architecture, use ``-D Kokkos_ARCH_AMPERE80=ON``. See `Kokkos documentation `_ for more information. + Specify the architecture flag ``-D Kokkos_ARCH_`` based on + the GPU architecture you are using. For example, for NVIDIA Ampere + architecture, use ``-D Kokkos_ARCH_AMPERE80=ON``. See + `Kokkos documentation `_ + for more information. Adding SPECFEM to PATH ---------------------- -Finally, once compiled you could run SPECFEM++ from inside the build directory, by running the executible ``./specfem2d``. However, we recommend you add SPECFEM++ build directory to your ``PATH`` using +Finally, once compiled you could run SPECFEM++ from inside the build directory, +by running the executible ``./specfem2d``. However, we recommend you add +SPECFEM++ build directory to your ``PATH`` using .. code-block:: bash @@ -136,11 +151,15 @@ Finally, once compiled you could run SPECFEM++ from inside the build directory, Running the solver ------------------ -Lets run a simple example to test the installation. We will use the ``example\homogeneous-medium-flat-topography`` directory in the SPECFEM++ repository. The example directory contains a mesh of a homogeneous half-space with a single source and neumann boundary conditions. +Lets run a simple example to test the installation. We will use the +``example\homogeneous-medium-flat-topography`` directory in the SPECFEM++ +repository. The example directory contains a mesh of a homogeneous half-space +with a single source and neumann boundary conditions. .. note:: - A detailed description of the example can be found within :ref:`this cookbook ` + A detailed description of the example can be found within + :ref:`this cookbook ` .. code-block:: bash @@ -155,4 +174,5 @@ This will generate the mesh files. Next, we will run the solver using mkdir -p OUTPUT_FILES/results specfem2d -p specfem_config.yaml -This will run the solver and generate synthetic seismograms at the receiver locations specified in ``STATIONS`` file. +This will run the solver and generate synthetic seismograms at the receiver +locations specified in ``STATIONS`` file. diff --git a/docs/output.txt b/docs/output.txt deleted file mode 100644 index a373dc1b..00000000 --- a/docs/output.txt +++ /dev/null @@ -1,2163 +0,0 @@ -warning: ignoring unsupported tag `CREATE_SUBDIRS_LEVEL =' at line 92, file Doxyfile.in -warning: ignoring unsupported tag `JAVADOC_BANNER =' at line 221, file Doxyfile.in -warning: ignoring unsupported tag `PYTHON_DOCSTRING =' at line 249, file Doxyfile.in -warning: ignoring unsupported tag `OPTIMIZE_OUTPUT_SLICE =' at line 325, file Doxyfile.in -warning: ignoring unsupported tag `NUM_PROC_THREADS =' at line 491, file Doxyfile.in -warning: ignoring unsupported tag `EXTRACT_PRIV_VIRTUAL =' at line 517, file Doxyfile.in -warning: ignoring unsupported tag `RESOLVE_UNNAMED_PARAMS =' at line 561, file Doxyfile.in -warning: ignoring unsupported tag `SHOW_HEADERFILE =' at line 634, file Doxyfile.in -warning: ignoring unsupported tag `WARN_IF_INCOMPLETE_DOC =' at line 852, file Doxyfile.in -warning: ignoring unsupported tag `WARN_LINE_FORMAT =' at line 892, file Doxyfile.in -warning: ignoring unsupported tag `DOCSET_FEEDURL =' at line 1406, file Doxyfile.in -warning: ignoring unsupported tag `FULL_SIDEBAR =' at line 1617, file Doxyfile.in -warning: ignoring unsupported tag `OBFUSCATE_EMAILS =' at line 1648, file Doxyfile.in -warning: ignoring unsupported tag `HTML_FORMULA_FORMAT =' at line 1659, file Doxyfile.in -warning: ignoring unsupported tag `FORMULA_MACROFILE =' at line 1685, file Doxyfile.in -warning: ignoring unsupported tag `MATHJAX_VERSION =' at line 1707, file Doxyfile.in -warning: ignoring unsupported tag `LATEX_MAKEINDEX_CMD =' at line 1896, file Doxyfile.in -warning: ignoring unsupported tag `LATEX_EMOJI_DIRECTORY =' at line 2031, file Doxyfile.in -warning: ignoring unsupported tag `XML_NS_MEMB_FILE_SCOPE =' at line 2165, file Doxyfile.in -warning: ignoring unsupported tag `DOT_UML_DETAILS =' at line 2480, file Doxyfile.in -warning: ignoring unsupported tag `DOT_WRAP_THRESHOLD =' at line 2489, file Doxyfile.in -warning: ignoring unsupported tag `DIR_GRAPH_MAX_DEPTH =' at line 2562, file Doxyfile.in -/scratch/gpfs/rk9481/specfem2d_kokkos/include/compute/compute_receivers.hpp:102: warning: The following parameters of specfem::compute::receivers::receivers(const std::vector< specfem::receivers::receiver * > &receivers, const std::vector< specfem::enums::seismogram::type > &stypes, const specfem::quadrature::quadrature *quadx, const specfem::quadrature::quadrature *quadz, const type_real xmax, const type_real xmin, const type_real zmax, const type_real zmin, const int max_sig_step, specfem::MPI::MPI *mpi) are not documented: - parameter 'xmax' - parameter 'xmin' - parameter 'zmax' - parameter 'zmin' - parameter 'max_sig_step' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/compute/compute_sources.hpp:56: warning: The following parameters of specfem::compute::sources::sources(const std::vector< specfem::sources::source * > &sources, const specfem::quadrature::quadrature *quadx, const specfem::quadrature::quadrature *quadz, const type_real xmax, const type_real xmin, const type_real zmax, const type_real zmin, specfem::MPI::MPI *mpi) are not documented: - parameter 'xmax' - parameter 'xmin' - parameter 'zmax' - parameter 'zmin' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/domain.hpp:143: warning: argument 'seismogram_types' of command @param is not found in the argument list of specfem::domain::domain< medium, qp_type >::compute_seismogram(const int isig_step) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:75: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::compute_gradient(const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium::components > field_chi, type_real *dchidxl, type_real *dchidzl) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\Omega_e' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:61: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::compute_mass_matrix_component(const int &ispec, const int &xz, type_real *mass_matrix) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:83: warning: argument 'dchipdzl' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::compute_stress(const int &ispec, const int &xz, const type_real *dchidxl, const type_real *dchidzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:104: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::compute_stress(const int &ispec, const int &xz, const type_real *dchidxl, const type_real *dchidzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const=0 are not documented: - parameter 'ispec' - parameter 'dchidzl' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\gamma' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\rho' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\gamma' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\partial_x' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\chi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\partial_x' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\xi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\partial_z' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\chi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\partial_z' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\xi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:109: warning: argument 'field_dot_dot' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium::components > stress_integrand_xi, const ScratchViewType< type_real, medium::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:127: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium::components > stress_integrand_xi, const ScratchViewType< type_real, medium::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 are not documented: - parameter 'acceleration' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:69: warning: argument 'ispec' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::element(const specfem::compute::partial_derivatives partial_derivatives, const specfem::compute::properties properties) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:140: warning: argument 'field_dot_dot' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:161: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const are not documented: - parameter 'acceleration' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:106: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_gradient(const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > field_chi, type_real *dchidxl, type_real *dchidzl) const are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\Omega_e' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:90: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_mass_matrix_component(const int &ispec, const int &xz, type_real *mass_matrix) const are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:114: warning: argument 'dchipdzl' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_stress(const int &ispec, const int &xz, const type_real *dchidxl, const type_real *dchidzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:135: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_stress(const int &ispec, const int &xz, const type_real *dchidxl, const type_real *dchidzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const are not documented: - parameter 'ispec' - parameter 'dchidzl' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:80: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::compute_gradient(const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > u, type_real *dudxl, type_real *dudzl) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\Omega_e' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:63: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::compute_mass_matrix_component(const int &ispec, const int &xz, type_real *mass_matrix) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:104: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::compute_stress(const int &ispec, const int &xz, const type_real *dudxl, const type_real *dudzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:109: warning: argument 'stress_integrand_1' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:109: warning: argument 'stress_integrand_2' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:109: warning: argument 'field_dot_dot' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:127: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 are not documented: - parameter 'stress_integrand_xi' - parameter 'stress_integrand_gamma' - parameter 'acceleration' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:145: warning: argument 'field_dot_dot' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:163: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const are not documented: - parameter 'acceleration' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\Omega_e' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp:85: warning: argument 'siesmogram_type' of command @param is not found in the argument list of specfem::domain::impl::receivers::receiver< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::get_field(const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp:85: warning: argument 'hprime_xx' of command @param is not found in the argument list of specfem::domain::impl::receivers::receiver< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::get_field(const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp:85: warning: argument 'hprime_zz' of command @param is not found in the argument list of specfem::domain::impl::receivers::receiver< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::get_field(const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp:101: warning: The following parameters of specfem::domain::impl::receivers::receiver< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::get_field(const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const are not documented: - parameter 'seismogram_type' - parameter 's_hprime_xx' - parameter 's_hprime_zz' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/sources/elastic/elastic2d_isotropic.hpp:70: warning: The following parameters of specfem::domain::impl::sources::source< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::source(const specfem::compute::properties &properties, specfem::kokkos::DeviceView4d< type_real > source_array) are not documented: - parameter 'properties' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:220: warning: argument 'teamMember' of command @param is not found in the argument list of specfem::jacobian::compute_inverted_derivatives(const specfem::kokkos::HostView2d< type_real > s_coorg, const int ngnod, const type_real xi, const type_real gamma) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:159: warning: The following parameters of specfem::jacobian::compute_jacobian(const specfem::kokkos::HostTeam::member_type &teamMember, const specfem::kokkos::HostScratchView2d< type_real > s_coorg, const int ngnod, const type_real xi, const type_real gamma) are not documented: - parameter 'teamMember' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:174: warning: The following parameters of specfem::jacobian::compute_jacobian(const specfem::kokkos::HostTeam::member_type &teamMember, const specfem::kokkos::HostScratchView2d< type_real > s_coorg, const int ngnod, const specfem::kokkos::HostView2d< type_real > dershape2D) are not documented: - parameter 'teamMember' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:65: warning: argument 'coorg' of command @param is not found in the argument list of specfem::jacobian::compute_locations(const specfem::kokkos::HostView2d< type_real > s_coorg, const int ngnod, const specfem::kokkos::HostView1d< type_real > shape2D) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:74: warning: The following parameters of specfem::jacobian::compute_locations(const specfem::kokkos::HostView2d< type_real > s_coorg, const int ngnod, const specfem::kokkos::HostView1d< type_real > shape2D) are not documented: - parameter 's_coorg' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:119: warning: argument 'teamMember' of command @param is not found in the argument list of specfem::jacobian::compute_partial_derivatives(const specfem::kokkos::HostView2d< type_real > s_coorg, const int ngnod, const type_real xi, const type_real gamma) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/kokkos_abstractions.h:574: warning: Unsupported xml/html tag found -/scratch/gpfs/rk9481/specfem2d_kokkos/include/kokkos_abstractions.h:574: warning: Unsupported xml/html tag found -/scratch/gpfs/rk9481/specfem2d_kokkos/include/mesh/mesh.hpp:82: warning: The following parameters of specfem::mesh::mesh::mesh(const std::string filename, std::vector< specfem::material::material * > &materials, const specfem::MPI::MPI *mpi) are not documented: - parameter 'materials' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/specfem_mpi/specfem_mpi.hpp:212: warning: The following parameters of specfem::MPI::MPI::bcast(int &val, int root) const are not documented: - parameter 'root' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/specfem_mpi/specfem_mpi.hpp:218: warning: The following parameters of specfem::MPI::MPI::bcast(float &val, int root) const are not documented: - parameter 'root' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/specfem_mpi/specfem_mpi.hpp:224: warning: The following parameters of specfem::MPI::MPI::bcast(double &val, int root) const are not documented: - parameter 'root' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/quadrature/quadrature.hpp:23: warning: argument 'alpha' of command @param is not found in the argument list of specfem::quadrature::quadrature::get_xi() const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/quadrature/quadrature.hpp:23: warning: argument 'beta' of command @param is not found in the argument list of specfem::quadrature::quadrature::get_xi() const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/parameter_parser/seismogram.hpp:48: warning: The following parameters of specfem::runtime_configuration::seismogram::instantiate_seismogram_writer(std::vector< specfem::receivers::receiver * > &receivers, specfem::compute::receivers *compute_receivers, const type_real dt, const type_real t0, const int nsteps_between_samples) const are not documented: - parameter 'nsteps_between_samples' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/solver/time_marching.hpp:33: warning: The following parameters of specfem::solver::time_marching::time_marching(specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type > &acoustic_domain, specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type > &elastic_domain, specfem::coupled_interface::coupled_interface< specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type >, specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type > > &acoustic_elastic_interface, specfem::coupled_interface::coupled_interface< specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type >, specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type > > &elastic_acoustic_interface, specfem::TimeScheme::TimeScheme *it) are not documented: - parameter 'acoustic_elastic_interface' - parameter 'elastic_acoustic_interface' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/force_source.hpp:25: warning: argument 'force_source' of command @param is not found in the argument list of specfem::sources::force::force(YAML::Node &Node, const type_real dt) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/force_source.hpp:31: warning: The following parameters of specfem::sources::force::force(YAML::Node &Node, const type_real dt) are not documented: - parameter 'Node' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/moment_tensor_source.hpp:26: warning: argument 'moment_tensor' of command @param is not found in the argument list of specfem::sources::moment_tensor::moment_tensor(YAML::Node &Node, const type_real dt) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/moment_tensor_source.hpp:31: warning: The following parameters of specfem::sources::moment_tensor::moment_tensor(YAML::Node &Node, const type_real dt) are not documented: - parameter 'Node' - parameter 'dt' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:25: warning: The following parameters of specfem::TimeScheme::Newmark::Newmark(const int nstep, const type_real t0, const type_real dt, const int nstep_between_samples) are not documented: - parameter 'nstep_between_samples' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:74: warning: argument 'domain_class' of command @param is not found in the argument list of specfem::TimeScheme::Newmark::apply_corrector_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:78: warning: The following parameters of specfem::TimeScheme::Newmark::apply_corrector_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) are not documented: - parameter 'field' - parameter 'field_dot' - parameter 'field_dot_dot' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:64: warning: argument 'domain_class' of command @param is not found in the argument list of specfem::TimeScheme::Newmark::apply_predictor_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:68: warning: The following parameters of specfem::TimeScheme::Newmark::apply_predictor_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) are not documented: - parameter 'field' - parameter 'field_dot' - parameter 'field_dot_dot' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/timescheme.hpp:63: warning: argument 'domain_class' of command @param is not found in the argument list of specfem::TimeScheme::TimeScheme::apply_corrector_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/timescheme.hpp:67: warning: The following parameters of specfem::TimeScheme::TimeScheme::apply_corrector_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) are not documented: - parameter 'field' - parameter 'field_dot' - parameter 'field_dot_dot' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/timescheme.hpp:53: warning: argument 'domain_class' of command @param is not found in the argument list of specfem::TimeScheme::TimeScheme::apply_predictor_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/timescheme.hpp:57: warning: The following parameters of specfem::TimeScheme::TimeScheme::apply_predictor_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) are not documented: - parameter 'field' - parameter 'field_dot' - parameter 'field_dot_dot' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/domain.hpp:143: warning: argument 'seismogram_types' of command @param is not found in the argument list of specfem::domain::domain< medium, qp_type >::compute_seismogram(const int isig_step) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\Omega_e' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:51: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:52: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:61: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::compute_mass_matrix_component(const int &ispec, const int &xz, type_real *mass_matrix) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:75: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::compute_gradient(const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium::components > field_chi, type_real *dchidxl, type_real *dchidzl) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:83: warning: argument 'dchipdzl' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::compute_stress(const int &ispec, const int &xz, const type_real *dchidxl, const type_real *dchidzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:104: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::compute_stress(const int &ispec, const int &xz, const type_real *dchidxl, const type_real *dchidzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const=0 are not documented: - parameter 'ispec' - parameter 'dchidzl' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\gamma' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\rho' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\gamma' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\partial_x' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\chi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:115: warning: Found unknown command `\partial_x' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\xi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\partial_z' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\chi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\partial_z' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:116: warning: Found unknown command `\xi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:109: warning: argument 'field_dot_dot' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium::components > stress_integrand_xi, const ScratchViewType< type_real, medium::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d.hpp:127: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, quadrature_points >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium::components > stress_integrand_xi, const ScratchViewType< type_real, medium::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 are not documented: - parameter 'acceleration' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:69: warning: argument 'ispec' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::element(const specfem::compute::partial_derivatives partial_derivatives, const specfem::compute::properties properties) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\Omega_e' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:80: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:81: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:90: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_mass_matrix_component(const int &ispec, const int &xz, type_real *mass_matrix) const are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:106: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_gradient(const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > field_chi, type_real *dchidxl, type_real *dchidzl) const are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:114: warning: argument 'dchipdzl' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_stress(const int &ispec, const int &xz, const type_real *dchidxl, const type_real *dchidzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:135: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_stress(const int &ispec, const int &xz, const type_real *dchidxl, const type_real *dchidzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const are not documented: - parameter 'ispec' - parameter 'dchidzl' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:140: warning: argument 'field_dot_dot' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/acoustic/acoustic2d_isotropic.hpp:161: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::acoustic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const are not documented: - parameter 'acceleration' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\Omega_e' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:53: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:54: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:63: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::compute_mass_matrix_component(const int &ispec, const int &xz, type_real *mass_matrix) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:80: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::compute_gradient(const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > u, type_real *dudxl, type_real *dudzl) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:104: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::compute_stress(const int &ispec, const int &xz, const type_real *dudxl, const type_real *dudzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const=0 are not documented: - parameter 'ispec' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:109: warning: argument 'stress_integrand_1' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:109: warning: argument 'stress_integrand_2' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:109: warning: argument 'field_dot_dot' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d.hpp:127: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, qp_type >::update_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const=0 are not documented: - parameter 'stress_integrand_xi' - parameter 'stress_integrand_gamma' - parameter 'acceleration' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\Omega_e' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\sum_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:84: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\omega_' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\alpha' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:85: warning: Found unknown command `\beta' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:145: warning: argument 'field_dot_dot' of command @param is not found in the argument list of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/elements/elastic/elastic2d_isotropic.hpp:163: warning: The following parameters of specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::compute_acceleration(const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const are not documented: - parameter 'acceleration' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/force_source.hpp:25: warning: argument 'force_source' of command @param is not found in the argument list of specfem::sources::force::force(YAML::Node &Node, const type_real dt) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/force_source.hpp:31: warning: The following parameters of specfem::sources::force::force(YAML::Node &Node, const type_real dt) are not documented: - parameter 'Node' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/mesh/mesh.hpp:82: warning: The following parameters of specfem::mesh::mesh::mesh(const std::string filename, std::vector< specfem::material::material * > &materials, const specfem::MPI::MPI *mpi) are not documented: - parameter 'materials' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/moment_tensor_source.hpp:26: warning: argument 'moment_tensor' of command @param is not found in the argument list of specfem::sources::moment_tensor::moment_tensor(YAML::Node &Node, const type_real dt) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/moment_tensor_source.hpp:31: warning: The following parameters of specfem::sources::moment_tensor::moment_tensor(YAML::Node &Node, const type_real dt) are not documented: - parameter 'Node' - parameter 'dt' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/specfem_mpi/specfem_mpi.hpp:212: warning: The following parameters of specfem::MPI::MPI::bcast(int &val, int root) const are not documented: - parameter 'root' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/specfem_mpi/specfem_mpi.hpp:218: warning: The following parameters of specfem::MPI::MPI::bcast(float &val, int root) const are not documented: - parameter 'root' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/specfem_mpi/specfem_mpi.hpp:224: warning: The following parameters of specfem::MPI::MPI::bcast(double &val, int root) const are not documented: - parameter 'root' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:25: warning: The following parameters of specfem::TimeScheme::Newmark::Newmark(const int nstep, const type_real t0, const type_real dt, const int nstep_between_samples) are not documented: - parameter 'nstep_between_samples' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:64: warning: argument 'domain_class' of command @param is not found in the argument list of specfem::TimeScheme::Newmark::apply_predictor_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:68: warning: The following parameters of specfem::TimeScheme::Newmark::apply_predictor_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) are not documented: - parameter 'field' - parameter 'field_dot' - parameter 'field_dot_dot' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:74: warning: argument 'domain_class' of command @param is not found in the argument list of specfem::TimeScheme::Newmark::apply_corrector_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/newmark.hpp:78: warning: The following parameters of specfem::TimeScheme::Newmark::apply_corrector_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) are not documented: - parameter 'field' - parameter 'field_dot' - parameter 'field_dot_dot' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/quadrature/quadrature.hpp:23: warning: argument 'alpha' of command @param is not found in the argument list of specfem::quadrature::quadrature::get_xi() const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/quadrature/quadrature.hpp:23: warning: argument 'beta' of command @param is not found in the argument list of specfem::quadrature::quadrature::get_xi() const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/receiver/receiver.hpp:133: warning: Found unknown command `\xi' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/receiver/receiver.hpp:134: warning: Found unknown command `\gamma' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp:85: warning: argument 'siesmogram_type' of command @param is not found in the argument list of specfem::domain::impl::receivers::receiver< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::get_field(const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp:85: warning: argument 'hprime_xx' of command @param is not found in the argument list of specfem::domain::impl::receivers::receiver< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::get_field(const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp:85: warning: argument 'hprime_zz' of command @param is not found in the argument list of specfem::domain::impl::receivers::receiver< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::get_field(const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp:101: warning: The following parameters of specfem::domain::impl::receivers::receiver< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::get_field(const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const are not documented: - parameter 'seismogram_type' - parameter 's_hprime_xx' - parameter 's_hprime_zz' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/compute/compute_receivers.hpp:102: warning: The following parameters of specfem::compute::receivers::receivers(const std::vector< specfem::receivers::receiver * > &receivers, const std::vector< specfem::enums::seismogram::type > &stypes, const specfem::quadrature::quadrature *quadx, const specfem::quadrature::quadrature *quadz, const type_real xmax, const type_real xmin, const type_real zmax, const type_real zmin, const int max_sig_step, specfem::MPI::MPI *mpi) are not documented: - parameter 'xmax' - parameter 'xmin' - parameter 'zmax' - parameter 'zmin' - parameter 'max_sig_step' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/parameter_parser/seismogram.hpp:48: warning: The following parameters of specfem::runtime_configuration::seismogram::instantiate_seismogram_writer(std::vector< specfem::receivers::receiver * > &receivers, specfem::compute::receivers *compute_receivers, const type_real dt, const type_real t0, const int nsteps_between_samples) const are not documented: - parameter 'nsteps_between_samples' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/domain/impl/sources/elastic/elastic2d_isotropic.hpp:70: warning: The following parameters of specfem::domain::impl::sources::source< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >::source(const specfem::compute::properties &properties, specfem::kokkos::DeviceView4d< type_real > source_array) are not documented: - parameter 'properties' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/compute/compute_sources.hpp:56: warning: The following parameters of specfem::compute::sources::sources(const std::vector< specfem::sources::source * > &sources, const specfem::quadrature::quadrature *quadx, const specfem::quadrature::quadrature *quadz, const type_real xmax, const type_real xmin, const type_real zmax, const type_real zmin, specfem::MPI::MPI *mpi) are not documented: - parameter 'xmax' - parameter 'xmin' - parameter 'zmax' - parameter 'zmin' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/kokkos_abstractions.h:574: warning: Unsupported xml/html tag found -/scratch/gpfs/rk9481/specfem2d_kokkos/include/kokkos_abstractions.h:574: warning: Unsupported xml/html tag found -/scratch/gpfs/rk9481/specfem2d_kokkos/include/solver/time_marching.hpp:33: warning: The following parameters of specfem::solver::time_marching::time_marching(specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type > &acoustic_domain, specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type > &elastic_domain, specfem::coupled_interface::coupled_interface< specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type >, specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type > > &acoustic_elastic_interface, specfem::coupled_interface::coupled_interface< specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type >, specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type > > &elastic_acoustic_interface, specfem::TimeScheme::TimeScheme *it) are not documented: - parameter 'acoustic_elastic_interface' - parameter 'elastic_acoustic_interface' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/timescheme.hpp:53: warning: argument 'domain_class' of command @param is not found in the argument list of specfem::TimeScheme::TimeScheme::apply_predictor_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/timescheme.hpp:57: warning: The following parameters of specfem::TimeScheme::TimeScheme::apply_predictor_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) are not documented: - parameter 'field' - parameter 'field_dot' - parameter 'field_dot_dot' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/timescheme.hpp:63: warning: argument 'domain_class' of command @param is not found in the argument list of specfem::TimeScheme::TimeScheme::apply_corrector_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/timescheme/timescheme.hpp:67: warning: The following parameters of specfem::TimeScheme::TimeScheme::apply_corrector_phase(specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) are not documented: - parameter 'field' - parameter 'field_dot' - parameter 'field_dot_dot' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:19: warning: Internal inconsistency: member x does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:19: warning: Internal inconsistency: member x does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:20: warning: Internal inconsistency: member y does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:20: warning: Internal inconsistency: member y does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:22: warning: Internal inconsistency: member z does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:22: warning: Internal inconsistency: member z does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:30: warning: Internal inconsistency: member displacement does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:30: warning: Internal inconsistency: member displacement does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:31: warning: Internal inconsistency: member velocity does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:31: warning: Internal inconsistency: member velocity does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:33: warning: Internal inconsistency: member acceleration does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/enumerations/specfem_enums.hpp:33: warning: Internal inconsistency: member acceleration does not belong to any container! -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:65: warning: argument 'coorg' of command @param is not found in the argument list of specfem::jacobian::compute_locations(const specfem::kokkos::HostView2d< type_real > s_coorg, const int ngnod, const specfem::kokkos::HostView1d< type_real > shape2D) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:74: warning: The following parameters of specfem::jacobian::compute_locations(const specfem::kokkos::HostView2d< type_real > s_coorg, const int ngnod, const specfem::kokkos::HostView1d< type_real > shape2D) are not documented: - parameter 's_coorg' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:119: warning: argument 'teamMember' of command @param is not found in the argument list of specfem::jacobian::compute_partial_derivatives(const specfem::kokkos::HostView2d< type_real > s_coorg, const int ngnod, const type_real xi, const type_real gamma) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:159: warning: The following parameters of specfem::jacobian::compute_jacobian(const specfem::kokkos::HostTeam::member_type &teamMember, const specfem::kokkos::HostScratchView2d< type_real > s_coorg, const int ngnod, const type_real xi, const type_real gamma) are not documented: - parameter 'teamMember' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:174: warning: The following parameters of specfem::jacobian::compute_jacobian(const specfem::kokkos::HostTeam::member_type &teamMember, const specfem::kokkos::HostScratchView2d< type_real > s_coorg, const int ngnod, const specfem::kokkos::HostView2d< type_real > dershape2D) are not documented: - parameter 'teamMember' -/scratch/gpfs/rk9481/specfem2d_kokkos/include/jacobian/jacobian.hpp:220: warning: argument 'teamMember' of command @param is not found in the argument list of specfem::jacobian::compute_inverted_derivatives(const specfem::kokkos::HostView2d< type_real > s_coorg, const int ngnod, const type_real xi, const type_real gamma) -/scratch/gpfs/rk9481/specfem2d_kokkos/include/source/read_sources.hpp:20: warning: The following parameters of specfem::sources::read_sources(const std::string sources_file, const type_real dt, const specfem::MPI::MPI *mpi) are not documented: - parameter 'dt' -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/IO/fortran_io.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/IO/mesh/boundaries/index.rst:7: WARNING: toctree contains reference to nonexisting document 'api/IO/mesh/boundaries/forcing_boundaries' -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/IO/mesh/elements/index.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/IO/mesh/index.rst:1: ERROR: Unknown directive type "mesh_io". - -.. mesh_io:: -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/IO/mesh/index.rst:18: WARNING: toctree contains reference to nonexisting document 'api/IO/mesh/coupling/index' -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_coupled_interfaces.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_partial_derivatives.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_properties.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_receivers.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_sources.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/index.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/index.rst:8: ERROR: Error in "toctree" directive: -invalid option block. - -.. toctree:: - :maxdepth: 1 - compute - compute_partial_derivatives - compute_properties - compute_sources - compute_receivers - compute_coupled_interfaces -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst:44: WARNING: Duplicate C++ declaration, also defined at api/coupling_physics/coupled_interface:8. -Declaration is '.. cpp:class:: template specfem::coupled_interface::coupled_interface'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst:3: CRITICAL: Duplicate ID: "classspecfem_1_1coupled__interface_1_1coupled__interface". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst:3: WARNING: Duplicate explicit target name: "classspecfem_1_1coupled__interface_1_1coupled__interface". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst:51: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION int npoints (const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz) - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: int [error at 19] - KOKKOS_FUNCTION int npoints (const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz) - -------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: int [error at 19] - KOKKOS_FUNCTION int npoints (const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz) - -------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst:51: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void self_iterator (const int &ipoint, const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz, int &i, int &j) - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void self_iterator (const int &ipoint, const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz, int &i, int &j) - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void self_iterator (const int &ipoint, const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz, int &i, int &j) - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst:51: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void coupled_iterator (const int &ipoint, const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz, int &i, int &j) - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void coupled_iterator (const int &ipoint, const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz, int &i, int &j) - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void coupled_iterator (const int &ipoint, const specfem::enums::coupling::edge::type &edge, const int ngllx, const int ngllz, int &i, int &j) - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/edge.rst:8: WARNING: duplicate label definition, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/edge.rst:13: WARNING: duplicate label interface, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/edge.rst:21: WARNING: duplicate label parameters, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/coupled_interface.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/elastic_acoustic/acoustic_elastic_edge.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void compute_coupling (const int &iedge, const int &ipoint) const - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_coupling (const int &iedge, const int &ipoint) const - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_coupling (const int &iedge, const int &ipoint) const - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/elastic_acoustic/acoustic_elastic_edge.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - inline KOKKOS_FUNCTION void get_edges (const int &iedge, specfem::enums::coupling::edge::type &self_edge_type, specfem::enums::coupling::edge::type &coupled_edge_type) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - inline KOKKOS_FUNCTION void get_edges (const int &iedge, specfem::enums::coupling::edge::type &self_edge_type, specfem::enums::coupling::edge::type &coupled_edge_type) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - inline KOKKOS_FUNCTION void get_edges (const int &iedge, specfem::enums::coupling::edge::type &self_edge_type, specfem::enums::coupling::edge::type &coupled_edge_type) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/elastic_acoustic/elastic_acoustic_edge.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void compute_coupling (const int &iedge, const int &ipoint) const - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_coupling (const int &iedge, const int &ipoint) const - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_coupling (const int &iedge, const int &ipoint) const - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/elastic_acoustic/elastic_acoustic_edge.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - inline KOKKOS_FUNCTION void get_edges (const int &iedge, specfem::enums::coupling::edge::type &self_edge_type, specfem::enums::coupling::edge::type &coupled_edge_type) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - inline KOKKOS_FUNCTION void get_edges (const int &iedge, specfem::enums::coupling::edge::type &self_edge_type, specfem::enums::coupling::edge::type &coupled_edge_type) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - inline KOKKOS_FUNCTION void get_edges (const int &iedge, specfem::enums::coupling::edge::type &self_edge_type, specfem::enums::coupling::edge::type &coupled_edge_type) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:22: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:26: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:30: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:50: WARNING: Duplicate C++ declaration, also defined at api/domain/domain:9. -Declaration is '.. cpp:class:: template specfem::domain::domain'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:4: CRITICAL: Duplicate ID: "classspecfem_1_1domain_1_1domain". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:4: WARNING: Duplicate explicit target name: "classspecfem_1_1domain_1_1domain". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:7: WARNING: duplicate label definition, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/edge.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:12: WARNING: duplicate label interface, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/edge.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst:20: WARNING: duplicate label parameters, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/edge.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst:9: WARNING: duplicate label definition, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst:14: WARNING: duplicate label interface, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst:22: WARNING: duplicate label parameters, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/domain.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst:82: WARNING: duplicate label template specializations, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/edge.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_mass_matrix_component (const int &ispec, const int &xz, type_real *mass_matrix) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_mass_matrix_component (const int &ispec, const int &xz, type_real *mass_matrix) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_mass_matrix_component (const int &ispec, const int &xz, type_real *mass_matrix) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_gradient (const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > u, type_real *dudxl, type_real *dudzl) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_gradient (const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > u, type_real *dudxl, type_real *dudzl) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_gradient (const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > u, type_real *dudxl, type_real *dudzl) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_stress (const int &ispec, const int &xz, const type_real *dudxl, const type_real *dudzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_stress (const int &ispec, const int &xz, const type_real *dudxl, const type_real *dudzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_stress (const int &ispec, const int &xz, const type_real *dudxl, const type_real *dudzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_acceleration (const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_acceleration (const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_acceleration (const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:class:: template specfem::domain::impl::elements::element< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:type:: dimension = specfem::enums::element::dimension::dim2'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:type:: medium_type = specfem::enums::element::medium::elastic'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:type:: quadrature_points_type = specfem::enums::element::quadrature::static_quadrature_points< NGLL >'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:type:: template ScratchViewType = typename quadrature_points_type::template ScratchViewType< T, N >'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView3d< type_real > xix'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView3d< type_real > xiz'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView3d< type_real > gammax'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView3d< type_real > gammaz'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView3d< type_real > jacobian'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView3d< type_real > lambdaplus2mu'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView3d< type_real > mu'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView3d< type_real > rho'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:function:: KOKKOS_FUNCTION element ()=default'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Duplicate C++ declaration, also defined at api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic:2. -Declaration is '.. cpp:function:: KOKKOS_FUNCTION element (const specfem::compute::partial_derivatives partial_derivatives, const specfem::compute::properties properties)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_mass_matrix_component (const int &ispec, const int &xz, type_real *mass_matrix) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_mass_matrix_component (const int &ispec, const int &xz, type_real *mass_matrix) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_mass_matrix_component (const int &ispec, const int &xz, type_real *mass_matrix) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_gradient (const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > u, type_real *dudxl, type_real *dudzl) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_gradient (const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > u, type_real *dudxl, type_real *dudzl) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_gradient (const int &ispec, const int &xz, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz, const ScratchViewType< type_real, medium_type::components > u, type_real *dudxl, type_real *dudzl) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_stress (const int &ispec, const int &xz, const type_real *dudxl, const type_real *dudzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_stress (const int &ispec, const int &xz, const type_real *dudxl, const type_real *dudzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_stress (const int &ispec, const int &xz, const type_real *dudxl, const type_real *dudzl, type_real *stress_integrand_xi, type_real *stress_integrand_gamma) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_acceleration (const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_acceleration (const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_acceleration (const int &xz, const type_real &wxglll, const type_real &wzglll, const ScratchViewType< type_real, medium_type::components > stress_integrand_xi, const ScratchViewType< type_real, medium_type::components > stress_integrand_gamma, const ScratchViewType< type_real, 1 > s_hprimewgll_xx, const ScratchViewType< type_real, 1 > s_hprimewgll_zz, type_real *acceleration) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/index.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst:1: ERROR: Unknown directive type "elemental_receivers_api_doc". - -.. elemental_receivers_api_doc:: -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst:9: WARNING: duplicate label definition, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst:14: WARNING: duplicate label interface, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst:22: WARNING: duplicate label parameters, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst:81: WARNING: duplicate label template specializations, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers_dim2_acoustic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void get_field (const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &siesmogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > hprime_xx, const ScratchViewType< type_real, 1 > hprime_zz) const - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void get_field (const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &siesmogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > hprime_xx, const ScratchViewType< type_real, 1 > hprime_zz) const - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void get_field (const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &siesmogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > hprime_xx, const ScratchViewType< type_real, 1 > hprime_zz) const - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers_dim2_acoustic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void compute_seismogram_components (const int &ireceiver, const int &iseis, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, dimension::array_type< type_real > &l_seismogram_components) const - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_seismogram_components (const int &ireceiver, const int &iseis, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, dimension::array_type< type_real > &l_seismogram_components) const - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_seismogram_components (const int &ireceiver, const int &iseis, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, dimension::array_type< type_real > &l_seismogram_components) const - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers_dim2_acoustic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void compute_seismogram (const int &ireceiver, const dimension::array_type< type_real > &seismogram_components, specfem::kokkos::DeviceView1d< type_real > receiver_seismogram) const - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_seismogram (const int &ireceiver, const dimension::array_type< type_real > &seismogram_components, specfem::kokkos::DeviceView1d< type_real > receiver_seismogram) const - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_seismogram (const int &ireceiver, const dimension::array_type< type_real > &seismogram_components, specfem::kokkos::DeviceView1d< type_real > receiver_seismogram) const - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void get_field (const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void get_field (const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void get_field (const int &ireceiver, const int &iseis, const int &ispec, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, const ScratchViewType< type_real, medium_type::components > field, const ScratchViewType< type_real, medium_type::components > field_dot, const ScratchViewType< type_real, medium_type::components > field_dot_dot, const ScratchViewType< type_real, 1 > s_hprime_xx, const ScratchViewType< type_real, 1 > s_hprime_zz) const - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void compute_seismogram_components (const int &ireceiver, const int &iseis, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, dimension::array_type< type_real > &l_seismogram_components) const - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_seismogram_components (const int &ireceiver, const int &iseis, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, dimension::array_type< type_real > &l_seismogram_components) const - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_seismogram_components (const int &ireceiver, const int &iseis, const specfem::enums::seismogram::type &seismogram_type, const int &xz, const int &isig_step, dimension::array_type< type_real > &l_seismogram_components) const - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 16] - KOKKOS_FUNCTION void compute_seismogram (const int &ireceiver, const dimension::array_type< type_real > &seismogram_components, specfem::kokkos::DeviceView1d< type_real > receiver_seismogram) const - ----------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_seismogram (const int &ireceiver, const dimension::array_type< type_real > &seismogram_components, specfem::kokkos::DeviceView1d< type_real > receiver_seismogram) const - --------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 20] - KOKKOS_FUNCTION void compute_seismogram (const int &ireceiver, const dimension::array_type< type_real > &seismogram_components, specfem::kokkos::DeviceView1d< type_real > receiver_seismogram) const - --------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/sources/sources.rst:9: WARNING: duplicate label definition, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/sources/sources.rst:14: WARNING: duplicate label interface, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/sources/sources.rst:22: WARNING: duplicate label parameters, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/sources/sources.rst:81: WARNING: duplicate label template specializations, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/sources/sources_dim2_acoustic_static_quadrature_points_isotrpoic.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - KOKKOS_INLINE_FUNCTION void compute_interaction (const int &isource, const int &ispec, const int &xz, const type_real &stf_value, type_real *acceleration) const - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_interaction (const int &isource, const int &ispec, const int &xz, const type_real &stf_value, type_real *acceleration) const - ---------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 27] - KOKKOS_INLINE_FUNCTION void compute_interaction (const int &isource, const int &ispec, const int &xz, const type_real &stf_value, type_real *acceleration) const - ---------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/sources/sources_dim2_elastic_static_quadrature_points_isotropic.rst:2: WARNING: doxygenclass: Cannot find class "specfem::domain::impl::sources::elemental_sources_api_documentation< specfem::enums::element::dimension::dim2, specfem::enums::element::medium::elastic, specfem::enums::element::quadrature::static_quadrature_points< NGLL >, specfem::enums::element::property::isotropic >" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/acoustic.rst:2: WARNING: doxygenclass: Cannot find class "specfem::enums::element::medium::acosutic" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim2.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION T & operator[] (const int &i) - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 32] - inline KOKKOS_INLINE_FUNCTION T & operator[] (const int &i) - --------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 32] - inline KOKKOS_INLINE_FUNCTION T & operator[] (const int &i) - --------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim2.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION const T & operator[] (const int &i) const - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 38] - inline KOKKOS_INLINE_FUNCTION const T & operator[] (const int &i) const - --------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 38] - inline KOKKOS_INLINE_FUNCTION const T & operator[] (const int &i) const - --------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim2.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION array_type< T > & operator+= (const array_type< T > &rhs) - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 46] - inline KOKKOS_INLINE_FUNCTION array_type< T > & operator+= (const array_type< T > &rhs) - ----------------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 46] - inline KOKKOS_INLINE_FUNCTION array_type< T > & operator+= (const array_type< T > &rhs) - ----------------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim2.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION void init () - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 34] - inline KOKKOS_INLINE_FUNCTION void init () - ----------------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 34] - inline KOKKOS_INLINE_FUNCTION void init () - ----------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim3.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION T & operator[] (const int &i) - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 32] - inline KOKKOS_INLINE_FUNCTION T & operator[] (const int &i) - --------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 32] - inline KOKKOS_INLINE_FUNCTION T & operator[] (const int &i) - --------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim3.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION const T & operator[] (const int &i) const - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 38] - inline KOKKOS_INLINE_FUNCTION const T & operator[] (const int &i) const - --------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 38] - inline KOKKOS_INLINE_FUNCTION const T & operator[] (const int &i) const - --------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim3.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION array_type< T > & operator+= (const array_type< T > &rhs) - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 46] - inline KOKKOS_INLINE_FUNCTION array_type< T > & operator+= (const array_type< T > &rhs) - ----------------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 46] - inline KOKKOS_INLINE_FUNCTION array_type< T > & operator+= (const array_type< T > &rhs) - ----------------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim3.rst:2: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION void init () - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 34] - inline KOKKOS_INLINE_FUNCTION void init () - ----------------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 34] - inline KOKKOS_INLINE_FUNCTION void init () - ----------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/static_quadrature_points.rst:2: WARNING: doxygenclass: Cannot find class "specfem::enums::element::quadrature::static_quadrature_points< NGLL >" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/index.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/seismogram/seismogram_enumeration.rst:7: WARNING: doxygenenum: Cannot find enum "specfem::enum::seismogram::type" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/index.rst:6: WARNING: toctree contains reference to nonexisting document 'api/namespace/index' -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/jacobian.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/jacobian.rst:13: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/jacobian.rst:13: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: jacobian'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/jacobian.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1jacobian". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/jacobian.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1jacobian". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/jacobian.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/jacobian.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/kokkos_abstractions.rst:10: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION void init (value_type &update) const - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 34] - inline KOKKOS_INLINE_FUNCTION void init (value_type &update) const - ----------------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 34] - inline KOKKOS_INLINE_FUNCTION void init (value_type &update) const - ----------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/kokkos_abstractions.rst:10: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION void join (value_type &update, const value_type &source) const - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 34] - inline KOKKOS_INLINE_FUNCTION void join (value_type &update, const value_type &source) const - ----------------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 34] - inline KOKKOS_INLINE_FUNCTION void join (value_type &update, const value_type &source) const - ----------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/kokkos_abstractions.rst:10: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION value_type & reference () const - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 41] - inline KOKKOS_INLINE_FUNCTION value_type & reference () const - -----------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 41] - inline KOKKOS_INLINE_FUNCTION value_type & reference () const - -----------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/kokkos_abstractions.rst:10: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION result_view_type view () const - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 47] - inline KOKKOS_INLINE_FUNCTION result_view_type view () const - -----------------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 47] - inline KOKKOS_INLINE_FUNCTION result_view_type view () const - -----------------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/kokkos_abstractions.rst:10: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 30] - inline KOKKOS_INLINE_FUNCTION bool references_scalar () const - ------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: bool [error at 34] - inline KOKKOS_INLINE_FUNCTION bool references_scalar () const - ----------------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: bool [error at 34] - inline KOKKOS_INLINE_FUNCTION bool references_scalar () const - ----------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material.rst:11: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material.rst:14: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material.rst:14: WARNING: Duplicate C++ declaration, also defined at api/material:11. -Declaration is '.. cpp:type:: material'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1material". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1material". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:class:: specfem::material::elastic_material : public specfem::material::material'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real density'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real cs'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real cp'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real Qkappa'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real Qmu'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real compaction_grad'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real lambdaplus2mu'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real mu'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real lambda'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real kappa'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real young'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: type_real poisson'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:member:: specfem::enums::element::type ispec_type =specfem::enums::element::elastic'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:function:: elastic_material ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:function:: elastic_material (const type_real &density, const type_real &cs, const type_real &cp, const type_real &Qkappa, const type_real &Qmu, const type_real &compaction_grad)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:function:: virtual utilities::return_holder get_properties () override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:function:: inline virtual specfem::enums::element::type get_ispec_type () override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:function:: virtual std::string print () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/elastic_material.rst:7: WARNING: Duplicate C++ declaration, also defined at api/material:14. -Declaration is '.. cpp:function:: friend std::ostream & operator<< (std::ostream &out, const elastic_material &h)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/index.rst:9: WARNING: Duplicate C++ declaration, also defined at api/material:11. -Declaration is '.. cpp:class:: specfem::material::material'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/index.rst:9: WARNING: Duplicate C++ declaration, also defined at api/material:11. -Declaration is '.. cpp:function:: inline material ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/index.rst:9: WARNING: Duplicate C++ declaration, also defined at api/material:11. -Declaration is '.. cpp:function:: inline virtual utilities::return_holder get_properties ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/index.rst:9: WARNING: Duplicate C++ declaration, also defined at api/material:11. -Declaration is '.. cpp:function:: inline virtual specfem::enums::element::type get_ispec_type ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/index.rst:9: WARNING: Duplicate C++ declaration, also defined at api/material:11. -Declaration is '.. cpp:function:: inline virtual std::string print () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material/index.rst:15: WARNING: Title underline too short. - -Types of Materials Implemented ------------------------------ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst:8: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst:11: WARNING: Duplicate C++ declaration, also defined at api/kokkos_abstractions:10. -Declaration is '.. cpp:type:: specfem::kokkos'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst:26: WARNING: doxygennamespace: Cannot find namespace "specfem::mesh::io" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst:29: WARNING: doxygennamespace: Cannot find namespace "specfem::mesh::io::fortran" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst:50: WARNING: doxygennamespace: Cannot find namespace "specfem::coupled_interfaces" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst:53: WARNING: doxygennamespace: Cannot find namespace "specfem::coupled_interfaces::impl" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst:56: WARNING: doxygennamespace: Cannot find namespace "specfem::coupled_interfaces::impl::edge" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst:65: WARNING: doxygennamespace: Cannot find namespace "specfem::materials" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:11: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:11: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:14: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:14: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:14: WARNING: Duplicate C++ declaration, also defined at api/parameter:11. -Declaration is '.. cpp:type:: solver'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration_1_1solver". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration_1_1solver". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:17: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:17: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:20: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:20: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:23: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:23: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:26: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:26: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:29: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:29: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:32: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:32: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:35: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:35: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:80. -Declaration is '.. cpp:type:: runtime_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1runtime__configuration". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:11: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:11: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:59. -Declaration is '.. cpp:type:: quadrature'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:14: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:14: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:59. -Declaration is '.. cpp:type:: quadrature'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:14: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:62. -Declaration is '.. cpp:type:: gll'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1quadrature". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1quadrature". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:20: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:20: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:59. -Declaration is '.. cpp:type:: quadrature'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:20: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:62. -Declaration is '.. cpp:type:: gll'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1quadrature_1_1gll". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1quadrature_1_1gll". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1quadrature". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1quadrature". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:23: WARNING: doxygenfile: Cannot find file "quadrature/gll/gll_utils.pp -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:29: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:29: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:59. -Declaration is '.. cpp:type:: quadrature'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:29: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:62. -Declaration is '.. cpp:type:: gll'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1quadrature_1_1gll". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1quadrature_1_1gll". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1quadrature". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1quadrature". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:class:: specfem::quadrature::gll::gll : public specfem::quadrature::quadrature'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: type_real alpha'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: type_real beta'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: int N'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView1d< type_real > xi'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: specfem::kokkos::HostMirror1d< type_real > h_xi'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView1d< type_real > w'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: specfem::kokkos::HostView1d< type_real > h_w'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView2d< type_real > hprime'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:member:: specfem::kokkos::HostView2d< type_real > h_hprime'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: gll ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: gll (const type_real alpha, const type_real beta)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: gll (const type_real alpha, const type_real beta, const int N)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: void set_derivation_matrices ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: inline specfem::kokkos::DeviceView1d< type_real > get_xi () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: inline specfem::kokkos::DeviceView1d< type_real > get_w () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: inline specfem::kokkos::DeviceView2d< type_real > get_hprime () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: inline specfem::kokkos::HostMirror1d< type_real > get_hxi () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: inline specfem::kokkos::HostMirror1d< type_real > get_hw () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: inline specfem::kokkos::HostMirror2d< type_real > get_hhprime () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: inline int get_N () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: void print (std::ostream &out) const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: void set_allocations ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/gll.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:14. -Declaration is '.. cpp:function:: void sync_views ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:class:: specfem::quadrature::quadrature'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: type_real alpha'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: type_real beta'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: int N'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView1d< type_real > xi'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: specfem::kokkos::HostMirror1d< type_real > h_xi'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView1d< type_real > w'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: specfem::kokkos::HostView1d< type_real > h_w'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: specfem::kokkos::DeviceView2d< type_real > hprime'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:member:: specfem::kokkos::HostView2d< type_real > h_hprime'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: inline quadrature ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: inline virtual specfem::kokkos::DeviceView1d< type_real > get_xi () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: inline virtual specfem::kokkos::DeviceView1d< type_real > get_w () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: inline virtual specfem::kokkos::DeviceView2d< type_real > get_hprime () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: inline virtual specfem::kokkos::HostMirror1d< type_real > get_hxi () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: inline virtual specfem::kokkos::HostMirror1d< type_real > get_hw () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: inline virtual specfem::kokkos::HostMirror2d< type_real > get_hhprime () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: inline virtual int get_N () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/quadrature:11. -Declaration is '.. cpp:function:: virtual void print (std::ostream &out) const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/database_configuration.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:17. -Declaration is '.. cpp:class:: specfem::runtime_configuration::database_configuration'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/database_configuration.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:17. -Declaration is '.. cpp:member:: std::string fortran_database'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/database_configuration.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:17. -Declaration is '.. cpp:member:: std::string source_database'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/database_configuration.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:17. -Declaration is '.. cpp:function:: inline database_configuration (std::string fortran_database, std::string source_database)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/database_configuration.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:17. -Declaration is '.. cpp:function:: database_configuration (const YAML::Node &Node)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/database_configuration.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:17. -Declaration is '.. cpp:function:: inline std::tuple< std::string, std::string > get_databases () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:20. -Declaration is '.. cpp:class:: specfem::runtime_configuration::header'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:20. -Declaration is '.. cpp:member:: std::string title'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:20. -Declaration is '.. cpp:member:: std::string description'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:20. -Declaration is '.. cpp:function:: inline header (std::string title, std::string description)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:20. -Declaration is '.. cpp:function:: header (const YAML::Node &Node)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:20. -Declaration is '.. cpp:function:: inline std::string get_title ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:20. -Declaration is '.. cpp:function:: inline std::string get_description ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:20. -Declaration is '.. cpp:function:: friend std::ostream & operator<< (std::ostream &out, header &header)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:class:: specfem::runtime_configuration::quadrature'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:member:: type_real alpha'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:member:: type_real beta'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:member:: int ngllx'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:member:: int ngllz'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:function:: inline quadrature (type_real alpha, type_real beta, int ngllx, int ngllz)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:function:: quadrature (const YAML::Node &Node)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:function:: quadrature (const std::string quadrature)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:23. -Declaration is '.. cpp:function:: std::tuple< specfem::quadrature::quadrature *, specfem::quadrature::quadrature * > instantiate ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/quadrature.rst:3: WARNING: duplicate label quadrature, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:class:: specfem::runtime_configuration::receivers'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:member:: std::string stations_file'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:member:: type_real angle'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:member:: int nstep_between_samples'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:member:: std::vector< specfem::enums::seismogram::type > stypes'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:function:: inline receivers (const std::string stations_file, const int angle, const int nstep_between_samples)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:function:: receivers (const YAML::Node &Node)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:function:: inline std::string get_stations_file () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:function:: inline type_real get_angle () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:function:: inline int get_nstep_between_samples () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/receivers.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:29. -Declaration is '.. cpp:function:: inline std::vector< specfem::enums::seismogram::type > get_seismogram_types () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/run_setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:26. -Declaration is '.. cpp:class:: specfem::runtime_configuration::run_setup'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/run_setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:26. -Declaration is '.. cpp:member:: int nproc'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/run_setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:26. -Declaration is '.. cpp:member:: int nruns'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/run_setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:26. -Declaration is '.. cpp:function:: inline run_setup (int nproc, int nruns)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/run_setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:26. -Declaration is '.. cpp:function:: run_setup (const YAML::Node &Node)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/seismogram.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:32. -Declaration is '.. cpp:class:: specfem::runtime_configuration::seismogram'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/seismogram.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:32. -Declaration is '.. cpp:member:: std::string seismogram_format'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/seismogram.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:32. -Declaration is '.. cpp:member:: std::string output_folder'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/seismogram.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:32. -Declaration is '.. cpp:function:: inline seismogram (const std::string seismogram_format, const std::string output_folder)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/seismogram.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:32. -Declaration is '.. cpp:function:: seismogram (const YAML::Node &Node)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/seismogram.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:32. -Declaration is '.. cpp:function:: specfem::writer::writer * instantiate_seismogram_writer (std::vector< specfem::receivers::receiver *> &receivers, specfem::compute::receivers *compute_receivers, const type_real dt, const type_real t0, const int nsteps_between_samples) const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:class:: specfem::runtime_configuration::setup'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:member:: std::unique_ptr< specfem::runtime_configuration::header > header'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:member:: std::unique_ptr< specfem::runtime_configuration::solver::solver > solver'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:member:: std::unique_ptr< specfem::runtime_configuration::run_setup > run_setup'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:member:: std::unique_ptr< specfem::runtime_configuration::quadrature > quadrature'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:member:: std::unique_ptr< specfem::runtime_configuration::receivers > receivers'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:member:: std::unique_ptr< specfem::runtime_configuration::seismogram > seismogram'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:member:: std::unique_ptr< specfem::runtime_configuration::database_configuration > databases'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: setup (const std::string ¶meter_file, const std::string &default_file)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline std::tuple< specfem::quadrature::quadrature *, specfem::quadrature::quadrature * > instantiate_quadrature ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline specfem::TimeScheme::TimeScheme * instantiate_solver ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline void update_t0 (type_real t0)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: std::string print_header (std::chrono::time_point< std::chrono::high_resolution_clock > now)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline type_real get_dt () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline std::tuple< std::string, std::string > get_databases () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline std::string get_stations_file () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline type_real get_receiver_angle () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline std::vector< specfem::enums::seismogram::type > get_seismogram_types () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst:7: WARNING: Duplicate C++ declaration, also defined at api/parameter:35. -Declaration is '.. cpp:function:: inline specfem::writer::writer * instantiate_seismogram_writer (std::vector< specfem::receivers::receiver *> &receivers, specfem::compute::receivers *compute_receivers) const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/index.rst:7: WARNING: doxygenclass: Cannot find class "specfem::runtime_configuration::solver:solver" in doxygen xml output for project "SPECFEM KOKKOS IMPLEMENTATION" from directory: _build/xml -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:class:: specfem::runtime_configuration::solver::time_marching : public specfem::runtime_configuration::solver::solver'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:member:: int nstep'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:member:: type_real dt'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:member:: type_real t0'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:member:: std::string timescheme'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:function:: inline time_marching (std::string timescheme, type_real dt, type_real nstep)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:function:: time_marching (const YAML::Node &Node)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:function:: inline virtual void update_t0 (type_real t0) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:function:: virtual specfem::TimeScheme::TimeScheme * instantiate (const int nstep_between_samples) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:function:: inline virtual type_real get_dt () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst:5: WARNING: Duplicate C++ declaration, also defined at api/parameter:14. -Declaration is '.. cpp:function:: inline virtual type_real get_t0 () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver.rst:6: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver.rst:9: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver.rst:9: WARNING: Duplicate C++ declaration, also defined at api/solver:6. -Declaration is '.. cpp:type:: solver'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1solver". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1solver". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:6. -Declaration is '.. cpp:class:: specfem::solver::solver'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:6. -Declaration is '.. cpp:function:: virtual void run ()=0'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/index.rst:3: WARNING: duplicate label solver api, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/index.rst:13: WARNING: duplicate label types of solvers, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:9. -Declaration is '.. cpp:class:: template specfem::solver::time_marching : public specfem::solver::solver'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:9. -Declaration is '.. cpp:member:: specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type > acoustic_domain'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:9. -Declaration is '.. cpp:member:: specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type > elastic_domain'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:9. -Declaration is '.. cpp:member:: specfem::coupled_interface::coupled_interface< specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type >, specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type > > acoustic_elastic_interface'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:9. -Declaration is '.. cpp:member:: specfem::coupled_interface::coupled_interface< specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type >, specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type > > elastic_acoustic_interface'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:9. -Declaration is '.. cpp:member:: specfem::TimeScheme::TimeScheme * it'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:9. -Declaration is '.. cpp:function:: inline time_marching (specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type > &acoustic_domain, specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type > &elastic_domain, specfem::coupled_interface::coupled_interface< specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type >, specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type > > &acoustic_elastic_interface, specfem::coupled_interface::coupled_interface< specfem::domain::domain< specfem::enums::element::medium::elastic, qp_type >, specfem::domain::domain< specfem::enums::element::medium::acoustic, qp_type > > &elastic_acoustic_interface, specfem::TimeScheme::TimeScheme *it)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:7: WARNING: Duplicate C++ declaration, also defined at api/solver:9. -Declaration is '.. cpp:function:: virtual void run () override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver/time_marching.rst:3: WARNING: duplicate label time marching solver, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/solver/time_marching.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources/force_source.rst:7: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 34] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - ----------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 44] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - --------------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 44] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - --------------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources/index.rst:7: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 41] - inline virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const - -----------------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 51] - inline virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const - ---------------------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 51] - inline virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const - ---------------------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources/index.rst:22: WARNING: duplicate label auxiliary functions, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/receivers/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources/moment_tensor_source.rst:7: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 34] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - ----------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 44] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - --------------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 44] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - --------------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:11: WARNING: doxygenfile: Found multiple matches for file "source.hpp -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:68. -Declaration is '.. cpp:type:: sources'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:class:: force : public specfem::sources::source'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: type_real xi'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: type_real gamma'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: type_real x'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: type_real z'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: type_real angle'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: int ispec'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: int islice'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: specfem::enums::element::type el_type'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:member:: specfem::forcing_function::stf * forcing_function =NULL'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: force (YAML::Node &Node, const type_real dt)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: virtual void locate (const specfem::kokkos::HostView2d< type_real > coord, const specfem::kokkos::HostMirror3d< int > h_ibool, const specfem::kokkos::HostMirror1d< type_real > xigll, const specfem::kokkos::HostMirror1d< type_real > zigll, const int nproc, const specfem::kokkos::HostView2d< type_real > coorg, const specfem::kokkos::HostView2d< int > knods, const int npgeo, const specfem::kokkos::HostMirror1d< specfem::enums::element::type > ispec_type, const specfem::MPI::MPI *mpi) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: virtual void compute_source_array (const specfem::quadrature::quadrature *quadx, const specfem::quadrature::quadrature *quadz, specfem::kokkos::HostView3d< type_real > source_array) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: virtual void check_locations (const type_real xmin, const type_real xmax, const type_real zmin, const type_real zmax, const specfem::MPI::MPI *mpi) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: inline virtual int get_islice () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: inline virtual int get_ispec () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: inline virtual type_real get_x () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: inline virtual type_real get_z () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: inline virtual type_real get_xi () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: inline virtual type_real get_gamma () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: inline ~force ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 34] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - ----------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 44] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - --------------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 44] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - --------------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: virtual void update_tshift (type_real tshift) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: virtual void print (std::ostream &out) const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: virtual std::string print () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:14: WARNING: Duplicate C++ declaration, also defined at api/sources/force_source:7. -Declaration is '.. cpp:function:: inline virtual specfem::forcing_function::stf * get_stf () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:68. -Declaration is '.. cpp:type:: sources'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:class:: moment_tensor : public specfem::sources::source'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: type_real xi'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: type_real gamma'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: type_real x'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: type_real z'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: type_real Mxx'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: type_real Mxz'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: type_real Mzz'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: int ispec'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: int islice'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: specfem::kokkos::HostView2d< type_real > s_coorg'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: specfem::forcing_function::stf * forcing_function =NULL'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:member:: specfem::enums::element::type el_type'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: moment_tensor (YAML::Node &Node, const type_real dt)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: virtual void locate (const specfem::kokkos::HostView2d< type_real > coord, const specfem::kokkos::HostMirror3d< int > h_ibool, const specfem::kokkos::HostMirror1d< type_real > xigll, const specfem::kokkos::HostMirror1d< type_real > zigll, const int nproc, const specfem::kokkos::HostView2d< type_real > coorg, const specfem::kokkos::HostView2d< int > knods, const int npgeo, const specfem::kokkos::HostMirror1d< specfem::enums::element::type > ispec_type, const specfem::MPI::MPI *mpi) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: virtual void compute_source_array (const specfem::quadrature::quadrature *quadx, const specfem::quadrature::quadrature *quadz, specfem::kokkos::HostView3d< type_real > source_array) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: inline virtual int get_islice () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: inline virtual int get_ispec () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: inline virtual type_real get_x () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: inline virtual type_real get_z () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: inline virtual type_real get_xi () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: inline virtual type_real get_gamma () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 34] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - ----------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 44] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - --------------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 44] - virtual KOKKOS_IMPL_HOST_FUNCTION type_real get_t0 () const override - --------------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: virtual void update_tshift (type_real tshift) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: virtual void print (std::ostream &out) const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: virtual std::string print () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: inline virtual specfem::forcing_function::stf * get_stf () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: virtual void check_locations (const type_real xmin, const type_real xmax, const type_real zmin, const type_real zmax, const specfem::MPI::MPI *mpi) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:17: WARNING: Duplicate C++ declaration, also defined at api/sources/moment_tensor_source:7. -Declaration is '.. cpp:function:: inline ~moment_tensor ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1sources". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1sources". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:23: ERROR: Error in "doxygenfile" directive: -unknown option: "projet". - -.. doxygenfile:: receiver.hpp - :projet: SPECFEM KOKKOS IMPLEMENTATION -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:29: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:29: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:68. -Declaration is '.. cpp:type:: sources'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:29: WARNING: Duplicate C++ declaration, also defined at api/sources/index:24. -Declaration is '.. cpp:function:: std::tuple< std::vector< specfem::sources::source * >, type_real > read_sources (const std::string sources_file, const type_real dt, const specfem::MPI::MPI *mpi)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1sources". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1sources". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:32: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:32: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:71. -Declaration is '.. cpp:type:: receivers'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:32: WARNING: Duplicate C++ declaration, also defined at api/receivers/index:15. -Declaration is '.. cpp:function:: std::vector< specfem::receivers::receiver * > read_receivers (const std::string stations_file, const type_real angle)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:38: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:38: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 31] - inline virtual KOKKOS_FUNCTION type_real compute (type_real t) - -------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 41] - inline virtual KOKKOS_FUNCTION type_real compute (type_real t) - -----------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 41] - inline virtual KOKKOS_FUNCTION type_real compute (type_real t) - -----------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:38: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 31] - inline virtual KOKKOS_FUNCTION void update_tshift (type_real tshift) - -------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 35] - inline virtual KOKKOS_FUNCTION void update_tshift (type_real tshift) - -----------------------------------^ - If declarator-id: - Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 35] - inline virtual KOKKOS_FUNCTION void update_tshift (type_real tshift) - -----------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:38: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 31] - inline virtual KOKKOS_FUNCTION type_real get_t0 () const - -------------------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 41] - inline virtual KOKKOS_FUNCTION type_real get_t0 () const - -----------------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 41] - inline virtual KOKKOS_FUNCTION type_real get_t0 () const - -----------------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:38: WARNING: Error when parsing function declaration. -If the function has no return type: - Error in declarator or parameters-and-qualifiers - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 23] - inline KOKKOS_FUNCTION type_real compute (const type_real t) - -----------------------^ -If the function has a return type: - Error in declarator or parameters-and-qualifiers - If pointer to member declarator: - Invalid C++ declaration: Expected '::' in pointer to member (function). [error at 33] - inline KOKKOS_FUNCTION type_real compute (const type_real t) - ---------------------------------^ - If declarator-id: - Invalid C++ declaration: Expecting "(" in parameters-and-qualifiers. [error at 33] - inline KOKKOS_FUNCTION type_real compute (const type_real t) - ---------------------------------^ - -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/specfem_enums.rst:8: WARNING: doxygenfile: Cannot find file "include/specfem_enums.hpp -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/specfem_enums.rst:4: WARNING: duplicate label enumerations, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/specfem_mpi.rst:1: WARNING: malformed hyperlink target. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/specfem_mpi.rst:8: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst:8: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst:8: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:74. -Declaration is '.. cpp:type:: TimeScheme'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst:11: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst:11: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:74. -Declaration is '.. cpp:type:: TimeScheme'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1_time_scheme". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1_time_scheme". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:class:: specfem::TimeScheme::TimeScheme'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual bool status () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual void increment_time ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual type_real get_time () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual int get_timestep () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual void reset_time ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual int get_max_timestep ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual void apply_predictor_phase (specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual void apply_corrector_phase (specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: virtual void print (std::ostream &out) const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual bool compute_seismogram () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual int get_seismogram_step () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual int get_max_seismogram_step () const'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: inline virtual void increment_seismogram_step ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/index.rst:7: WARNING: Duplicate C++ declaration, also defined at api/timescheme:8. -Declaration is '.. cpp:function:: friend std::ostream & operator<< (std::ostream &out, TimeScheme &ts)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:class:: specfem::TimeScheme::Newmark : public specfem::TimeScheme::TimeScheme'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: type_real current_time'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: int istep = 0'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: type_real deltat'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: type_real deltatover2'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: type_real deltatsquareover2'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: int nstep'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: type_real t0'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: int nstep_between_samples'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:member:: int isig_step = 0'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: Newmark (const int nstep, const type_real t0, const type_real dt, const int nstep_between_samples)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: inline virtual bool status () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: virtual void increment_time () override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: inline virtual type_real get_time () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: inline virtual int get_timestep () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: virtual void reset_time () override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: inline virtual int get_max_timestep () override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: virtual void apply_predictor_phase (specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: virtual void apply_corrector_phase (specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot, specfem::kokkos::DeviceView2d< type_real, Kokkos::LayoutLeft > field_dot_dot) override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: inline virtual bool compute_seismogram () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: inline virtual int get_seismogram_step () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: inline virtual int get_max_seismogram_step () const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: inline virtual void increment_seismogram_step () override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme/newmark.rst:5: WARNING: Duplicate C++ declaration, also defined at api/timescheme:11. -Declaration is '.. cpp:function:: virtual void print (std::ostream &out) const override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:1: ERROR: Unknown directive type "writer". - -.. writer:: -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:8: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:8: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:77. -Declaration is '.. cpp:type:: writer'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:8: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/index:7. -Declaration is '.. cpp:class:: writer'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:8: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/index:7. -Declaration is '.. cpp:function:: inline virtual void write ()'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/jacobian:8. -Declaration is '.. cpp:type:: specfem'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/namespaces/index:77. -Declaration is '.. cpp:type:: writer'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:class:: seismogram : public specfem::writer::writer'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:member:: specfem::enums::seismogram::format type'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:member:: std::string output_folder'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:member:: specfem::compute::receivers * compute_receivers'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:member:: std::vector< specfem::receivers::receiver * > receivers'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:member:: type_real dt'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:member:: type_real t0'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:member:: int nstep_between_samples'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:function:: inline seismogram (std ::vector< specfem::receivers::receiver *> &receivers, specfem::compute::receivers *compute_receivers, const specfem::enums::seismogram::format type, const std::string output_folder, const type_real dt, const type_real t0, const int nstep_between_samples)'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:11: WARNING: Duplicate C++ declaration, also defined at api/IO/writer/seismogram_writer:7. -Declaration is '.. cpp:function:: virtual void write () override'. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:4: CRITICAL: Duplicate ID: "namespacespecfem_1_1writer". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem_1_1writer". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:4: CRITICAL: Duplicate ID: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst:4: WARNING: Duplicate explicit target name: "namespacespecfem". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/cookbooks/example_01.rst:545: ERROR: Error in "code" directive: -unknown option: "linenos". - -.. code:: yaml - :linenos: - :caption: single_source.yaml - - number-of-sources: 1 - sources: - - force: - x : 2500.0 - z : 2500.0 - source_surf: false - angle : 0.0 - vx : 0.0 - vz : 0.0 - Dirac: - factor: 1.0 - tshift: 0.0 -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/cookbooks/example_01.rst:562: ERROR: Error in "code" directive: -unknown option: "linenos". - -.. code:: yaml - :linenos: - :caption: two_sources.yaml - - number-of-sources: 2 - sources: - - force: - x : 2500.0 - z : 2500.0 - source_surf: false - angle : 0.0 - vx : 0.0 - vz : 0.0 - Dirac: - factor: 1.0 - tshift: 0.0 - - force: - x : 2500.0 - z : 500.0 - source_surf: false - angle : 0.0 - vx : 0.0 - vz : 0.0 - Dirac: - factor: 1.0 - tshift: 0.0 -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/cookbooks/index.rst:4: WARNING: duplicate label cookbooks, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/cookbooks/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/domain.rst:1: ERROR: Unknown directive type "domain_coupled_interface_dev_guide". - -.. domain_coupled_interface_dev_guide:: -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/domain.rst:4: WARNING: Title underline too short. - -Domain and Coupled Interface Developer Guide -=========================================== -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/domain.rst:71: ERROR: Unknown interpreted text role "cite". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/domain.rst:161: WARNING: Mismatch: both interpreted text role prefix and reference suffix. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/domain.rst:421: ERROR: Unknown interpreted text role "cite". -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/quadrature.rst:10: ERROR: Unexpected indentation. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/quadrature.rst:10: WARNING: Inline interpreted text or phrase reference start-string without end-string. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/quadrature.rst:11: WARNING: Inline interpreted text or phrase reference start-string without end-string. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/quadrature.rst:11: WARNING: Inline interpreted text or phrase reference start-string without end-string. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/quadrature.rst:13: WARNING: Block quote ends without a blank line; unexpected unindent. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/git_workflow.rst:11: WARNING: Bullet list ends without a blank line; unexpected unindent. -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/index.rst:4: WARNING: duplicate label developer documentation, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/tests.rst:4: WARNING: duplicate label tests, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/tests.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/databases.rst:10: WARNING: Title underline too short. - -**Parameter name** : ``databases`` -------------------------------- -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/header.rst:2: WARNING: duplicate label header, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/header.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/header.rst:7: WARNING: duplicate label parameter definitions, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/databases.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/run_setup.rst:2: WARNING: duplicate label runtime setup, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/run_setup.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/run_setup.rst:7: WARNING: duplicate label parameter definitions, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/header.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/seismogram_setup.rst:8: WARNING: duplicate label parameter definitions, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/run_setup.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/simulation_setup.rst:2: WARNING: duplicate label simulation setup, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/simulation_setup.rst:7: WARNING: duplicate label parameter definitions, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/parameter_documentation/seismogram_setup.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:75: WARNING: Title underline too short. - -**Parameter Name** : ``sources..source_surf`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:75: WARNING: Title underline too short. - -**Parameter Name** : ``sources..source_surf`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:111: WARNING: Title underline too short. - -**Parameter Name** : ``sources.moment_tensor.Mxx`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:111: WARNING: Title underline too short. - -**Parameter Name** : ``sources.moment_tensor.Mxx`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:120: WARNING: Title underline too short. - -**Parameter Name** : ``sources.moment_tensor.Mxz`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:120: WARNING: Title underline too short. - -**Parameter Name** : ``sources.moment_tensor.Mxz`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:129: WARNING: Title underline too short. - -**Parameter Name** : ``sources.moment_tensor.Mzz`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:129: WARNING: Title underline too short. - -**Parameter Name** : ``sources.moment_tensor.Mzz`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:138: WARNING: Title underline too short. - -**Parameter Name** : ``sources..Dirac`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:138: WARNING: Title underline too short. - -**Parameter Name** : ``sources..Dirac`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:30: WARNING: duplicate label **parameter name** : ``sources``, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst:156: WARNING: duplicate label **parameter name** : ``sources..dirac.factor``, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/source_description/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/user_documentation/introduction.rst:2: WARNING: duplicate label introduction, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/user_documentation/introduction.rst:7: WARNING: duplicate label code feature matrix, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/index.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/user_documentation/running_the_solver.rst:2: WARNING: duplicate label running the solver, other instance in /scratch/gpfs/rk9481/specfem2d_kokkos/docs/cookbooks/example_01.rst -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/IO/mesh/boundaries/acoustic_forcing.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_coupled_interfaces.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_partial_derivatives.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_properties.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_receivers.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/compute/compute_sources.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/elastic_acoustic/acoustic_elastic_edge.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/coupling_physics/edge/elastic_acoustic/elastic_acoustic_edge.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_acoustic_static_quadrature_points_isotropic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/element/elements_dim2_elastic_static_quadrature_points_isotropic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers_dim2_acoustic_static_quadrature_points_isotropic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/receivers/receivers_dim2_elastic_static_quadrature_points_isotropic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/sources/sources_dim2_acoustic_static_quadrature_points_isotrpoic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/domain/sources/sources_dim2_elastic_static_quadrature_points_isotropic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/acoustic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim2.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/dim3.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/elastic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/isotropic.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/enumerations/element/static_quadrature_points.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/jacobian.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/kokkos_abstractions.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/material.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/namespaces/index.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/parameter.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/quadrature.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/setup_parameters/setup.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/solver.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/sources_recievers.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/specfem_enums.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/specfem_mpi.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/timescheme.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/api/writer.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/architecture.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/compute.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/domain.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/mesh.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/quadrature.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/cmake_primer.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/doxygen_primer.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/kokkos_primer.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/user_documentation/introduction.rst: WARNING: document isn't included in any toctree -/scratch/gpfs/rk9481/specfem2d_kokkos/docs/developer_documentation/SPECFEM_architecture/domain.rst:427: WARNING: undefined label: parallelism diff --git a/docs/parameter_documentation/simulation_setup.rst b/docs/parameter_documentation/simulation_setup.rst index dbedf2b4..4e8ca46e 100644 --- a/docs/parameter_documentation/simulation_setup.rst +++ b/docs/parameter_documentation/simulation_setup.rst @@ -241,6 +241,60 @@ Parameter definitions **documentation** : Output folder for the wavefield +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display`` [optional] +******************************************************************************************* + +**default value** : None + +**possible values** : [YAML Node] + +**documentation** : Plot the wavefield during the forward simulation + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.format`` [optional] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : PNG + +**possible values** : [PNG, JPG, on_screen] + +**documentation** : Output format for resulting plots + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.directory`` [optional] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : Current working directory + +**possible values** : [string] + +**documentation** : Output folder for the plots (not applicable for on_screen) + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.field`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : None + +**possible values** : [displacement, velocity, acceleration, pressure] + +**documentation** : Component of the wavefield to be plotted + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.simulation-field`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : None + +**possible values** : [forward] + +**documentation** : Type of wavefield to be plotted + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.time-interval`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : None + +**possible values** : [int] + +**documentation** : Time step interval for plotting the wavefield + .. admonition:: Example for defining a forward simulation node .. code-block:: yaml @@ -256,6 +310,14 @@ Parameter definitions format: HDF5 directory: /path/to/output/folder + display: + format: PNG + directory: /path/to/output/folder + field: displacement + simulation-field: forward + time-interval: 10 + + .. Note:: Atlease one writer node should be defined in the forward simulation node. @@ -368,6 +430,60 @@ Parameter definitions **documentation** : Output folder for the kernels +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display`` [optional] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : None + +**possible values** : [YAML Node] + +**documentation** : Plot the wavefield during the forward simulation + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.format`` [optional] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : PNG + +**possible values** : [PNG, JPG, on_screen] + +**documentation** : Output format for resulting plots + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.directory`` [optional] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : Current working directory + +**possible values** : [string] + +**documentation** : Output folder for the plots (not applicable for on_screen) + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.field`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : None + +**possible values** : [displacement, velocity, acceleration, pressure] + +**documentation** : Component of the wavefield to be plotted + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.simulation-field`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : None + +**possible values** : [adjoint, backward] + +**documentation** : Type of wavefield to be plotted + +**Parameter Name** : ``simulation-setup.simulation-mode.forward.writer.display.time-interval`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**default value** : None + +**possible values** : [int] + +**documentation** : Time step interval for plotting the wavefield + .. admonition:: Example for defining a combined simulation node .. code-block:: yaml @@ -385,6 +501,13 @@ Parameter definitions format: HDF5 directory: /path/to/output/folder + display: + format: PNG + directory: /path/to/output/folder + field: displacement + simulation-field: adjoint + time-interval: 10 + .. Note:: Exactly one of forward or combined simulation nodes should be defined. diff --git a/include/IO/ASCII/impl/datasetbase.hpp b/include/IO/ASCII/impl/datasetbase.hpp index 9026bc73..d3101d43 100644 --- a/include/IO/ASCII/impl/datasetbase.hpp +++ b/include/IO/ASCII/impl/datasetbase.hpp @@ -36,7 +36,7 @@ template <> class DatasetBase { boost::filesystem::remove(metadata_path); } - std::ofstream metadata(metadata_path); + std::ofstream metadata(metadata_path.string()); if (!metadata.is_open()) { std::ostringstream oss; oss << "ERROR : Could not open file " << metadata_path; @@ -55,7 +55,7 @@ template <> class DatasetBase { template void write(const value_type *data) const { - std::ofstream file(file_path); + std::ofstream file(file_path.string()); if (!file.is_open()) { std::ostringstream oss; oss << "ERROR : Could not open file " << file_path; @@ -97,7 +97,7 @@ template <> class DatasetBase { oss << "ERROR : Metadata file " << metadata_path << " does not exist"; throw std::runtime_error(oss.str()); } - std::ifstream metadata(metadata_path); + std::ifstream metadata(metadata_path.string()); if (!metadata.is_open()) { std::ostringstream oss; oss << "ERROR : Could not open file " << metadata_path; @@ -143,7 +143,7 @@ template <> class DatasetBase { } template void read(value_type *data) const { - std::ifstream file(file_path); + std::ifstream file(file_path.string()); if (!file.is_open()) { std::ostringstream oss; oss << "ERROR : Could not open file " << file_path; diff --git a/include/IO/mesh/impl/fortran/read_boundaries.hpp b/include/IO/mesh/impl/fortran/read_boundaries.hpp new file mode 100644 index 00000000..37747dee --- /dev/null +++ b/include/IO/mesh/impl/fortran/read_boundaries.hpp @@ -0,0 +1,77 @@ +#pragma once + +#include "mesh/boundaries/absorbing_boundaries.hpp" +#include "mesh/boundaries/acoustic_free_surface.hpp" +#include "mesh/boundaries/boundaries.hpp" +#include "mesh/boundaries/forcing_boundaries.hpp" +#include "specfem_mpi/interface.hpp" +#include +#include + +namespace specfem { +namespace IO { +namespace mesh { +namespace impl { +namespace fortran { + +// /** +// * @brief Read absorbing boundaries from mesh database +// * +// * @param stream Input stream +// * @param nspec Number of spectral elements +// * @param n_absorbing Number of absorbing boundaries +// * @param mpi MPI object +// * @return specfem::mesh::absorbing_boundary +// */ +// specfem::mesh::absorbing_boundary read_absorbing_boundaries( +// std::ifstream &stream, const int n_absorbing, const int nspec, +// const specfem::MPI::MPI *mpi); + +// /** +// * @brief Read acoustic free surface from mesh database +// * +// * @param stream Input stream +// * @param nspec Number of spectral elements +// * @param n_acoustic_surface Number of acoustic surfaces +// * @param mpi MPI object +// * @return specfem::mesh::acoustic_free_surface +// */ +// specfem::mesh::acoustic_free_surface read_acoustic_free_surface( +// std::ifstream &stream, const int nspec, const int n_acoustic_surface, +// const specfem::MPI::MPI *mpi); + +// /** +// * @brief Read forcing boundaries from mesh database +// * +// * @param stream Input stream +// * @param nspec Number of spectral elements +// * @param n_acforcing Number of acoustic forcing boundaries +// * @param mpi MPI object +// * @return specfem::mesh::forcing_boundary +// */ +// specfem::mesh::forcing_boundary read_forcing_boundaries( +// std::ifstream &stream, const int nspec, const int n_acforcing, +// const specfem::MPI::MPI *mpi); + +/** + * @brief Read boundaries from mesh database + * + * @param stream Input stream + * @param nspec Number of spectral elements + * @param n_absorbing Number of absorbing boundaries + * @param n_acforcing Number of acoustic forcing boundaries + * @param n_acoustic_surface Number of acoustic surfaces + * @param mpi MPI object + * @return specfem::mesh::boundaries + */ +specfem::mesh::boundaries +read_boundaries(std::ifstream &stream, const int nspec, const int n_absorbing, + const int n_acoustic_surface, const int n_acforcing, + const Kokkos::View knods, + const specfem::MPI::MPI *mpi); + +} // namespace fortran +} // namespace impl +} // namespace mesh +} // namespace IO +} // namespace specfem diff --git a/include/IO/mesh/impl/fortran/read_elements.hpp b/include/IO/mesh/impl/fortran/read_elements.hpp new file mode 100644 index 00000000..69c492b4 --- /dev/null +++ b/include/IO/mesh/impl/fortran/read_elements.hpp @@ -0,0 +1,43 @@ +#pragma once + +#include "mesh/elements/axial_elements.hpp" +#include "mesh/elements/tangential_elements.hpp" +#include "specfem_mpi/interface.hpp" + +namespace specfem { +namespace IO { +namespace mesh { +namespace impl { +namespace fortran { + +/** + * @brief Read tangential elements from mesh database + * + * @param stream Input stream + * @param nnodes_tangential_curve Number of nodes on the tangential curve + * @return specfem::mesh::elements::tangential_elements + * + */ +specfem::mesh::elements::tangential_elements +read_tangential_elements(std::ifstream &stream, + const int nnodes_tangential_curve); + +/** + * @brief Read axial elements from mesh database + * + * @param stream Input stream + * @param nelem_on_the_axis Number of elements on the axis + * @param nspec Number of spectral elements + * @param mpi MPI object + * @return specfem::mesh::elements::axial_elements + * + */ +specfem::mesh::elements::axial_elements +read_axial_elements(std::ifstream &stream, const int nelem_on_the_axis, + const int nspec, const specfem::MPI::MPI *mpi); + +} // namespace fortran +} // namespace impl +} // namespace mesh +} // namespace IO +} // namespace specfem diff --git a/include/IO/mesh/impl/fortran/read_interfaces.hpp b/include/IO/mesh/impl/fortran/read_interfaces.hpp new file mode 100644 index 00000000..77826d3e --- /dev/null +++ b/include/IO/mesh/impl/fortran/read_interfaces.hpp @@ -0,0 +1,37 @@ +#pragma once + +#include "mesh/coupled_interfaces/coupled_interfaces.hpp" +#include "mesh/coupled_interfaces/interface_container.hpp" +#include "specfem_mpi/interface.hpp" + +namespace specfem { +namespace IO { +namespace mesh { +namespace impl { +namespace fortran { + +template +specfem::mesh::interface_container +read_interfaces(const int num_interfaces, std::ifstream &stream, + const specfem::MPI::MPI *mpi); + +/* @brief Read the coupled interfaces from the database file + * + * @param stream input file stream + * @param num_interfaces_elastic_acoustic + * @param num_interfaces_acoustic_poroelastic + * @param num_interfaces_elastic_poroelastic + * @param mpi + * @return specfem::mesh::coupled_interfaces + */ +specfem::mesh::coupled_interfaces read_coupled_interfaces( + std::ifstream &stream, const int num_interfaces_elastic_acoustic, + const int num_interfaces_acoustic_poroelastic, + const int num_interfaces_elastic_poroelastic, const specfem::MPI::MPI *mpi); + +} // namespace fortran +} // namespace impl +} // namespace mesh +} // namespace IO +} // namespace specfem diff --git a/include/mesh/IO/fortran/read_material_properties.hpp b/include/IO/mesh/impl/fortran/read_material_properties.hpp similarity index 67% rename from include/mesh/IO/fortran/read_material_properties.hpp rename to include/IO/mesh/impl/fortran/read_material_properties.hpp index 5a4f07d4..93c1807f 100644 --- a/include/mesh/IO/fortran/read_material_properties.hpp +++ b/include/IO/mesh/impl/fortran/read_material_properties.hpp @@ -1,7 +1,6 @@ -#ifndef _READ_MATERIAL_PROPERTIES_HPP -#define _READ_MATERIAL_PROPERTIES_HPP +#pragma once -#include "material/interface.hpp" +#include "mesh/materials/materials.hpp" #include "specfem_mpi/interface.hpp" #include #include @@ -9,8 +8,9 @@ #include namespace specfem { -namespace mesh { namespace IO { +namespace mesh { +namespace impl { namespace fortran { /** @@ -23,11 +23,13 @@ namespace fortran { * @return std::vector Pointer to material objects read * from the database file */ -std::vector > -read_material_properties(std::ifstream &stream, const int numat, - const specfem::MPI::MPI *mpi); + +specfem::mesh::materials read_material_properties( + std::ifstream &stream, const int numat, const int nspec, + const specfem::kokkos::HostView2d knods, const specfem::MPI::MPI *mpi); + } // namespace fortran -} // namespace IO +} // namespace impl } // namespace mesh +} // namespace IO } // namespace specfem -#endif diff --git a/include/mesh/IO/fortran/read_mesh_database.hpp b/include/IO/mesh/impl/fortran/read_mesh_database.hpp similarity index 85% rename from include/mesh/IO/fortran/read_mesh_database.hpp rename to include/IO/mesh/impl/fortran/read_mesh_database.hpp index 2fcf3a1b..6322e2ba 100644 --- a/include/mesh/IO/fortran/read_mesh_database.hpp +++ b/include/IO/mesh/impl/fortran/read_mesh_database.hpp @@ -1,5 +1,4 @@ -#ifndef _READ_MESH_DATABASE_HPP -#define _READ_MESH_DATABASE_HPP +#pragma once #include "kokkos_abstractions.h" #include "specfem_mpi/interface.hpp" @@ -9,12 +8,9 @@ #include namespace specfem { -/** - * Helper routines to read fortran binary database - * - */ -namespace mesh { namespace IO { +namespace mesh { +namespace impl { namespace fortran { /** @@ -37,8 +33,7 @@ read_mesh_database_header(std::ifstream &stream, const specfem::MPI::MPI *mpi); * section * @param npgeo Total number of control nodes in simulation box * @param mpi Pointer to MPI object - * @return specfem::kokkos::HostView2d coorg values as read from - * fortran binary database file + * @return std::tuple nspec, npgeo, nproc values read from */ specfem::kokkos::HostView2d read_coorg_elements(std::ifstream &stream, const int npgeo, @@ -52,8 +47,7 @@ std::tuple read_mesh_database_attenuation(std::ifstream &stream, const specfem::MPI::MPI *mpi); } // namespace fortran -} // namespace IO +} // namespace impl } // namespace mesh +} // namespace IO } // namespace specfem - -#endif diff --git a/include/IO/mesh/impl/fortran/read_properties.hpp b/include/IO/mesh/impl/fortran/read_properties.hpp new file mode 100644 index 00000000..57f413fe --- /dev/null +++ b/include/IO/mesh/impl/fortran/read_properties.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "IO/fortranio/interface.hpp" +#include "mesh/properties/properties.hpp" +#include "specfem_mpi/interface.hpp" + +namespace specfem { +namespace IO { +namespace mesh { +namespace impl { +namespace fortran { + +/* + * @brief Read properties from mesh database + * + * @param stream Input stream + * @param mpi MPI object + * @return specfem::mesh::properties Property object + */ +specfem::mesh::properties read_properties(std::ifstream &stream, + const specfem::MPI::MPI *mpi); + +} // namespace fortran +} // namespace impl +} // namespace mesh +} // namespace IO +} // namespace specfem diff --git a/include/IO/mesh/read_mesh.hpp b/include/IO/mesh/read_mesh.hpp new file mode 100644 index 00000000..7e05bfe3 --- /dev/null +++ b/include/IO/mesh/read_mesh.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "mesh/mesh.hpp" +#include "specfem_mpi/interface.hpp" +#include "specfem_setup.hpp" + +namespace specfem { + +namespace IO { + +/** + * @brief Construct a mesh object from a Fortran binary database file + * + * @param filename Fortran binary database filename + * @param mpi pointer to MPI object to manage communication + * @return specfem::mesh::mesh Specfem mesh object + * + */ +specfem::mesh::mesh read_mesh(const std::string filename, + const specfem::MPI::MPI *mpi); + +} // namespace IO +} // namespace specfem diff --git a/include/receiver/read_receiver.hpp b/include/IO/receivers/read_receivers.hpp similarity index 89% rename from include/receiver/read_receiver.hpp rename to include/IO/receivers/read_receivers.hpp index f939a99e..7e7cf7e9 100644 --- a/include/receiver/read_receiver.hpp +++ b/include/IO/receivers/read_receivers.hpp @@ -1,12 +1,12 @@ #ifndef _READ_RECEIVER_HPP #define _READ_RECEIVER_HPP -#include "receiver.hpp" +#include "receiver/interface.hpp" #include "specfem_setup.hpp" #include namespace specfem { -namespace receivers { +namespace IO { /** * @brief Read receiver station file * @@ -20,7 +20,7 @@ namespace receivers { */ std::vector > read_receivers(const std::string stations_file, const type_real angle); -} // namespace receivers +} // namespace IO } // namespace specfem #endif diff --git a/include/source/read_sources.hpp b/include/IO/sources/read_sources.hpp similarity index 92% rename from include/source/read_sources.hpp rename to include/IO/sources/read_sources.hpp index 28779577..a6e2ebe9 100644 --- a/include/source/read_sources.hpp +++ b/include/IO/sources/read_sources.hpp @@ -2,11 +2,11 @@ #define _READ_SOURCES_HPP #include "enumerations/simulation.hpp" -#include "source.hpp" +#include "source/interface.hpp" #include namespace specfem { -namespace sources { +namespace IO { /** * @brief Read sources file written in .yml format * @@ -23,7 +23,7 @@ read_sources(const std::string sources_file, const int nsteps, const type_real user_t0, const type_real dt, const specfem::simulation::type simulation_type); -} // namespace sources +} // namespace IO } // namespace specfem #endif diff --git a/include/chunk_element/field.hpp b/include/chunk_element/field.hpp index 68087577..f704bd6d 100644 --- a/include/chunk_element/field.hpp +++ b/include/chunk_element/field.hpp @@ -237,16 +237,16 @@ template struct FieldTraits - : public ImplFieldTraits< - specfem::datatype::ScalarChunkViewType< - type_real, NumElements, NGLL, - specfem::medium::medium::components, - MemorySpace, MemoryTraits, UseSIMD>, - StoreDisplacement, StoreVelocity, StoreAcceleration, - StoreMassMatrix> { + : public ImplFieldTraits::components(), + MemorySpace, MemoryTraits, UseSIMD>, + StoreDisplacement, StoreVelocity, + StoreAcceleration, StoreMassMatrix> { constexpr static int components = - specfem::medium::medium::components; + specfem::element::attributes::components(); using ViewType = specfem::datatype::ScalarChunkViewType::components; ///< Number of components. - ///@} + ///@} private: constexpr static int num_dimensions = - specfem::dimension::dimension::dim; ///< Number of - ///< dimensions. + specfem::element::attributes::dimension(); ///< Number of + ///< dimensions. + constexpr static int components = + specfem::element::attributes::components(); ///< Number of + ///< components. public: /** diff --git a/include/compute/assembly/assembly.hpp b/include/compute/assembly/assembly.hpp index 91b61b76..c21b0de7 100644 --- a/include/compute/assembly/assembly.hpp +++ b/include/compute/assembly/assembly.hpp @@ -12,6 +12,7 @@ #include "compute/kernels/kernels.hpp" #include "compute/properties/interface.hpp" #include "compute/sources/sources.hpp" +#include "enumerations/display.hpp" #include "enumerations/specfem_enums.hpp" #include "mesh/mesh.hpp" #include "receiver/interface.hpp" @@ -62,7 +63,7 @@ struct assembly { * @param t0 Start time of simulation * @param dt Time step * @param max_timesteps Maximum number of time steps - * @param max_sig_step Maximum number of siesmogram time steps + * @param max_sig_step Maximum number of seismogram time steps * @param simulation Type of simulation (forward, adjoint, etc.) */ assembly( @@ -74,6 +75,21 @@ struct assembly { const std::vector &stypes, const type_real t0, const type_real dt, const int max_timesteps, const int max_sig_step, const specfem::simulation::type simulation); + + /** + * @brief Maps the component of wavefield on the entire spectral element grid + * + * This field can be used to generate a plot of the wavefield + * + * @param component Component of the wavefield to map + * @return Kokkos::View + * Wavefield mapped on the entire grid. Dimensions of the view are nspec, + * ngllz, ngllx + */ + Kokkos::View + generate_wavefield_on_entire_grid( + const specfem::wavefield::simulation_field wavefield, + const specfem::wavefield::type component); }; } // namespace compute diff --git a/include/compute/boundary_values/impl/boundary_medium_container.hpp b/include/compute/boundary_values/impl/boundary_medium_container.hpp index b9919557..b80f726c 100644 --- a/include/compute/boundary_values/impl/boundary_medium_container.hpp +++ b/include/compute/boundary_values/impl/boundary_medium_container.hpp @@ -19,7 +19,7 @@ template ::components; + specfem::element::attributes::components(); constexpr static auto dimension = DimensionType; public: diff --git a/include/compute/fields/fields.hpp b/include/compute/fields/fields.hpp index 2d3b3c7e..467f1f7a 100644 --- a/include/compute/fields/fields.hpp +++ b/include/compute/fields/fields.hpp @@ -44,16 +44,19 @@ struct fields { * @tparam fieldtype Field type * @return specfem::compute::simulation_field Simulation field */ - template + template KOKKOS_INLINE_FUNCTION specfem::compute::simulation_field get_simulation_field() const { - if constexpr (fieldtype == specfem::wavefield::type::forward) { + if constexpr (fieldtype == specfem::wavefield::simulation_field::forward) { return forward; - } else if constexpr (fieldtype == specfem::wavefield::type::adjoint) { + } else if constexpr (fieldtype == + specfem::wavefield::simulation_field::adjoint) { return adjoint; - } else if constexpr (fieldtype == specfem::wavefield::type::backward) { + } else if constexpr (fieldtype == + specfem::wavefield::simulation_field::backward) { return backward; - } else if constexpr (fieldtype == specfem::wavefield::type::buffer) { + } else if constexpr (fieldtype == + specfem::wavefield::simulation_field::buffer) { return buffer; } else { static_assert("field type not supported"); @@ -82,14 +85,18 @@ struct fields { backward.copy_to_host(); } - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::buffer> buffer; ///< Buffer field. Generally used for temporary storage for ///< adjoint fields read from disk - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::forward> forward; ///< Forward field - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::adjoint> adjoint; ///< Adjoint field - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::backward> backward; ///< Backward field }; diff --git a/include/compute/fields/impl/field_impl.hpp b/include/compute/fields/impl/field_impl.hpp index 749a8479..2ba1527d 100644 --- a/include/compute/fields/impl/field_impl.hpp +++ b/include/compute/fields/impl/field_impl.hpp @@ -13,9 +13,8 @@ template class field_impl { public: - using medium_type = specfem::medium::medium; - - constexpr static int components = medium_type::components; + constexpr static int components = + specfem::element::attributes::components(); field_impl() = default; diff --git a/include/compute/fields/impl/field_impl.tpp b/include/compute/fields/impl/field_impl.tpp index 26d915c4..ce09afb0 100644 --- a/include/compute/fields/impl/field_impl.tpp +++ b/include/compute/fields/impl/field_impl.tpp @@ -9,17 +9,14 @@ template specfem::compute::impl::field_impl::field_impl( const int nglob) - : nglob(nglob), - field("specfem::compute::fields::field", nglob, medium_type::components), + : nglob(nglob), field("specfem::compute::fields::field", nglob, components), h_field(Kokkos::create_mirror_view(field)), - field_dot("specfem::compute::fields::field_dot", nglob, - medium_type::components), + field_dot("specfem::compute::fields::field_dot", nglob, components), h_field_dot(Kokkos::create_mirror_view(field_dot)), field_dot_dot("specfem::compute::fields::field_dot_dot", nglob, - medium_type::components), + components), h_field_dot_dot(Kokkos::create_mirror_view(field_dot_dot)), - mass_inverse("specfem::compute::fields::mass_inverse", nglob, - medium_type::components), + mass_inverse("specfem::compute::fields::mass_inverse", nglob, components), h_mass_inverse(Kokkos::create_mirror_view(mass_inverse)) {} template ::field_impl( nglob = count; field = specfem::kokkos::DeviceView2d( - "specfem::compute::fields::field", nglob, medium_type::components); + "specfem::compute::fields::field", nglob, components); h_field = specfem::kokkos::HostMirror2d( Kokkos::create_mirror_view(field)); field_dot = specfem::kokkos::DeviceView2d( - "specfem::compute::fields::field_dot", nglob, medium_type::components); + "specfem::compute::fields::field_dot", nglob, components); h_field_dot = specfem::kokkos::HostMirror2d( Kokkos::create_mirror_view(field_dot)); field_dot_dot = specfem::kokkos::DeviceView2d( - "specfem::compute::fields::field_dot_dot", nglob, - medium_type::components); + "specfem::compute::fields::field_dot_dot", nglob, components); h_field_dot_dot = specfem::kokkos::HostMirror2d( Kokkos::create_mirror_view(field_dot_dot)); mass_inverse = specfem::kokkos::DeviceView2d( - "specfem::compute::fields::mass_inverse", nglob, medium_type::components); + "specfem::compute::fields::mass_inverse", nglob, components); h_mass_inverse = specfem::kokkos::HostMirror2d( Kokkos::create_mirror_view(mass_inverse)); - Kokkos::parallel_for( - "specfem::compute::fields::field_impl::initialize_field", - specfem::kokkos::HostRange(0, nglob), [=](const int &iglob) { - for (int icomp = 0; icomp < medium_type::components; ++icomp) { - h_field(iglob, icomp) = 0.0; - h_field_dot(iglob, icomp) = 0.0; - h_field_dot_dot(iglob, icomp) = 0.0; - h_mass_inverse(iglob, icomp) = 0.0; - } - }); + Kokkos::parallel_for("specfem::compute::fields::field_impl::initialize_field", + specfem::kokkos::HostRange(0, nglob), + [=](const int &iglob) { + for (int icomp = 0; icomp < components; ++icomp) { + h_field(iglob, icomp) = 0.0; + h_field_dot(iglob, icomp) = 0.0; + h_field_dot_dot(iglob, icomp) = 0.0; + h_mass_inverse(iglob, icomp) = 0.0; + } + }); Kokkos::fence(); diff --git a/include/compute/fields/simulation_field.hpp b/include/compute/fields/simulation_field.hpp index 3709b73a..24086470 100644 --- a/include/compute/fields/simulation_field.hpp +++ b/include/compute/fields/simulation_field.hpp @@ -20,15 +20,9 @@ namespace compute { * * @tparam WavefieldType Wavefield type. */ -template struct simulation_field { +template +struct simulation_field { private: - using elastic_type = - specfem::medium::medium; - - using acoustic_type = - specfem::medium::medium; using ViewType = Kokkos::View; ///< Underlying view type to @@ -74,7 +68,7 @@ template struct simulation_field { * @tparam DestinationWavefieldType Destination wavefield type * @param rhs Simulation field to copy from */ - template + template void operator=(const simulation_field &rhs) { this->nglob = rhs.nglob; this->assembly_index_mapping = rhs.assembly_index_mapping; @@ -126,8 +120,8 @@ template struct simulation_field { } }; -template +template void deep_copy(simulation_field &dst, const simulation_field &src) { dst.nglob = src.nglob; diff --git a/include/compute/fields/simulation_field.tpp b/include/compute/fields/simulation_field.tpp index 4f0108f5..09f1504b 100644 --- a/include/compute/fields/simulation_field.tpp +++ b/include/compute/fields/simulation_field.tpp @@ -9,8 +9,7 @@ #include namespace { -template -int compute_nglob(const ViewType index_mapping) { +template int compute_nglob(const ViewType index_mapping) { const int nspec = index_mapping.extent(0); const int ngllz = index_mapping.extent(1); const int ngllx = index_mapping.extent(2); @@ -29,7 +28,7 @@ int compute_nglob(const ViewType index_mapping) { } } // namespace -template +template specfem::compute::simulation_field::simulation_field( const specfem::compute::mesh &mesh, const specfem::compute::properties &properties) { @@ -60,11 +59,11 @@ specfem::compute::simulation_field::simulation_field( auto acoustic_index = Kokkos::subview(h_assembly_index_mapping, Kokkos::ALL, - static_cast(acoustic_type::medium_tag)); + static_cast(specfem::element::medium_tag::acoustic)); auto elastic_index = Kokkos::subview(h_assembly_index_mapping, Kokkos::ALL, - static_cast(elastic_type::medium_tag)); + static_cast(specfem::element::medium_tag::elastic)); elastic = specfem::compute::impl::field_impl View of the indices of elements of the given + * type + */ + Kokkos::View + get_elements_on_device(const specfem::element::medium_tag medium) const; + + /** + * @brief Get the indices of elements of a given type as a view on the device + * + * @param medium Medium tag of the elements + * @param property Property tag of the elements + * @return Kokkos::View View of the indices of elements of the given + * type + */ + Kokkos::View + get_elements_on_device(const specfem::element::medium_tag medium, + const specfem::element::property_tag property) const; + + /** + * @brief Get the indices of elements of a given type as a view on the host + * + * @param medium Medium tag of the elements + * @return Kokkos::View View of + * the indices of elements of the given type + */ + Kokkos::View + get_elements_on_host(const specfem::element::medium_tag medium) const; + + /** + * @brief Get the indices of elements of a given type as a view on the host + * + * @param medium Medium tag of the elements + * @param property Property tag of the elements + * @return Kokkos::View View of + * the indices of elements of the given type + */ + Kokkos::View + get_elements_on_host(const specfem::element::medium_tag medium, + const specfem::element::property_tag property) const; }; /** diff --git a/include/compute/sources/source_medium.hpp b/include/compute/sources/source_medium.hpp index e28e432a..3ccc656b 100644 --- a/include/compute/sources/source_medium.hpp +++ b/include/compute/sources/source_medium.hpp @@ -34,9 +34,12 @@ struct source_medium { ///< store source arrays constexpr static int components = - specfem::medium::medium::components; ///< Number of - ///< components in - ///< the medium + specfem::element::attributes::components(); ///< Number + ///< of + ///< components + ///< in the + ///< medium public: /** diff --git a/include/compute/sources/sources.hpp b/include/compute/sources/sources.hpp index 66997dc9..e4772f92 100644 --- a/include/compute/sources/sources.hpp +++ b/include/compute/sources/sources.hpp @@ -69,7 +69,7 @@ struct sources { specfem::kokkos::HostView1d source_medium_mapping; ///< Medium type for every spectral element where ///< source is located - specfem::kokkos::HostView1d + specfem::kokkos::HostView1d source_wavefield_mapping; ///< Wavefield type on which any source acts specfem::compute::source_medium diff --git a/include/coupled_interface/coupled_interface.hpp b/include/coupled_interface/coupled_interface.hpp index a5aae464..1ba515ff 100644 --- a/include/coupled_interface/coupled_interface.hpp +++ b/include/coupled_interface/coupled_interface.hpp @@ -53,7 +53,7 @@ class coupled_interface diff --git a/include/coupled_interface/coupled_interface.tpp b/include/coupled_interface/coupled_interface.tpp index af6b4036..eb3e0832 100644 --- a/include/coupled_interface/coupled_interface.tpp +++ b/include/coupled_interface/coupled_interface.tpp @@ -5,7 +5,7 @@ #include "policies/edge.hpp" #include -template @@ -24,7 +24,7 @@ specfem::coupled_interface::coupled_interfacefield = field; } -template diff --git a/include/domain/domain.hpp b/include/domain/domain.hpp index c1bdf66d..70eadcc6 100644 --- a/include/domain/domain.hpp +++ b/include/domain/domain.hpp @@ -19,14 +19,18 @@ namespace domain { * @tparam qp_type Type of quadrature points i.e. static or dynamic (will be * deprecated soon) */ -template class domain : public specfem::domain::impl::kernels::kernels< WavefieldType, DimensionType, MediumTag, qp_type> { public: - using dimension = specfem::dimension::dimension; - using medium_type = specfem::medium::medium; + constexpr static auto dimension = DimensionType; ///< Dimension of the domain + constexpr static auto medium_tag = MediumTag; ///< Medium tag + constexpr static int num_dimensions = + specfem::element::attributes::dimension(); + constexpr static int components = + specfem::element::attributes::components(); using quadrature_points_type = qp_type; /** diff --git a/include/domain/domain.tpp b/include/domain/domain.tpp index 8df53f1e..da7c45b6 100644 --- a/include/domain/domain.tpp +++ b/include/domain/domain.tpp @@ -5,12 +5,11 @@ #include "policies/range.hpp" #include -template void specfem::domain::domain::divide_mass_matrix() { - constexpr int components = medium_type::components; const int nglob = field.template get_nglob(); constexpr bool using_simd = true; using LoadFieldType = specfem::point::field void specfem::domain::domain::invert_mass_matrix() { - constexpr int components = medium_type::components; const int nglob = field.template get_nglob(); constexpr bool using_simd = true; using PointFieldType = specfem::point::field; constexpr static int num_dimensions = - specfem::dimension::dimension::dim; + specfem::element::attributes::dimension(); constexpr static int components = - specfem::medium::medium::components; + specfem::element::attributes::components(); using ChunkElementFieldType = specfem::chunk_element::field< ParallelConfig::chunk_size, ngll, DimensionType, MediumTag, @@ -86,7 +86,7 @@ class KernelDatatypes { specfem::point::partial_derivatives; }; -template -class element_kernel - : public element_kernel_base { private: /// Datatypes used in the kernels using datatypes = - KernelDatatypes; using simd = typename datatypes::simd; using ChunkPolicyType = typename datatypes::ChunkPolicyType; @@ -290,7 +290,7 @@ class element_kernel h_element_kernel_index_mapping) - : field(assembly.fields - .get_simulation_field()), - element_kernel_base()), + element_kernel_base( assembly, h_element_kernel_index_mapping) {} void compute_mass_matrix(const type_real dt) const { - element_kernel_base::compute_mass_matrix(dt, field); } @@ -323,7 +323,9 @@ class element_kernel field; + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::backward> + field; }; } // namespace kernels diff --git a/include/domain/impl/elements/kernel.tpp b/include/domain/impl/elements/kernel.tpp index c95b3c97..e7f58d16 100644 --- a/include/domain/impl/elements/kernel.tpp +++ b/include/domain/impl/elements/kernel.tpp @@ -9,10 +9,11 @@ #include "enumerations/medium.hpp" #include "enumerations/specfem_enums.hpp" #include "kernel.hpp" +#include "medium/medium.hpp" #include "specfem_setup.hpp" #include -template void specfem::domain::impl::kernels::element_kernel< - specfem::wavefield::type::backward, DimensionType, MediumType, PropertyTag, + specfem::wavefield::simulation_field::backward, DimensionType, MediumType, PropertyTag, specfem::element::boundary_tag::stacey, NGLL>::compute_stiffness_interaction(const int istep) const { diff --git a/include/domain/impl/kernels.hpp b/include/domain/impl/kernels.hpp index 919c38c0..47cd08b1 100644 --- a/include/domain/impl/kernels.hpp +++ b/include/domain/impl/kernels.hpp @@ -11,7 +11,7 @@ namespace domain { namespace impl { namespace kernels { -template class kernels { diff --git a/include/domain/impl/kernels.tpp b/include/domain/impl/kernels.tpp index 97dcc40e..e07257e6 100644 --- a/include/domain/impl/kernels.tpp +++ b/include/domain/impl/kernels.tpp @@ -33,7 +33,7 @@ void allocate_elements( using dimension = specfem::dimension::dimension; using medium_type = - specfem::medium::medium; + specfem::element::attributes; const int nspec = assembly.mesh.nspec; @@ -73,13 +73,14 @@ void allocate_elements( } } - if constexpr (wavefield_type == specfem::wavefield::type::forward || - wavefield_type == specfem::wavefield::type::adjoint) { + if constexpr (wavefield_type == specfem::wavefield::simulation_field::forward || + wavefield_type == specfem::wavefield::simulation_field::adjoint) { std::cout << " - Element type: \n" << " - dimension : " << dimension::to_string() << "\n" - << " - Element type : " << medium_type::to_string() + << " - Element type : " << specfem::element::to_string( + medium_tag, property_tag) << "\n" << " - Boundary Conditions : " << specfem::domain::impl::boundary_conditions::print_boundary_tag< @@ -92,7 +93,7 @@ void allocate_elements( elements = { assembly, h_ispec_domain }; } -template @@ -137,7 +138,7 @@ void allocate_isotropic_sources( return; } -template @@ -188,7 +189,7 @@ void allocate_isotropic_receivers( } } // namespace -template specfem::domain::impl::kernels:: @@ -196,8 +197,6 @@ specfem::domain::impl::kernels:: const type_real dt, const specfem::compute::assembly &assembly, const qp_type &quadrature_points) { - using medium_type = specfem::medium::medium; - const int nspec = assembly.mesh.nspec; specfem::kokkos::HostView1d element_tags( "specfem::domain::domain::element_tag", nspec); @@ -210,11 +209,11 @@ specfem::domain::impl::kernels:: assembly.boundaries.boundary_tags(ispec)); } - if constexpr (WavefieldType == specfem::wavefield::type::forward || - WavefieldType == specfem::wavefield::type::adjoint) { + if constexpr (WavefieldType == specfem::wavefield::simulation_field::forward || + WavefieldType == specfem::wavefield::simulation_field::adjoint) { std::cout << " Element Statistics \n" << "------------------------------\n" - << "- Types of elements in " << medium_type::to_string() + << "- Types of elements in " << specfem::element::to_string(medium) << " medium :\n\n"; } diff --git a/include/domain/impl/receivers/acoustic/acoustic2d_isotropic.hpp b/include/domain/impl/receivers/acoustic/acoustic2d_isotropic.hpp index c814e8a6..c659b7c8 100644 --- a/include/domain/impl/receivers/acoustic/acoustic2d_isotropic.hpp +++ b/include/domain/impl/receivers/acoustic/acoustic2d_isotropic.hpp @@ -26,15 +26,17 @@ class receiver< using_simd> { private: - constexpr static auto DimensionType = specfem::dimension::type::dim2; - constexpr static auto MediumTag = specfem::element::medium_tag::acoustic; + constexpr static auto dimension = specfem::dimension::type::dim2; + constexpr static auto medium_tag = specfem::element::medium_tag::acoustic; + constexpr static auto property_tag = + specfem::element::property_tag::isotropic; using ElementQuadratureViewType = typename specfem::element::quadrature< - NGLL, DimensionType, specfem::kokkos::DevScratchSpace, + NGLL, dimension, specfem::kokkos::DevScratchSpace, Kokkos::MemoryTraits, true, true>::ViewType; using ElementFieldViewType = typename specfem::element::field< - NGLL, DimensionType, MediumTag, specfem::kokkos::DevScratchSpace, + NGLL, dimension, medium_tag, specfem::kokkos::DevScratchSpace, Kokkos::MemoryTraits, true, true, true, false, using_simd>::ViewType; @@ -43,13 +45,13 @@ class receiver< * @name Typedefs */ ///@{ - using dimension = - specfem::dimension::dimension; + constexpr static int num_dimensions = + specfem::element::attributes::dimension(); + + constexpr static int components = + specfem::element::attributes::components(); + ///@} - using medium_type = - specfem::medium::medium; /** * @brief Number of Gauss-Lobatto-Legendre quadrature points */ @@ -101,19 +103,18 @@ class receiver< * @param hprime_zz Derivates of Lagrange interpolants in the z direction */ KOKKOS_FUNCTION - void get_field(const int iz, const int ix, - const specfem::point::partial_derivatives - partial_derivatives, - const specfem::point::properties< - specfem::dimension::type::dim2, medium_type::medium_tag, - medium_type::property_tag, using_simd> - properties, - const ElementQuadratureViewType hprime, - const ElementFieldViewType active_field, - Kokkos::View - receiver_field) const; + void get_field( + const int iz, const int ix, + const specfem::point::partial_derivatives + partial_derivatives, + const specfem::point::properties + properties, + const ElementQuadratureViewType hprime, + const ElementFieldViewType active_field, + Kokkos::View + receiver_field) const; // /** // * @brief Compute the seismogram components for a given receiver and diff --git a/include/domain/impl/receivers/acoustic/acoustic2d_isotropic.tpp b/include/domain/impl/receivers/acoustic/acoustic2d_isotropic.tpp index 9144d4a9..45813ce4 100644 --- a/include/domain/impl/receivers/acoustic/acoustic2d_isotropic.tpp +++ b/include/domain/impl/receivers/acoustic/acoustic2d_isotropic.tpp @@ -55,10 +55,10 @@ KOKKOS_INLINE_FUNCTION void specfem::domain::impl::receivers::receiver< specfem::enums::element::quadrature::static_quadrature_points, using_simd>:: get_field( const int iz, const int ix, - const specfem::point::partial_derivatives + const specfem::point::partial_derivatives partial_derivatives, - const specfem::point::properties + const specfem::point::properties properties, const ElementQuadratureViewType hprime, const ElementFieldViewType active_field, diff --git a/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp b/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp index 6def10dd..a3ee47e4 100644 --- a/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp +++ b/include/domain/impl/receivers/elastic/elastic2d_isotropic.hpp @@ -27,15 +27,17 @@ class receiver< specfem::enums::element::quadrature::static_quadrature_points, using_simd> { private: - constexpr static auto DimensionType = specfem::dimension::type::dim2; - constexpr static auto MediumTag = specfem::element::medium_tag::elastic; + constexpr static auto dimension = specfem::dimension::type::dim2; + constexpr static auto property_tag = + specfem::element::property_tag::isotropic; + constexpr static auto medium_tag = specfem::element::medium_tag::elastic; using ElementQuadratureViewType = typename specfem::element::quadrature< - NGLL, DimensionType, specfem::kokkos::DevScratchSpace, + NGLL, dimension, specfem::kokkos::DevScratchSpace, Kokkos::MemoryTraits, true, false>::ViewType; using ElementFieldViewType = typename specfem::element::field< - NGLL, DimensionType, MediumTag, specfem::kokkos::DevScratchSpace, + NGLL, dimension, medium_tag, specfem::kokkos::DevScratchSpace, Kokkos::MemoryTraits, true, true, true, false, using_simd>::ViewType; @@ -48,12 +50,13 @@ class receiver< * @brief Dimension of the element * */ - using dimension = - specfem::dimension::dimension; - using medium_type = - specfem::medium::medium; + constexpr static int num_dimensions = + specfem::element::attributes::dimension(); + + constexpr static int components = + specfem::element::attributes::components(); + ///@} + /** * @brief Number of Gauss-Lobatto-Legendre quadrature points */ @@ -106,12 +109,10 @@ class receiver< KOKKOS_FUNCTION void get_field( const int iz, const int ix, - const specfem::point::partial_derivatives + const specfem::point::partial_derivatives partial_derivatives, - const specfem::point::properties + const specfem::point::properties properties, const ElementQuadratureViewType hprime, const ElementFieldViewType active_field, diff --git a/include/domain/impl/receivers/elastic/elastic2d_isotropic.tpp b/include/domain/impl/receivers/elastic/elastic2d_isotropic.tpp index 2276f5c4..aef25bb4 100644 --- a/include/domain/impl/receivers/elastic/elastic2d_isotropic.tpp +++ b/include/domain/impl/receivers/elastic/elastic2d_isotropic.tpp @@ -33,20 +33,18 @@ KOKKOS_INLINE_FUNCTION void specfem::domain::impl::receivers::receiver< specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, specfem::element::property_tag::isotropic, specfem::enums::element::quadrature::static_quadrature_points, - using_simd>:: - get_field(const int iz, const int ix, - const specfem::point::partial_derivatives< - specfem::dimension::type::dim2, false, using_simd> - partial_derivatives, - const specfem::point::properties< - specfem::dimension::type::dim2, medium_type::medium_tag, - medium_type::property_tag, using_simd> - properties, - const ElementQuadratureViewType hprime, - const ElementFieldViewType active_field, - Kokkos::View - receiver_field) const { + using_simd>::get_field(const int iz, const int ix, + const specfem::point::partial_derivatives< + dimension, false, using_simd> + partial_derivatives, + const specfem::point::properties< + dimension, medium_tag, property_tag, using_simd> + properties, + const ElementQuadratureViewType hprime, + const ElementFieldViewType active_field, + Kokkos::View + receiver_field) const { // Receiver field is probably not the best way of storing this, since this // would require global memory accesses. A better way for doing this would be diff --git a/include/domain/impl/receivers/kernel.hpp b/include/domain/impl/receivers/kernel.hpp index b8d1a46e..0f352dda 100644 --- a/include/domain/impl/receivers/kernel.hpp +++ b/include/domain/impl/receivers/kernel.hpp @@ -13,15 +13,19 @@ namespace domain { namespace impl { namespace kernels { -template class receiver_kernel { public: - using dimension = specfem::dimension::dimension; - using medium_type = - specfem::medium::medium; + constexpr static int num_dimensions = + specfem::element::attributes::dimension(); + constexpr static int components = + specfem::element::attributes::components(); + constexpr static auto medium_tag = MediumTag; + constexpr static auto property_tag = PropertyTag; + constexpr static auto dimension = DimensionType; using quadrature_points_type = qp_type; constexpr static bool using_simd = false; diff --git a/include/domain/impl/receivers/kernel.tpp b/include/domain/impl/receivers/kernel.tpp index 67d52930..e1f02cad 100644 --- a/include/domain/impl/receivers/kernel.tpp +++ b/include/domain/impl/receivers/kernel.tpp @@ -10,7 +10,7 @@ #include "quadrature/interface.hpp" #include "specfem_setup.hpp" -template @@ -34,9 +34,9 @@ specfem::domain::impl::kernels::receiver_kernel< for (int ireceiver = 0; ireceiver < nreceivers; ++ireceiver) { const int ispec = h_receiver_kernel_index_mapping(ireceiver); if ((assembly.properties.h_element_types(ispec) != - medium_type::medium_tag) && + medium_tag) && (assembly.properties.h_element_property(ispec) != - medium_type::property_tag)) { + property_tag)) { throw std::runtime_error("Invalid element detected in kernel"); } } @@ -63,7 +63,7 @@ specfem::domain::impl::kernels::receiver_kernel< return; } -template @@ -78,7 +78,6 @@ void specfem::domain::impl::kernels::receiver_kernel< // within the element. Scratch views speed up this computation by limiting // global memory accesses. - constexpr int components = medium_type::components; constexpr int NGLL = quadrature_points_type::NGLL; using ElementFieldType = specfem::element::field< NGLL, DimensionType, MediumTag, specfem::kokkos::DevScratchSpace, diff --git a/include/domain/impl/sources/acoustic/acoustic2d_isotropic.hpp b/include/domain/impl/sources/acoustic/acoustic2d_isotropic.hpp index ae6a83ac..b913da28 100644 --- a/include/domain/impl/sources/acoustic/acoustic2d_isotropic.hpp +++ b/include/domain/impl/sources/acoustic/acoustic2d_isotropic.hpp @@ -32,12 +32,16 @@ class source< * @name Typedefs */ ///@{ - using dimension = - specfem::dimension::dimension; - using medium_type = - specfem::medium::medium; + constexpr static int num_dimensions = specfem::element::attributes< + specfem::dimension::type::dim2, + specfem::element::medium_tag::acoustic>::dimension(); + constexpr static int components = specfem::element::attributes< + specfem::dimension::type::dim2, + specfem::element::medium_tag::acoustic>::components(); + constexpr static auto medium_tag = specfem::element::medium_tag::acoustic; + constexpr static auto property_tag = + specfem::element::property_tag::isotropic; + constexpr static auto dimension = specfem::dimension::type::dim2; using quadrature_points_type = specfem::enums::element::quadrature::static_quadrature_points; @@ -78,12 +82,12 @@ class source< * the source */ KOKKOS_INLINE_FUNCTION void compute_interaction( + const specfem::datatype::ScalarPointViewType &source_array, const specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> &stf, - const specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> &lagrange_interpolant, - specfem::datatype::ScalarPointViewType &acceleration) const; + type_real, components, using_simd> &lagrange_interpolants, + specfem::datatype::ScalarPointViewType + &acceleration) const; }; } // namespace sources } // namespace impl diff --git a/include/domain/impl/sources/acoustic/acoustic2d_isotropic.tpp b/include/domain/impl/sources/acoustic/acoustic2d_isotropic.tpp index e12529ba..5d469715 100644 --- a/include/domain/impl/sources/acoustic/acoustic2d_isotropic.tpp +++ b/include/domain/impl/sources/acoustic/acoustic2d_isotropic.tpp @@ -47,8 +47,7 @@ KOKKOS_INLINE_FUNCTION void specfem::domain::impl::sources::source< compute_interaction( const specfem::datatype::ScalarPointViewType &stf, const specfem::datatype::ScalarPointViewType &lagrange_interpolant, - specfem::datatype::ScalarPointViewType - &acceleration) const { + specfem::datatype::ScalarPointViewType &acceleration) const { acceleration(0) = lagrange_interpolant(0) * stf(0); diff --git a/include/domain/impl/sources/elastic/elastic2d_isotropic.hpp b/include/domain/impl/sources/elastic/elastic2d_isotropic.hpp index d20908ea..38d825b1 100644 --- a/include/domain/impl/sources/elastic/elastic2d_isotropic.hpp +++ b/include/domain/impl/sources/elastic/elastic2d_isotropic.hpp @@ -32,12 +32,16 @@ class source< * @name Typedefs */ ///@{ - using dimension = - specfem::dimension::dimension; - using medium_type = - specfem::medium::medium; + constexpr static int num_dimensions = specfem::element::attributes< + specfem::dimension::type::dim2, + specfem::element::medium_tag::elastic>::dimension(); + constexpr static int components = specfem::element::attributes< + specfem::dimension::type::dim2, + specfem::element::medium_tag::elastic>::components(); + constexpr static auto medium_tag = specfem::element::medium_tag::elastic; + constexpr static auto property_tag = + specfem::element::property_tag::isotropic; + constexpr static auto dimension = specfem::dimension::type::dim2; /** * @brief Number of Gauss-Lobatto-Legendre quadrature points @@ -80,12 +84,12 @@ class source< * the source */ KOKKOS_INLINE_FUNCTION void compute_interaction( + const specfem::datatype::ScalarPointViewType &stf, const specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> &stf, - const specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> &lagrange_interpolant, - specfem::datatype::ScalarPointViewType &acceleration) const; + type_real, components, using_simd> &lagrange_interpolant, + specfem::datatype::ScalarPointViewType + &acceleration) const; }; } // namespace sources } // namespace impl diff --git a/include/domain/impl/sources/elastic/elastic2d_isotropic.tpp b/include/domain/impl/sources/elastic/elastic2d_isotropic.tpp index 0d9255aa..9c4d3a62 100644 --- a/include/domain/impl/sources/elastic/elastic2d_isotropic.tpp +++ b/include/domain/impl/sources/elastic/elastic2d_isotropic.tpp @@ -40,12 +40,12 @@ KOKKOS_INLINE_FUNCTION void specfem::domain::impl::sources::source< using_simd>:: compute_interaction( const specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> &stf, + type_real, components, using_simd> &stf, const specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> + type_real, components, using_simd> &lagrange_interpolant, specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> &acceleration) + type_real, components, using_simd> &acceleration) const { if constexpr (specfem::globals::simulation_wave == specfem::wave::p_sv) { diff --git a/include/domain/impl/sources/kernel.hpp b/include/domain/impl/sources/kernel.hpp index e6b91247..3ed11aa2 100644 --- a/include/domain/impl/sources/kernel.hpp +++ b/include/domain/impl/sources/kernel.hpp @@ -13,15 +13,19 @@ namespace domain { namespace impl { namespace kernels { -template class source_kernel { public: - using dimension = specfem::dimension::dimension; - using medium_type = - specfem::medium::medium; + constexpr static int num_dimensions = + specfem::element::attributes::dimension(); + constexpr static int components = + specfem::element::attributes::components(); + constexpr static auto medium_tag = MediumTag; + constexpr static auto property_tag = PropertyTag; + constexpr static auto dimension = DimensionType; using quadrature_point_type = qp_type; constexpr static bool using_simd = false; @@ -44,7 +48,7 @@ class source_kernel { specfem::compute::simulation_field field; specfem::compute::source_medium sources; quadrature_point_type quadrature_points; - specfem::domain::impl::sources::source source; }; diff --git a/include/domain/impl/sources/kernel.tpp b/include/domain/impl/sources/kernel.tpp index 18f693f9..4f7adfa6 100644 --- a/include/domain/impl/sources/kernel.tpp +++ b/include/domain/impl/sources/kernel.tpp @@ -10,7 +10,7 @@ #include "specfem_setup.hpp" #include -template @@ -32,9 +32,9 @@ specfem::domain::impl::kernels::source_kernel< for (int isource = 0; isource < nsources; isource++) { const int ispec = sources.h_source_index_mapping(isource); if ((assembly.properties.h_element_types(ispec) != - medium_type::medium_tag) && + medium_tag) && (assembly.properties.h_element_property(ispec) != - medium_type::property_tag)) { + property_tag)) { throw std::runtime_error("Invalid element detected in kernel"); } } @@ -49,11 +49,11 @@ specfem::domain::impl::kernels::source_kernel< Kokkos::deep_copy(source_domain_index_mapping, h_source_domain_index_mapping); source = specfem::domain::impl::sources::source< - DimensionType, MediumTag, PropertyTag, quadrature_point_type, using_simd>(); + dimension, medium_tag, property_tag, quadrature_point_type, using_simd>(); return; } -template @@ -61,8 +61,7 @@ void specfem::domain::impl::kernels::source_kernel< WavefieldType, DimensionType, MediumTag, PropertyTag, qp_type>::compute_source_interaction(const int timestep) const { - constexpr int components = medium_type::components; - using PointFieldType = specfem::point::field; if (nsources == 0) @@ -91,15 +90,15 @@ void specfem::domain::impl::kernels::source_kernel< specfem::point::index index(ispec_l, iz, ix); const specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> + type_real, components, using_simd> lagrange_interpolant(Kokkos::subview( sources.source_array, isource_l, Kokkos::ALL, iz, ix)); // Source time function // For acoustic medium, forward simulation, divide by kappa - const auto stf = [&, timestep, components]() { + const auto stf = [&, timestep]() { if constexpr ((WavefieldType == - specfem::wavefield::type::forward) && + specfem::wavefield::simulation_field::forward) && (MediumTag == specfem::element::medium_tag::acoustic)) { const auto point_properties = [&]() @@ -113,7 +112,7 @@ void specfem::domain::impl::kernels::source_kernel< return point_properties; }(); specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd> + type_real, components, using_simd> stf(Kokkos::subview(sources.source_time_function, timestep, isource_l, Kokkos::ALL)); for (int i = 0; i < components; i++) { @@ -122,7 +121,7 @@ void specfem::domain::impl::kernels::source_kernel< return stf; } else { return specfem::datatype::ScalarPointViewType< - type_real, medium_type::components, using_simd>( + type_real, components, using_simd>( Kokkos::subview(sources.source_time_function, timestep, isource_l, Kokkos::ALL)); } diff --git a/include/element/field.hpp b/include/element/field.hpp index 0994d8cd..014fd812 100644 --- a/include/element/field.hpp +++ b/include/element/field.hpp @@ -244,17 +244,17 @@ template struct FieldTraits - : ImplFieldTraits< - specfem::datatype::ScalarElementViewType< - type_real, NGLL, - specfem::medium::medium::components, - MemorySpace, MemoryTraits, UseSIMD>, - StoreDisplacement, StoreVelocity, StoreAcceleration, - StoreMassMatrix> { + : ImplFieldTraits::components(), + MemorySpace, MemoryTraits, UseSIMD>, + StoreDisplacement, StoreVelocity, StoreAcceleration, + StoreMassMatrix> { public: using ViewType = specfem::datatype::ScalarElementViewType< type_real, NGLL, - specfem::medium::medium::components, + specfem::element::attributes::components(), MemorySpace, MemoryTraits, UseSIMD>; KOKKOS_FUNCTION FieldTraits() = default; diff --git a/include/enumerations/display.hpp b/include/enumerations/display.hpp new file mode 100644 index 00000000..1c743747 --- /dev/null +++ b/include/enumerations/display.hpp @@ -0,0 +1,10 @@ +#pragma once + +namespace specfem { +namespace display { + +enum class format { PNG, JPG, on_screen }; + +enum class wavefield { displacement, velocity, acceleration, pressure }; +} // namespace display +} // namespace specfem diff --git a/include/enumerations/medium.hpp b/include/enumerations/medium.hpp index 39bcf3ab..05378291 100644 --- a/include/enumerations/medium.hpp +++ b/include/enumerations/medium.hpp @@ -18,66 +18,35 @@ enum class medium_tag { elastic, acoustic, poroelastic }; * */ enum class property_tag { isotropic }; -} // namespace element - -namespace medium { -/** - * @brief Medium - * - * @tparam Dimension dimension type - * @tparam MediumTag medium tag - * @tparam PropertyTag property tag - */ template -class medium; + specfem::element::medium_tag MediumTag> +class attributes; -/** - * @brief 2D Elastic, Isotropic medium specialization - * - */ template <> -class medium { +class attributes { + public: - static constexpr auto dimension = - specfem::dimension::type::dim2; ///< dimension type - static constexpr auto medium_tag = - specfem::element::medium_tag::elastic; ///< medium tag - static constexpr auto property_tag = - specfem::element::property_tag::isotropic; ///< property tag - static constexpr int components = - 2; ///< Number of components for the field inside the medium - static std::string to_string() { - return "Elastic, Isotropic"; - } ///< Convert medium to string + constexpr static int dimension() { return 2; } + + constexpr static int components() { return 2; } }; -/** - * @brief 2D Acoustic, Isotropic medium specialization - * - */ template <> -class medium { +class attributes { + public: - static constexpr auto dimension = - specfem::dimension::type::dim2; ///< dimension type - static constexpr auto medium_tag = - specfem::element::medium_tag::acoustic; ///< medium tag - static constexpr auto property_tag = - specfem::element::property_tag::isotropic; ///< property tag - static constexpr int components = - 1; ///< Number of components for the field inside the medium - static std::string to_string() { - return "Acoustic, Isotropic"; - } ///< Convert medium to string + constexpr static int dimension() { return 2; } + + constexpr static int components() { return 1; } }; -} // namespace medium +const std::string to_string(const medium_tag &medium, + const property_tag &property_tag); + +const std::string to_string(const medium_tag &medium); + +} // namespace element } // namespace specfem diff --git a/include/enumerations/simulation.hpp b/include/enumerations/simulation.hpp index 04c043a7..c5909432 100644 --- a/include/enumerations/simulation.hpp +++ b/include/enumerations/simulation.hpp @@ -1,4 +1,5 @@ #pragma once +#include namespace specfem { namespace simulation { diff --git a/include/enumerations/specfem_enums.hpp b/include/enumerations/specfem_enums.hpp index 320672fc..c980deb9 100644 --- a/include/enumerations/specfem_enums.hpp +++ b/include/enumerations/specfem_enums.hpp @@ -81,6 +81,8 @@ namespace time_scheme { enum class type { newmark, ///< Newmark time scheme }; + } // namespace time_scheme + } // namespace enums } // namespace specfem diff --git a/include/enumerations/wavefield.hpp b/include/enumerations/wavefield.hpp index 9799c96b..e0ec9dc5 100644 --- a/include/enumerations/wavefield.hpp +++ b/include/enumerations/wavefield.hpp @@ -1,11 +1,101 @@ #pragma once +#include "dimension.hpp" + namespace specfem { namespace wavefield { /** - * @brief Wavefield type enumeration + * @brief Wavefield tag within the simulation + * + */ +enum class simulation_field { forward, adjoint, backward, buffer }; + +/** + * @brief Type of wavefield component + * + */ +enum class type { displacement, velocity, acceleration, pressure }; + +/** + * @brief Defines compile time constants for wavefield components * + * @tparam DimensionType Dimension of the wavefield + * @tparam Component Type of the wavefield component */ -enum class type { forward, adjoint, backward, buffer }; +template +class wavefield; + +// clang-format off +/** + * @fn static constexpr specfem::dimension::type specfem::wavefield::wavefield::dimension() + * @brief Returns the dimension type of the wavefield + * + * @return constexpr specfem::dimension::type Dimension type of the wavefield + * @memberof specfem::wavefield::wavefield + */ + +/** + * @fn static constexpr specfem::wavefield::type specfem::wavefield::wavefield::component() + * + * @brief Returns the component type of the wavefield + * + * @return constexpr specfem::wavefield::type Component type of the wavefield + * @memberof specfem::wavefield::wavefield + */ + +/** + * @fn static constexpr int specfem::wavefield::wavefield::num_components() + * @brief Returns the number of components of the wavefield + * + * @return constexpr int Number of components of the wavefield + * @memberof specfem::wavefield::wavefield + */ +// clang-format on + +template <> +class wavefield { +public: + static constexpr auto dimension() { return specfem::dimension::type::dim2; } + static constexpr auto component() { + return specfem::wavefield::type::displacement; + } + static constexpr int num_components() { return 2; } +}; + +template <> +class wavefield { +public: + static constexpr auto dimension() { return specfem::dimension::type::dim2; } + static constexpr auto component() { + return specfem::wavefield::type::velocity; + } + static constexpr int num_components() { return 2; } +}; + +template <> +class wavefield { +public: + static constexpr auto dimension() { return specfem::dimension::type::dim2; } + static constexpr auto component() { + return specfem::wavefield::type::acceleration; + } + static constexpr int num_components() { return 2; } +}; + +template <> +class wavefield { +public: + static constexpr auto dimension() { return specfem::dimension::type::dim2; } + static constexpr auto component() { + return specfem::wavefield::type::pressure; + } + static constexpr int num_components() { return 1; } +}; + } // namespace wavefield } // namespace specfem diff --git a/include/frechet_derivatives/frechet_derivatives.hpp b/include/frechet_derivatives/frechet_derivatives.hpp index 278ad7f0..2af7e950 100644 --- a/include/frechet_derivatives/frechet_derivatives.hpp +++ b/include/frechet_derivatives/frechet_derivatives.hpp @@ -20,8 +20,14 @@ template class frechet_derivatives { public: - using dimension = specfem::dimension::dimension; - using medium_type = specfem::medium::medium; + constexpr static auto dimension = DimensionType; ///< Dimension of the domain + constexpr static auto medium_tag = MediumTag; ///< Medium tag + + constexpr static int num_dimensions = + specfem::element::attributes::dimension(); + constexpr static int components = + specfem::element::attributes::components(); + constexpr static int ngll = NGLL; /** * @name Constructor diff --git a/include/frechet_derivatives/impl/frechet_element.hpp b/include/frechet_derivatives/impl/frechet_element.hpp index 9619f9a1..e9472dcf 100644 --- a/include/frechet_derivatives/impl/frechet_element.hpp +++ b/include/frechet_derivatives/impl/frechet_element.hpp @@ -105,9 +105,11 @@ class frechet_elements { ///< this kernel specfem::kokkos::HostMirror1d h_element_index; ///< Host mirror of ///< element_index - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::adjoint> adjoint_field; ///< Adjoint field - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::backward> backward_field; ///< Backward field specfem::compute::kernels kernels; ///< Misfit kernels specfem::compute::quadrature quadrature; ///< Integration quadrature diff --git a/include/kernels/impl/domain_kernels.hpp b/include/kernels/impl/domain_kernels.hpp index 6c92253e..5a4cdb51 100644 --- a/include/kernels/impl/domain_kernels.hpp +++ b/include/kernels/impl/domain_kernels.hpp @@ -10,7 +10,7 @@ namespace specfem { namespace kernels { namespace impl { -template class domain_kernels { public: diff --git a/include/kernels/impl/interface_kernels.hpp b/include/kernels/impl/interface_kernels.hpp index 8e125ce6..2d34c076 100644 --- a/include/kernels/impl/interface_kernels.hpp +++ b/include/kernels/impl/interface_kernels.hpp @@ -10,12 +10,12 @@ namespace specfem { namespace kernels { namespace impl { -template class interface_kernels; -template class interface_kernels { @@ -34,7 +34,7 @@ class interface_kernels class interface_kernels { diff --git a/include/kernels/impl/kernels.hpp b/include/kernels/impl/kernels.hpp index b1aa87e1..a2ade16c 100644 --- a/include/kernels/impl/kernels.hpp +++ b/include/kernels/impl/kernels.hpp @@ -12,7 +12,7 @@ namespace specfem { namespace kernels { namespace impl { -template class kernels diff --git a/include/kernels/kernels.hpp b/include/kernels/kernels.hpp index b8367a5b..b2cbaf35 100644 --- a/include/kernels/kernels.hpp +++ b/include/kernels/kernels.hpp @@ -8,7 +8,7 @@ namespace specfem { namespace kernels { -template class kernels : public impl::domain_kernels { diff --git a/include/medium/acoustic_isotropic2d/acoustic_isotropic2d.hpp b/include/medium/acoustic_isotropic2d/acoustic_isotropic2d.hpp new file mode 100644 index 00000000..f93fd6df --- /dev/null +++ b/include/medium/acoustic_isotropic2d/acoustic_isotropic2d.hpp @@ -0,0 +1,112 @@ +#pragma once + +#include "algorithms/gradient.hpp" +#include "enumerations/dimension.hpp" +#include "enumerations/medium.hpp" +#include "point/field_derivatives.hpp" +#include "point/properties.hpp" +#include "point/stress.hpp" +#include + +namespace specfem { +namespace medium { + +template +KOKKOS_INLINE_FUNCTION specfem::point::stress< + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + UseSIMD> +impl_compute_stress( + const specfem::point::properties< + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + specfem::element::property_tag::isotropic, UseSIMD> &properties, + const specfem::point::field_derivatives< + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + UseSIMD> &field_derivatives) { + + const auto &du = field_derivatives.du; + + specfem::datatype::VectorPointViewType T; + + T(0, 0) = properties.rho_inverse * du(0, 0); + T(1, 0) = properties.rho_inverse * du(1, 0); + + return { T }; +} + +template +KOKKOS_FUNCTION void impl_compute_wavefield( + const std::integral_constant, + const std::integral_constant, + const std::integral_constant, + const MemberType &team, const IteratorType &iterator, + const specfem::compute::assembly &assembly, + const QuadratureType &quadrature, const ChunkFieldType &field, + const specfem::wavefield::type wavefield_component, + WavefieldViewType wavefield) { + + using FieldDerivativesType = + specfem::point::field_derivatives; + + using PointPropertyType = specfem::point::properties< + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + specfem::element::property_tag::isotropic, false>; + + const auto &properties = assembly.properties; + + const auto &active_field = [&]() { + if (wavefield_component == specfem::wavefield::type::displacement) { + return field.displacement; + } else if (wavefield_component == specfem::wavefield::type::velocity) { + return field.velocity; + } else if (wavefield_component == specfem::wavefield::type::acceleration) { + return field.acceleration; + } else if (wavefield_component == specfem::wavefield::type::pressure) { + return field.acceleration; + } else { + Kokkos::abort("component not supported"); + } + }(); + + if (wavefield_component == specfem::wavefield::type::pressure) { + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, iterator.chunk_size()), + [&](const int &i) { + const auto iterator_index = iterator(i); + const auto index = iterator_index.index; + wavefield(index.ispec, index.iz, index.ix, 0) = + -1.0 * active_field(iterator_index.ielement, + index.iz, index.ix, 0); + }); + + return; + } + + specfem::algorithms::gradient( + team, iterator, assembly.partial_derivatives, quadrature.hprime_gll, + active_field, + [&](const typename IteratorType::index_type &iterator_index, + const FieldDerivativesType::ViewType &du) { + const auto &index = iterator_index.index; + PointPropertyType point_property; + + specfem::compute::load_on_device(index, properties, point_property); + + FieldDerivativesType point_field_derivatives(du); + + const auto point_stress = + impl_compute_stress(point_property, point_field_derivatives); + + wavefield(index.ispec, index.iz, index.ix, 0) = point_stress.T(0, 0); + wavefield(index.ispec, index.iz, index.ix, 1) = point_stress.T(1, 0); + }); + + return; +} + +} // namespace medium +} // namespace specfem diff --git a/include/medium/compute_stress.hpp b/include/medium/compute_stress.hpp new file mode 100644 index 00000000..f0b62183 --- /dev/null +++ b/include/medium/compute_stress.hpp @@ -0,0 +1,56 @@ +#pragma once + +#include "acoustic_isotropic2d/acoustic_isotropic2d.hpp" +#include "elastic_isotropic2d/elastic_isotropic2d.hpp" +#include + +namespace specfem { +namespace medium { + +/** + * @defgroup MediumPhysics + */ + +/** + * @brief Compute the stress tensor at a quadrature point + * + * @ingroup MediumPhysics + * + * @tparam PointPropertiesType Material properties at the quadrature point + * specfem::point::properties + * @tparam PointFieldDerivativesType Field derivatives at the quadrature point + * specfem::point::field_derivatives + * @param properties Material properties at the quadrature point + * @param field_derivatives Field derivatives at the quadrature point + * @return specfem::point::stress The stress tensor at the quadrature point + */ +template +KOKKOS_INLINE_FUNCTION auto +compute_stress(const PointPropertiesType &properties, + const PointFieldDerivativesType &field_derivatives) + -> decltype(specfem::medium::impl_compute_stress(properties, + field_derivatives)) { + + static_assert(PointPropertiesType::is_point_properties, + "properties is not a point properties type"); + static_assert(PointFieldDerivativesType::is_point_field_derivatives, + "field_derivatives is not a point field derivatives type"); + + static_assert(PointPropertiesType::dimension == + PointFieldDerivativesType::dimension, + "properties and field_derivatives have different dimensions"); + + static_assert(PointPropertiesType::medium_tag == + PointFieldDerivativesType::medium_tag, + "properties and field_derivatives have different medium tags"); + + static_assert( + PointPropertiesType::simd::using_simd == + PointFieldDerivativesType::simd::using_simd, + "properties and field_derivatives have different SIMD settings"); + + return specfem::medium::impl_compute_stress(properties, field_derivatives); +} + +} // namespace medium +} // namespace specfem diff --git a/include/medium/compute_wavefield.hpp b/include/medium/compute_wavefield.hpp new file mode 100644 index 00000000..d70616a3 --- /dev/null +++ b/include/medium/compute_wavefield.hpp @@ -0,0 +1,83 @@ +#pragma once + +#include "acoustic_isotropic2d/acoustic_isotropic2d.hpp" +#include "elastic_isotropic2d/elastic_isotropic2d.hpp" +#include + +namespace specfem { +namespace medium { + +/** + * @brief Compute the values of wavefield of a given component within a spectral + * element. + * + * + * This function computes the wavefield values given the intrinsic field values + * within that element. For example, for elastic medium when the wavefield + * component is pressure, the function computes the pressure values from the + * displacement field values. + * + * + * @ingroup MediumPhysics + * + * @tparam MediumTag The medium tag of the element + * @tparam PropertyTag The property tag of the element + * @tparam MemberType The kokkos team policy member type + * @tparam IteratorType The iterator type specfem::iterator::chunk + * @tparam ChunkFieldType Chunk field type that stores the intrinsic field + * values specfem::chunk_element::field + * @tparam QuadratureType The quadrature type that stores the lagrange + * polynomial values specfem::element::quadrature + * @tparam WavefieldViewType 4 dimensional Kokkos view (output) + * @param team The kokkos team policy member + * @param iterator The iterator to iterate over all the GLL points + * @param assembly SPECFEM++ assembly object + * @param quadrature The quadrature object containing lagrange polynomial values + * @param field Instrinsic field values + * @param wavefield_component The wavefield component to compute + * @param wavefield_on_entire_grid The wavefield view to store the computed + * values + */ +template +KOKKOS_INLINE_FUNCTION auto +compute_wavefield(const MemberType &team, const IteratorType &iterator, + const specfem::compute::assembly &assembly, + const QuadratureType &quadrature, const ChunkFieldType &field, + const specfem::wavefield::type &wavefield_component, + WavefieldViewType wavefield_on_entire_grid) { + + static_assert(ChunkFieldType::isChunkFieldType, + "field is not a chunk field type"); + static_assert( + ChunkFieldType::store_displacement && ChunkFieldType::store_velocity && + ChunkFieldType::store_acceleration, + "field type needs to store displacement, velocity and acceleration"); + static_assert(QuadratureType::store_hprime_gll, + "quadrature type needs to store GLL points"); + static_assert(WavefieldViewType::rank() == 4, + "wavefield_on_entire_grid needs to be a 4D view"); + + static_assert(ChunkFieldType::medium_tag == MediumTag, + "field type needs to have the same medium tag as the function"); + + using dimension_dispatch = + std::integral_constant; + using medium_dispatch = + std::integral_constant; + using property_dispatch = + std::integral_constant; + + impl_compute_wavefield(dimension_dispatch(), medium_dispatch(), + property_dispatch(), team, iterator, assembly, + quadrature, field, wavefield_component, + wavefield_on_entire_grid); + + return; +} + +} // namespace medium +} // namespace specfem diff --git a/include/medium/elastic_isotropic2d/elastic_isotropic2d.hpp b/include/medium/elastic_isotropic2d/elastic_isotropic2d.hpp new file mode 100644 index 00000000..48b5a951 --- /dev/null +++ b/include/medium/elastic_isotropic2d/elastic_isotropic2d.hpp @@ -0,0 +1,138 @@ +#pragma once + +#include "enumerations/dimension.hpp" +#include "enumerations/medium.hpp" +#include "enumerations/wavefield.hpp" +#include "point/field_derivatives.hpp" +#include "point/properties.hpp" +#include "point/stress.hpp" +#include + +namespace specfem { +namespace medium { + +template +KOKKOS_INLINE_FUNCTION specfem::point::stress< + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + UseSIMD> +impl_compute_stress( + const specfem::point::properties< + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + specfem::element::property_tag::isotropic, UseSIMD> &properties, + const specfem::point::field_derivatives< + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + UseSIMD> &field_derivatives) { + + using datatype = + typename specfem::datatype::simd::datatype; + const auto &du = field_derivatives.du; + + datatype sigma_xx, sigma_zz, sigma_xz; + + // P_SV case + // sigma_xx + sigma_xx = properties.lambdaplus2mu * du(0, 0) + properties.lambda * du(1, 1); + + // sigma_zz + sigma_zz = properties.lambdaplus2mu * du(1, 1) + properties.lambda * du(0, 0); + + // sigma_xz + sigma_xz = properties.mu * (du(0, 1) + du(1, 0)); + + specfem::datatype::VectorPointViewType T; + + T(0, 0) = sigma_xx; + T(0, 1) = sigma_xz; + T(1, 0) = sigma_xz; + T(1, 1) = sigma_zz; + + return { T }; +} + +template +KOKKOS_FUNCTION void impl_compute_wavefield( + const std::integral_constant, + const std::integral_constant, + const std::integral_constant, + const MemberType &team, const IteratorType &iterator, + const specfem::compute::assembly &assembly, + const QuadratureType &quadrature, const ChunkFieldType &field, + const specfem::wavefield::type wavefield_component, + WavefieldViewType wavefield) { + + using FieldDerivativesType = + specfem::point::field_derivatives; + + using PointPropertyType = specfem::point::properties< + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + specfem::element::property_tag::isotropic, false>; + + const auto &properties = assembly.properties; + + const auto &active_field = [&]() { + if (wavefield_component == specfem::wavefield::type::displacement) { + return field.displacement; + } else if (wavefield_component == specfem::wavefield::type::velocity) { + return field.velocity; + } else if (wavefield_component == specfem::wavefield::type::acceleration) { + return field.acceleration; + } else if (wavefield_component == specfem::wavefield::type::pressure) { + return field.displacement; + } else { + Kokkos::abort("component not supported"); + } + }(); + + if (wavefield_component == specfem::wavefield::type::pressure) { + + specfem::algorithms::gradient( + team, iterator, assembly.partial_derivatives, quadrature.hprime_gll, + active_field, + [&](const typename IteratorType::index_type &iterator_index, + const FieldDerivativesType::ViewType &du) { + const auto &index = iterator_index.index; + PointPropertyType point_property; + + specfem::compute::load_on_device(index, properties, point_property); + + // P_SV case + // sigma_xx + const auto sigma_xx = point_property.lambdaplus2mu * du(0, 0) + + point_property.lambda * du(1, 1); + + // sigma_zz + const auto sigma_zz = point_property.lambdaplus2mu * du(1, 1) + + point_property.lambda * du(0, 0); + + // sigma_yy + const auto sigma_yy = + point_property.lambdaplus2mu * (du(0, 0) + du(1, 1)); + + wavefield(index.ispec, index.iz, index.ix, 0) = + -1.0 * (sigma_xx + sigma_zz + sigma_yy) / 3.0; + }); + + return; + } + + Kokkos::parallel_for( + Kokkos::TeamThreadRange(team, iterator.chunk_size()), [&](const int &i) { + const auto iterator_index = iterator(i); + const auto &index = iterator_index.index; + wavefield(index.ispec, index.iz, index.ix, 0) = + active_field(iterator_index.ielement, index.iz, index.ix, 0); + wavefield(index.ispec, index.iz, index.ix, 1) = + active_field(iterator_index.ielement, index.iz, index.ix, 1); + }); + + return; +} + +} // namespace medium +} // namespace specfem diff --git a/include/medium/medium.hpp b/include/medium/medium.hpp new file mode 100644 index 00000000..69bfd338 --- /dev/null +++ b/include/medium/medium.hpp @@ -0,0 +1,4 @@ +#pragma once + +#include "compute_stress.hpp" +#include "compute_wavefield.hpp" diff --git a/include/mesh/boundaries/absorbing_boundaries.hpp b/include/mesh/boundaries/absorbing_boundaries.hpp index 45f1abf0..4016d44e 100644 --- a/include/mesh/boundaries/absorbing_boundaries.hpp +++ b/include/mesh/boundaries/absorbing_boundaries.hpp @@ -34,18 +34,6 @@ struct absorbing_boundary { absorbing_boundary(const int num_abs_boundaries_faces); - /** - * @brief Constructor to read and assign values from fortran binary database - * file - * - * @param stream Stream object for fortran binary file buffered to absorbing - * boundary section - * @param num_abs_boundary_faces Number of absorbing boundary faces - * @param nspec Number of spectral elements - * @param mpi Pointer to MPI object - */ - absorbing_boundary(std::ifstream &stream, int num_abs_boundary_faces, - const int nspec, const specfem::MPI::MPI *mpi); ///@} }; } // namespace mesh diff --git a/include/mesh/boundaries/acoustic_free_surface.hpp b/include/mesh/boundaries/acoustic_free_surface.hpp index bc52ad32..e79184dd 100644 --- a/include/mesh/boundaries/acoustic_free_surface.hpp +++ b/include/mesh/boundaries/acoustic_free_surface.hpp @@ -22,20 +22,7 @@ struct acoustic_free_surface { acoustic_free_surface(){}; acoustic_free_surface(const int nelem_acoustic_surface); - /** - * @brief Constructor to read and assign values from fortran binary database - * file - * - * @param stream Stream object for fortran binary file buffered to absorbing - * boundary section - * @param nelem_acoustic_surface Number of absorbing boundary faces - * @param knods Spectral element node connectivity - * @param mpi Pointer to MPI object - */ - acoustic_free_surface(std::ifstream &stream, - const int &nelem_acoustic_surface, - const Kokkos::View knods, - const specfem::MPI::MPI *mpi); + ///@} int nelem_acoustic_surface; ///< Number of elements on the acoustic free diff --git a/include/mesh/boundaries/boundaries.hpp b/include/mesh/boundaries/boundaries.hpp index 6375f2a8..245d4f5e 100644 --- a/include/mesh/boundaries/boundaries.hpp +++ b/include/mesh/boundaries/boundaries.hpp @@ -36,30 +36,12 @@ struct boundaries { * @param forcing_boundary forcing boundary */ boundaries(const specfem::mesh::absorbing_boundary &absorbing_boundary, - const specfem::mesh::acoustic_free_surface &acoustic_free_surface) + const specfem::mesh::acoustic_free_surface &acoustic_free_surface, + const specfem::mesh::forcing_boundary &forcing_boundary) : absorbing_boundary(absorbing_boundary), - acoustic_free_surface(acoustic_free_surface) {} + acoustic_free_surface(acoustic_free_surface), + forcing_boundary(forcing_boundary) {} - /** - * @brief Constructor to read and assign values from fortran binary database - * file - * - * @param stream Stream object for fortran binary file buffered to absorbing - * boundary section - * @param nspec Number of spectral elements - * @param n_absorbing Number of absorbing boundary faces - * @param n_acoustic_surface Number of acoustic free surface boundary faces - * @param n_acforcing Number of acoustic forcing boundary faces - * @param knods Spectral element control nodes - * @param mpi Pointer to MPI object - */ - boundaries(std::ifstream &stream, const int nspec, const int n_absorbing, - const int n_acoustic_surface, const int n_acforcing, - const Kokkos::View knods, - const specfem::MPI::MPI *mpi) - : absorbing_boundary(stream, n_absorbing, nspec, mpi), - forcing_boundary(stream, n_acoustic_surface, nspec, mpi), - acoustic_free_surface(stream, n_acforcing, knods, mpi){}; ///@} }; } // namespace mesh diff --git a/include/mesh/coupled_interfaces/coupled_interfaces.hpp b/include/mesh/coupled_interfaces/coupled_interfaces.hpp index 38648ecf..6087b3cb 100644 --- a/include/mesh/coupled_interfaces/coupled_interfaces.hpp +++ b/include/mesh/coupled_interfaces/coupled_interfaces.hpp @@ -25,25 +25,22 @@ struct coupled_interfaces { */ coupled_interfaces() : elastic_acoustic(), acoustic_poroelastic(), elastic_poroelastic(){}; - /** - * @brief Constructor to read and assign values from fortran binary database - * file - * - * @param stream Stream object for fortran binary file buffered to coupled - * interfaces section - * @param num_interfaces_elastic_acoustic Number of elastic-acoustic - * interfaces - * @param num_interfaces_acoustic_poroelastic Number of acoustic-poroelastic - * interfaces - * @param num_interfaces_elastic_poroelastic Number of elastic-poroelastic - * interfaces - * @param mpi Pointer to MPI object - */ - coupled_interfaces(std::ifstream &stream, - const int num_interfaces_elastic_acoustic, - const int num_interfaces_acoustic_poroelastic, - const int num_interfaces_elastic_poroelastic, - const specfem::MPI::MPI *mpi); + + coupled_interfaces( + specfem::mesh::interface_container + elastic_acoustic, + specfem::mesh::interface_container< + specfem::element::medium_tag::acoustic, + specfem::element::medium_tag::poroelastic> + acoustic_poroelastic, + specfem::mesh::interface_container< + specfem::element::medium_tag::elastic, + specfem::element::medium_tag::poroelastic> + elastic_poroelastic) + : elastic_acoustic(elastic_acoustic), + acoustic_poroelastic(acoustic_poroelastic), + elastic_poroelastic(elastic_poroelastic){}; ///@} /** diff --git a/include/mesh/coupled_interfaces/interface_container.hpp b/include/mesh/coupled_interfaces/interface_container.hpp index c43093d6..b65af353 100644 --- a/include/mesh/coupled_interfaces/interface_container.hpp +++ b/include/mesh/coupled_interfaces/interface_container.hpp @@ -29,17 +29,8 @@ struct interface_container { */ interface_container(){}; - /** - * @brief Constructor to read and assign values from fortran binary database - * file - * - * @param num_interfaces Number of interfaces - * @param stream Stream object for fortran binary file buffered to coupled - * interfaces section - * @param mpi Pointer to MPI object - */ - interface_container(const int num_interfaces, std::ifstream &stream, - const specfem::MPI::MPI *mpi); + interface_container(const int num_interfaces); + ///@} int num_interfaces = 0; ///< Number of edges within this interface diff --git a/include/mesh/coupled_interfaces/interface_container.tpp b/include/mesh/coupled_interfaces/interface_container.tpp index c46d773f..3b9215bc 100644 --- a/include/mesh/coupled_interfaces/interface_container.tpp +++ b/include/mesh/coupled_interfaces/interface_container.tpp @@ -9,25 +9,10 @@ template specfem::mesh::interface_container< - medium1, medium2>::interface_container(const int num_interfaces, - std::ifstream &stream, - const specfem::MPI::MPI *mpi) + medium1, medium2>::interface_container(const int num_interfaces) : num_interfaces(num_interfaces), medium1_index_mapping("medium1_index_mapping", num_interfaces), medium2_index_mapping("medium2_index_mapping", num_interfaces) { - - if (!num_interfaces) - return; - - int medium1_ispec_l, medium2_ispec_l; - - for (int i = 0; i < num_interfaces; i++) { - specfem::IO::fortran_read_line(stream, &medium2_ispec_l, - &medium1_ispec_l); - medium1_index_mapping(i) = medium1_ispec_l - 1; - medium2_index_mapping(i) = medium2_ispec_l - 1; - } - return; } diff --git a/include/mesh/elements/tangential_elements.hpp b/include/mesh/elements/tangential_elements.hpp index a3d5edc2..d46fa252 100644 --- a/include/mesh/elements/tangential_elements.hpp +++ b/include/mesh/elements/tangential_elements.hpp @@ -18,7 +18,6 @@ struct tangential_elements { specfem::kokkos::HostView1d x, y; tangential_elements(){}; tangential_elements(const int nnodes_tangential_curve); - tangential_elements(std::ifstream &stream, const int nnodes_tangential_curve); }; } // namespace elements } // namespace mesh diff --git a/include/mesh/materials/materials.hpp b/include/mesh/materials/materials.hpp index e3911f32..87995ef7 100644 --- a/include/mesh/materials/materials.hpp +++ b/include/mesh/materials/materials.hpp @@ -78,21 +78,11 @@ struct materials { * @param nspec Number of spectral elements * @param ngnod Number of control nodes per spectral element */ - materials(const int nspec, const int ngnod); - /** - * @brief Constructor used to allocate and assign views from fortran database - * file - * - * @param stream Stream object for fortran binary file buffered to material - * definition section - * @param ngnod Number of control nodes per spectral element - * @param nspec Number of spectral elements - * @param numat Total number of different materials - * @param mpi Pointer to a MPI object - */ - materials(std::ifstream &stream, const int numat, const int nspec, - const specfem::kokkos::HostView2d knods, - const specfem::MPI::MPI *mpi); + materials(const int nspec, const int numat) + : n_materials(numat), + material_index_mapping("specfem::mesh::material_index_mapping", + nspec){}; + ///@} /** diff --git a/include/mesh/mesh.hpp b/include/mesh/mesh.hpp index f849ca94..515760a8 100644 --- a/include/mesh/mesh.hpp +++ b/include/mesh/mesh.hpp @@ -58,13 +58,19 @@ struct mesh { */ mesh(){}; - /** - * @brief Construct mesh from a fortran binary database file - * - * @param filename Fortran binary database filename - * @param mpi pointer to MPI object to manage communication - */ - mesh(const std::string filename, const specfem::MPI::MPI *mpi); + mesh(const int npgeo, const int nspec, const int nproc, + const specfem::mesh::control_nodes &control_nodes, + const specfem::mesh::properties ¶meters, + const specfem::mesh::coupled_interfaces &coupled_interfaces, + const specfem::mesh::boundaries &boundaries, + const specfem::mesh::tags &tags, + const specfem::mesh::elements::tangential_elements &tangential_nodes, + const specfem::mesh::elements::axial_elements &axial_nodes, + const specfem::mesh::materials &materials) + : npgeo(npgeo), nspec(nspec), nproc(nproc), control_nodes(control_nodes), + parameters(parameters), coupled_interfaces(coupled_interfaces), + boundaries(boundaries), tags(tags), tangential_nodes(tangential_nodes), + axial_nodes(axial_nodes), materials(materials){}; ///@} std::string print() const; diff --git a/include/mesh/properties/properties.hpp b/include/mesh/properties/properties.hpp index b5c63b3e..5c2724da 100644 --- a/include/mesh/properties/properties.hpp +++ b/include/mesh/properties/properties.hpp @@ -33,14 +33,40 @@ struct properties { * */ properties(){}; + /** - * Constructor to read and assign values from fortran binary database file + * @brief Construct a properties object * - * @param stream Stream object for fortran binary file buffered to properties - * section - * @param mpi Pointer to MPI object + * @param numat Total number of materials + * @param ngnod Total number of control nodes + * @param nspec Total number of spectral elements + * @param pointsdisp Total number of points to display + * @param nelemabs Number of elements on absorbing boundary + * @param nelem_acforcing Number of elements on acoustic forcing boundary + * @param nelem_acoustic_surface Number of elements on acoustic surface + * @param num_fluid_solid_edges Number of solid-fluid edges + * @param num_fluid_poro_edges Number of fluid-poroelastic edges + * @param num_solid_poro_edges Number of solid-poroelastic edges + * @param nnodes_tangential_curve Number of elements on tangential curve + * @param nelem_on_the_axis Number of axial elements + * @param plot_lowerleft_corner_only Flag to plot only lower left corner */ - properties(std::ifstream &stream, const specfem::MPI::MPI *mpi); + + properties(const int numat, const int ngnod, const int nspec, + const int pointsdisp, const int nelemabs, + const int nelem_acforcing, const int nelem_acoustic_surface, + const int num_fluid_solid_edges, const int num_fluid_poro_edges, + const int num_solid_poro_edges, const int nnodes_tangential_curve, + const int nelem_on_the_axis, const bool plot_lowerleft_corner_only) + : numat(numat), ngnod(ngnod), nspec(nspec), pointsdisp(pointsdisp), + nelemabs(nelemabs), nelem_acforcing(nelem_acforcing), + nelem_acoustic_surface(nelem_acoustic_surface), + num_fluid_solid_edges(num_fluid_solid_edges), + num_fluid_poro_edges(num_fluid_poro_edges), + num_solid_poro_edges(num_solid_poro_edges), + nnodes_tangential_curve(nnodes_tangential_curve), + nelem_on_the_axis(nelem_on_the_axis), + plot_lowerleft_corner_only(plot_lowerleft_corner_only){}; }; } // namespace mesh } // namespace specfem diff --git a/include/parameter_parser/setup.hpp b/include/parameter_parser/setup.hpp index 678ee67f..6d7dd855 100644 --- a/include/parameter_parser/setup.hpp +++ b/include/parameter_parser/setup.hpp @@ -11,6 +11,7 @@ #include "specfem_setup.hpp" #include "time_scheme/interface.hpp" #include "writer/kernel.hpp" +#include "writer/plot_wavefield.hpp" #include "writer/seismogram.hpp" #include "writer/wavefield.hpp" #include "yaml-cpp/yaml.h" @@ -74,8 +75,8 @@ class setup { /** * @brief Log the header and description of the simulation */ - std::string print_header( - const std::chrono::time_point now); + std::string + print_header(const std::chrono::time_point now); /** * @brief Get delta time value @@ -159,6 +160,15 @@ class setup { } } + std::shared_ptr instantiate_wavefield_plotter( + const specfem::compute::assembly &assembly) const { + if (this->plot_wavefield) { + return this->plot_wavefield->instantiate_wavefield_plotter(assembly); + } else { + return nullptr; + } + } + std::shared_ptr instantiate_kernel_writer(const specfem::compute::assembly &assembly) const { if (this->kernel) { @@ -176,8 +186,11 @@ class setup { std::shared_ptr instantiate_solver( const type_real dt, const specfem::compute::assembly &assembly, std::shared_ptr time_scheme, - const qp_type &quadrature) const { - return this->solver->instantiate(dt, assembly, time_scheme, quadrature); + const qp_type &quadrature, + const std::vector > &plotters) + const { + return this->solver->instantiate(dt, assembly, time_scheme, quadrature, + plotters); } int get_nsteps() const { return this->time_scheme->get_nsteps(); } @@ -203,6 +216,9 @@ class setup { std::unique_ptr wavefield; ///< Pointer to ///< wavefield object + std::unique_ptr + plot_wavefield; ///< Pointer to + ///< plot_wavefield object std::unique_ptr kernel; std::unique_ptr databases; ///< Get database filenames diff --git a/include/parameter_parser/solver/solver.hpp b/include/parameter_parser/solver/solver.hpp index 8840a1cd..8d5d47f2 100644 --- a/include/parameter_parser/solver/solver.hpp +++ b/include/parameter_parser/solver/solver.hpp @@ -2,6 +2,7 @@ #define _SPECFEM_RUNTIME_CONFIGURATION_SOLVER_SOLVER_HPP_ #include "compute/interface.hpp" +#include "plotter/plotter.hpp" #include "solver/solver.hpp" #include "timescheme/newmark.hpp" #include @@ -46,7 +47,9 @@ class solver { std::shared_ptr instantiate(const type_real dt, const specfem::compute::assembly &assembly, std::shared_ptr time_scheme, - const qp_type &quadrature) const; + const qp_type &quadrature, + const std::vector > + &plotters) const; /** * @brief Get the type of the simulation (forward or combined) @@ -64,7 +67,8 @@ class solver { } private: - std::string simulation_type; ///< Type of the simulation (forward or combined) + std::string simulation_type; ///< Type of the simulation (forward or + ///< combined) }; } // namespace solver } // namespace runtime_configuration diff --git a/include/parameter_parser/solver/solver.tpp b/include/parameter_parser/solver/solver.tpp index 776e1a75..ce04cd2c 100644 --- a/include/parameter_parser/solver/solver.tpp +++ b/include/parameter_parser/solver/solver.tpp @@ -13,31 +13,31 @@ std::shared_ptr specfem::runtime_configuration::solver::solver::instantiate(const type_real dt, const specfem::compute::assembly &assembly, std::shared_ptr time_scheme, - const qp_type &quadrature) const { + const qp_type &quadrature, const std::vector > &plotters) const { if (this->simulation_type == "forward") { std::cout << "Instantiating Kernels \n"; std::cout << "-------------------------------\n"; - const auto kernels = specfem::kernels::kernels( dt, assembly, quadrature); return std::make_shared< specfem::solver::time_marching>( - kernels, time_scheme); + kernels, time_scheme, plotters); } else if (this->simulation_type == "combined") { std::cout << "Instantiating Kernels \n"; std::cout << "-------------------------------\n"; - const auto adjoint_kernels = specfem::kernels::kernels(dt, assembly, quadrature); - const auto backward_kernels = specfem::kernels::kernels(dt, assembly, quadrature); return std::make_shared< specfem::solver::time_marching>( - assembly, adjoint_kernels, backward_kernels, time_scheme); + assembly, adjoint_kernels, backward_kernels, time_scheme, plotters); } else { throw std::runtime_error("Simulation type not recognized"); } diff --git a/include/parameter_parser/writer/plot_wavefield.hpp b/include/parameter_parser/writer/plot_wavefield.hpp new file mode 100644 index 00000000..46027611 --- /dev/null +++ b/include/parameter_parser/writer/plot_wavefield.hpp @@ -0,0 +1,64 @@ +#pragma once + +#include "compute/assembly/assembly.hpp" +#include "enumerations/display.hpp" +#include "plotter/plotter.hpp" +#include "yaml-cpp/yaml.h" +#include + +namespace specfem { +namespace runtime_configuration { +/** + * @brief Runtime configuration class for instantiating wavefield plotter + * + */ +class plot_wavefield { + +public: + /** + * @name Constructors + * + */ + ///@{ + /** + * @brief Construct a new plotter configuration object + * + * @param output_format output format for the resulting plot (PNG, JPG) + * @param output_folder path to the folder where the plot will be stored + * @param wavefield_type type of wavefield to plot (displacement, velocity, + * acceleration) + */ + plot_wavefield(const std::string output_format, + const std::string output_folder, const std::string component, + const std::string wavefield_type, const int time_interval) + : output_format(output_format), output_folder(output_folder), + component(component), wavefield_type(wavefield_type), + time_interval(time_interval) {} + + /** + * @brief Construct a new plotter configuration object from YAML node + * + * @param Node YAML node describing the plotter configuration + */ + plot_wavefield(const YAML::Node &Node); + ///@} + + /** + * @brief Instantiate a wavefield plotter object + * + * @param assembly SPECFEM++ assembly object + * @return std::shared_ptr Pointer to an instantiated + * plotter object + */ + std::shared_ptr instantiate_wavefield_plotter( + const specfem::compute::assembly &assembly) const; + +private: + std::string output_format; ///< format of output file + std::string output_folder; ///< Path to output folder + std::string component; ///< Component of the wavefield to plot + std::string wavefield_type; ///< Type of wavefield to plot + int time_interval; ///< Time interval for plotting +}; +} // namespace runtime_configuration +} // namespace specfem diff --git a/include/parameter_parser/writer/wavefield.hpp b/include/parameter_parser/writer/wavefield.hpp index a29474ee..5884a359 100644 --- a/include/parameter_parser/writer/wavefield.hpp +++ b/include/parameter_parser/writer/wavefield.hpp @@ -8,19 +8,57 @@ namespace specfem { namespace runtime_configuration { + +/** + * @brief Wavefield configuration class is used to instantiate wavefield writers + * + */ class wavefield { public: + /** + * @name Constructors + * + */ + ///@{ + /** + * @brief Construct a new wavefield configuration object + * + * @param output_format Output wavefield file format + * @param output_folder Path to folder location where wavefield will be stored + * @param type Type of simulation (forward or adjoint) + */ wavefield(const std::string output_format, const std::string output_folder, const specfem::simulation::type type) : output_format(output_format), output_folder(output_folder), simulation_type(type) {} + /** + * @brief Construct a new wavefield configuration object from YAML node + * + * @param Node YAML node describing the wavefield writer + * @param type Type of simulation (forward or adjoint) + */ wavefield(const YAML::Node &Node, const specfem::simulation::type type); + ///@} + /** + * @brief Instantiate a wavefield writer object + * + * @param assembly SPECFEM++ assembly object + * @return std::shared_ptr Pointer to an instantiated + * writer object + */ std::shared_ptr instantiate_wavefield_writer( const specfem::compute::assembly &assembly) const; + /** + * @brief Instantiate a wavefield reader object + * + * @param assembly SPECFEM++ assembly object + * @return std::shared_ptr Pointer to an instantiated + * reader object + */ std::shared_ptr instantiate_wavefield_reader( const specfem::compute::assembly &assembly) const; diff --git a/include/plotter/plot_wavefield.hpp b/include/plotter/plot_wavefield.hpp new file mode 100644 index 00000000..2aaa9c1b --- /dev/null +++ b/include/plotter/plot_wavefield.hpp @@ -0,0 +1,64 @@ +#pragma once + +#include "compute/assembly/assembly.hpp" +#include "enumerations/display.hpp" +#include "enumerations/wavefield.hpp" +#include "plotter.hpp" +#include +#ifdef NO_VTK +#include +#endif + +namespace specfem { +namespace plotter { +/** + * @brief Writer to plot the wavefield + */ +class plot_wavefield : public plotter { +public: + /** + * @brief Construct a new plotter object + * + * @param assembly SPECFFEM++ assembly object + * @param output_format Output format of the plot (PNG, JPG, etc.) + * @param component Component of the wavefield to plot (displacement, + * velocity, etc.) + * @param wavefield Type of wavefield to plot (forward, adjoint, etc.) + * @param time_interval Time interval between subsequent plots + * @param output_folder Path to output folder where plots will be stored + */ + plot_wavefield(const specfem::compute::assembly &assembly, + const specfem::display::format &output_format, + const specfem::display::wavefield &component, + const specfem::wavefield::simulation_field &wavefield, + const int &time_interval, + const boost::filesystem::path &output_folder) + : plotter(time_interval), output_format(output_format), + component(component), output_folder(output_folder), + wavefield(wavefield), assembly(assembly) { +#ifdef NO_VTK + std::ostringstream message; + message << "Display section is not enabled, since SPECFEM++ was built " + "without VTK\n" + << "Please install VTK and rebuild SPECFEM++ with " + "-DVTK_DIR=/path/to/vtk"; + throw std::runtime_error(message.str()); +#endif + } + + /** + * @brief Plot the wavefield + * + */ + void plot() override; + +private: + const specfem::display::format output_format; ///< Output format of the plot + const specfem::display::wavefield component; ///< Component of the wavefield + const specfem::wavefield::simulation_field wavefield; ///< Type of wavefield + ///< to plot + const boost::filesystem::path output_folder; ///< Path to output folder + specfem::compute::assembly assembly; ///< Assembly object +}; +} // namespace plotter +} // namespace specfem diff --git a/include/plotter/plotter.hpp b/include/plotter/plotter.hpp new file mode 100644 index 00000000..80dd6e85 --- /dev/null +++ b/include/plotter/plotter.hpp @@ -0,0 +1,45 @@ +#pragma once + +namespace specfem { +namespace plotter { +/** + * @brief Base writer class + * + */ +class plotter { +public: + /** + * @brief Construct a new plotter object + * + * @param time_interval Time interval between subsequent plots + */ + plotter(const int time_interval) : time_interval(time_interval){}; + + /** + * @brief Method to plot the data + * + */ + virtual void plot(){}; + + /** + * @brief Returns true if the data should be plotted at the current + * timestep. Updates the internal timestep counter + * + * @param istep Current timestep + * @return true if the data should be plotted at the current timestep + */ + bool should_plot(const int istep) { + if (istep % time_interval == 0) { + this->m_istep = istep; + return true; + } + return false; + } + +protected: + int time_interval; + int m_istep; +}; + +} // namespace plotter +} // namespace specfem diff --git a/include/point/field.hpp b/include/point/field.hpp index e009fe06..e8d548be 100644 --- a/include/point/field.hpp +++ b/include/point/field.hpp @@ -159,6 +159,42 @@ struct ImplFieldTraits : public Displacement, "Acceleration and mass matrix are not stored"); } + KOKKOS_FUNCTION typename ViewType::value_type & + operator()(const int i, std::true_type, std::false_type, std::false_type, + std::false_type) { + return this->displacement(i); + } + + KOKKOS_FUNCTION typename ViewType::value_type & + operator()(const int i, std::false_type, std::true_type, std::false_type, + std::false_type) { + return this->velocity(i); + } + + KOKKOS_FUNCTION typename ViewType::value_type & + operator()(const int i, std::false_type, std::false_type, std::true_type, + std::false_type) { + return this->acceleration(i); + } + + KOKKOS_FUNCTION const typename ViewType::value_type & + operator()(const int i, std::true_type, std::false_type, std::false_type, + std::false_type) const { + return this->displacement(i); + } + + KOKKOS_FUNCTION const typename ViewType::value_type & + operator()(const int i, std::false_type, std::true_type, std::false_type, + std::false_type) const { + return this->velocity(i); + } + + KOKKOS_FUNCTION const typename ViewType::value_type & + operator()(const int i, std::false_type, std::false_type, std::true_type, + std::false_type) const { + return this->acceleration(i); + } + public: KOKKOS_FUNCTION ImplFieldTraits() = default; @@ -187,6 +223,21 @@ struct ImplFieldTraits : public Displacement, std::integral_constant{}, std::integral_constant{}) {} + KOKKOS_FUNCTION typename ViewType::value_type &operator()(const int i) { + return operator()(i, std::integral_constant{}, + std::integral_constant{}, + std::integral_constant{}, + std::integral_constant{}); + } + + KOKKOS_FUNCTION const typename ViewType::value_type & + operator()(const int i) const { + return operator()(i, std::integral_constant{}, + std::integral_constant{}, + std::integral_constant{}, + std::integral_constant{}); + } + /** * @brief Divide acceleration by mass matrix * @@ -207,16 +258,17 @@ template struct FieldTraits - : public ImplFieldTraits< - specfem::datatype::ScalarPointViewType< - type_real, - specfem::medium::medium::components, - UseSIMD>, - StoreDisplacement, StoreVelocity, StoreAcceleration, - StoreMassMatrix> { + : public ImplFieldTraits::components(), + UseSIMD>, + StoreDisplacement, StoreVelocity, + StoreAcceleration, StoreMassMatrix> { using ViewType = specfem::datatype::ScalarPointViewType< - type_real, specfem::medium::medium::components, + type_real, + specfem::element::attributes::components(), UseSIMD>; public: diff --git a/include/point/field_derivatives.hpp b/include/point/field_derivatives.hpp index f1678f14..fdc96004 100644 --- a/include/point/field_derivatives.hpp +++ b/include/point/field_derivatives.hpp @@ -29,11 +29,13 @@ struct field_derivatives { * */ ///@{ + constexpr static bool is_point_field_derivatives = true; static constexpr int components = - specfem::medium::medium::components; - - static constexpr int dimension = - specfem::dimension::dimension::dim; + specfem::element::attributes::components(); + constexpr static auto medium_tag = MediumTag; ///< Medium tag for the element + constexpr static auto dimension = DimensionType; ///< Dimension of the element + constexpr static int num_dimensions = + specfem::element::attributes::dimension(); ///@} /** @@ -44,7 +46,8 @@ struct field_derivatives { using simd = specfem::datatype::simd; ///< SIMD type using ViewType = - specfem::datatype::VectorPointViewType; ///< Underlying view type ///< to store the field ///< derivatives diff --git a/include/point/properties.hpp b/include/point/properties.hpp index 8b0f8bcd..eee52175 100644 --- a/include/point/properties.hpp +++ b/include/point/properties.hpp @@ -35,6 +35,7 @@ struct properties; ///< SIMD type constexpr static auto dimension = specfem::dimension::type::dim2; constexpr static auto medium_tag = specfem::element::medium_tag::elastic; @@ -110,6 +111,7 @@ struct properties; ///< SIMD type constexpr static auto dimension = specfem::dimension::type::dim2; constexpr static auto medium_tag = specfem::element::medium_tag::acoustic; diff --git a/include/point/stress.hpp b/include/point/stress.hpp new file mode 100644 index 00000000..9b126564 --- /dev/null +++ b/include/point/stress.hpp @@ -0,0 +1,93 @@ +#pragma once + +#include "datatypes/point_view.hpp" +#include "enumerations/dimension.hpp" +#include "enumerations/medium.hpp" +#include + +namespace specfem { +namespace point { + +/** + * @brief Stress tensor at a quadrature point + * + * @tparam DimensionType Dimension of the element (2D or 3D) + * @tparam MediumTag Medium tag for the element + * @tparam UseSIMD Use SIMD instructions + */ +template +struct stress { + /** + * @name Compile time constants + * + */ + ///@{ + constexpr static int dimension = + specfem::element::attributes::dimension(); + constexpr static int components = + specfem::element::attributes::components(); + ///@} + + /** + * @name Typedefs + * + */ + ///@{ + using simd = specfem::datatype::simd; ///< SIMD type + + using ViewType = + specfem::datatype::VectorPointViewType; ///< Underlying view type + ///< to store the stress + ///< tensor + ///@} + + ViewType T; ///< View to store the stress tensor + + /** + * @name Constructors + * + */ + ///@{ + + /** + * @brief Default constructor + * + */ + KOKKOS_FUNCTION stress() = default; + + /** + * @brief Constructor + * + * @param T stress tensor + */ + KOKKOS_FUNCTION stress(const ViewType &T) : T(T) {} + ///@} + + /** + * @brief Compute the product of the stress tensor with spatial derivatives + * + * /f$ F_{ij} = \sum_{k=1}^{N} T_{ik} \partial_k xi_j /f$ + * + * @param partial_derivatives Spatial derivatives + * @return ViewType Result of the product + */ + KOKKOS_INLINE_FUNCTION + ViewType operator*(const specfem::point::partial_derivatives< + specfem::dimension::type::dim2, false, UseSIMD> + &partial_derivatives) const { + ViewType F; + + for (int icomponent = 0; icomponent < components; ++icomponent) { + F(0, icomponent) = T(0, icomponent) * partial_derivatives.xix + + T(1, icomponent) * partial_derivatives.xiz; + F(1, icomponent) = T(0, icomponent) * partial_derivatives.gammax + + T(1, icomponent) * partial_derivatives.gammaz; + } + + return F; + } +}; +} // namespace point +} // namespace specfem diff --git a/include/point/stress_integrand.hpp b/include/point/stress_integrand.hpp index c80b9a72..ea786e2e 100644 --- a/include/point/stress_integrand.hpp +++ b/include/point/stress_integrand.hpp @@ -35,9 +35,9 @@ struct stress_integrand { */ ///@{ constexpr static int dimension = - specfem::dimension::dimension::dim; + specfem::element::attributes::dimension(); constexpr static int components = - specfem::medium::medium::components; + specfem::element::attributes::components(); ///@} /** diff --git a/include/policies/range.hpp b/include/policies/range.hpp index 07b2c621..2cbaa0b7 100644 --- a/include/policies/range.hpp +++ b/include/policies/range.hpp @@ -37,6 +37,7 @@ template <> struct range_index_type { range_index_type(const specfem::point::simd_assembly_index index) : index(index) {} }; + } // namespace impl /** @@ -52,6 +53,7 @@ template <> struct range_index_type { * @tparam SIMD type to generate a SIMD index. */ template struct range { + private: int starting_index; ///< Starting index for the iterator range. int number_points; ///< Number of points in the iterator range. Equal to or @@ -60,12 +62,23 @@ template struct range { constexpr static bool using_simd = SIMD::using_simd; constexpr static int simd_size = SIMD::size(); + // --- SIMD + // Range constructor for simd execution KOKKOS_INLINE_FUNCTION range(const int starting_index, const int number_points, std::true_type) : starting_index(starting_index), number_points((number_points < simd_size) ? number_points : simd_size) { } + // range_index_type operator for simd execution + KOKKOS_INLINE_FUNCTION + impl::range_index_type operator()(const int i, std::true_type) const { + return impl::range_index_type( + specfem::point::simd_assembly_index{ starting_index, number_points }); + } + + // --- NON-SIMD + // Range constructor for non-simd execution KOKKOS_INLINE_FUNCTION range(const int starting_index, const int number_points, std::false_type) : starting_index(starting_index), number_points(number_points) {} @@ -76,12 +89,6 @@ template struct range { specfem::point::assembly_index{ starting_index }); } - KOKKOS_INLINE_FUNCTION - impl::range_index_type operator()(const int i, std::true_type) const { - return impl::range_index_type( - specfem::point::simd_assembly_index{ starting_index, number_points }); - } - public: /** * @name Type definitions diff --git a/include/reader/seismogram.hpp b/include/reader/seismogram.hpp index 5bef6f11..b4267588 100644 --- a/include/reader/seismogram.hpp +++ b/include/reader/seismogram.hpp @@ -15,6 +15,7 @@ namespace reader { class seismogram : public reader { public: + seismogram(){}; seismogram(const char *filename, const specfem::enums::seismogram::format type, specfem::kokkos::HostView2d source_time_function) diff --git a/include/reader/wavefield.hpp b/include/reader/wavefield.hpp index aff1ce6a..5edae080 100644 --- a/include/reader/wavefield.hpp +++ b/include/reader/wavefield.hpp @@ -30,7 +30,8 @@ template class wavefield : public reader { private: std::string output_folder; ///< Path to output folder - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::buffer> buffer; ///< Buffer wavefield to store the data specfem::compute::boundary_values boundary_values; ///< Boundary values used ///< for backward diff --git a/include/receiver/interface.hpp b/include/receiver/interface.hpp index 7c846f8e..7df8c490 100644 --- a/include/receiver/interface.hpp +++ b/include/receiver/interface.hpp @@ -1,7 +1,6 @@ #ifndef _RECEIVER_INTERFACE_HPP #define _RECEIVER_INTERFACE_HPP -#include "read_receiver.hpp" #include "receiver.hpp" #endif diff --git a/include/solver/time_marching.hpp b/include/solver/time_marching.hpp index 37dd90d4..3bf681b7 100644 --- a/include/solver/time_marching.hpp +++ b/include/solver/time_marching.hpp @@ -6,8 +6,10 @@ #include "enumerations/wavefield.hpp" #include "kernels/frechet_kernels.hpp" #include "kernels/kernels.hpp" +#include "plotter/plotter.hpp" #include "solver.hpp" #include "timescheme/newmark.hpp" +#include "timescheme/timescheme.hpp" namespace specfem { namespace solver { @@ -43,10 +45,12 @@ class time_marching * @param time_scheme Time scheme */ time_marching( - const specfem::kernels::kernels &kernels, - const std::shared_ptr time_scheme) - : kernels(kernels), time_scheme(time_scheme) {} + const specfem::kernels::kernels< + specfem::wavefield::simulation_field::forward, DimensionType, qp_type> + &kernels, + const std::shared_ptr time_scheme, + const std::vector > &plotters) + : kernels(kernels), time_scheme(time_scheme), plotters(plotters) {} ///@} @@ -56,11 +60,15 @@ class time_marching void run() override; private: - specfem::kernels::kernels kernels; ///< Computational kernels std::shared_ptr time_scheme; ///< Time ///< scheme + std::vector > + plotters; ///< Plotter + ///< objects }; /** @@ -86,27 +94,33 @@ class time_marching */ time_marching( const specfem::compute::assembly &assembly, - const specfem::kernels::kernels &adjoint_kernels, - const specfem::kernels::kernels &backward_kernels, - const std::shared_ptr time_scheme) + const specfem::kernels::kernels< + specfem::wavefield::simulation_field::adjoint, DimensionType, qp_type> + &adjoint_kernels, + const specfem::kernels::kernels< + specfem::wavefield::simulation_field::backward, DimensionType, + qp_type> &backward_kernels, + const std::shared_ptr time_scheme, + const std::vector > &plotters) : assembly(assembly), adjoint_kernels(adjoint_kernels), frechet_kernels(assembly), backward_kernels(backward_kernels), - time_scheme(time_scheme) {} + time_scheme(time_scheme), plotters(plotters) {} ///@} /** - * @brief Run the time marching solver + * @brief + * */ void run() override; private: constexpr static int NGLL = qp_type::NGLL; - specfem::kernels::kernels adjoint_kernels; ///< Adjoint computational kernels - specfem::kernels::kernels backward_kernels; ///< Backward computational kernels specfem::kernels::frechet_kernels @@ -114,6 +128,9 @@ class time_marching specfem::compute::assembly assembly; ///< Spectral element assembly object std::shared_ptr time_scheme; ///< Time ///< scheme + std::vector > + plotters; ///< Plotter + ///< objects }; } // namespace solver } // namespace specfem diff --git a/include/solver/time_marching.tpp b/include/solver/time_marching.tpp index 14600395..4bd938c8 100644 --- a/include/solver/time_marching.tpp +++ b/include/solver/time_marching.tpp @@ -33,6 +33,12 @@ void specfem::solver::time_marchingincrement_seismogram_step(); } + for (const auto &plotter : plotters) { + if (plotter && plotter->should_plot(istep)) { + plotter->plot(); + } + } + if (istep % 10 == 0) { std::cout << "Progress : executed " << istep << " steps of " << nstep << " steps" << std::endl; @@ -94,6 +100,12 @@ void specfem::solver::time_marchingincrement_seismogram_step(); } + for (const auto &plotter : plotters) { + if (plotter && plotter->should_plot(istep)) { + plotter->plot(); + } + } + if (istep % 10 == 0) { std::cout << "Progress : executed " << istep << " steps of " << nstep << " steps" << std::endl; diff --git a/include/source/adjoint_source.hpp b/include/source/adjoint_source.hpp index 148bad00..627457f8 100644 --- a/include/source/adjoint_source.hpp +++ b/include/source/adjoint_source.hpp @@ -24,8 +24,8 @@ class adjoint_source : public source { const specfem::compute::properties &properties, specfem::kokkos::HostView3d source_array) override; - specfem::wavefield::type get_wavefield_type() const override { - return specfem::wavefield::type::adjoint; + specfem::wavefield::simulation_field get_wavefield_type() const override { + return specfem::wavefield::simulation_field::adjoint; } std::string print() const override; diff --git a/include/source/external.hpp b/include/source/external.hpp index ad848c74..7e63e03c 100644 --- a/include/source/external.hpp +++ b/include/source/external.hpp @@ -15,7 +15,7 @@ class external : public source { external(){}; external(YAML::Node &Node, const int nsteps, const type_real dt, - const specfem::wavefield::type wavefield_type) + const specfem::wavefield::simulation_field wavefield_type) : wavefield_type(wavefield_type), specfem::sources::source(Node, nsteps, dt){}; @@ -25,14 +25,14 @@ class external : public source { const specfem::compute::properties &properties, specfem::kokkos::HostView3d source_array) override; - specfem::wavefield::type get_wavefield_type() const override { + specfem::wavefield::simulation_field get_wavefield_type() const override { return wavefield_type; } std::string print() const override; private: - specfem::wavefield::type wavefield_type; + specfem::wavefield::simulation_field wavefield_type; }; } // namespace sources } // namespace specfem diff --git a/include/source/force_source.hpp b/include/source/force_source.hpp index 628190b2..87491bc3 100644 --- a/include/source/force_source.hpp +++ b/include/source/force_source.hpp @@ -37,7 +37,7 @@ class force : public source { * frequecy of Dirac source. */ force(YAML::Node &Node, const int nsteps, const type_real dt, - const specfem::wavefield::type wavefield_type) + const specfem::wavefield::simulation_field wavefield_type) : angle([](YAML::Node &Node) -> type_real { if (Node["angle"]) { return Node["angle"].as(); @@ -59,14 +59,15 @@ class force : public source { const specfem::compute::properties &properties, specfem::kokkos::HostView3d source_array) override; - specfem::wavefield::type get_wavefield_type() const override { + specfem::wavefield::simulation_field get_wavefield_type() const override { return wavefield_type; } private: - type_real angle; ///< Angle of force source - specfem::wavefield::type wavefield_type; ///< Type of wavefield on which the - ///< source acts + type_real angle; ///< Angle of force source + specfem::wavefield::simulation_field wavefield_type; ///< Type of wavefield on + ///< which the source + ///< acts }; } // namespace sources } // namespace specfem diff --git a/include/source/interface.hpp b/include/source/interface.hpp index 61ac13cd..2e260510 100644 --- a/include/source/interface.hpp +++ b/include/source/interface.hpp @@ -5,7 +5,6 @@ #include "external.hpp" #include "force_source.hpp" #include "moment_tensor_source.hpp" -#include "read_sources.hpp" #include "source.hpp" #endif diff --git a/include/source/moment_tensor_source.hpp b/include/source/moment_tensor_source.hpp index a502865f..194695fd 100644 --- a/include/source/moment_tensor_source.hpp +++ b/include/source/moment_tensor_source.hpp @@ -37,7 +37,7 @@ class moment_tensor : public source { * written in .yml format */ moment_tensor(YAML::Node &Node, const int nsteps, const type_real dt, - const specfem::wavefield::type wavefield_type) + const specfem::wavefield::simulation_field wavefield_type) : Mxx(Node["Mxx"].as()), Mzz(Node["Mzz"].as()), Mxz(Node["Mxz"].as()), wavefield_type(wavefield_type), specfem::sources::source(Node, nsteps, @@ -54,16 +54,17 @@ class moment_tensor : public source { const specfem::compute::properties &properties, specfem::kokkos::HostView3d source_array) override; - specfem::wavefield::type get_wavefield_type() const override { + specfem::wavefield::simulation_field get_wavefield_type() const override { return wavefield_type; } private: - type_real Mxx; ///< Mxx for the source - type_real Mxz; ///< Mxz for the source - type_real Mzz; ///< Mzz for the source - specfem::wavefield::type wavefield_type; ///< Type of wavefield on which the - ///< source acts + type_real Mxx; ///< Mxx for the source + type_real Mxz; ///< Mxz for the source + type_real Mzz; ///< Mzz for the source + specfem::wavefield::simulation_field wavefield_type; ///< Type of wavefield on + ///< which the source + ///< acts }; } // namespace sources } // namespace specfem diff --git a/include/source/source.hpp b/include/source/source.hpp index 0514cdb5..412c596a 100644 --- a/include/source/source.hpp +++ b/include/source/source.hpp @@ -81,7 +81,7 @@ class source { t0, dt, nsteps, source_time_function); } - virtual specfem::wavefield::type get_wavefield_type() const = 0; + virtual specfem::wavefield::simulation_field get_wavefield_type() const = 0; protected: type_real x; ///< x-coordinate of source diff --git a/include/timescheme/newmark.hpp b/include/timescheme/newmark.hpp index e2ad5e07..d3a79b8b 100644 --- a/include/timescheme/newmark.hpp +++ b/include/timescheme/newmark.hpp @@ -23,15 +23,8 @@ template <> class newmark : public time_scheme { public: - using elastic_type = - specfem::medium::medium; - using acoustic_type = - specfem::medium::medium; - constexpr static auto simulation_type = - specfem::wavefield::type::forward; ///< Wavefield tag + specfem::wavefield::simulation_field::forward; ///< Wavefield tag /** * @name Constructors @@ -120,7 +113,8 @@ class newmark : public time_scheme { type_real deltat; ///< Time increment type_real deltatover2; type_real deltasquareover2; - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::forward> field; ///< forward wavefield }; @@ -134,14 +128,6 @@ class newmark : public time_scheme { public: constexpr static auto simulation_type = specfem::simulation::type::combined; ///< Wavefield tag - - using elastic_type = - specfem::medium::medium; - using acoustic_type = - specfem::medium::medium; - /** * @name Constructors */ @@ -230,9 +216,11 @@ class newmark : public time_scheme { type_real deltat; ///< Time increment type_real deltatover2; type_real deltasquareover2; - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::adjoint> adjoint_field; ///< adjoint wavefield - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::backward> backward_field; ///< backward wavefield }; diff --git a/include/timescheme/newmark.tpp b/include/timescheme/newmark.tpp index d39de309..13dd2e0b 100644 --- a/include/timescheme/newmark.tpp +++ b/include/timescheme/newmark.tpp @@ -6,22 +6,21 @@ #include "timescheme/newmark.hpp" namespace { -template +template void corrector_phase_impl( const specfem::compute::simulation_field &field, const type_real deltatover2) { constexpr int components = - specfem::medium::medium::components; - const int nglob = field.template get_nglob(); + specfem::element::attributes::components(); + const int nglob = field.template get_nglob(); constexpr bool using_simd = true; using LoadFieldType = - specfem::point::field; using AddFieldType = - specfem::point::field; using ParallelConfig = specfem::parallel_config::default_range_config< @@ -70,26 +69,26 @@ void corrector_phase_impl( return; } -template +template void predictor_phase_impl( const specfem::compute::simulation_field &field, const type_real deltat, const type_real deltatover2, const type_real deltasquareover2) { constexpr int components = - specfem::medium::medium::components; - const int nglob = field.template get_nglob(); + specfem::element::attributes::components(); + const int nglob = field.template get_nglob(); constexpr bool using_simd = true; using LoadFieldType = - specfem::point::field; using AddFieldType = - specfem::point::field; using StoreFieldType = - specfem::point::field; using ParallelConfig = specfem::parallel_config::default_range_config< @@ -198,7 +197,7 @@ void predictor_phase_impl( void specfem::time_scheme::newmark:: apply_corrector_phase_forward(const specfem::element::medium_tag tag) { - constexpr auto wavefield = specfem::wavefield::type::forward; + constexpr auto wavefield = specfem::wavefield::simulation_field::forward; constexpr auto elastic = specfem::element::medium_tag::elastic; constexpr auto acoustic = specfem::element::medium_tag::acoustic; @@ -216,7 +215,7 @@ void specfem::time_scheme::newmark:: void specfem::time_scheme::newmark:: apply_predictor_phase_forward(const specfem::element::medium_tag tag) { - constexpr auto wavefield = specfem::wavefield::type::forward; + constexpr auto wavefield = specfem::wavefield::simulation_field::forward; constexpr auto elastic = specfem::element::medium_tag::elastic; constexpr auto acoustic = specfem::element::medium_tag::acoustic; @@ -234,7 +233,7 @@ void specfem::time_scheme::newmark:: void specfem::time_scheme::newmark:: apply_corrector_phase_forward(const specfem::element::medium_tag tag) { - constexpr auto wavefield = specfem::wavefield::type::adjoint; + constexpr auto wavefield = specfem::wavefield::simulation_field::adjoint; constexpr auto elastic = specfem::element::medium_tag::elastic; constexpr auto acoustic = specfem::element::medium_tag::acoustic; @@ -251,7 +250,7 @@ void specfem::time_scheme::newmark:: void specfem::time_scheme::newmark:: apply_corrector_phase_backward(const specfem::element::medium_tag tag) { - constexpr auto wavefield = specfem::wavefield::type::backward; + constexpr auto wavefield = specfem::wavefield::simulation_field::backward; constexpr auto elastic = specfem::element::medium_tag::elastic; constexpr auto acoustic = specfem::element::medium_tag::acoustic; @@ -271,7 +270,7 @@ void specfem::time_scheme::newmark:: void specfem::time_scheme::newmark:: apply_predictor_phase_forward(const specfem::element::medium_tag tag) { - constexpr auto wavefield = specfem::wavefield::type::adjoint; + constexpr auto wavefield = specfem::wavefield::simulation_field::adjoint; constexpr auto elastic = specfem::element::medium_tag::elastic; constexpr auto acoustic = specfem::element::medium_tag::acoustic; @@ -289,7 +288,7 @@ void specfem::time_scheme::newmark:: void specfem::time_scheme::newmark:: apply_predictor_phase_backward(const specfem::element::medium_tag tag) { - constexpr auto wavefield = specfem::wavefield::type::backward; + constexpr auto wavefield = specfem::wavefield::simulation_field::backward; constexpr auto elastic = specfem::element::medium_tag::elastic; constexpr auto acoustic = specfem::element::medium_tag::acoustic; diff --git a/include/writer/kernel.hpp b/include/writer/kernel.hpp index c156c2b7..162c4b34 100644 --- a/include/writer/kernel.hpp +++ b/include/writer/kernel.hpp @@ -7,17 +7,38 @@ namespace specfem { namespace writer { +/** + * @brief Writer to output misfit kernel data to disk + * + * @tparam OutputLibrary Library to use for output (HDF5, ASCII, etc.) + */ template class kernel : public writer { public: + /** + * @name Constructors + * + */ + ///@{ + /** + * @brief Construct a writer object + * + * @param assembly SPECFEM++ assembly + * @param output_folder Path to output location (will be an .h5 file if using + * HDF5, and a folder if using ASCII) + */ kernel(const specfem::compute::assembly &assembly, const std::string output_folder); + /** + * @brief write the kernel data to disk + * + */ void write() override; private: - std::string output_folder; ///< Path to output folder - specfem::compute::mesh mesh; - specfem::compute::kernels kernels; + std::string output_folder; ///< Path to output folder + specfem::compute::mesh mesh; ///< Mesh object + specfem::compute::kernels kernels; ///< Kernels object }; } // namespace writer } // namespace specfem diff --git a/include/writer/plot_wavefield.hpp b/include/writer/plot_wavefield.hpp new file mode 100644 index 00000000..7324df9a --- /dev/null +++ b/include/writer/plot_wavefield.hpp @@ -0,0 +1,81 @@ +#pragma once + +#include "compute/assembly/assembly.hpp" +#include "enumerations/display.hpp" +#include "enumerations/wavefield.hpp" +#include "writer.hpp" +#include +#ifdef NO_VTK +#include +#endif + +namespace specfem { +namespace writer { +/** + * @brief Writer to plot the wavefield + */ +class plot_wavefield : public writer { +public: + /** + * @brief Construct a new plotter object + * + * @param assembly SPECFFEM++ assembly object + * @param output_format Output format of the plot (PNG, JPG, etc.) + * @param component Component of the wavefield to plot (displacement, + * velocity, etc.) + * @param wavefield Type of wavefield to plot (forward, adjoint, etc.) + * @param time_interval Time interval between subsequent plots + * @param output_folder Path to output folder where plots will be stored + */ + plot_wavefield(const specfem::compute::assembly &assembly, + const specfem::display::format &output_format, + const specfem::display::wavefield &component, + const specfem::wavefield::simulation_field &wavefield, + const int &time_interval, + const boost::filesystem::path &output_folder) + : output_format(output_format), component(component), + output_folder(output_folder), wavefield(wavefield), + time_interval(time_interval), assembly(assembly) { +#ifdef NO_VTK + std::ostringstream message; + message << "Display section is not enabled, since SPECFEM++ was built " + "without VTK\n" + << "Please install VTK and rebuild SPECFEM++ with " + "-DVTK_DIR=/path/to/vtk"; + throw std::runtime_error(message.str()); +#endif + } + + /** + * @brief Plot the wavefield + * + */ + void write() override; + + /** + * @brief Returns true if the wavefield should be plotted at the current + * timestep. Updates the internal timestep counter + * + * @param istep Current timestep + * @return true if the wavefield should be plotted at the current timestep + */ + bool compute_plotting(const int istep) { + if (istep % time_interval == 0) { + this->m_istep = istep; + return true; + } + return false; + } + +private: + const specfem::display::format output_format; ///< Output format of the plot + const specfem::display::wavefield component; ///< Component of the wavefield + const specfem::wavefield::simulation_field wavefield; ///< Type of wavefield + ///< to plot + const boost::filesystem::path output_folder; ///< Path to output folder + const int time_interval; ///< Time interval between plots + int m_istep = 0; ///< Current timestep + specfem::compute::assembly assembly; ///< Assembly object +}; +} // namespace writer +} // namespace specfem diff --git a/include/writer/wavefield.hpp b/include/writer/wavefield.hpp index d59562e8..27a39bc5 100644 --- a/include/writer/wavefield.hpp +++ b/include/writer/wavefield.hpp @@ -15,13 +15,6 @@ namespace writer { template class wavefield : public writer { public: - using elastic_type = - specfem::medium::medium; - using acoustic_type = - specfem::medium::medium; - /** * @name Constructors * @@ -47,7 +40,8 @@ template class wavefield : public writer { private: std::string output_folder; ///< Path to output folder - specfem::compute::simulation_field + specfem::compute::simulation_field< + specfem::wavefield::simulation_field::forward> forward; ///< Forward wavefield specfem::compute::boundary_values boundary_values; ///< Boundary values used ///< for backward diff --git a/meshfem2d/CMakeLists.txt b/meshfem2d/CMakeLists.txt index 92c14deb..7cbff08c 100644 --- a/meshfem2d/CMakeLists.txt +++ b/meshfem2d/CMakeLists.txt @@ -11,8 +11,46 @@ unset(WITH_SCOTCH) enable_language(Fortran) enable_language(C) +# Set the C compiler set(FCFLAGS_f90 -g -O2 -fbacktrace) +# Check if CFLAGS is defined +if (DEFINED ENV{CFLAGS}) + set(CFLAGS "$ENV{CFLAGS}") +endif() + +message("-- CFLAGS: ${CFLAGS}") + +# Check if MacOS +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(MACOSX TRUE) + message("-- macOS detected") +endif() + +# Check if Clang +if (CMAKE_C_COMPILER_ID MATCHES "Clang") + set(CLANG TRUE) + message("-- Detected usage of clang on macOS") +endif() + +# Fix for macos and clang include files... sometimes I hate mac. +if (MACOSX AND CLANG) + message("-- Fixing include files for macOS and Clang") + set (FCFLAGS_f90 "${FCFLAGS_f90}") + # In the future, we can use the following line to add the flags to the compiler + # add_compile_options($<$:-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk>) + # set (CFLAGS "${CFLAGS}) + # Right now we can use the following line to add the flags to the compiler + if (DEFINED CFLAGS) + set(CFLAGS "$ENV{CFLAGS} -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk") + else() + set(CFLAGS "-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk") + endif() +endif() + +message("-- CFLAGS: ${CFLAGS}") + + ## ========= MACROS ========= # define macro wrapper on custom command macro(build_fortran_command module_name dependecies) diff --git a/poetry.lock b/poetry.lock index cdaa792b..07ba7e73 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "alabaster" @@ -325,13 +325,13 @@ sphinx-basic-ng = ">=1.0.0.beta2" [[package]] name = "identify" -version = "2.6.1" +version = "2.6.2" description = "File identification library for Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "identify-2.6.1-py2.py3-none-any.whl", hash = "sha256:53863bcac7caf8d2ed85bd20312ea5dcfc22226800f6d6881f232d861db5a8f0"}, - {file = "identify-2.6.1.tar.gz", hash = "sha256:91478c5fb7c3aac5ff7bf9b4344f803843dc586832d5f110d672b19aa1984c98"}, + {file = "identify-2.6.2-py2.py3-none-any.whl", hash = "sha256:c097384259f49e372f4ea00a19719d95ae27dd5ff0fd77ad630aa891306b82f3"}, + {file = "identify-2.6.2.tar.gz", hash = "sha256:fab5c716c24d7a789775228823797296a2994b075fb6080ac83a102772a98cbd"}, ] [package.extras] @@ -497,13 +497,13 @@ files = [ [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -852,29 +852,29 @@ yaml = ["pyyaml (>=6.0.0)"] [[package]] name = "ruff" -version = "0.7.2" +version = "0.7.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.7.2-py3-none-linux_armv6l.whl", hash = "sha256:b73f873b5f52092e63ed540adefc3c36f1f803790ecf2590e1df8bf0a9f72cb8"}, - {file = "ruff-0.7.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5b813ef26db1015953daf476202585512afd6a6862a02cde63f3bafb53d0b2d4"}, - {file = "ruff-0.7.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:853277dbd9675810c6826dad7a428d52a11760744508340e66bf46f8be9701d9"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21aae53ab1490a52bf4e3bf520c10ce120987b047c494cacf4edad0ba0888da2"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ccc7e0fc6e0cb3168443eeadb6445285abaae75142ee22b2b72c27d790ab60ba"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd77877a4e43b3a98e5ef4715ba3862105e299af0c48942cc6d51ba3d97dc859"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:e00163fb897d35523c70d71a46fbaa43bf7bf9af0f4534c53ea5b96b2e03397b"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f3c54b538633482dc342e9b634d91168fe8cc56b30a4b4f99287f4e339103e88"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b792468e9804a204be221b14257566669d1db5c00d6bb335996e5cd7004ba80"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dba53ed84ac19ae4bfb4ea4bf0172550a2285fa27fbb13e3746f04c80f7fa088"}, - {file = "ruff-0.7.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b19fafe261bf741bca2764c14cbb4ee1819b67adb63ebc2db6401dcd652e3748"}, - {file = "ruff-0.7.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:28bd8220f4d8f79d590db9e2f6a0674f75ddbc3847277dd44ac1f8d30684b828"}, - {file = "ruff-0.7.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9fd67094e77efbea932e62b5d2483006154794040abb3a5072e659096415ae1e"}, - {file = "ruff-0.7.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:576305393998b7bd6c46018f8104ea3a9cb3fa7908c21d8580e3274a3b04b691"}, - {file = "ruff-0.7.2-py3-none-win32.whl", hash = "sha256:fa993cfc9f0ff11187e82de874dfc3611df80852540331bc85c75809c93253a8"}, - {file = "ruff-0.7.2-py3-none-win_amd64.whl", hash = "sha256:dd8800cbe0254e06b8fec585e97554047fb82c894973f7ff18558eee33d1cb88"}, - {file = "ruff-0.7.2-py3-none-win_arm64.whl", hash = "sha256:bb8368cd45bba3f57bb29cbb8d64b4a33f8415d0149d2655c5c8539452ce7760"}, - {file = "ruff-0.7.2.tar.gz", hash = "sha256:2b14e77293380e475b4e3a7a368e14549288ed2931fce259a6f99978669e844f"}, + {file = "ruff-0.7.4-py3-none-linux_armv6l.whl", hash = "sha256:a4919925e7684a3f18e18243cd6bea7cfb8e968a6eaa8437971f681b7ec51478"}, + {file = "ruff-0.7.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:cfb365c135b830778dda8c04fb7d4280ed0b984e1aec27f574445231e20d6c63"}, + {file = "ruff-0.7.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:63a569b36bc66fbadec5beaa539dd81e0527cb258b94e29e0531ce41bacc1f20"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d06218747d361d06fd2fdac734e7fa92df36df93035db3dc2ad7aa9852cb109"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e0cea28d0944f74ebc33e9f934238f15c758841f9f5edd180b5315c203293452"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80094ecd4793c68b2571b128f91754d60f692d64bc0d7272ec9197fdd09bf9ea"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:997512325c6620d1c4c2b15db49ef59543ef9cd0f4aa8065ec2ae5103cedc7e7"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00b4cf3a6b5fad6d1a66e7574d78956bbd09abfd6c8a997798f01f5da3d46a05"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7dbdc7d8274e1422722933d1edddfdc65b4336abf0b16dfcb9dedd6e6a517d06"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e92dfb5f00eaedb1501b2f906ccabfd67b2355bdf117fea9719fc99ac2145bc"}, + {file = "ruff-0.7.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3bd726099f277d735dc38900b6a8d6cf070f80828877941983a57bca1cd92172"}, + {file = "ruff-0.7.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:2e32829c429dd081ee5ba39aef436603e5b22335c3d3fff013cd585806a6486a"}, + {file = "ruff-0.7.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:662a63b4971807623f6f90c1fb664613f67cc182dc4d991471c23c541fee62dd"}, + {file = "ruff-0.7.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:876f5e09eaae3eb76814c1d3b68879891d6fde4824c015d48e7a7da4cf066a3a"}, + {file = "ruff-0.7.4-py3-none-win32.whl", hash = "sha256:75c53f54904be42dd52a548728a5b572344b50d9b2873d13a3f8c5e3b91f5cac"}, + {file = "ruff-0.7.4-py3-none-win_amd64.whl", hash = "sha256:745775c7b39f914238ed1f1b0bebed0b9155a17cd8bc0b08d3c87e4703b990d6"}, + {file = "ruff-0.7.4-py3-none-win_arm64.whl", hash = "sha256:11bff065102c3ae9d3ea4dc9ecdfe5a5171349cdd0787c1fc64761212fc9cf1f"}, + {file = "ruff-0.7.4.tar.gz", hash = "sha256:cd12e35031f5af6b9b93715d8c4f40360070b2041f81273d0527683d5708fce2"}, ] [[package]] @@ -1139,13 +1139,13 @@ pbr = ">=2.0.0" [[package]] name = "typer" -version = "0.12.5" +version = "0.13.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false python-versions = ">=3.7" files = [ - {file = "typer-0.12.5-py3-none-any.whl", hash = "sha256:62fe4e471711b147e3365034133904df3e235698399bc4de2b36c8579298d52b"}, - {file = "typer-0.12.5.tar.gz", hash = "sha256:f592f089bedcc8ec1b974125d64851029c3b1af145f04aca64d69410f0c9b722"}, + {file = "typer-0.13.0-py3-none-any.whl", hash = "sha256:d85fe0b777b2517cc99c8055ed735452f2659cd45e451507c76f48ce5c1d00e2"}, + {file = "typer-0.13.0.tar.gz", hash = "sha256:f1c7198347939361eec90139ffa0fd8b3df3a2259d5852a0f7400e476d95985c"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index a7a9ba34..bc66c15f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,9 @@ [tool.poetry] -name = "specfem2d_kokkos" +name = "SPECFEMPP" version = "0.1.0" description = "Kokkos implementation of SpecFEM2D code" authors = ["Your Name "] +package-mode = false [tool.poetry.dependencies] python = ">=3.12,<4.0" diff --git a/src/IO/mesh/impl/fortran/read_boundaries.cpp b/src/IO/mesh/impl/fortran/read_boundaries.cpp new file mode 100644 index 00000000..7d66911e --- /dev/null +++ b/src/IO/mesh/impl/fortran/read_boundaries.cpp @@ -0,0 +1,374 @@ +#include "IO/mesh/impl/fortran/read_boundaries.hpp" +#include "IO/fortranio/interface.hpp" +#include "mesh/boundaries/boundaries.hpp" +#include "specfem_mpi/interface.hpp" +#include "utilities/interface.hpp" +#include +#include + +static std::tuple< + specfem::kokkos::HostView1d, + specfem::kokkos::HostView1d > +find_corners(const specfem::kokkos::HostView1d ispec_edge, + const specfem::kokkos::HostView1d + type_edge) { + + int ncorner = 0; + int num_abs_boundary_faces = ispec_edge.extent(0); + for (int inum = 0; inum < num_abs_boundary_faces; inum++) { + if (type_edge(inum) == specfem::enums::boundaries::type::BOTTOM) { + for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; + inum_duplicate++) { + if (inum != inum_duplicate) { + if (ispec_edge(inum) == ispec_edge(inum_duplicate)) { + if (type_edge(inum) == specfem::enums::boundaries::type::LEFT) { + ncorner++; + } + if (type_edge(inum) == specfem::enums::boundaries::type::RIGHT) { + ncorner++; + } + } + } + } + if (type_edge(inum) == specfem::enums::boundaries::type::TOP) { + for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; + inum_duplicate++) { + if (inum != inum_duplicate) { + if (ispec_edge(inum) == ispec_edge(inum_duplicate)) { + if (type_edge(inum) == specfem::enums::boundaries::type::LEFT) { + ncorner++; + } + if (type_edge(inum) == specfem::enums::boundaries::type::RIGHT) { + ncorner++; + } + } + } + } + } + } + } + + specfem::kokkos::HostView1d ispec_corners( + "specfem:IO::mesh::impl::fortran::read_boundaries::find_corners::ispec_" + "corners", + ncorner); + + specfem::kokkos::HostView1d type_corners( + "specfem:IO::mesh::impl::fortran::read_boundaries::find_corners::type_" + "corners", + ncorner); + + int icorner = 0; + + for (int inum = 0; inum < num_abs_boundary_faces; inum++) { + if (type_edge(inum) == specfem::enums::boundaries::type::BOTTOM) { + for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; + inum_duplicate++) { + if (inum != inum_duplicate) { + if (ispec_edge(inum) == ispec_edge(inum_duplicate)) { + if (type_edge(inum) == specfem::enums::boundaries::type::LEFT) { + ispec_corners(icorner) = ispec_edge(inum); + type_corners(icorner) = + specfem::enums::boundaries::type::BOTTOM_LEFT; + icorner++; + } + if (type_edge(inum) == specfem::enums::boundaries::type::RIGHT) { + ispec_corners(icorner) = ispec_edge(inum); + type_corners(icorner) = + specfem::enums::boundaries::type::BOTTOM_RIGHT; + icorner++; + } + } + } + } + if (type_edge(inum) == specfem::enums::boundaries::type::TOP) { + for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; + inum_duplicate++) { + if (inum != inum_duplicate) { + if (ispec_edge(inum) == ispec_edge(inum_duplicate)) { + if (type_edge(inum) == specfem::enums::boundaries::type::LEFT) { + ispec_corners(icorner) = ispec_edge(inum); + type_corners(icorner) = + specfem::enums::boundaries::type::TOP_LEFT; + icorner++; + } + if (type_edge(inum) == specfem::enums::boundaries::type::RIGHT) { + ispec_corners(icorner) = ispec_edge(inum); + type_corners(icorner) = + specfem::enums::boundaries::type::TOP_RIGHT; + icorner++; + } + } + } + } + } + } + } + + return std::make_tuple(ispec_corners, type_corners); +} + +inline void calculate_ib(const specfem::kokkos::HostView2d code, + specfem::kokkos::HostView1d ib_bottom, + specfem::kokkos::HostView1d ib_top, + specfem::kokkos::HostView1d ib_left, + specfem::kokkos::HostView1d ib_right, + const int nelements) { + + int nspec_left = 0, nspec_right = 0, nspec_top = 0, nspec_bottom = 0; + for (int inum = 0; inum < nelements; inum++) { + if (code(inum, 0)) { + ib_bottom(inum) = nspec_bottom; + nspec_bottom++; + } else if (code(inum, 1)) { + ib_right(inum) = nspec_right; + nspec_right++; + } else if (code(inum, 2)) { + ib_top(inum) = nspec_top; + nspec_top++; + } else if (code(inum, 3)) { + ib_left(inum) = nspec_left; + nspec_left++; + } else { + throw std::runtime_error("Incorrect acoustic boundary element type read"); + } + } + + assert(nspec_left + nspec_right + nspec_bottom + nspec_top == nelements); +} + +specfem::mesh::absorbing_boundary +read_absorbing_boundaries(std::ifstream &stream, int num_abs_boundary_faces, + const int nspec, const specfem::MPI::MPI *mpi) { + + // Create base instance of the absorbing boundary + specfem::mesh::absorbing_boundary absorbing_boundary(num_abs_boundary_faces); + + // I have to do this because std::vector is a fake container type that + // causes issues when getting a reference + bool codeabsread1 = true, codeabsread2 = true, codeabsread3 = true, + codeabsread4 = true; + std::vector iedgeread(8, 0); + int numabsread, typeabsread; + if (num_abs_boundary_faces < 0) { + mpi->cout("Warning: read in negative nelemabs resetting to 0!"); + num_abs_boundary_faces = 0; + } + + specfem::kokkos::HostView1d type_edge( + "specfem::mesh::absorbing_boundary::type_edge", num_abs_boundary_faces); + + specfem::kokkos::HostView1d ispec_edge( + "specfem::mesh::absorbing_boundary::ispec_edge", num_abs_boundary_faces); + + if (num_abs_boundary_faces > 0) { + for (int inum = 0; inum < num_abs_boundary_faces; inum++) { + specfem::IO::fortran_read_line(stream, &numabsread, &codeabsread1, + &codeabsread2, &codeabsread3, + &codeabsread4, &typeabsread, &iedgeread); + if (numabsread < 1 || numabsread > nspec) + throw std::runtime_error("Wrong absorbing element number"); + ispec_edge(inum) = numabsread - 1; + std::vector codeabsread = { codeabsread1, codeabsread2, + codeabsread3, codeabsread4 }; + if (std::count(codeabsread.begin(), codeabsread.end(), true) != 1) { + throw std::runtime_error("must have one and only one absorbing edge " + "per absorbing line cited"); + } + if (codeabsread1) + type_edge(inum) = specfem::enums::boundaries::type::BOTTOM; + + if (codeabsread2) + type_edge(inum) = specfem::enums::boundaries::type::RIGHT; + + if (codeabsread3) + type_edge(inum) = specfem::enums::boundaries::type::TOP; + + if (codeabsread4) + type_edge(inum) = specfem::enums::boundaries::type::LEFT; + } + + // Find corner elements + auto [ispec_corners, type_corners] = find_corners(ispec_edge, type_edge); + + const int nelements = ispec_corners.extent(0) + ispec_edge.extent(0); + + absorbing_boundary.nelements = nelements; + + absorbing_boundary.index_mapping = Kokkos::View( + "specfem::mesh::absorbing_boundary::index_mapping", nelements); + + absorbing_boundary.type = + Kokkos::View( + "specfem::mesh::absorbing_boundary::type", nelements); + // Populate ispec and type arrays + + for (int inum = 0; inum < ispec_edge.extent(0); inum++) { + absorbing_boundary.index_mapping(inum) = ispec_edge(inum); + absorbing_boundary.type(inum) = type_edge(inum); + } + + for (int inum = 0; inum < ispec_corners.extent(0); inum++) { + absorbing_boundary.index_mapping(inum + ispec_edge.extent(0)) = + ispec_corners(inum); + absorbing_boundary.type(inum + ispec_edge.extent(0)) = type_corners(inum); + } + } else { + absorbing_boundary.nelements = 0; + } + + return absorbing_boundary; +} + +using view_type = + Kokkos::Subview, + std::remove_const_t, int>; + +/** + * @brief Get the type of boundary + * + * @param type int indicating if the boundary is edge of node + * @param e1 control node index for the starting node of the if the boundary is + * edge else control node index of the node if the boundary is node + * @param e2 control node index for the ending node of the if the boundary is + * edge + * @return specfem::enums::boundaries::type type of the boundary + */ +specfem::enums::boundaries::type +get_boundary_type(const int type, const int e1, const int e2, + const view_type &control_nodes) { + // if this is a node type + if (type == 1) { + if (e1 == control_nodes(0)) { + return specfem::enums::boundaries::type::BOTTOM_LEFT; + } else if (e1 == control_nodes(1)) { + return specfem::enums::boundaries::type::BOTTOM_RIGHT; + } else if (e1 == control_nodes(2)) { + return specfem::enums::boundaries::type::TOP_RIGHT; + } else if (e1 == control_nodes(3)) { + return specfem::enums::boundaries::type::TOP_LEFT; + } else { + throw std::invalid_argument( + "Error: Could not generate type of acoustic free surface boundary"); + } + } else { + if ((e1 == control_nodes(0) && e2 == control_nodes(1)) || + (e1 == control_nodes(1) && e2 == control_nodes(0))) { + return specfem::enums::boundaries::type::BOTTOM; + } else if ((e1 == control_nodes(0) && e2 == control_nodes(3)) || + (e1 == control_nodes(3) && e2 == control_nodes(0))) { + return specfem::enums::boundaries::type::LEFT; + } else if ((e1 == control_nodes(1) && e2 == control_nodes(2)) || + (e1 == control_nodes(2) && e2 == control_nodes(1))) { + return specfem::enums::boundaries::type::RIGHT; + } else if ((e1 == control_nodes(2) && e2 == control_nodes(3)) || + (e1 == control_nodes(3) && e2 == control_nodes(2))) { + return specfem::enums::boundaries::type::TOP; + } else { + throw std::invalid_argument( + "Error: Could not generate type of acoustic free surface boundary"); + } + } +} + +specfem::mesh::acoustic_free_surface +read_acoustic_free_surface(std::ifstream &stream, + const int &nelem_acoustic_surface, + const Kokkos::View knods, + const specfem::MPI::MPI *mpi) { + + std::vector acfree_edge(4, 0); + specfem::mesh::acoustic_free_surface acoustic_free_surface( + nelem_acoustic_surface); + + if (nelem_acoustic_surface > 0) { + for (int inum = 0; inum < nelem_acoustic_surface; inum++) { + specfem::IO::fortran_read_line(stream, &acfree_edge); + acoustic_free_surface.index_mapping(inum) = acfree_edge[0] - 1; + const auto control_nodes = Kokkos::subview( + knods, Kokkos::ALL, acoustic_free_surface.index_mapping(inum)); + acoustic_free_surface.type(inum) = + get_boundary_type(acfree_edge[1], acfree_edge[2] - 1, + acfree_edge[3] - 1, control_nodes); + } + } + + mpi->sync_all(); + + return acoustic_free_surface; +} + +specfem::mesh::forcing_boundary +read_forcing_boundaries(std::ifstream &stream, const int nelement_acforcing, + const int nspec, const specfem::MPI::MPI *mpi) { + + bool codeacread1 = true, codeacread2 = true, codeacread3 = true, + codeacread4 = true; + std::vector iedgeread(8, 0); + int numacread, typeacread; + + specfem::mesh::forcing_boundary forcing_boundary(nelement_acforcing); + + if (nelement_acforcing > 0) { + for (int inum = 0; inum < nelement_acforcing; inum++) { + specfem::IO::fortran_read_line(stream, &numacread, &codeacread1, + &codeacread2, &codeacread3, &codeacread4, + &typeacread, &iedgeread); + std::vector codeacread(4, false); + if (numacread < 1 || numacread > nspec) { + std::runtime_error("Wrong absorbing element number"); + } + forcing_boundary.numacforcing(inum) = numacread - 1; + forcing_boundary.typeacforcing(inum) = typeacread; + codeacread[0] = codeacread1; + codeacread[1] = codeacread2; + codeacread[2] = codeacread3; + codeacread[3] = codeacread4; + if (std::count(codeacread.begin(), codeacread.end(), true) != 1) { + throw std::runtime_error("must have one and only one acoustic forcing " + "per acoustic forcing line cited"); + } + forcing_boundary.codeacforcing(inum, 0) = codeacread[0]; + forcing_boundary.codeacforcing(inum, 1) = codeacread[1]; + forcing_boundary.codeacforcing(inum, 2) = codeacread[2]; + forcing_boundary.codeacforcing(inum, 3) = codeacread[3]; + forcing_boundary.ibegin_edge1(inum) = iedgeread[0]; + forcing_boundary.iend_edge1(inum) = iedgeread[1]; + forcing_boundary.ibegin_edge2(inum) = iedgeread[2]; + forcing_boundary.iend_edge2(inum) = iedgeread[3]; + forcing_boundary.ibegin_edge3(inum) = iedgeread[4]; + forcing_boundary.iend_edge3(inum) = iedgeread[5]; + forcing_boundary.ibegin_edge4(inum) = iedgeread[6]; + forcing_boundary.iend_edge4(inum) = iedgeread[7]; + } + } + + // populate ib_bottom, ib_top, ib_left, ib_right arrays + calculate_ib(forcing_boundary.codeacforcing, forcing_boundary.ib_bottom, + forcing_boundary.ib_top, forcing_boundary.ib_left, + forcing_boundary.ib_right, nelement_acforcing); + + return forcing_boundary; +} + +specfem::mesh::boundaries specfem::IO::mesh::impl::fortran::read_boundaries( + std::ifstream &stream, const int nspec, const int n_absorbing, + const int n_acoustic_surface, const int n_acforcing, + const Kokkos::View knods, + const specfem::MPI::MPI *mpi) { + + // Read absorbing boundaries + auto absorbing_boundary = + read_absorbing_boundaries(stream, n_absorbing, nspec, mpi); + + // Read acoustic free surface + auto acoustic_free_surface = + read_acoustic_free_surface(stream, n_acoustic_surface, knods, mpi); + + // Read forcing boundaries + auto forcing_boundary = + read_forcing_boundaries(stream, n_acforcing, nspec, mpi); + + return specfem::mesh::boundaries(absorbing_boundary, acoustic_free_surface, + forcing_boundary); +} diff --git a/src/IO/mesh/impl/fortran/read_elements.cpp b/src/IO/mesh/impl/fortran/read_elements.cpp new file mode 100644 index 00000000..53788e7f --- /dev/null +++ b/src/IO/mesh/impl/fortran/read_elements.cpp @@ -0,0 +1,51 @@ +#include "IO/mesh/impl/fortran/read_elements.hpp" +#include "IO/fortranio/interface.hpp" +#include "mesh/elements/axial_elements.hpp" +#include "mesh/elements/tangential_elements.hpp" +#include "specfem_mpi/interface.hpp" + +specfem::mesh::elements::axial_elements +specfem::IO::mesh::impl::fortran::read_axial_elements( + std::ifstream &stream, const int nelem_on_the_axis, const int nspec, + const specfem::MPI::MPI *mpi) { + + int ispec; + + specfem::mesh::elements::axial_elements axial_elements(nspec); + + for (int inum = 0; inum < nelem_on_the_axis; inum++) { + specfem::IO::fortran_read_line(stream, &ispec); + if (ispec < 0 || ispec > nspec - 1) + throw std::runtime_error( + "ispec out of range when reading axial elements"); + axial_elements.is_on_the_axis(ispec) = true; + } + + return axial_elements; +} + +specfem::mesh::elements::tangential_elements +specfem::IO::mesh::impl::fortran::read_tangential_elements( + std::ifstream &stream, const int nnodes_tangential_curve) { + type_real xread, yread; + + auto tangential_elements = + specfem::mesh::elements::tangential_elements(nnodes_tangential_curve); + + specfem::IO::fortran_read_line(stream, + &tangential_elements.force_normal_to_surface, + &tangential_elements.rec_normal_to_surface); + + if (nnodes_tangential_curve > 0) { + for (int inum = 0; inum < nnodes_tangential_curve; inum++) { + specfem::IO::fortran_read_line(stream, &xread, &yread); + tangential_elements.x(inum) = xread; + tangential_elements.y(inum) = yread; + } + } else { + tangential_elements.force_normal_to_surface = false; + tangential_elements.rec_normal_to_surface = false; + } + + return tangential_elements; +} diff --git a/src/IO/mesh/impl/fortran/read_interfaces.cpp b/src/IO/mesh/impl/fortran/read_interfaces.cpp new file mode 100644 index 00000000..9b9d9676 --- /dev/null +++ b/src/IO/mesh/impl/fortran/read_interfaces.cpp @@ -0,0 +1,86 @@ +#include "IO/mesh/impl/fortran/read_interfaces.hpp" +#include "IO/fortranio/interface.hpp" +#include "mesh/coupled_interfaces/coupled_interfaces.hpp" +#include "mesh/coupled_interfaces/interface_container.hpp" +#include "specfem_mpi/interface.hpp" + +template +specfem::mesh::interface_container +specfem::IO::mesh::impl::fortran::read_interfaces( + const int num_interfaces, std::ifstream &stream, + const specfem::MPI::MPI *mpi) { + + specfem::mesh::interface_container interface( + num_interfaces); + + if (!num_interfaces) + return interface; + + int medium1_ispec_l, medium2_ispec_l; + + for (int i = 0; i < num_interfaces; i++) { + specfem::IO::fortran_read_line(stream, &medium2_ispec_l, &medium1_ispec_l); + interface.medium1_index_mapping(i) = medium1_ispec_l - 1; + interface.medium2_index_mapping(i) = medium2_ispec_l - 1; + } + + return interface; +} + +// Explicit instantiation of the template function for the different medium +// interfaces elastic/acoustic +template specfem::mesh::interface_container< + specfem::element::medium_tag::elastic, + specfem::element::medium_tag::acoustic> +specfem::IO::mesh::impl::fortran::read_interfaces< + specfem::element::medium_tag::elastic, + specfem::element::medium_tag::acoustic>(const int num_interfaces, + std::ifstream &stream, + const specfem::MPI::MPI *mpi); + +// acoustic/poroelastic +template specfem::mesh::interface_container< + specfem::element::medium_tag::acoustic, + specfem::element::medium_tag::poroelastic> +specfem::IO::mesh::impl::fortran::read_interfaces< + specfem::element::medium_tag::acoustic, + specfem::element::medium_tag::poroelastic>(const int num_interfaces, + std::ifstream &stream, + const specfem::MPI::MPI *mpi); + +// elastic/poroelastic +template specfem::mesh::interface_container< + specfem::element::medium_tag::elastic, + specfem::element::medium_tag::poroelastic> +specfem::IO::mesh::impl::fortran::read_interfaces< + specfem::element::medium_tag::elastic, + specfem::element::medium_tag::poroelastic>(const int num_interfaces, + std::ifstream &stream, + const specfem::MPI::MPI *mpi); + +specfem::mesh::coupled_interfaces +specfem::IO::mesh::impl::fortran::read_coupled_interfaces( + std::ifstream &stream, const int num_interfaces_elastic_acoustic, + const int num_interfaces_acoustic_poroelastic, + const int num_interfaces_elastic_poroelastic, + const specfem::MPI::MPI *mpi) { + + auto elastic_acoustic = specfem::IO::mesh::impl::fortran::read_interfaces< + specfem::element::medium_tag::elastic, + specfem::element::medium_tag::acoustic>(num_interfaces_elastic_acoustic, + stream, mpi); + + auto acoustic_poroelastic = specfem::IO::mesh::impl::fortran::read_interfaces< + specfem::element::medium_tag::acoustic, + specfem::element::medium_tag::poroelastic>( + num_interfaces_acoustic_poroelastic, stream, mpi); + + auto elastic_poroelastic = specfem::IO::mesh::impl::fortran::read_interfaces< + specfem::element::medium_tag::elastic, + specfem::element::medium_tag::poroelastic>( + num_interfaces_elastic_poroelastic, stream, mpi); + + return specfem::mesh::coupled_interfaces( + elastic_acoustic, acoustic_poroelastic, elastic_poroelastic); +} diff --git a/src/IO/mesh/impl/fortran/read_material_properties.cpp b/src/IO/mesh/impl/fortran/read_material_properties.cpp new file mode 100644 index 00000000..68dc8877 --- /dev/null +++ b/src/IO/mesh/impl/fortran/read_material_properties.cpp @@ -0,0 +1,197 @@ +#include "IO/mesh/impl/fortran/read_material_properties.hpp" +#include "IO/fortranio/interface.hpp" +// #include "mesh/materials/materials.hpp" +#include "mesh/materials/materials.tpp" +#include "specfem_mpi/interface.hpp" +#include "utilities/interface.hpp" +#include +#include + +namespace { +constexpr auto elastic = specfem::element::medium_tag::elastic; +constexpr auto isotropic = specfem::element::property_tag::isotropic; +constexpr auto acoustic = specfem::element::medium_tag::acoustic; + +struct input_holder { + // Struct to hold temporary variables read from database file + type_real val0, val1, val2, val3, val4, val5, val6, val7, val8, val9, val10, + val11, val12; + int n, indic; +}; + +std::vector read_materials( + std::ifstream &stream, const int numat, + specfem::mesh::materials::material &elastic_isotropic, + specfem::mesh::materials::material &acoustic_isotropic, + const specfem::MPI::MPI *mpi) { + + input_holder read_values; + + std::ostringstream message; + + std::vector index_mapping( + numat); + + message << "Material systems:\n" + << "------------------------------"; + + mpi->cout(message.str()); + + if (mpi->get_rank() == 0) + std::cout << "Number of material systems = " << numat << "\n\n"; + + std::vector > + l_elastic_isotropic; + + l_elastic_isotropic.reserve(numat); + + int index_elastic_isotropic = 0; + + std::vector > + l_acoustic_isotropic; + + l_acoustic_isotropic.reserve(numat); + + int index_acoustic_isotropic = 0; + + for (int i = 0; i < numat; i++) { + + specfem::IO::fortran_read_line( + stream, &read_values.n, &read_values.indic, &read_values.val0, + &read_values.val1, &read_values.val2, &read_values.val3, + &read_values.val4, &read_values.val5, &read_values.val6, + &read_values.val7, &read_values.val8, &read_values.val9, + &read_values.val10, &read_values.val11, &read_values.val12); + + if (read_values.n < 1 || read_values.n > numat) { + throw std::runtime_error( + "Wrong material set number. Check database file."); + } + + assert(read_values.n == i + 1); + + if (read_values.indic == 1) { + // Acoustic Material + if (read_values.val2 == 0) { + const type_real density = read_values.val0; + const type_real cp = read_values.val1; + const type_real compaction_grad = read_values.val3; + const type_real Qkappa = read_values.val5; + const type_real Qmu = read_values.val6; + + specfem::material::material acoustic_holder( + density, cp, Qkappa, Qmu, compaction_grad); + + acoustic_holder.print(); + + l_acoustic_isotropic.push_back(acoustic_holder); + + index_mapping[i] = specfem::mesh::materials::material_specification( + specfem::element::medium_tag::acoustic, + specfem::element::property_tag::isotropic, + index_acoustic_isotropic); + + index_acoustic_isotropic++; + + } else { + + const type_real density = read_values.val0; + const type_real cp = read_values.val1; + const type_real cs = read_values.val2; + const type_real compaction_grad = read_values.val3; + const type_real Qkappa = read_values.val5; + const type_real Qmu = read_values.val6; + + specfem::material::material elastic_holder( + density, cs, cp, Qkappa, Qmu, compaction_grad); + + elastic_holder.print(); + + l_elastic_isotropic.push_back(elastic_holder); + + index_mapping[i] = specfem::mesh::materials::material_specification( + specfem::element::medium_tag::elastic, + specfem::element::property_tag::isotropic, index_elastic_isotropic); + + index_elastic_isotropic++; + } + } else { + throw std::runtime_error("Material type not supported"); + } + } + + assert(l_elastic_isotropic.size() + l_acoustic_isotropic.size() == numat); + + elastic_isotropic = specfem::mesh::materials::material( + l_elastic_isotropic.size(), l_elastic_isotropic); + + acoustic_isotropic = specfem::mesh::materials::material( + l_acoustic_isotropic.size(), l_acoustic_isotropic); + + return index_mapping; +} + +void read_material_indices( + std::ifstream &stream, const int nspec, const int numat, + const std::vector + &index_mapping, + const specfem::kokkos::HostView1d< + specfem::mesh::materials::material_specification> + material_index_mapping, + const specfem::kokkos::HostView2d knods, + const specfem::MPI::MPI *mpi) { + + const int ngnod = knods.extent(0); + + int n, kmato_read, pml_read; + + std::vector knods_read(ngnod, -1); + + for (int ispec = 0; ispec < nspec; ispec++) { + // format: #element_id #material_id #node_id1 #node_id2 #... + specfem::IO::fortran_read_line(stream, &n, &kmato_read, &knods_read, + &pml_read); + + if (n < 1 || n > nspec) { + throw std::runtime_error("Error reading material indices"); + } + + if (kmato_read < 1 || kmato_read > numat) { + throw std::runtime_error("Error reading material indices"); + } + + for (int i = 0; i < ngnod; i++) { + if (knods_read[i] == 0) + throw std::runtime_error("Error reading knods (node_id) values"); + + knods(i, n - 1) = knods_read[i] - 1; + } + + material_index_mapping(n - 1) = index_mapping[kmato_read - 1]; + } + + return; +} + +} // namespace + +specfem::mesh::materials +specfem::IO::mesh::impl::fortran::read_material_properties( + std::ifstream &stream, const int numat, const int nspec, + const specfem::kokkos::HostView2d knods, + const specfem::MPI::MPI *mpi) { + + // Create materials instances + specfem::mesh::materials materials(nspec, numat); + + // Read material properties + auto index_mapping = + ::read_materials(stream, numat, materials.elastic_isotropic, + materials.acoustic_isotropic, mpi); + + // Read material indices + ::read_material_indices(stream, nspec, numat, index_mapping, + materials.material_index_mapping, knods, mpi); + + return materials; +} diff --git a/src/mesh/IO/fortran/read_mesh_database.cpp b/src/IO/mesh/impl/fortran/read_mesh_database.cpp similarity index 95% rename from src/mesh/IO/fortran/read_mesh_database.cpp rename to src/IO/mesh/impl/fortran/read_mesh_database.cpp index 8341b7f2..4c8c1b0c 100644 --- a/src/mesh/IO/fortran/read_mesh_database.cpp +++ b/src/IO/mesh/impl/fortran/read_mesh_database.cpp @@ -1,4 +1,4 @@ -#include "mesh/IO/fortran/read_mesh_database.hpp" +#include "IO/mesh/impl/fortran/read_mesh_database.hpp" #include "IO/fortranio/interface.hpp" #include "kokkos_abstractions.h" // #include "mesh/IO/fortran/read_material_properties.hpp" @@ -9,7 +9,8 @@ #include #include -std::tuple specfem::mesh::IO::fortran::read_mesh_database_header( +std::tuple +specfem::IO::mesh::impl::fortran::read_mesh_database_header( std::ifstream &stream, const specfem::MPI::MPI *mpi) { // This subroutine reads header values of the database which are skipped std::string dummy_s; @@ -144,9 +145,8 @@ std::tuple specfem::mesh::IO::fortran::read_mesh_database_header( } specfem::kokkos::HostView2d -specfem::mesh::IO::fortran::read_coorg_elements(std::ifstream &stream, - const int npgeo, - const specfem::MPI::MPI *mpi) { +specfem::IO::mesh::impl::fortran::read_coorg_elements( + std::ifstream &stream, const int npgeo, const specfem::MPI::MPI *mpi) { int ipoin = 0; @@ -169,7 +169,7 @@ specfem::mesh::IO::fortran::read_coorg_elements(std::ifstream &stream, } std::tuple -specfem::mesh::IO::fortran::read_mesh_database_attenuation( +specfem::IO::mesh::impl::fortran::read_mesh_database_attenuation( std::ifstream &stream, const specfem::MPI::MPI *mpi) { int n_sls; diff --git a/src/IO/mesh/impl/fortran/read_properties.cpp b/src/IO/mesh/impl/fortran/read_properties.cpp new file mode 100644 index 00000000..70c51339 --- /dev/null +++ b/src/IO/mesh/impl/fortran/read_properties.cpp @@ -0,0 +1,50 @@ +#include "IO/mesh/impl/fortran/read_properties.hpp" +#include "IO/fortranio/interface.hpp" +#include "mesh/properties/properties.hpp" + +specfem::mesh::properties specfem::IO::mesh::impl::fortran::read_properties( + std::ifstream &stream, const specfem::MPI::MPI *mpi) { + // --------------------------------------------------------------------- + // reading mesh properties + + int numat; ///< Total number of different materials + int ngnod; ///< Number of control nodes + int nspec; ///< Number of spectral elements + int pointsdisp; // Total number of points to display (Only used for + // visualization) + int nelemabs; ///< Number of elements on absorbing boundary + int nelem_acforcing; ///< Number of elements on acoustic forcing boundary + int nelem_acoustic_surface; ///< Number of elements on acoustic surface + int num_fluid_solid_edges; ///< Number of solid-fluid edges + int num_fluid_poro_edges; ///< Number of fluid-poroelastic edges + int num_solid_poro_edges; ///< Number of solid-poroelastic edges + int nnodes_tangential_curve; ///< Number of elements on tangential curve + int nelem_on_the_axis; ///< Number of axial elements + bool plot_lowerleft_corner_only; + + specfem::IO::fortran_read_line(stream, &numat, &ngnod, &nspec, &pointsdisp, + &plot_lowerleft_corner_only); + + // --------------------------------------------------------------------- + if (ngnod != 9) { + std::ostringstream error_message; + error_message << "Number of control nodes per element must be 9, but is " + << ngnod << "\n" + << "Currently, there is a bug when NGNOD == 4 \n"; + throw std::runtime_error(error_message.str()); + } + + specfem::IO::fortran_read_line( + stream, &nelemabs, &nelem_acforcing, &nelem_acoustic_surface, + &num_fluid_solid_edges, &num_fluid_poro_edges, &num_solid_poro_edges, + &nnodes_tangential_curve, &nelem_on_the_axis); + // ---------------------------------------------------------------------- + + mpi->sync_all(); + + return specfem::mesh::properties( + numat, ngnod, nspec, pointsdisp, nelemabs, nelem_acforcing, + nelem_acoustic_surface, num_fluid_solid_edges, num_fluid_poro_edges, + num_solid_poro_edges, nnodes_tangential_curve, nelem_on_the_axis, + plot_lowerleft_corner_only); +} diff --git a/src/IO/mesh/read_mesh.cpp b/src/IO/mesh/read_mesh.cpp new file mode 100644 index 00000000..d9c0322f --- /dev/null +++ b/src/IO/mesh/read_mesh.cpp @@ -0,0 +1,211 @@ +#include "IO/mesh/read_mesh.hpp" +#include "IO/fortranio/interface.hpp" +#include "IO/mesh/impl/fortran/read_boundaries.hpp" +#include "IO/mesh/impl/fortran/read_elements.hpp" +#include "IO/mesh/impl/fortran/read_interfaces.hpp" +#include "IO/mesh/impl/fortran/read_material_properties.hpp" +#include "IO/mesh/impl/fortran/read_mesh_database.hpp" +#include "IO/mesh/impl/fortran/read_properties.hpp" +#include "enumerations/specfem_enums.hpp" +#include "kokkos_abstractions.h" +#include "material/material.hpp" +#include "mesh/mesh.hpp" +#include "mesh/tags/tags.hpp" +#include "specfem_mpi/interface.hpp" +#include "specfem_setup.hpp" +#include +#include +#include +#include +#include +#include + +specfem::mesh::mesh specfem::IO::read_mesh(const std::string filename, + const specfem::MPI::MPI *mpi) { + + // Declaring empty mesh objects + specfem::mesh::mesh mesh; + + // Open the database file + std::ifstream stream; + stream.open(filename); + + if (!stream.is_open()) { + throw std::runtime_error("Could not open database file"); + } + int nspec, npgeo, nproc; + + try { + std::tie(nspec, npgeo, nproc) = + specfem::IO::mesh::impl::fortran::read_mesh_database_header(stream, + mpi); + mesh.nspec = nspec; + mesh.npgeo = npgeo; + mesh.nproc = nproc; + } catch (std::runtime_error &e) { + throw; + } + + // Mesh class to be populated from the database file. + try { + mesh.control_nodes.coord = + specfem::IO::mesh::impl::fortran::read_coorg_elements(stream, + mesh.npgeo, mpi); + } catch (std::runtime_error &e) { + throw; + } + + try { + mesh.parameters = + specfem::IO::mesh::impl::fortran::read_properties(stream, mpi); + } catch (std::runtime_error &e) { + throw; + } + + mesh.control_nodes.ngnod = mesh.parameters.ngnod; + mesh.control_nodes.nspec = mesh.nspec; + mesh.control_nodes.knods = specfem::kokkos::HostView2d( + "specfem::mesh::knods", mesh.parameters.ngnod, mesh.nspec); + + int nspec_all = mpi->reduce(mesh.parameters.nspec, specfem::MPI::sum); + int nelem_acforcing_all = + mpi->reduce(mesh.parameters.nelem_acforcing, specfem::MPI::sum); + int nelem_acoustic_surface_all = + mpi->reduce(mesh.parameters.nelem_acoustic_surface, specfem::MPI::sum); + + try { + auto [n_sls, attenuation_f0_reference, read_velocities_at_f0] = + specfem::IO::mesh::impl::fortran::read_mesh_database_attenuation(stream, + mpi); + } catch (std::runtime_error &e) { + throw; + } + + try { + mesh.materials = specfem::IO::mesh::impl::fortran::read_material_properties( + stream, mesh.parameters.numat, mesh.nspec, mesh.control_nodes.knods, + mpi); + } catch (std::runtime_error &e) { + throw; + } + + // try { + // materials = specfem::mesh::IO::fortran::read_material_properties( + // stream, this->parameters.numat, mpi); + // } catch (std::runtime_error &e) { + // throw; + // } + + // try { + // this->material_ind = specfem::mesh::material_ind( + // stream, this->parameters.ngnod, this->nspec, this->parameters.numat, + // this->control_nodes.knods, mpi); + // } catch (std::runtime_error &e) { + // throw; + // } + + // try { + // this->interface = specfem::mesh::interfaces::interface(stream, mpi); + // } catch (std::runtime_error &e) { + // throw; + // } + + int ninterfaces; + int max_interface_size; + + specfem::IO::fortran_read_line(stream, &ninterfaces, &max_interface_size); + + try { + mesh.boundaries = specfem::IO::mesh::impl::fortran::read_boundaries( + stream, mesh.parameters.nspec, mesh.parameters.nelemabs, + mesh.parameters.nelem_acoustic_surface, mesh.parameters.nelem_acforcing, + mesh.control_nodes.knods, mpi); + } catch (std::runtime_error &e) { + throw; + } + + // try { + // this->boundaries.absorbing_boundary = specfem::mesh::absorbing_boundary( + // stream, this->parameters.nelemabs, this->parameters.nspec, mpi); + // } catch (std::runtime_error &e) { + // throw; + // } + + // try { + // this->boundaries.forcing_boundary = specfem::mesh::forcing_boundary( + // stream, this->parameters.nelem_acforcing, this->parameters.nspec, + // mpi); + // } catch (std::runtime_error &e) { + // throw; + // } + + // try { + // this->boundaries.acoustic_free_surface = + // specfem::mesh::acoustic_free_surface( + // stream, this->parameters.nelem_acoustic_surface, + // this->control_nodes.knods, mpi); + // } catch (std::runtime_error &e) { + // throw; + // } + + try { + mesh.coupled_interfaces = + specfem::IO::mesh::impl::fortran::read_coupled_interfaces( + stream, mesh.parameters.num_fluid_solid_edges, + mesh.parameters.num_fluid_poro_edges, + mesh.parameters.num_solid_poro_edges, mpi); + } catch (std::runtime_error &e) { + throw; + } + + try { + mesh.tangential_nodes = + specfem::IO::mesh::impl::fortran::read_tangential_elements( + stream, mesh.parameters.nnodes_tangential_curve); + } catch (std::runtime_error &e) { + throw; + } + + try { + mesh.axial_nodes = specfem::IO::mesh::impl::fortran::read_axial_elements( + stream, mesh.parameters.nelem_on_the_axis, mesh.nspec, mpi); + } catch (std::runtime_error &e) { + throw; + } + + // Check if database file was read completely + if (stream.get() && !stream.eof()) { + throw std::runtime_error("The Database file wasn't fully read. Is there " + "anything written after axial elements?"); + } + + stream.close(); + + // Print material properties + + mpi->cout("Material systems:\n" + "------------------------------"); + + mpi->cout("Number of material systems = " + + std::to_string(mesh.materials.n_materials) + "\n\n"); + + const auto l_elastic_isotropic = + mesh.materials.elastic_isotropic.material_properties; + const auto l_acoustic_isotropic = + mesh.materials.acoustic_isotropic.material_properties; + + for (const auto material : l_elastic_isotropic) { + mpi->cout(material.print()); + } + + for (const auto material : l_acoustic_isotropic) { + mpi->cout(material.print()); + } + + assert(l_elastic_isotropic.size() + l_acoustic_isotropic.size() == + mesh.materials.n_materials); + + mesh.tags = specfem::mesh::tags(mesh.materials, mesh.boundaries); + + return mesh; +} diff --git a/src/receiver/read_receiver.cpp b/src/IO/receivers/read_receivers.cpp similarity index 90% rename from src/receiver/read_receiver.cpp rename to src/IO/receivers/read_receivers.cpp index 3b140957..48995f8b 100644 --- a/src/receiver/read_receiver.cpp +++ b/src/IO/receivers/read_receivers.cpp @@ -1,3 +1,4 @@ +#include "IO/receivers/read_receivers.hpp" #include "receiver/interface.hpp" #include "specfem_setup.hpp" #include "utilities/interface.hpp" @@ -8,8 +9,8 @@ #include std::vector > -specfem::receivers::read_receivers(const std::string stations_file, - const type_real angle) { +specfem::IO::read_receivers(const std::string stations_file, + const type_real angle) { boost::char_separator sep(" "); std::vector > receivers; diff --git a/src/source/read_sources.cpp b/src/IO/sources/read_sources.cpp similarity index 88% rename from src/source/read_sources.cpp rename to src/IO/sources/read_sources.cpp index 93ba9f3f..6dbfa92a 100644 --- a/src/source/read_sources.cpp +++ b/src/IO/sources/read_sources.cpp @@ -1,3 +1,4 @@ +#include "IO/sources/read_sources.hpp" #include "source/interface.hpp" #include "specfem_setup.hpp" #include "utilities/interface.hpp" @@ -9,20 +10,20 @@ #include std::tuple >, type_real> -specfem::sources::read_sources( - const std::string sources_file, const int nsteps, const type_real user_t0, - const type_real dt, const specfem::simulation::type simulation_type) { +specfem::IO::read_sources(const std::string sources_file, const int nsteps, + const type_real user_t0, const type_real dt, + const specfem::simulation::type simulation_type) { const bool user_defined_start_time = (std::abs(user_t0) > std::numeric_limits::epsilon()); - const specfem::wavefield::type source_wavefield_type = - [&simulation_type]() -> specfem::wavefield::type { + const specfem::wavefield::simulation_field source_wavefield_type = + [&simulation_type]() -> specfem::wavefield::simulation_field { switch (simulation_type) { case specfem::simulation::type::forward: - return specfem::wavefield::type::forward; + return specfem::wavefield::simulation_field::forward; case specfem::simulation::type::combined: - return specfem::wavefield::type::backward; + return specfem::wavefield::simulation_field::backward; default: throw std::runtime_error("Unknown simulation type"); } diff --git a/src/compute/compute_assembly.cpp b/src/compute/assembly/assembly.cpp similarity index 100% rename from src/compute/compute_assembly.cpp rename to src/compute/assembly/assembly.cpp diff --git a/src/compute/assembly/compute_wavefield.cpp b/src/compute/assembly/compute_wavefield.cpp new file mode 100644 index 00000000..4a63908c --- /dev/null +++ b/src/compute/assembly/compute_wavefield.cpp @@ -0,0 +1,85 @@ + +#include "compute/assembly/assembly.hpp" +#include "helper.hpp" + +namespace { + +template +void get_wavefield_on_entire_grid( + const specfem::wavefield::type component, + const specfem::compute::assembly &assembly, + Kokkos::View + wavefield_on_entire_grid) { + + const int ngllx = assembly.mesh.ngllx; + const int ngllz = assembly.mesh.ngllz; + + if (ngllx == 5 && ngllz == 5) { + impl::helper helper(assembly, + wavefield_on_entire_grid); + helper(component); + } else if (ngllx == 8 && ngllz == 8) { + impl::helper helper(assembly, + wavefield_on_entire_grid); + helper(component); + } else { + throw std::runtime_error("Number of quadrature points not supported"); + } + + return; +} + +} // namespace + +Kokkos::View +specfem::compute::assembly::generate_wavefield_on_entire_grid( + const specfem::wavefield::simulation_field wavefield, + const specfem::wavefield::type component) { + + const int ncomponents = [&]() -> int { + if (component == specfem::wavefield::type::displacement) { + return 2; + } else if (component == specfem::wavefield::type::velocity) { + return 2; + } else if (component == specfem::wavefield::type::acceleration) { + return 2; + } else if (component == specfem::wavefield::type::pressure) { + return 1; + } else { + throw std::runtime_error("Wavefield component not supported"); + } + }(); + + // Copy the required wavefield into the buffer + if (wavefield == specfem::wavefield::simulation_field::forward) { + specfem::compute::deep_copy(this->fields.buffer, this->fields.forward); + } else if (wavefield == specfem::wavefield::simulation_field::adjoint) { + specfem::compute::deep_copy(this->fields.buffer, this->fields.adjoint); + } else if (wavefield == specfem::wavefield::simulation_field::backward) { + specfem::compute::deep_copy(this->fields.buffer, this->fields.backward); + } else { + throw std::runtime_error("Wavefield type not supported"); + } + + Kokkos::View + wavefield_on_entire_grid("wavefield_on_entire_grid", this->mesh.nspec, + this->mesh.ngllz, this->mesh.ngllx, ncomponents); + + const auto h_wavefield_on_entire_grid = + Kokkos::create_mirror_view(wavefield_on_entire_grid); + + get_wavefield_on_entire_grid( + component, *this, wavefield_on_entire_grid); + + get_wavefield_on_entire_grid( + component, *this, wavefield_on_entire_grid); + + Kokkos::deep_copy(h_wavefield_on_entire_grid, wavefield_on_entire_grid); + + return h_wavefield_on_entire_grid; +} diff --git a/src/compute/assembly/helper.hpp b/src/compute/assembly/helper.hpp new file mode 100644 index 00000000..0ed72c33 --- /dev/null +++ b/src/compute/assembly/helper.hpp @@ -0,0 +1,428 @@ +#pragma once + +#include "algorithms/gradient.hpp" +#include "chunk_element/field.hpp" +#include "compute/assembly/assembly.hpp" +#include "enumerations/dimension.hpp" +#include "enumerations/medium.hpp" +#include "enumerations/wavefield.hpp" +#include "medium/medium.hpp" +#include "parallel_configuration/chunk_config.hpp" +#include "point/field.hpp" +#include "point/field_derivatives.hpp" +#include "point/properties.hpp" +#include "policies/chunk.hpp" +#include + +namespace impl { + +template +class helper { +public: + constexpr static auto medium_tag = MediumTag; + constexpr static auto property_tag = PropertyTag; + constexpr static auto ngll = NGLL; + + helper(specfem::compute::assembly assembly, + Kokkos::View + wavefield_on_entire_grid) + : assembly(assembly), wavefield_on_entire_grid(wavefield_on_entire_grid) { + if (assembly.mesh.ngllz != ngll || assembly.mesh.ngllx != ngll) { + throw std::runtime_error("Number of quadrature points not supported"); + } + } + + void operator()(const specfem::wavefield::type wavefield_type) { + const auto buffer = assembly.fields.buffer; + + const int nspec = assembly.mesh.nspec; + const int ngllz = assembly.mesh.ngllz; + const int ngllx = assembly.mesh.ngllx; + + const auto elements = + assembly.properties.get_elements_on_device(medium_tag, property_tag); + + const int nelements = elements.extent(0); + + if (nelements == 0) { + return; + } + + using ParallelConfig = specfem::parallel_config::default_chunk_config< + specfem::dimension::type::dim2, + specfem::datatype::simd, + Kokkos::DefaultExecutionSpace>; + + using ChunkElementFieldType = specfem::chunk_element::field< + ParallelConfig::chunk_size, ngll, specfem::dimension::type::dim2, + medium_tag, specfem::kokkos::DevScratchSpace, + Kokkos::MemoryTraits, true, true, true, false, + false>; + + using QuadratureType = specfem::element::quadrature< + ngll, specfem::dimension::type::dim2, specfem::kokkos::DevScratchSpace, + Kokkos::MemoryTraits, true, false>; + + using PointPropertyType = + specfem::point::properties; + + using PointFieldDerivativesType = + specfem::point::field_derivatives; + + using ChunkPolicyType = specfem::policy::element_chunk; + + int scratch_size = + ChunkElementFieldType::shmem_size() + QuadratureType::shmem_size(); + + ChunkPolicyType chunk_policy(elements, ngllz, ngllx); + + Kokkos::parallel_for( + "specfem::compute::assembly::compute_wavefield", + chunk_policy.set_scratch_size(0, Kokkos::PerTeam(scratch_size)), + KOKKOS_CLASS_LAMBDA(const typename ChunkPolicyType::member_type &team) { + QuadratureType quadrature(team); + ChunkElementFieldType field(team); + + specfem::compute::load_on_device(team, assembly.mesh.quadratures, + quadrature); + + for (int tile = 0; tile < ChunkPolicyType::tile_size; + tile += ChunkPolicyType::chunk_size) { + const int starting_element_index = + team.league_rank() * ChunkPolicyType::tile_size + tile; + + if (starting_element_index >= nelements) { + break; + } + + const auto iterator = + chunk_policy.league_iterator(starting_element_index); + specfem::compute::load_on_device(team, iterator, buffer, field); + team.team_barrier(); + + specfem::medium::compute_wavefield( + team, iterator, assembly, quadrature, field, wavefield_type, + wavefield_on_entire_grid); + } + }); + + return; + } + +private: + const specfem::compute::assembly assembly; + Kokkos::View + wavefield_on_entire_grid; +}; + +} // namespace impl + +// namespace impl { +// template +// class field_type_parameters; + +// template +// class field_type_parameters { +// public: +// constexpr static auto medium_tag = MediumTag; +// constexpr static auto store_displacement = true; +// constexpr static auto store_velocity = false; +// constexpr static auto store_acceleration = false; +// constexpr static auto store_mass_matrix = false; +// constexpr static auto num_components = 2; +// }; + +// template +// class field_type_parameters { +// public: +// constexpr static auto medium_tag = MediumTag; +// constexpr static auto store_displacement = false; +// constexpr static auto store_velocity = true; +// constexpr static auto store_acceleration = false; +// constexpr static auto store_mass_matrix = false; +// constexpr static auto num_components = 2; +// }; + +// template +// class field_type_parameters { +// public: +// constexpr static auto medium_tag = MediumTag; +// constexpr static auto store_displacement = false; +// constexpr static auto store_velocity = false; +// constexpr static auto store_acceleration = true; +// constexpr static auto store_mass_matrix = false; +// constexpr static auto num_components = 2; +// }; + +// template +// class helper; + +// template +// class helper { +// public: +// constexpr static auto medium_tag = specfem::element::medium_tag::elastic; +// constexpr static auto property_tag = PropertyTag; +// constexpr static auto component = Component; +// constexpr static auto ngll = NGLL; +// using field_parameters = field_type_parameters; +// helper(specfem::compute::assembly assembly, +// Kokkos::View +// wavefield_on_entire_grid) +// : assembly(assembly), +// wavefield_on_entire_grid(wavefield_on_entire_grid) { +// if (assembly.mesh.ngllz != ngll || assembly.mesh.ngllx != ngll) { +// throw std::runtime_error("Number of quadrature points not supported"); +// } +// return; +// } + +// void operator()() const { +// const auto buffer = assembly.fields.buffer; + +// const int nspec = assembly.mesh.nspec; +// const int ngllz = assembly.mesh.ngllz; +// const int ngllx = assembly.mesh.ngllx; + +// const auto elements = +// assembly.properties.get_elements_on_device(medium_tag, property_tag); + +// const int nelements = elements.extent(0); + +// if (nelements == 0) { +// return; +// } + +// using PointFieldType = +// specfem::point::field; + +// using simd = specfem::datatype::simd; +// constexpr int simd_size = simd::size(); + +// using ParallelConfig = specfem::parallel_config::default_chunk_config< +// specfem::dimension::type::dim2, simd, Kokkos::DefaultExecutionSpace>; + +// using ChunkPolicyType = specfem::policy::element_chunk; + +// ChunkPolicyType chunk_policy(elements, ngllz, ngllx); + +// Kokkos::parallel_for( +// "specfem::domain::impl::kernels::elements::compute_mass_matrix", +// static_cast( +// chunk_policy), +// KOKKOS_CLASS_LAMBDA(const typename ChunkPolicyType::member_type +// &team) { +// for (int tile = 0; tile < ChunkPolicyType::tile_size * simd_size; +// tile += ChunkPolicyType::chunk_size * simd_size) { +// const int starting_element_index = +// team.league_rank() * ChunkPolicyType::tile_size * simd_size + +// tile; + +// if (starting_element_index >= nelements) { +// break; +// } + +// const auto iterator = +// chunk_policy.league_iterator(starting_element_index); + +// Kokkos::parallel_for( +// Kokkos::TeamThreadRange(team, iterator.chunk_size()), +// [&](const int i) { +// const auto iterator_index = iterator(i); +// const auto index = iterator_index.index; + +// PointFieldType field; + +// specfem::compute::load_on_device(index, buffer, field); + +// for (int icomponent = 0; +// icomponent < field_parameters::num_components; +// icomponent++) { +// wavefield_on_entire_grid(index.ispec, index.iz, index.ix, +// icomponent) = field(icomponent); +// } +// }); +// } +// }); + +// return; +// } + +// private: +// const specfem::compute::assembly assembly; +// Kokkos::View +// wavefield_on_entire_grid; +// }; + +// template +// class helper { +// public: +// constexpr static auto medium_tag = specfem::element::medium_tag::acoustic; +// constexpr static auto property_tag = PropertyTag; +// constexpr static auto component = Component; +// constexpr static auto ngll = NGLL; +// using field_parameters = +// field_type_parameters; +// helper(specfem::compute::assembly assembly, +// Kokkos::View +// wavefield_on_entire_grid) +// : assembly(assembly), +// wavefield_on_entire_grid(wavefield_on_entire_grid) { +// if (assembly.mesh.ngllz != ngll || assembly.mesh.ngllx != ngll) { +// throw std::runtime_error("Number of quadrature points not supported"); +// } +// } + +// void operator()() const { +// const auto buffer = assembly.fields.buffer; + +// const int nspec = assembly.mesh.nspec; +// const int ngllz = assembly.mesh.ngllz; +// const int ngllx = assembly.mesh.ngllx; + +// const auto elements = +// assembly.properties.get_elements_on_device(medium_tag, property_tag); +// const int nelements = elements.extent(0); + +// if (nelements == 0) { +// return; +// } + +// constexpr auto num_components = field_parameters::num_components; + +// using simd = specfem::datatype::simd; +// constexpr int simd_size = simd::size(); +// using ParallelConfig = specfem::parallel_config::default_chunk_config< +// specfem::dimension::type::dim2, simd, Kokkos::DefaultExecutionSpace>; + +// using ChunkElementFieldType = specfem::chunk_element::field< +// ParallelConfig::chunk_size, ngll, specfem::dimension::type::dim2, +// medium_tag, specfem::kokkos::DevScratchSpace, +// Kokkos::MemoryTraits, +// field_parameters::store_displacement, +// field_parameters::store_velocity, +// field_parameters::store_acceleration, +// field_parameters::store_mass_matrix, false>; + +// using QuadratureType = specfem::element::quadrature< +// ngll, specfem::dimension::type::dim2, +// specfem::kokkos::DevScratchSpace, +// Kokkos::MemoryTraits, true, false>; + +// using PointPropertyType = +// specfem::point::properties; + +// using PointFieldDerivativesType = +// specfem::point::field_derivatives; + +// using ChunkPolicyType = specfem::policy::element_chunk; + +// int scratch_size = +// ChunkElementFieldType::shmem_size() + QuadratureType::shmem_size(); +// ChunkPolicyType chunk_policy(elements, ngllz, ngllx); + +// Kokkos::parallel_for( +// "compute_wavefield", +// chunk_policy.set_scratch_size(0, Kokkos::PerTeam(scratch_size)), +// KOKKOS_CLASS_LAMBDA(const typename ChunkPolicyType::member_type +// &team) { +// QuadratureType quadrature(team); +// ChunkElementFieldType field(team); + +// specfem::compute::load_on_device(team, assembly.mesh.quadratures, +// quadrature); + +// for (int tile = 0; tile < ChunkPolicyType::tile_size * simd_size; +// tile += ChunkPolicyType::chunk_size * simd_size) { +// const int starting_element_index = +// team.league_rank() * ChunkPolicyType::tile_size * simd_size + +// tile; + +// if (starting_element_index >= nelements) { +// break; +// } + +// const auto iterator = +// chunk_policy.league_iterator(starting_element_index); +// specfem::compute::load_on_device(team, iterator, buffer, field); +// team.team_barrier(); + +// const auto &active_field = [&]() { +// if constexpr (Component == +// specfem::wavefield::type::displacement) { +// return field.displacement; +// } else if constexpr (Component == +// specfem::wavefield::type::velocity) { +// return field.velocity; +// } else if constexpr (Component == +// specfem::wavefield::type:: +// acceleration) { +// return field.acceleration; +// } else { +// static_assert("component not supported"); +// } +// }(); + +// specfem::algorithms::gradient( +// team, iterator, assembly.partial_derivatives, +// quadrature.hprime_gll, active_field, +// [&](const typename ChunkPolicyType::iterator_type::index_type +// &iterator_index, +// const typename PointFieldDerivativesType::ViewType &du) { +// PointPropertyType point_property; + +// specfem::compute::load_on_device(iterator_index.index, +// assembly.properties, +// point_property); + +// PointFieldDerivativesType field_derivatives(du); + +// auto stress = specfem::medium::compute_stress( +// point_property, field_derivatives); + +// for (int icomponent = 0; icomponent < num_components; +// icomponent++) { +// wavefield_on_entire_grid( +// iterator_index.index.ispec, iterator_index.index.iz, +// iterator_index.index.ix, icomponent) = +// stress.T(icomponent, 0); +// } +// }); +// } +// }); + +// return; +// } + +// private: +// const specfem::compute::assembly assembly; +// Kokkos::View +// wavefield_on_entire_grid; +// }; +// } // namespace impl diff --git a/src/compute/compute_properties.cpp b/src/compute/compute_properties.cpp index 6bc1776f..872cb348 100644 --- a/src/compute/compute_properties.cpp +++ b/src/compute/compute_properties.cpp @@ -94,3 +94,99 @@ specfem::compute::properties::properties( return; } + +Kokkos::View +specfem::compute::properties::get_elements_on_host( + const specfem::element::medium_tag medium) const { + + const int nspec = this->nspec; + + int nelements = 0; + for (int ispec = 0; ispec < nspec; ispec++) { + if (h_element_types(ispec) == medium) { + nelements++; + } + } + + Kokkos::View elements( + "specfem::compute::properties::get_elements_on_host", nelements); + + nelements = 0; + for (int ispec = 0; ispec < nspec; ispec++) { + if (h_element_types(ispec) == medium) { + elements(nelements) = ispec; + nelements++; + } + } + + return elements; +} + +Kokkos::View +specfem::compute::properties::get_elements_on_device( + const specfem::element::medium_tag medium) const { + + // If the elements have not been computed, compute them. + // The elements need to be computed in serial on the host. + // This function computes the host elements on host and then + // copies them to the device. + const auto host_elements = this->get_elements_on_host(medium); + + Kokkos::View + elements("specfem::compute::properties::get_elements_on_device", + host_elements.extent(0)); + + Kokkos::deep_copy(elements, host_elements); + + return elements; +} + +Kokkos::View +specfem::compute::properties::get_elements_on_host( + const specfem::element::medium_tag medium, + const specfem::element::property_tag property) const { + + const int nspec = this->nspec; + + int nelements = 0; + for (int ispec = 0; ispec < nspec; ispec++) { + if (h_element_types(ispec) == medium && + h_element_property(ispec) == property) { + nelements++; + } + } + + Kokkos::View elements( + "specfem::compute::properties::get_elements_on_host", nelements); + + nelements = 0; + for (int ispec = 0; ispec < nspec; ispec++) { + if (h_element_types(ispec) == medium && + h_element_property(ispec) == property) { + elements(nelements) = ispec; + nelements++; + } + } + + return elements; +} + +Kokkos::View +specfem::compute::properties::get_elements_on_device( + const specfem::element::medium_tag medium, + const specfem::element::property_tag property) const { + + // If the elements have not been computed, compute them. + // The elements need to be computed in serial on the host. + // This function computes the host elements on host and then + // copies them to the device. + const auto host_elements = this->get_elements_on_host(medium, property); + + Kokkos::View + elements("specfem::compute::properties::get_elements_on_device", + host_elements.extent(0)); + + Kokkos::deep_copy(elements, host_elements); + + return elements; +} diff --git a/src/compute/fields/fields.cpp b/src/compute/fields/fields.cpp index e8d81dd0..5ecd406d 100644 --- a/src/compute/fields/fields.cpp +++ b/src/compute/fields/fields.cpp @@ -7,23 +7,23 @@ // Explcitly instantiate the template class template class specfem::compute::simulation_field< - specfem::wavefield::type::forward>; + specfem::wavefield::simulation_field::forward>; template class specfem::compute::simulation_field< - specfem::wavefield::type::adjoint>; + specfem::wavefield::simulation_field::adjoint>; template class specfem::compute::simulation_field< - specfem::wavefield::type::backward>; + specfem::wavefield::simulation_field::backward>; template class specfem::compute::simulation_field< - specfem::wavefield::type::buffer>; + specfem::wavefield::simulation_field::buffer>; specfem::compute::fields::fields(const specfem::compute::mesh &mesh, const specfem::compute::properties &properties, const specfem::simulation::type simulation) : // Initialize the forward field only if the simulation type is forward forward([&]() -> specfem::compute::simulation_field< - specfem::wavefield::type::forward> { + specfem::wavefield::simulation_field::forward> { if (simulation == specfem::simulation::type::forward) { return { mesh, properties }; } else if (simulation == specfem::simulation::type::combined) { @@ -34,7 +34,7 @@ specfem::compute::fields::fields(const specfem::compute::mesh &mesh, }()), // Initiaze the adjoint field only if the simulation type is adjoint adjoint([&]() -> specfem::compute::simulation_field< - specfem::wavefield::type::adjoint> { + specfem::wavefield::simulation_field::adjoint> { if (simulation == specfem::simulation::type::forward) { return {}; } else if (simulation == specfem::simulation::type::combined) { @@ -45,7 +45,7 @@ specfem::compute::fields::fields(const specfem::compute::mesh &mesh, }()), // Initialize the backward field only if the simulation type is adjoint backward([&]() -> specfem::compute::simulation_field< - specfem::wavefield::type::backward> { + specfem::wavefield::simulation_field::backward> { if (simulation == specfem::simulation::type::forward) { return {}; } else if (simulation == specfem::simulation::type::combined) { @@ -56,9 +56,9 @@ specfem::compute::fields::fields(const specfem::compute::mesh &mesh, }()), // Initialize the buffer field only if the simulation type is adjoint buffer([&]() -> specfem::compute::simulation_field< - specfem::wavefield::type::buffer> { + specfem::wavefield::simulation_field::buffer> { if (simulation == specfem::simulation::type::forward) { - return {}; + return { mesh, properties }; } else if (simulation == specfem::simulation::type::combined) { return { mesh, properties }; } else { diff --git a/src/coupled_interface/coupled_interface.cpp b/src/coupled_interface/coupled_interface.cpp index 31a57fe1..e0952e9d 100644 --- a/src/coupled_interface/coupled_interface.cpp +++ b/src/coupled_interface/coupled_interface.cpp @@ -4,31 +4,31 @@ #include "enumerations/medium.hpp" template class specfem::coupled_interface::coupled_interface< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, specfem::element::medium_tag::acoustic>; template class specfem::coupled_interface::coupled_interface< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, specfem::element::medium_tag::elastic>; template class specfem::coupled_interface::coupled_interface< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, specfem::element::medium_tag::acoustic>; template class specfem::coupled_interface::coupled_interface< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, specfem::element::medium_tag::elastic>; template class specfem::coupled_interface::coupled_interface< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, specfem::element::medium_tag::acoustic>; template class specfem::coupled_interface::coupled_interface< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, specfem::element::medium_tag::elastic>; diff --git a/src/domain/domain.cpp b/src/domain/domain.cpp index d27cdb5c..d8076f02 100644 --- a/src/domain/domain.cpp +++ b/src/domain/domain.cpp @@ -12,49 +12,61 @@ using static_8 = } // namespace template class specfem::domain::domain< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_5>; + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_5>; template class specfem::domain::domain< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_5>; + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_5>; template class specfem::domain::domain< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_5>; + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_5>; template class specfem::domain::domain< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_5>; + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_5>; template class specfem::domain::domain< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_5>; + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_5>; template class specfem::domain::domain< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_5>; + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_5>; template class specfem::domain::domain< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_8>; + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_8>; template class specfem::domain::domain< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_8>; + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_8>; template class specfem::domain::domain< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_8>; + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_8>; template class specfem::domain::domain< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_8>; + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_8>; template class specfem::domain::domain< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_8>; + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_8>; template class specfem::domain::domain< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_8>; + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_8>; diff --git a/src/domain/impl/elements/kernel.cpp b/src/domain/impl/elements/kernel.cpp index 6e1ab90a..bfe2d824 100644 --- a/src/domain/impl/elements/kernel.cpp +++ b/src/domain/impl/elements/kernel.cpp @@ -1,9 +1,9 @@ #include "domain/impl/elements/kernel.hpp" #include "domain/impl/elements/kernel.tpp" -constexpr static auto forward = specfem::wavefield::type::forward; -constexpr static auto adjoint = specfem::wavefield::type::adjoint; -constexpr static auto backward = specfem::wavefield::type::backward; +constexpr static auto forward = specfem::wavefield::simulation_field::forward; +constexpr static auto adjoint = specfem::wavefield::simulation_field::adjoint; +constexpr static auto backward = specfem::wavefield::simulation_field::backward; constexpr static auto dim2 = specfem::dimension::type::dim2; diff --git a/src/domain/impl/kernels.cpp b/src/domain/impl/kernels.cpp index 8cbce89b..28692e58 100644 --- a/src/domain/impl/kernels.cpp +++ b/src/domain/impl/kernels.cpp @@ -13,49 +13,61 @@ using static_8 = // Explicit template instantiation template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_5>; + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_5>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_5>; + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_5>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_5>; + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_5>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_5>; + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_5>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_5>; + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_5>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_5>; + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_5>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_8>; + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_8>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_8>; + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_8>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, static_8>; + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + static_8>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_8>; + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_8>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_8>; + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_8>; template class specfem::domain::impl::kernels::kernels< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, static_8>; + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + static_8>; diff --git a/src/enumerations/medium.cpp b/src/enumerations/medium.cpp new file mode 100644 index 00000000..5b756e53 --- /dev/null +++ b/src/enumerations/medium.cpp @@ -0,0 +1,27 @@ +#include "enumerations/medium.hpp" + +const std::string specfem::element::to_string( + const specfem::element::medium_tag &medium, + const specfem::element::property_tag &property_tag) { + + if ((medium == specfem::element::medium_tag::elastic) && + (property_tag == specfem::element::property_tag::isotropic)) { + return "elastic isotropic"; + } else if ((medium == specfem::element::medium_tag::acoustic) && + (property_tag == specfem::element::property_tag::isotropic)) { + return "acoustic isotropic"; + } else { + return "unknown"; + } +} + +const std::string +specfem::element::to_string(const specfem::element::medium_tag &medium) { + if (medium == specfem::element::medium_tag::elastic) { + return "elastic"; + } else if (medium == specfem::element::medium_tag::acoustic) { + return "acoustic"; + } else { + return "unknown"; + } +} diff --git a/src/kernels/kernels.cpp b/src/kernels/kernels.cpp index 3f0f8e20..55fe1c46 100644 --- a/src/kernels/kernels.cpp +++ b/src/kernels/kernels.cpp @@ -2,25 +2,28 @@ // Explicit template instantiation template class specfem::kernels::kernels< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::enums::element::quadrature::static_quadrature_points<5> >; template class specfem::kernels::kernels< - specfem::wavefield::type::adjoint, specfem::dimension::type::dim2, + specfem::wavefield::simulation_field::adjoint, + specfem::dimension::type::dim2, specfem::enums::element::quadrature::static_quadrature_points<5> >; template class specfem::kernels::kernels< - specfem::wavefield::type::backward, specfem::dimension::type::dim2, + specfem::wavefield::simulation_field::backward, + specfem::dimension::type::dim2, specfem::enums::element::quadrature::static_quadrature_points<5> >; -// template class kernels>; -// template class kernels>; -// template class kernels>; diff --git a/src/mesh/IO/fortran/read_material_properties.cpp b/src/mesh/IO/fortran/read_material_properties.cpp deleted file mode 100644 index b5a94e58..00000000 --- a/src/mesh/IO/fortran/read_material_properties.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include "mesh/IO/fortran/read_material_properties.hpp" -#include "fortranio/interface.hpp" -#include "material/interface.hpp" -#include "specfem_mpi/interface.hpp" -#include "utilities/interface.hpp" -#include -#include - -struct input_holder { - // Struct to hold temporary variables read from database file - type_real val0, val1, val2, val3, val4, val5, val6, val7, val8, val9, val10, - val11, val12; - int n, indic; -}; - -std::vector > -specfem::mesh::IO::fortran::read_material_properties( - std::ifstream &stream, const int numat, const specfem::MPI::MPI *mpi) { - - input_holder read_values; - - std::vector > materials(numat); - - std::ostringstream message; - message << "Material systems:\n" - << "------------------------------"; - - mpi->cout(message.str()); - - if (mpi->get_rank() == 0) - std::cout << "Number of material systems = " << numat << "\n\n"; - - for (int i = 0; i < numat; i++) { - - specfem::fortran_IO::fortran_read_line( - stream, &read_values.n, &read_values.indic, &read_values.val0, - &read_values.val1, &read_values.val2, &read_values.val3, - &read_values.val4, &read_values.val5, &read_values.val6, - &read_values.val7, &read_values.val8, &read_values.val9, - &read_values.val10, &read_values.val11, &read_values.val12); - - if (read_values.n < 1 || read_values.n > numat) { - throw std::runtime_error("Wrong material set number"); - } - - if (read_values.indic == 1) { - // Acoustic Material - if (read_values.val2 == 0) { - const type_real density = read_values.val0; - const type_real cp = read_values.val1; - const type_real compaction_grad = read_values.val3; - const type_real Qkappa = read_values.val5; - const type_real Qmu = read_values.val6; - std::shared_ptr acoustic_holder = - std::make_shared( - density, cp, Qkappa, Qmu, compaction_grad); - - materials[read_values.n - 1] = acoustic_holder; - } else { - const type_real density = read_values.val0; - const type_real cp = read_values.val1; - const type_real cs = read_values.val2; - const type_real compaction_grad = read_values.val3; - const type_real Qkappa = read_values.val5; - const type_real Qmu = read_values.val6; - std::shared_ptr elastic_holder = - std::make_shared( - density, cs, cp, Qkappa, Qmu, compaction_grad); - materials[read_values.n - 1] = elastic_holder; - } - } else { - throw std::runtime_error( - "Error reading material properties. Invalid material type"); - } - } - - for (int i = 0; i < materials.size(); i++) { - mpi->cout(materials[i]->print()); - } - - return materials; -} diff --git a/src/mesh/boundaries/absorbing_boundaries.cpp b/src/mesh/boundaries/absorbing_boundaries.cpp index 00f3859d..c08d7dbf 100644 --- a/src/mesh/boundaries/absorbing_boundaries.cpp +++ b/src/mesh/boundaries/absorbing_boundaries.cpp @@ -20,180 +20,3 @@ specfem::mesh::absorbing_boundary::absorbing_boundary( return; } - -static std::tuple< - specfem::kokkos::HostView1d, - specfem::kokkos::HostView1d > -find_corners(const specfem::kokkos::HostView1d ispec_edge, - const specfem::kokkos::HostView1d - type_edge) { - - int ncorner = 0; - int num_abs_boundary_faces = ispec_edge.extent(0); - for (int inum = 0; inum < num_abs_boundary_faces; inum++) { - if (type_edge(inum) == specfem::enums::boundaries::type::BOTTOM) { - for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; - inum_duplicate++) { - if (inum != inum_duplicate) { - if (ispec_edge(inum) == ispec_edge(inum_duplicate)) { - if (type_edge(inum) == specfem::enums::boundaries::type::LEFT) { - ncorner++; - } - if (type_edge(inum) == specfem::enums::boundaries::type::RIGHT) { - ncorner++; - } - } - } - } - if (type_edge(inum) == specfem::enums::boundaries::type::TOP) { - for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; - inum_duplicate++) { - if (inum != inum_duplicate) { - if (ispec_edge(inum) == ispec_edge(inum_duplicate)) { - if (type_edge(inum) == specfem::enums::boundaries::type::LEFT) { - ncorner++; - } - if (type_edge(inum) == specfem::enums::boundaries::type::RIGHT) { - ncorner++; - } - } - } - } - } - } - } - - specfem::kokkos::HostView1d ispec_corners( - "specfem::mesh::absorbing_boundary::ispec_corners", ncorner); - - specfem::kokkos::HostView1d type_corners( - "specfem::mesh::absorbing_boundary::type_corners", ncorner); - - int icorner = 0; - - for (int inum = 0; inum < num_abs_boundary_faces; inum++) { - if (type_edge(inum) == specfem::enums::boundaries::type::BOTTOM) { - for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; - inum_duplicate++) { - if (inum != inum_duplicate) { - if (ispec_edge(inum) == ispec_edge(inum_duplicate)) { - if (type_edge(inum) == specfem::enums::boundaries::type::LEFT) { - ispec_corners(icorner) = ispec_edge(inum); - type_corners(icorner) = - specfem::enums::boundaries::type::BOTTOM_LEFT; - icorner++; - } - if (type_edge(inum) == specfem::enums::boundaries::type::RIGHT) { - ispec_corners(icorner) = ispec_edge(inum); - type_corners(icorner) = - specfem::enums::boundaries::type::BOTTOM_RIGHT; - icorner++; - } - } - } - } - if (type_edge(inum) == specfem::enums::boundaries::type::TOP) { - for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; - inum_duplicate++) { - if (inum != inum_duplicate) { - if (ispec_edge(inum) == ispec_edge(inum_duplicate)) { - if (type_edge(inum) == specfem::enums::boundaries::type::LEFT) { - ispec_corners(icorner) = ispec_edge(inum); - type_corners(icorner) = - specfem::enums::boundaries::type::TOP_LEFT; - icorner++; - } - if (type_edge(inum) == specfem::enums::boundaries::type::RIGHT) { - ispec_corners(icorner) = ispec_edge(inum); - type_corners(icorner) = - specfem::enums::boundaries::type::TOP_RIGHT; - icorner++; - } - } - } - } - } - } - } - - return std::make_tuple(ispec_corners, type_corners); -} - -specfem::mesh::absorbing_boundary::absorbing_boundary( - std::ifstream &stream, int num_abs_boundary_faces, const int nspec, - const specfem::MPI::MPI *mpi) { - - // I have to do this because std::vector is a fake container type that - // causes issues when getting a reference - bool codeabsread1 = true, codeabsread2 = true, codeabsread3 = true, - codeabsread4 = true; - std::vector iedgeread(8, 0); - int numabsread, typeabsread; - if (num_abs_boundary_faces < 0) { - mpi->cout("Warning: read in negative nelemabs resetting to 0!"); - num_abs_boundary_faces = 0; - } - - specfem::kokkos::HostView1d type_edge( - "specfem::mesh::absorbing_boundary::type_edge", num_abs_boundary_faces); - - specfem::kokkos::HostView1d ispec_edge( - "specfem::mesh::absorbing_boundary::ispec_edge", num_abs_boundary_faces); - - if (num_abs_boundary_faces > 0) { - for (int inum = 0; inum < num_abs_boundary_faces; inum++) { - specfem::IO::fortran_read_line(stream, &numabsread, &codeabsread1, - &codeabsread2, &codeabsread3, - &codeabsread4, &typeabsread, &iedgeread); - if (numabsread < 1 || numabsread > nspec) - throw std::runtime_error("Wrong absorbing element number"); - ispec_edge(inum) = numabsread - 1; - std::vector codeabsread = { codeabsread1, codeabsread2, - codeabsread3, codeabsread4 }; - if (std::count(codeabsread.begin(), codeabsread.end(), true) != 1) { - throw std::runtime_error("must have one and only one absorbing edge " - "per absorbing line cited"); - } - if (codeabsread1) - type_edge(inum) = specfem::enums::boundaries::type::BOTTOM; - - if (codeabsread2) - type_edge(inum) = specfem::enums::boundaries::type::RIGHT; - - if (codeabsread3) - type_edge(inum) = specfem::enums::boundaries::type::TOP; - - if (codeabsread4) - type_edge(inum) = specfem::enums::boundaries::type::LEFT; - } - - // Find corner elements - auto [ispec_corners, type_corners] = find_corners(ispec_edge, type_edge); - - const int nelements = ispec_corners.extent(0) + ispec_edge.extent(0); - - this->nelements = nelements; - - this->index_mapping = Kokkos::View( - "specfem::mesh::absorbing_boundary::index_mapping", nelements); - - this->type = - Kokkos::View( - "specfem::mesh::absorbing_boundary::type", nelements); - // Populate ispec and type arrays - - for (int inum = 0; inum < ispec_edge.extent(0); inum++) { - this->index_mapping(inum) = ispec_edge(inum); - this->type(inum) = type_edge(inum); - } - - for (int inum = 0; inum < ispec_corners.extent(0); inum++) { - this->index_mapping(inum + ispec_edge.extent(0)) = ispec_corners(inum); - this->type(inum + ispec_edge.extent(0)) = type_corners(inum); - } - } else { - this->nelements = 0; - } - - return; -} diff --git a/src/mesh/boundaries/acoustic_free_surface.cpp b/src/mesh/boundaries/acoustic_free_surface.cpp index c2a80e22..bb8d14ab 100644 --- a/src/mesh/boundaries/acoustic_free_surface.cpp +++ b/src/mesh/boundaries/acoustic_free_surface.cpp @@ -3,58 +3,6 @@ #include "specfem_mpi/interface.hpp" #include -using view_type = - Kokkos::Subview, - std::remove_const_t, int>; - -/** - * @brief Get the type of boundary - * - * @param type int indicating if the boundary is edge of node - * @param e1 control node index for the starting node of the if the boundary is - * edge else control node index of the node if the boundary is node - * @param e2 control node index for the ending node of the if the boundary is - * edge - * @return specfem::enums::boundaries::type type of the boundary - */ -specfem::enums::boundaries::type -get_boundary_type(const int type, const int e1, const int e2, - const view_type &control_nodes) { - - // if this is a node type - if (type == 1) { - if (e1 == control_nodes(0)) { - return specfem::enums::boundaries::type::BOTTOM_LEFT; - } else if (e1 == control_nodes(1)) { - return specfem::enums::boundaries::type::BOTTOM_RIGHT; - } else if (e1 == control_nodes(2)) { - return specfem::enums::boundaries::type::TOP_RIGHT; - } else if (e1 == control_nodes(3)) { - return specfem::enums::boundaries::type::TOP_LEFT; - } else { - throw std::invalid_argument( - "Error: Could not generate type of acoustic free surface boundary"); - } - } else { - if ((e1 == control_nodes(0) && e2 == control_nodes(1)) || - (e1 == control_nodes(1) && e2 == control_nodes(0))) { - return specfem::enums::boundaries::type::BOTTOM; - } else if ((e1 == control_nodes(0) && e2 == control_nodes(3)) || - (e1 == control_nodes(3) && e2 == control_nodes(0))) { - return specfem::enums::boundaries::type::LEFT; - } else if ((e1 == control_nodes(1) && e2 == control_nodes(2)) || - (e1 == control_nodes(2) && e2 == control_nodes(1))) { - return specfem::enums::boundaries::type::RIGHT; - } else if ((e1 == control_nodes(2) && e2 == control_nodes(3)) || - (e1 == control_nodes(3) && e2 == control_nodes(2))) { - return specfem::enums::boundaries::type::TOP; - } else { - throw std::invalid_argument( - "Error: Could not generate type of acoustic free surface boundary"); - } - } -} - specfem::mesh::acoustic_free_surface::acoustic_free_surface( const int nelem_acoustic_surface) : nelem_acoustic_surface(nelem_acoustic_surface) { @@ -69,26 +17,3 @@ specfem::mesh::acoustic_free_surface::acoustic_free_surface( } return; } - -specfem::mesh::acoustic_free_surface::acoustic_free_surface( - std::ifstream &stream, const int &nelem_acoustic_surface, - const Kokkos::View knods, - const specfem::MPI::MPI *mpi) { - - std::vector acfree_edge(4, 0); - *this = specfem::mesh::acoustic_free_surface(nelem_acoustic_surface); - - if (nelem_acoustic_surface > 0) { - for (int inum = 0; inum < nelem_acoustic_surface; inum++) { - specfem::IO::fortran_read_line(stream, &acfree_edge); - this->index_mapping(inum) = acfree_edge[0] - 1; - const auto control_nodes = - Kokkos::subview(knods, Kokkos::ALL, this->index_mapping(inum)); - this->type(inum) = get_boundary_type(acfree_edge[1], acfree_edge[2] - 1, - acfree_edge[3] - 1, control_nodes); - } - } - - mpi->sync_all(); - return; -} diff --git a/src/mesh/boundaries/forcing_boundaries.cpp b/src/mesh/boundaries/forcing_boundaries.cpp index 8aab89cb..965bd491 100644 --- a/src/mesh/boundaries/forcing_boundaries.cpp +++ b/src/mesh/boundaries/forcing_boundaries.cpp @@ -1,12 +1,12 @@ #include "IO/fortranio/interface.hpp" #include "mesh/boundaries/boundaries.hpp" #include "specfem_mpi/interface.hpp" -#include "utilities.cpp" #include #include specfem::mesh::forcing_boundary::forcing_boundary( const int nelement_acforcing) { + if (nelement_acforcing > 0) { this->numacforcing = specfem::kokkos::HostView1d( "specfem::mesh::forcing_boundary::numacforcing", nelement_acforcing); @@ -110,54 +110,3 @@ specfem::mesh::forcing_boundary::forcing_boundary( } return; } - -specfem::mesh::forcing_boundary::forcing_boundary( - std::ifstream &stream, const int nelement_acforcing, const int nspec, - const specfem::MPI::MPI *mpi) { - bool codeacread1 = true, codeacread2 = true, codeacread3 = true, - codeacread4 = true; - std::vector iedgeread(8, 0); - int numacread, typeacread; - - *this = specfem::mesh::forcing_boundary(nelement_acforcing); - - if (nelement_acforcing > 0) { - for (int inum = 0; inum < nelement_acforcing; inum++) { - specfem::IO::fortran_read_line(stream, &numacread, &codeacread1, - &codeacread2, &codeacread3, &codeacread4, - &typeacread, &iedgeread); - std::vector codeacread(4, false); - if (numacread < 1 || numacread > nspec) { - std::runtime_error("Wrong absorbing element number"); - } - this->numacforcing(inum) = numacread - 1; - this->typeacforcing(inum) = typeacread; - codeacread[0] = codeacread1; - codeacread[1] = codeacread2; - codeacread[2] = codeacread3; - codeacread[3] = codeacread4; - if (std::count(codeacread.begin(), codeacread.end(), true) != 1) { - throw std::runtime_error("must have one and only one acoustic forcing " - "per acoustic forcing line cited"); - } - this->codeacforcing(inum, 0) = codeacread[0]; - this->codeacforcing(inum, 1) = codeacread[1]; - this->codeacforcing(inum, 2) = codeacread[2]; - this->codeacforcing(inum, 3) = codeacread[3]; - this->ibegin_edge1(inum) = iedgeread[0]; - this->iend_edge1(inum) = iedgeread[1]; - this->ibegin_edge2(inum) = iedgeread[2]; - this->iend_edge2(inum) = iedgeread[3]; - this->ibegin_edge3(inum) = iedgeread[4]; - this->iend_edge3(inum) = iedgeread[5]; - this->ibegin_edge4(inum) = iedgeread[6]; - this->iend_edge4(inum) = iedgeread[7]; - } - } - - // populate ib_bottom, ib_top, ib_left, ib_right arrays - calculate_ib(this->codeacforcing, this->ib_bottom, this->ib_top, - this->ib_left, this->ib_right, nelement_acforcing); - - return; -} diff --git a/src/mesh/boundaries/utilities.cpp b/src/mesh/boundaries/utilities.cpp deleted file mode 100644 index 1af8c8b9..00000000 --- a/src/mesh/boundaries/utilities.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// Find corner elements of the absorbing boundary -inline void find_corners(const specfem::kokkos::HostView1d numabs, - const specfem::kokkos::HostView2d codeabs, - specfem::kokkos::HostView2d codeabscorner, - const int num_abs_boundary_faces, - const specfem::MPI::MPI *mpi) { - int ncorner = 0; - for (int inum = 0; inum < num_abs_boundary_faces; inum++) { - if (codeabs(inum, 0)) { - for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; - inum_duplicate++) { - if (inum != inum_duplicate) { - if (numabs(inum) == numabs(inum_duplicate)) { - if (codeabs(inum_duplicate, 3)) { - codeabscorner(inum, 1) = true; - ncorner++; - } - if (codeabs(inum_duplicate, 1)) { - codeabscorner(inum, 2) = true; - ncorner++; - } - } - } - } - } - if (codeabs(inum, 2)) { - for (int inum_duplicate = 0; inum_duplicate < num_abs_boundary_faces; - inum_duplicate++) { - if (inum != inum_duplicate) { - if (numabs(inum) == numabs(inum_duplicate)) { - if (codeabs(inum_duplicate, 3)) { - codeabscorner(inum, 3) = true; - ncorner++; - } - if (codeabs(inum_duplicate, 1)) { - codeabscorner(inum, 4) = true; - ncorner++; - } - } - } - } - } - } - - int ncorner_all = mpi->reduce(ncorner, specfem::MPI::sum); - if (mpi->get_rank() == 0) - assert(ncorner_all <= 4); -} - -inline void calculate_ib(const specfem::kokkos::HostView2d code, - specfem::kokkos::HostView1d ib_bottom, - specfem::kokkos::HostView1d ib_top, - specfem::kokkos::HostView1d ib_left, - specfem::kokkos::HostView1d ib_right, - const int nelements) { - - int nspec_left = 0, nspec_right = 0, nspec_top = 0, nspec_bottom = 0; - for (int inum = 0; inum < nelements; inum++) { - if (code(inum, 0)) { - ib_bottom(inum) = nspec_bottom; - nspec_bottom++; - } else if (code(inum, 1)) { - ib_right(inum) = nspec_right; - nspec_right++; - } else if (code(inum, 2)) { - ib_top(inum) = nspec_top; - nspec_top++; - } else if (code(inum, 3)) { - ib_left(inum) = nspec_left; - nspec_left++; - } else { - throw std::runtime_error("Incorrect acoustic boundary element type read"); - } - } - - assert(nspec_left + nspec_right + nspec_bottom + nspec_top == nelements); -} diff --git a/src/mesh/coupled_interfaces/coupled_interfaces.cpp b/src/mesh/coupled_interfaces/coupled_interfaces.cpp index 1fd873a7..865ef05d 100644 --- a/src/mesh/coupled_interfaces/coupled_interfaces.cpp +++ b/src/mesh/coupled_interfaces/coupled_interfaces.cpp @@ -2,15 +2,18 @@ #include "mesh/coupled_interfaces/interface_container.hpp" #include "mesh/coupled_interfaces/interface_container.tpp" -specfem::mesh::coupled_interfaces::coupled_interfaces::coupled_interfaces( - std::ifstream &stream, const int num_interfaces_elastic_acoustic, - const int num_interfaces_acoustic_poroelastic, - const int num_interfaces_elastic_poroelastic, const specfem::MPI::MPI *mpi) - : elastic_acoustic(num_interfaces_elastic_acoustic, stream, mpi), - acoustic_poroelastic(num_interfaces_acoustic_poroelastic, stream, mpi), - elastic_poroelastic(num_interfaces_elastic_poroelastic, stream, mpi) { - return; -} +// specfem::mesh::coupled_interfaces::coupled_interfaces( +// specfem::mesh::interface_container +// elastic_acoustic, +// specfem::mesh::interface_container< +// specfem::element::medium_tag::acoustic, +// specfem::element::medium_tag::poroelastic> +// acoustic_poroelastic, +// specfem::mesh::interface_container< +// specfem::element::medium_tag::elastic, +// specfem::element::medium_tag::poroelastic> +// elastic_poroelastic) {} template diff --git a/src/mesh/elements/axial_elements.cpp b/src/mesh/elements/axial_elements.cpp index 83f8d435..e8b907ce 100644 --- a/src/mesh/elements/axial_elements.cpp +++ b/src/mesh/elements/axial_elements.cpp @@ -12,20 +12,3 @@ specfem::mesh::elements::axial_elements::axial_elements(const int nspec) { return; } - -specfem::mesh::elements::axial_elements::axial_elements( - std::ifstream &stream, const int nelem_on_the_axis, const int nspec, - const specfem::MPI::MPI *mpi) { - int ispec; - - *this = specfem::mesh::elements::axial_elements(nspec); - for (int inum = 0; inum < nelem_on_the_axis; inum++) { - specfem::IO::fortran_read_line(stream, &ispec); - if (ispec < 0 || ispec > nspec - 1) - throw std::runtime_error( - "ispec out of range when reading axial elements"); - this->is_on_the_axis(ispec) = true; - } - - return; -} diff --git a/src/mesh/elements/tangential_elements.cpp b/src/mesh/elements/tangential_elements.cpp index 1bc5dab9..aff29188 100644 --- a/src/mesh/elements/tangential_elements.cpp +++ b/src/mesh/elements/tangential_elements.cpp @@ -27,26 +27,3 @@ specfem::mesh::elements::tangential_elements::tangential_elements( } return; } - -specfem::mesh::elements::tangential_elements::tangential_elements( - std::ifstream &stream, const int nnodes_tangential_curve) { - type_real xread, yread; - - *this = specfem::mesh::elements::tangential_elements(nnodes_tangential_curve); - - specfem::IO::fortran_read_line(stream, &this->force_normal_to_surface, - &this->rec_normal_to_surface); - - if (nnodes_tangential_curve > 0) { - for (int inum = 0; inum < nnodes_tangential_curve; inum++) { - specfem::IO::fortran_read_line(stream, &xread, &yread); - this->x(inum) = xread; - this->y(inum) = yread; - } - } else { - this->force_normal_to_surface = false; - this->rec_normal_to_surface = false; - } - - return; -} diff --git a/src/mesh/materials/materials.cpp b/src/mesh/materials/materials.cpp index 387e47e3..c200d6e3 100644 --- a/src/mesh/materials/materials.cpp +++ b/src/mesh/materials/materials.cpp @@ -4,202 +4,6 @@ #include "mesh/materials/materials.tpp" #include -namespace { - -constexpr auto elastic = specfem::element::medium_tag::elastic; -constexpr auto isotropic = specfem::element::property_tag::isotropic; -constexpr auto acoustic = specfem::element::medium_tag::acoustic; - -struct input_holder { - // Struct to hold temporary variables read from database file - type_real val0, val1, val2, val3, val4, val5, val6, val7, val8, val9, val10, - val11, val12; - int n, indic; -}; - -std::vector read_materials( - std::ifstream &stream, const int numat, - specfem::mesh::materials::material &elastic_isotropic, - specfem::mesh::materials::material &acoustic_isotropic, - const specfem::MPI::MPI *mpi) { - - input_holder read_values; - - std::ostringstream message; - - std::vector index_mapping( - numat); - - message << "Material systems:\n" - << "------------------------------"; - - mpi->cout(message.str()); - - if (mpi->get_rank() == 0) - std::cout << "Number of material systems = " << numat << "\n\n"; - - std::vector > - l_elastic_isotropic; - - l_elastic_isotropic.reserve(numat); - - int index_elastic_isotropic = 0; - - std::vector > - l_acoustic_isotropic; - - l_acoustic_isotropic.reserve(numat); - - int index_acoustic_isotropic = 0; - - for (int i = 0; i < numat; i++) { - - specfem::IO::fortran_read_line( - stream, &read_values.n, &read_values.indic, &read_values.val0, - &read_values.val1, &read_values.val2, &read_values.val3, - &read_values.val4, &read_values.val5, &read_values.val6, - &read_values.val7, &read_values.val8, &read_values.val9, - &read_values.val10, &read_values.val11, &read_values.val12); - - if (read_values.n < 1 || read_values.n > numat) { - throw std::runtime_error( - "Wrong material set number. Check database file."); - } - - assert(read_values.n == i + 1); - - if (read_values.indic == 1) { - // Acoustic Material - if (read_values.val2 == 0) { - const type_real density = read_values.val0; - const type_real cp = read_values.val1; - const type_real compaction_grad = read_values.val3; - const type_real Qkappa = read_values.val5; - const type_real Qmu = read_values.val6; - - specfem::material::material acoustic_holder( - density, cp, Qkappa, Qmu, compaction_grad); - - acoustic_holder.print(); - - l_acoustic_isotropic.push_back(acoustic_holder); - - index_mapping[i] = specfem::mesh::materials::material_specification( - specfem::element::medium_tag::acoustic, - specfem::element::property_tag::isotropic, - index_acoustic_isotropic); - - index_acoustic_isotropic++; - - } else { - - const type_real density = read_values.val0; - const type_real cp = read_values.val1; - const type_real cs = read_values.val2; - const type_real compaction_grad = read_values.val3; - const type_real Qkappa = read_values.val5; - const type_real Qmu = read_values.val6; - - specfem::material::material elastic_holder( - density, cs, cp, Qkappa, Qmu, compaction_grad); - - elastic_holder.print(); - - l_elastic_isotropic.push_back(elastic_holder); - - index_mapping[i] = specfem::mesh::materials::material_specification( - specfem::element::medium_tag::elastic, - specfem::element::property_tag::isotropic, index_elastic_isotropic); - - index_elastic_isotropic++; - } - } else { - throw std::runtime_error("Material type not supported"); - } - } - - assert(l_elastic_isotropic.size() + l_acoustic_isotropic.size() == numat); - - elastic_isotropic = specfem::mesh::materials::material( - l_elastic_isotropic.size(), l_elastic_isotropic); - - acoustic_isotropic = specfem::mesh::materials::material( - l_acoustic_isotropic.size(), l_acoustic_isotropic); - - return index_mapping; -} - -void read_material_indices( - std::ifstream &stream, const int nspec, const int numat, - const std::vector - &index_mapping, - const specfem::kokkos::HostView1d< - specfem::mesh::materials::material_specification> - material_index_mapping, - const specfem::kokkos::HostView2d knods, - const specfem::MPI::MPI *mpi) { - - const int ngnod = knods.extent(0); - int n, kmato_read, pml_read; - - std::vector knods_read(ngnod, -1); - - for (int ispec = 0; ispec < nspec; ispec++) { - // format: #element_id #material_id #node_id1 #node_id2 #... - specfem::IO::fortran_read_line(stream, &n, &kmato_read, &knods_read, - &pml_read); - - if (n < 1 || n > nspec) { - throw std::runtime_error("Error reading material indices"); - } - - if (kmato_read < 1 || kmato_read > numat) { - throw std::runtime_error("Error reading material indices"); - } - - for (int i = 0; i < ngnod; i++) { - if (knods_read[i] == 0) - throw std::runtime_error("Error reading knods (node_id) values"); - - knods(i, n - 1) = knods_read[i] - 1; - } - - material_index_mapping(n - 1) = index_mapping[kmato_read - 1]; - } - - return; -} -} // namespace - -// specfem::mesh::material_ind::material_ind(const int nspec, const int ngnod) { -// this->region_CPML = -// specfem::kokkos::HostView1d("specfem::mesh::region_CPML", nspec); -// this->kmato = -// specfem::kokkos::HostView1d("specfem::mesh::region_CPML", nspec); - -// for (int ispec = 0; ispec < nspec; ispec++) { -// this->kmato(ispec) = -1; -// } -// return; -// } - -specfem::mesh::materials::materials( - std::ifstream &stream, const int numat, const int nspec, - const specfem::kokkos::HostView2d knods, const specfem::MPI::MPI *mpi) - : n_materials(numat), - material_index_mapping("specfem::mesh::material_index_mapping", nspec) { - - // Read material properties - auto index_mapping = read_materials(stream, numat, this->elastic_isotropic, - this->acoustic_isotropic, mpi); - - // Read material indices - read_material_indices(stream, nspec, numat, index_mapping, - this->material_index_mapping, knods, mpi); - - return; -} - std::variant< specfem::material::material, diff --git a/src/mesh/mesh.cpp b/src/mesh/mesh.cpp index a8a0344a..c3466044 100644 --- a/src/mesh/mesh.cpp +++ b/src/mesh/mesh.cpp @@ -1,9 +1,7 @@ #include "mesh/mesh.hpp" -#include "IO/fortranio/interface.hpp" #include "enumerations/specfem_enums.hpp" #include "kokkos_abstractions.h" #include "material/material.hpp" -#include "mesh/IO/fortran/read_mesh_database.hpp" #include "specfem_mpi/interface.hpp" #include "specfem_setup.hpp" #include @@ -12,185 +10,6 @@ #include #include -specfem::mesh::mesh::mesh(const std::string filename, - const specfem::MPI::MPI *mpi) { - - std::ifstream stream; - stream.open(filename); - - if (!stream.is_open()) { - throw std::runtime_error("Could not open database file"); - } - - try { - auto [nspec, npgeo, nproc] = - specfem::mesh::IO::fortran::read_mesh_database_header(stream, mpi); - this->nspec = nspec; - this->npgeo = npgeo; - this->nproc = nproc; - } catch (std::runtime_error &e) { - throw; - } - - try { - this->control_nodes.coord = specfem::mesh::IO::fortran::read_coorg_elements( - stream, this->npgeo, mpi); - } catch (std::runtime_error &e) { - throw; - } - - try { - this->parameters = specfem::mesh::properties(stream, mpi); - } catch (std::runtime_error &e) { - throw; - } - - this->control_nodes.ngnod = this->parameters.ngnod; - this->control_nodes.nspec = this->nspec; - this->control_nodes.knods = specfem::kokkos::HostView2d( - "specfem::mesh::knods", this->parameters.ngnod, this->nspec); - - int nspec_all = mpi->reduce(this->parameters.nspec, specfem::MPI::sum); - int nelem_acforcing_all = - mpi->reduce(this->parameters.nelem_acforcing, specfem::MPI::sum); - int nelem_acoustic_surface_all = - mpi->reduce(this->parameters.nelem_acoustic_surface, specfem::MPI::sum); - - try { - auto [n_sls, attenuation_f0_reference, read_velocities_at_f0] = - specfem::mesh::IO::fortran::read_mesh_database_attenuation(stream, mpi); - } catch (std::runtime_error &e) { - throw; - } - - try { - this->materials = - specfem::mesh::materials(stream, this->parameters.numat, this->nspec, - this->control_nodes.knods, mpi); - } catch (std::runtime_error &e) { - throw; - } - - // try { - // materials = specfem::mesh::IO::fortran::read_material_properties( - // stream, this->parameters.numat, mpi); - // } catch (std::runtime_error &e) { - // throw; - // } - - // try { - // this->material_ind = specfem::mesh::material_ind( - // stream, this->parameters.ngnod, this->nspec, this->parameters.numat, - // this->control_nodes.knods, mpi); - // } catch (std::runtime_error &e) { - // throw; - // } - - // try { - // this->interface = specfem::mesh::interfaces::interface(stream, mpi); - // } catch (std::runtime_error &e) { - // throw; - // } - - int ninterfaces; - int max_interface_size; - - specfem::IO::fortran_read_line(stream, &ninterfaces, &max_interface_size); - - try { - this->boundaries = specfem::mesh::boundaries( - stream, this->parameters.nspec, this->parameters.nelemabs, - this->parameters.nelem_acforcing, - this->parameters.nelem_acoustic_surface, this->control_nodes.knods, - mpi); - } catch (std::runtime_error &e) { - throw; - } - - // try { - // this->boundaries.absorbing_boundary = specfem::mesh::absorbing_boundary( - // stream, this->parameters.nelemabs, this->parameters.nspec, mpi); - // } catch (std::runtime_error &e) { - // throw; - // } - - // try { - // this->boundaries.forcing_boundary = specfem::mesh::forcing_boundary( - // stream, this->parameters.nelem_acforcing, this->parameters.nspec, - // mpi); - // } catch (std::runtime_error &e) { - // throw; - // } - - // try { - // this->boundaries.acoustic_free_surface = - // specfem::mesh::acoustic_free_surface( - // stream, this->parameters.nelem_acoustic_surface, - // this->control_nodes.knods, mpi); - // } catch (std::runtime_error &e) { - // throw; - // } - - try { - this->coupled_interfaces = specfem::mesh::coupled_interfaces( - stream, this->parameters.num_fluid_solid_edges, - this->parameters.num_fluid_poro_edges, - this->parameters.num_solid_poro_edges, mpi); - } catch (std::runtime_error &e) { - throw; - } - - try { - this->tangential_nodes = specfem::mesh::elements::tangential_elements( - stream, this->parameters.nnodes_tangential_curve); - } catch (std::runtime_error &e) { - throw; - } - - try { - this->axial_nodes = specfem::mesh::elements::axial_elements( - stream, this->parameters.nelem_on_the_axis, this->nspec, mpi); - } catch (std::runtime_error &e) { - throw; - } - - // Check if database file was read completely - if (stream.get() && !stream.eof()) { - throw std::runtime_error("The Database file wasn't fully read. Is there " - "anything written after axial elements?"); - } - - stream.close(); - - // Print material properties - - mpi->cout("Material systems:\n" - "------------------------------"); - - mpi->cout("Number of material systems = " + - std::to_string(this->materials.n_materials) + "\n\n"); - - const auto l_elastic_isotropic = - this->materials.elastic_isotropic.material_properties; - const auto l_acoustic_isotropic = - this->materials.acoustic_isotropic.material_properties; - - for (const auto material : l_elastic_isotropic) { - mpi->cout(material.print()); - } - - for (const auto material : l_acoustic_isotropic) { - mpi->cout(material.print()); - } - - assert(l_elastic_isotropic.size() + l_acoustic_isotropic.size() == - this->materials.n_materials); - - this->tags = specfem::mesh::tags(this->materials, this->boundaries); - - return; -} - std::string specfem::mesh::mesh::print() const { int n_elastic; diff --git a/src/mesh/properties/properties.cpp b/src/mesh/properties/properties.cpp deleted file mode 100644 index 6fba389c..00000000 --- a/src/mesh/properties/properties.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "mesh/properties/properties.hpp" -#include "IO/fortranio/interface.hpp" - -specfem::mesh::properties::properties(std::ifstream &stream, - const specfem::MPI::MPI *mpi) { - // --------------------------------------------------------------------- - // reading mesh properties - - specfem::IO::fortran_read_line(stream, &this->numat, &this->ngnod, - &this->nspec, &this->pointsdisp, - &this->plot_lowerleft_corner_only); - - // --------------------------------------------------------------------- - if (this->ngnod != 9) { - std::ostringstream error_message; - error_message << "Number of control nodes per element must be 9, but is " - << this->ngnod << "\n" - << "Currently, there is a bug when NGNOD == 4 \n"; - throw std::runtime_error(error_message.str()); - } - - specfem::IO::fortran_read_line( - stream, &this->nelemabs, &this->nelem_acforcing, - &this->nelem_acoustic_surface, &this->num_fluid_solid_edges, - &this->num_fluid_poro_edges, &this->num_solid_poro_edges, - &this->nnodes_tangential_curve, &this->nelem_on_the_axis); - // ---------------------------------------------------------------------- - - mpi->sync_all(); -} diff --git a/src/parameter_parser/setup.cpp b/src/parameter_parser/setup.cpp index 46db13dc..9caa7fc4 100644 --- a/src/parameter_parser/setup.cpp +++ b/src/parameter_parser/setup.cpp @@ -120,6 +120,24 @@ specfem::runtime_configuration::setup::setup(const std::string ¶meter_file, this->wavefield = nullptr; } + if (const YAML::Node &n_plotter = n_writer["display"]) { + if ((n_plotter["simulation-field"] && + n_plotter["simulation-field"].as() != "forward")) { + std::ostringstream message; + message << "Error: Plotting a " + << n_plotter["simulation-field"].as() + << " wavefield in forward simulation mode. \n"; + throw std::runtime_error(message.str()); + } + + at_least_one_writer = true; + this->plot_wavefield = + std::make_unique( + n_plotter); + } else { + this->plot_wavefield = nullptr; + } + this->kernel = nullptr; if (!at_least_one_writer) { @@ -186,6 +204,21 @@ specfem::runtime_configuration::setup::setup(const std::string ¶meter_file, throw std::runtime_error(message.str()); } + + if (const YAML::Node &n_plotter = n_writer["display"]) { + if (n_plotter["simulation-field"] && + n_plotter["simulation-field"].as() == "forward") { + std::ostringstream message; + message << "Error: Plotting a forward wavefield in combined " + << "simulation mode. \n"; + throw std::runtime_error(message.str()); + } + this->plot_wavefield = + std::make_unique( + n_plotter); + } else { + this->plot_wavefield = nullptr; + } } } @@ -212,7 +245,7 @@ specfem::runtime_configuration::setup::setup(const std::string ¶meter_file, } std::string specfem::runtime_configuration::setup::print_header( - const std::chrono::time_point now) { + const std::chrono::time_point now) { std::ostringstream message; diff --git a/src/parameter_parser/writer/plot_wavefield.cpp b/src/parameter_parser/writer/plot_wavefield.cpp new file mode 100644 index 00000000..6b03cbe7 --- /dev/null +++ b/src/parameter_parser/writer/plot_wavefield.cpp @@ -0,0 +1,113 @@ +#include "parameter_parser/writer/plot_wavefield.hpp" +#include "plotter/plot_wavefield.hpp" +#include "plotter/plotter.hpp" +#include + +specfem::runtime_configuration::plot_wavefield::plot_wavefield( + const YAML::Node &Node) { + + const std::string output_format = [&]() -> std::string { + if (Node["format"]) { + return Node["format"].as(); + } else { + return "PNG"; + } + }(); + + if (output_format == "on_screen") { + throw std::runtime_error("On screen plotting not supported"); + } + + const std::string output_folder = [&]() -> std::string { + if (Node["directory"]) { + return Node["directory"].as(); + } else { + return boost::filesystem::current_path().string(); + } + }(); + + if (!boost::filesystem::is_directory( + boost::filesystem::path(output_folder))) { + std::ostringstream message; + message << "Output folder : " << output_folder << " does not exist."; + throw std::runtime_error(message.str()); + } + + const std::string component = [&]() -> std::string { + if (Node["field"]) { + return Node["field"].as(); + } else { + throw std::runtime_error( + "Plotting wavefield not specified in the display section"); + } + }(); + + const std::string wavefield_type = [&]() -> std::string { + if (Node["simulation-field"]) { + return Node["simulation-field"].as(); + } else { + throw std::runtime_error( + "Simulation field type not specified in the display section"); + } + }(); + + const int time_interval = [&]() -> int { + if (Node["time-interval"]) { + return Node["time-interval"].as(); + } else { + throw std::runtime_error( + "Time interval not specified in the display section"); + } + }(); + + *this = specfem::runtime_configuration::plot_wavefield( + output_format, output_folder, component, wavefield_type, time_interval); + + return; +} + +std::shared_ptr +specfem::runtime_configuration::plot_wavefield::instantiate_wavefield_plotter( + const specfem::compute::assembly &assembly) const { + + const auto output_format = [&]() { + if (this->output_format == "PNG") { + return specfem::display::format::PNG; + } else if (this->output_format == "JPG") { + return specfem::display::format::JPG; + } else if (this->output_format == "on_screen") { + return specfem::display::format::on_screen; + } else { + throw std::runtime_error("Unknown plotter format"); + } + }(); + + const auto component = [&]() { + if (this->component == "displacement") { + return specfem::display::wavefield::displacement; + } else if (this->component == "velocity") { + return specfem::display::wavefield::velocity; + } else if (this->component == "acceleration") { + return specfem::display::wavefield::acceleration; + } else if (this->component == "pressure") { + return specfem::display::wavefield::pressure; + } else { + throw std::runtime_error( + "Unknown wavefield component in the display section"); + } + }(); + + const auto wavefield = [&]() { + if (this->wavefield_type == "forward") { + return specfem::wavefield::simulation_field::forward; + } else if (this->wavefield_type == "adjoint") { + return specfem::wavefield::simulation_field::adjoint; + } else { + throw std::runtime_error("Unknown wavefield type in the display section"); + } + }(); + + return std::make_shared( + assembly, output_format, component, wavefield, time_interval, + this->output_folder); +} diff --git a/src/plotter/plot_wavefield.cpp b/src/plotter/plot_wavefield.cpp new file mode 100644 index 00000000..d7122188 --- /dev/null +++ b/src/plotter/plot_wavefield.cpp @@ -0,0 +1,329 @@ + +#include "plotter/plot_wavefield.hpp" +#include "compute/assembly/assembly.hpp" +#include "enumerations/display.hpp" + +#ifdef NO_VTK + +#include + +#else + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // NO_VTK + +#ifdef NO_VTK + +void specfem::plotter::plot_wavefield::plot() { + std::ostringstream message; + message + << "Display section is not enabled, since SPECFEM++ was built without " + "VTK\n" + << "Please install VTK and rebuild SPECFEM++ with -DVTK_DIR=/path/to/vtk"; + throw std::runtime_error(message.str()); +} + +#else + +namespace { + +// Sigmoid function centered at 0.0 +double sigmoid(double x) { return (1 / (1 + std::exp(-100 * x)) - 0.5) * 1.5; } + +// Maps different materials to different colors +vtkSmartPointer +map_materials_with_color(const specfem::compute::assembly &assembly) { + + const auto &properties = assembly.properties; + + const std::unordered_map > + material_colors = { + { specfem::element::medium_tag::elastic, // sienna color + { 160, 82, 45 } }, + { specfem::element::medium_tag::acoustic, // aqua color + { 0, 255, 255 } }, + }; + + const auto &coordinates = assembly.mesh.points.h_coord; + const int nspec = assembly.mesh.nspec; + const int ngllx = assembly.mesh.ngllx; + const int ngllz = assembly.mesh.ngllz; + + const int cell_points = 4; + + const std::array z_index = { 0, ngllz - 1, ngllz - 1, 0 }; + const std::array x_index = { 0, 0, ngllx - 1, ngllx - 1 }; + + auto points = vtkSmartPointer::New(); + + auto cells = vtkSmartPointer::New(); + + auto colors = vtkSmartPointer::New(); + colors->SetNumberOfComponents(3); + colors->SetName("Colors"); + + for (int icell = 0; icell < nspec; ++icell) { + for (int i = 0; i < cell_points; ++i) { + points->InsertNextPoint(coordinates(0, icell, z_index[i], x_index[i]), + coordinates(1, icell, z_index[i], x_index[i]), + 0.0); + } + auto quad = vtkSmartPointer::New(); + for (int i = 0; i < cell_points; ++i) { + quad->GetPointIds()->SetId(i, icell * cell_points + i); + } + cells->InsertNextCell(quad); + + const auto material = properties.h_element_types(icell); + const auto color = material_colors.at(material); + unsigned char color_uc[3] = { static_cast(color[0]), + static_cast(color[1]), + static_cast(color[2]) }; + colors->InsertNextTypedTuple(color_uc); + } + + auto unstructured_grid = vtkSmartPointer::New(); + unstructured_grid->SetPoints(points); + unstructured_grid->SetCells(VTK_QUAD, cells); + + unstructured_grid->GetCellData()->SetScalars(colors); + + auto mapper = vtkSmartPointer::New(); + mapper->SetInputData(unstructured_grid); + + return mapper; +} + +vtkSmartPointer get_wavefield_on_vtk_grid( + specfem::compute::assembly &assembly, + const specfem::wavefield::simulation_field type, + const specfem::display::wavefield &display_component) { + + const auto component = [&display_component]() { + if (display_component == specfem::display::wavefield::displacement) { + return specfem::wavefield::type::displacement; + } else if (display_component == specfem::display::wavefield::velocity) { + return specfem::wavefield::type::velocity; + } else if (display_component == specfem::display::wavefield::acceleration) { + return specfem::wavefield::type::acceleration; + } else if (display_component == specfem::display::wavefield::pressure) { + return specfem::wavefield::type::pressure; + } else { + throw std::runtime_error("Unsupported component"); + } + }(); + + const auto &wavefield = + assembly.generate_wavefield_on_entire_grid(type, component); + const auto &coordinates = assembly.mesh.points.h_coord; + + const int ncells = wavefield.extent(0); + const int ngllz = wavefield.extent(1); + const int ngllx = wavefield.extent(2); + + const int cell_points = 9; + + const std::array z_index = { 0, + 0, + ngllz - 1, + ngllz - 1, + 0, + (ngllz - 1) / 2, + ngllz - 1, + (ngllz - 1) / 2, + (ngllz - 1) / 2 }; + const std::array x_index = { 0, + ngllx - 1, + ngllx - 1, + 0, + (ngllx - 1) / 2, + ngllx - 1, + (ngllx - 1) / 2, + 0, + (ngllx - 1) / 2 }; + + auto points = vtkSmartPointer::New(); + auto cells = vtkSmartPointer::New(); + auto scalars = vtkSmartPointer::New(); + + for (int icell = 0; icell < ncells; ++icell) { + for (int i = 0; i < cell_points; ++i) { + points->InsertNextPoint(coordinates(0, icell, z_index[i], x_index[i]), + coordinates(1, icell, z_index[i], x_index[i]), + 0.0); + if (component == specfem::wavefield::type::pressure) { + scalars->InsertNextValue( + std::sqrt(wavefield(icell, z_index[i], x_index[i], 0) * + wavefield(icell, z_index[i], x_index[i], 0))); + } else { + scalars->InsertNextValue( + std::sqrt((wavefield(icell, z_index[i], x_index[i], 0) * + wavefield(icell, z_index[i], x_index[i], 0)) + + (wavefield(icell, z_index[i], x_index[i], 1) * + wavefield(icell, z_index[i], x_index[i], 1)))); + } + } + auto quad = vtkSmartPointer::New(); + for (int i = 0; i < cell_points; ++i) { + quad->GetPointIds()->SetId(i, icell * cell_points + i); + } + cells->InsertNextCell(quad); + } + + auto unstructured_grid = vtkSmartPointer::New(); + unstructured_grid->SetPoints(points); + unstructured_grid->SetCells(VTK_BIQUADRATIC_QUAD, cells); + unstructured_grid->GetPointData()->SetScalars(scalars); + + return unstructured_grid; +} +} // namespace + +void specfem::plotter::plot_wavefield::plot() { + + auto colors = vtkSmartPointer::New(); + + if (this->output_format != specfem::display::format::on_screen) { + vtkSmartPointer graphics_factory; + graphics_factory->SetOffScreenOnlyMode(1); + graphics_factory->SetUseMesaClasses(1); + } + + auto material_mapper = map_materials_with_color(this->assembly); + + // Create an actor + auto material_actor = vtkSmartPointer::New(); + material_actor->SetMapper(material_mapper); + + const auto unstructured_grid = get_wavefield_on_vtk_grid( + this->assembly, this->wavefield, this->component); + const int ncell = unstructured_grid->GetNumberOfCells(); + + double range[2]; + + unstructured_grid->GetPointData()->GetScalars()->GetRange(range); + + // create a lookup table to map cell data to colors. The range is from + // range[0] to range[1] + vtkSmartPointer lut = vtkSmartPointer::New(); + lut->SetNumberOfTableValues(256); + lut->SetRange(range[0], range[1]); + lut->Build(); + + // set color gradient from white to black + for (int i = 0; i < 256; ++i) { + double t = static_cast(i) / 255.0; + double transparency = sigmoid(t); + lut->SetTableValue(i, 1.0 - t, 1.0 - t, 1.0 - t, transparency); + } + + // Create a mapper + auto mapper = vtkSmartPointer::New(); + mapper->SetInputData(unstructured_grid); + mapper->SetLookupTable(lut); + mapper->SetScalarRange(range[0], range[1]); + mapper->SetScalarModeToUsePointData(); + mapper->SetColorModeToMapScalars(); + mapper->SetScalarVisibility(1); + + // Create an actor + auto actor = vtkSmartPointer::New(); + actor->SetMapper(mapper); + + vtkSmartPointer edges = + vtkSmartPointer::New(); + edges->SetInputData(unstructured_grid); + edges->Update(); + + vtkSmartPointer outlineMapper = + vtkSmartPointer::New(); + outlineMapper->SetInputConnection(edges->GetOutputPort()); + outlineMapper->ScalarVisibilityOff(); + + vtkSmartPointer outlineActor = vtkSmartPointer::New(); + outlineActor->SetMapper(outlineMapper); + outlineActor->GetProperty()->SetColor(colors->GetColor3d("Black").GetData()); + outlineActor->GetProperty()->SetLineWidth(0.5); + + // Create a renderer + auto renderer = vtkSmartPointer::New(); + renderer->AddActor(material_actor); + // renderer->AddActor(outlineActor); + renderer->AddActor(actor); + renderer->SetBackground(colors->GetColor3d("White").GetData()); + renderer->ResetCamera(); + + if (this->output_format != specfem::display::format::on_screen) { + // Create a render window + auto render_window = vtkSmartPointer::New(); + render_window->SetOffScreenRendering(1); + render_window->AddRenderer(renderer); + render_window->SetSize(1280, 1280); + render_window->SetWindowName("Wavefield"); + auto image_filter = vtkSmartPointer::New(); + image_filter->SetInput(render_window); + image_filter->Update(); + + // Save the plot + if (this->output_format == specfem::display::format::PNG) { + const auto filename = + this->output_folder / + ("wavefield" + std::to_string(this->m_istep) + ".png"); + auto writer = vtkSmartPointer::New(); + writer->SetFileName(filename.string().c_str()); + writer->SetInputConnection(image_filter->GetOutputPort()); + writer->Write(); + } else if (this->output_format == specfem::display::format::JPG) { + const auto filename = + this->output_folder / + ("wavefield" + std::to_string(this->m_istep) + ".jpg"); + auto writer = vtkSmartPointer::New(); + writer->SetFileName(filename.string().c_str()); + writer->SetInputConnection(image_filter->GetOutputPort()); + writer->Write(); + } else { + throw std::runtime_error("Unsupported output format"); + } + } else { + // Create a render window interactor + auto render_window = vtkSmartPointer::New(); + render_window->AddRenderer(renderer); + render_window->SetSize(1280, 1280); + render_window->SetWindowName("Wavefield"); + + auto render_window_interactor = + vtkSmartPointer::New(); + render_window_interactor->SetRenderWindow(render_window); + + // Start the event loop + render_window->Render(); + render_window_interactor->Start(); + } +} + +#endif // NO_VTK diff --git a/src/specfem2d.cpp b/src/specfem2d.cpp index 7834715d..4d402c2b 100644 --- a/src/specfem2d.cpp +++ b/src/specfem2d.cpp @@ -1,6 +1,9 @@ #include "compute/interface.hpp" // #include "coupled_interface/interface.hpp" // #include "domain/interface.hpp" +#include "IO/mesh/read_mesh.hpp" +#include "IO/receivers/read_receivers.hpp" +#include "IO/sources/read_sources.hpp" #include "kokkos_abstractions.h" #include "mesh/mesh.hpp" #include "parameter_parser/interface.hpp" @@ -21,14 +24,14 @@ #include // Specfem2d driver -std::string print_end_message( - std::chrono::time_point start_time, - std::chrono::duration solver_time) { +std::string +print_end_message(std::chrono::time_point start_time, + std::chrono::duration solver_time) { std::ostringstream message; // current date/time based on current system - const auto now = std::chrono::high_resolution_clock::now(); + const auto now = std::chrono::system_clock::now(); - std::time_t c_now = std::chrono::high_resolution_clock::to_time_t(now); + std::time_t c_now = std::chrono::system_clock::to_time_t(now); std::chrono::duration diff = now - start_time; @@ -87,7 +90,7 @@ void execute(const std::string ¶meter_file, const std::string &default_file, // -------------------------------------------------------------- // Read parameter file // -------------------------------------------------------------- - auto start_time = std::chrono::high_resolution_clock::now(); + auto start_time = std::chrono::system_clock::now(); specfem::runtime_configuration::setup setup(parameter_file, default_file); const auto [database_filename, source_filename] = setup.get_databases(); mpi->cout(setup.print_header(start_time)); @@ -97,7 +100,8 @@ void execute(const std::string ¶meter_file, const std::string &default_file, // Read mesh and materials // -------------------------------------------------------------- const auto quadrature = setup.instantiate_quadrature(); - const specfem::mesh::mesh mesh(database_filename, mpi); + const specfem::mesh::mesh mesh = + specfem::IO::read_mesh(database_filename, mpi); // -------------------------------------------------------------- // -------------------------------------------------------------- @@ -105,13 +109,13 @@ void execute(const std::string ¶meter_file, const std::string &default_file, // -------------------------------------------------------------- const int nsteps = setup.get_nsteps(); const specfem::simulation::type simulation_type = setup.get_simulation_type(); - auto [sources, t0] = specfem::sources::read_sources( + auto [sources, t0] = specfem::IO::read_sources( source_filename, nsteps, setup.get_t0(), setup.get_dt(), simulation_type); setup.update_t0(t0); // Update t0 in case it was changed const auto stations_filename = setup.get_stations_file(); const auto angle = setup.get_receiver_angle(); - auto receivers = specfem::receivers::read_receivers(stations_filename, angle); + auto receivers = specfem::IO::read_receivers(stations_filename, angle); mpi->cout("Source Information:"); mpi->cout("-------------------------------"); @@ -175,12 +179,20 @@ void execute(const std::string ¶meter_file, const std::string &default_file, } // -------------------------------------------------------------- + // -------------------------------------------------------------- + // Instantiate plotter + // -------------------------------------------------------------- + std::vector > plotters; + const auto wavefield_plotter = setup.instantiate_wavefield_plotter(assembly); + plotters.push_back(wavefield_plotter); + // -------------------------------------------------------------- + // -------------------------------------------------------------- // Instantiate Solver // -------------------------------------------------------------- specfem::enums::element::quadrature::static_quadrature_points<5> qp5; std::shared_ptr solver = - setup.instantiate_solver(dt, assembly, time_scheme, qp5); + setup.instantiate_solver(dt, assembly, time_scheme, qp5, plotters); // -------------------------------------------------------------- // -------------------------------------------------------------- @@ -190,9 +202,9 @@ void execute(const std::string ¶meter_file, const std::string &default_file, mpi->cout("Executing time loop:"); mpi->cout("-------------------------------"); - const auto solver_start_time = std::chrono::high_resolution_clock::now(); + const auto solver_start_time = std::chrono::system_clock::now(); solver->run(); - const auto solver_end_time = std::chrono::high_resolution_clock::now(); + const auto solver_end_time = std::chrono::system_clock::now(); std::chrono::duration solver_time = solver_end_time - solver_start_time; diff --git a/tests/unit-tests/CMakeLists.txt b/tests/unit-tests/CMakeLists.txt index 90842351..8ea3abcd 100644 --- a/tests/unit-tests/CMakeLists.txt +++ b/tests/unit-tests/CMakeLists.txt @@ -101,6 +101,7 @@ target_link_libraries( mpi_environment kokkos_environment yaml-cpp + IO # material_class -lpthread -lm ) @@ -175,6 +176,7 @@ target_link_libraries( kokkos_environment yaml-cpp compare_arrays + IO Boost::filesystem # material_class -lpthread -lm @@ -182,8 +184,10 @@ target_link_libraries( add_executable( assembly_tests + assembly/test_fixture/test_fixture.cpp assembly/runner.cpp - assembly/kernels.cpp + assembly/kernels/kernels.cpp + assembly/compute_wavefield/compute_wavefield.cpp ) target_link_libraries( @@ -192,6 +196,7 @@ target_link_libraries( compute quadrature mpi_environment + IO kokkos_environment yaml-cpp Boost::filesystem @@ -213,6 +218,7 @@ target_link_libraries( kokkos_environment algorithms point + IO Boost::filesystem ) @@ -229,6 +235,7 @@ target_link_libraries( mpi_environment kokkos_environment algorithms + IO Boost::filesystem point ) @@ -288,7 +295,9 @@ target_link_libraries( point algorithms domain + IO coupled_interface + plotter -lpthread -lm ) @@ -315,6 +324,7 @@ target_link_libraries( coupled_interface domain solver + plotter -lpthread -lm ) @@ -333,6 +343,7 @@ target_link_libraries( compute parameter_reader writer + plotter domain coupled_interface solver @@ -354,6 +365,7 @@ target_link_libraries( compute parameter_reader writer + plotter domain coupled_interface solver diff --git a/tests/unit-tests/algorithms/interpolate_function.cpp b/tests/unit-tests/algorithms/interpolate_function.cpp index 1dc05c3b..fd31d00a 100644 --- a/tests/unit-tests/algorithms/interpolate_function.cpp +++ b/tests/unit-tests/algorithms/interpolate_function.cpp @@ -1,3 +1,4 @@ +#include "IO/mesh/read_mesh.hpp" #include "Kokkos_Environment.hpp" #include "MPI_environment.hpp" #include "algorithms/interpolate.hpp" @@ -20,7 +21,7 @@ TEST(ALGORITHMS, interpolate_function) { // Read Mesh database specfem::MPI::MPI *mpi = MPIEnvironment::get_mpi(); - specfem::mesh::mesh mesh(database_file, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); constexpr int N = 5; diff --git a/tests/unit-tests/algorithms/locate.cpp b/tests/unit-tests/algorithms/locate.cpp index 07d68d59..c1b6eebd 100644 --- a/tests/unit-tests/algorithms/locate.cpp +++ b/tests/unit-tests/algorithms/locate.cpp @@ -1,3 +1,4 @@ +#include "IO/mesh/read_mesh.hpp" #include "Kokkos_Environment.hpp" #include "MPI_environment.hpp" #include "algorithms/locate_point.hpp" @@ -13,7 +14,7 @@ TEST(ALGORITHMS, locate_point) { // Read Mesh database specfem::MPI::MPI *mpi = MPIEnvironment::get_mpi(); - specfem::mesh::mesh mesh(database_file, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); // Quadratures specfem::quadrature::gll::gll gll(0.0, 0.0, 5); diff --git a/tests/unit-tests/assembly/compute_wavefield/compute_wavefield.cpp b/tests/unit-tests/assembly/compute_wavefield/compute_wavefield.cpp new file mode 100644 index 00000000..cb3593ec --- /dev/null +++ b/tests/unit-tests/assembly/compute_wavefield/compute_wavefield.cpp @@ -0,0 +1,123 @@ +#include "../test_fixture/test_fixture.hpp" +#include "enumerations/medium.hpp" +#include "enumerations/wavefield.hpp" +#include "generate_data.hpp" +#include "point/coordinates.hpp" +#include "point/field.hpp" +#include "test_helper.hpp" +#include +#include +#include +#include +#include + +template +void test_element_wavefield( + const int ispec, + const Kokkos::View + &wavefield, + specfem::compute::assembly &assembly) { + + const auto properties = assembly.properties; + + const auto medium = properties.h_element_types(ispec); + const auto property = properties.h_element_property(ispec); + + if ((medium == specfem::element::medium_tag::elastic) && + (property == specfem::element::property_tag::isotropic)) { + test_helper + handle(ispec, wavefield, assembly); + handle.test(); + } else if ((medium == specfem::element::medium_tag::acoustic) && + (property == specfem::element::property_tag::isotropic)) { + test_helper + handle(ispec, wavefield, assembly); + handle.test(); + } else { + throw std::runtime_error("Unsupported medium and property combination"); + } +} + +template +void test_compute_wavefield(specfem::compute::assembly &assembly) { + + const auto ispecs = generate_data(assembly); + + const auto wavefield = + assembly.generate_wavefield_on_entire_grid(type, component); + + for (const auto ispec : ispecs) { + test_element_wavefield(ispec, wavefield, assembly); + } +} + +void test_compute_wavefield(specfem::compute::assembly &assembly) { + + try { + test_compute_wavefield( + assembly); + } catch (std::exception &e) { + std::ostringstream message; + message << "Error in computing displacement wavefield: \n\t" << e.what(); + throw std::runtime_error(message.str()); + } + + try { + test_compute_wavefield( + assembly); + } catch (std::exception &e) { + std::ostringstream message; + message << "Error in computing velocity wavefield: \n\t" << e.what(); + throw std::runtime_error(message.str()); + } + + try { + test_compute_wavefield( + assembly); + } catch (std::exception &e) { + std::ostringstream message; + message << "Error in computing acceleration wavefield: \n\t" << e.what(); + throw std::runtime_error(message.str()); + } + + try { + test_compute_wavefield( + assembly); + } catch (std::exception &e) { + std::ostringstream message; + message << "Error in computing pressure wavefield: \n\t" << e.what(); + throw std::runtime_error(message.str()); + } +} + +TEST_F(ASSEMBLY, compute_wavefield) { + for (auto parameters : *this) { + const auto Test = std::get<0>(parameters); + auto assembly = std::get<1>(parameters); + + try { + test_compute_wavefield(assembly); + + std::cout << "-------------------------------------------------------\n" + << "\033[0;32m[PASSED]\033[0m " << Test.name << "\n" + << "-------------------------------------------------------\n\n" + << std::endl; + } catch (std::exception &e) { + std::cout << "-------------------------------------------------------\n" + << "\033[0;31m[FAILED]\033[0m \n" + << "-------------------------------------------------------\n" + << "- Test: " << Test.name << "\n" + << "- Error: " << e.what() << "\n" + << "-------------------------------------------------------\n\n" + << std::endl; + ADD_FAILURE(); + } + } +} diff --git a/tests/unit-tests/assembly/compute_wavefield/generate_data.hpp b/tests/unit-tests/assembly/compute_wavefield/generate_data.hpp new file mode 100644 index 00000000..ad302b7f --- /dev/null +++ b/tests/unit-tests/assembly/compute_wavefield/generate_data.hpp @@ -0,0 +1,77 @@ +// generate_data function generates wavefield data for compute_wavefield tests +// We pick a single element for different medium_tag and property_tag +// combinations and assign 1.0 to all the quadrature points in the element + +#pragma once +#include "enumerations/medium.hpp" +#include "enumerations/wavefield.hpp" +#include "point/coordinates.hpp" +#include "point/field.hpp" + +template +void generate_data(specfem::compute::assembly &assembly, + std::vector &ispecs) { + + auto field = assembly.fields.template get_simulation_field(); + + const int ngllx = assembly.mesh.ngllx; + const int ngllz = assembly.mesh.ngllz; + + const auto elements = + assembly.properties.get_elements_on_host(medium, property); + + constexpr int num_components = + specfem::element::attributes::components(); + + using PointFieldType = + specfem::point::field; + + using IndexType = + specfem::point::index; + + const int nelements = elements.size(); + + if (nelements == 0) + return; + + const int ispec = elements(nelements / 2); + ispecs.push_back(ispec); + + for (int iz = 0; iz < ngllz; iz++) { + for (int ix = 0; ix < ngllx; ix++) { + const IndexType index(ispec, iz, ix); + + PointFieldType point_field; + + for (int ic = 0; ic < num_components; ic++) { + point_field.displacement(ic) = 1.0; + point_field.velocity(ic) = 1.0; + point_field.acceleration(ic) = 1.0; + } + + specfem::compute::store_on_host(index, point_field, field); + } + } + + field.copy_to_device(); +} + +template +std::vector generate_data(specfem::compute::assembly &assembly) { + + std::vector ispecs; + + generate_data(assembly, ispecs); + + generate_data(assembly, ispecs); + + return ispecs; +} diff --git a/tests/unit-tests/assembly/compute_wavefield/test_helper.hpp b/tests/unit-tests/assembly/compute_wavefield/test_helper.hpp new file mode 100644 index 00000000..52d45d06 --- /dev/null +++ b/tests/unit-tests/assembly/compute_wavefield/test_helper.hpp @@ -0,0 +1,263 @@ + +// Check if the wavefield is correctly generated for the given element. +// Given an element index, we check if the wavefield component was correctly +// generated. We compare the generated wavefield with the expected wavefield. + +// Expected wavefield: +// - When a component is present as on of the primary components for a medium +// type. +// We just check if the wavefield component is equal to 1.0. + +// - When a component is not present as on of the primary components for a +// medium type. +// We check that the value is equal to 0.0. +// Since, the computed strain for a uniform wavefield is zero. + +#pragma once +#include "enumerations/medium.hpp" +#include "enumerations/wavefield.hpp" +#include "point/coordinates.hpp" +#include "point/field.hpp" + +template +class test_helper; + +template +class test_helper { + +public: + test_helper(const int ispec, + const Kokkos::View &wavefield, + specfem::compute::assembly &assembly) + : ispec(ispec), wavefield(wavefield), assembly(assembly) {} + + void test() { + + constexpr static int num_components = + specfem::wavefield::wavefield::num_components(); + + const int ngllz = assembly.mesh.ngllz; + const int ngllx = assembly.mesh.ngllx; + + for (int iz = 0; iz < ngllz; iz++) { + for (int ix = 0; ix < ngllx; ix++) { + + for (int ic = 0; ic < num_components; ic++) { + const auto computed = wavefield(ispec, iz, ix, ic); + const auto expected = 1.0; + + if (std::abs(computed - expected) > 1.0e-4) { + std::ostringstream message; + message << "Error in elastic wavefield computation: \n" + << " ispec = " << ispec << "\n" + << " iz = " << iz << "\n" + << " ix = " << ix << "\n" + << " component = " << ic << "\n" + << " computed = " << computed << "\n" + << " expected = " << expected; + throw std::runtime_error(message.str()); + } + } + } + } + } + +private: + const int ispec; + const Kokkos::View + &wavefield; + specfem::compute::assembly &assembly; +}; + +template <> +class test_helper { +public: + test_helper(const int ispec, + const Kokkos::View &wavefield, + specfem::compute::assembly &assembly) + : ispec(ispec), wavefield(wavefield), assembly(assembly) {} + + void test() { + + constexpr static int num_components = specfem::wavefield::wavefield< + specfem::dimension::type::dim2, + specfem::wavefield::type::pressure>::num_components(); + + const int ngllz = assembly.mesh.ngllz; + const int ngllx = assembly.mesh.ngllx; + + using PointProperties = specfem::point::properties< + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, + specfem::element::property_tag::isotropic, false>; + + for (int iz = 0; iz < ngllz; iz++) { + for (int ix = 0; ix < ngllx; ix++) { + + const specfem::point::index + index(ispec, iz, ix); + + PointProperties point_properties; + specfem::compute::load_on_host(index, assembly.properties, + point_properties); + + for (int ic = 0; ic < num_components; ic++) { + const auto computed = + wavefield(ispec, iz, ix, ic) / + ((point_properties.lambdaplus2mu + point_properties.lambda) / + 2.0); + const auto expected = 0.0; + + if (std::abs(computed - expected) > 1.0e-4) { + std::ostringstream message; + message << "Error in elastic wavefield computation: \n" + << " ispec = " << ispec << "\n" + << " iz = " << iz << "\n" + << " ix = " << ix << "\n" + << " component = " << ic << "\n" + << " computed = " << computed << "\n" + << " expected = " << expected; + throw std::runtime_error(message.str()); + } + } + } + } + } + +private: + const int ispec; + const Kokkos::View + &wavefield; + specfem::compute::assembly &assembly; +}; + +template +class test_helper { + +public: + test_helper(const int ispec, + const Kokkos::View &wavefield, + specfem::compute::assembly &assembly) + : ispec(ispec), wavefield(wavefield), assembly(assembly) {} + + void test() { + + constexpr static int num_components = + specfem::wavefield::wavefield::num_components(); + + const int ngllz = assembly.mesh.ngllz; + const int ngllx = assembly.mesh.ngllx; + + using PointProperties = specfem::point::properties< + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + specfem::element::property_tag::isotropic, false>; + + for (int iz = 0; iz < ngllz; iz++) { + for (int ix = 0; ix < ngllx; ix++) { + + const specfem::point::index + index(ispec, iz, ix); + + PointProperties point_properties; + specfem::compute::load_on_host(index, assembly.properties, + point_properties); + + for (int ic = 0; ic < num_components; ic++) { + const auto computed = + wavefield(ispec, iz, ix, ic) / point_properties.rho_inverse; + const auto expected = 0.0; + + if (std::abs(computed - expected) > 1.0e-4) { + std::ostringstream message; + message << "Error in acoustic wavefield computation: \n" + << " ispec = " << ispec << "\n" + << " iz = " << iz << "\n" + << " ix = " << ix << "\n" + << " component = " << ic << "\n" + << " computed = " << computed << "\n" + << " expected = " << expected; + throw std::runtime_error(message.str()); + } + } + } + } + } + +private: + const int ispec; + const Kokkos::View + &wavefield; + specfem::compute::assembly &assembly; +}; + +template <> +class test_helper { + +public: + test_helper(const int ispec, + const Kokkos::View &wavefield, + specfem::compute::assembly &assembly) + : ispec(ispec), wavefield(wavefield), assembly(assembly) {} + + void test() { + + constexpr static int num_components = specfem::wavefield::wavefield< + specfem::dimension::type::dim2, + specfem::wavefield::type::pressure>::num_components(); + + const int ngllz = assembly.mesh.ngllz; + const int ngllx = assembly.mesh.ngllx; + + using PointProperties = specfem::point::properties< + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, + specfem::element::property_tag::isotropic, false>; + + for (int iz = 0; iz < ngllz; iz++) { + for (int ix = 0; ix < ngllx; ix++) { + + const specfem::point::index + index(ispec, iz, ix); + + PointProperties point_properties; + specfem::compute::load_on_host(index, assembly.properties, + point_properties); + + for (int ic = 0; ic < num_components; ic++) { + const auto computed = wavefield(ispec, iz, ix, ic); + const auto expected = -1.0; + + if (std::abs(computed - expected) > 1.0e-4) { + std::ostringstream message; + message << "Error in acoustic wavefield computation: \n" + << " ispec = " << ispec << "\n" + << " iz = " << iz << "\n" + << " ix = " << ix << "\n" + << " component = " << ic << "\n" + << " computed = " << computed << "\n" + << " expected = " << expected; + throw std::runtime_error(message.str()); + } + } + } + } + } + +private: + const int ispec; + const Kokkos::View + &wavefield; + specfem::compute::assembly &assembly; +}; diff --git a/tests/unit-tests/assembly/kernels.cpp b/tests/unit-tests/assembly/kernels/kernels.cpp similarity index 99% rename from tests/unit-tests/assembly/kernels.cpp rename to tests/unit-tests/assembly/kernels/kernels.cpp index 0def02f0..183f2b8c 100644 --- a/tests/unit-tests/assembly/kernels.cpp +++ b/tests/unit-tests/assembly/kernels/kernels.cpp @@ -1,10 +1,10 @@ +#include "../test_fixture/test_fixture.hpp" #include "datatypes/simd.hpp" #include "enumerations/dimension.hpp" #include "enumerations/medium.hpp" #include "parallel_configuration/chunk_config.hpp" #include "policies/chunk.hpp" #include "specfem_setup.hpp" -#include "test_fixture.hpp" #include template &tests) { + YAML::Node all_tests = yaml["Tests"]; + assert(all_tests.IsSequence()); + + for (auto N : all_tests) + tests.push_back(test_configuration::Test(N)); + + return; +} + +ASSEMBLY::ASSEMBLY() { + + std::string config_filename = + "../../../tests/unit-tests/assembly/test_config.yaml"; + parse_test_config(YAML::LoadFile(config_filename), Tests); + + specfem::MPI::MPI *mpi = MPIEnvironment::get_mpi(); + + const auto quadrature = []() { + specfem::quadrature::gll::gll gll{}; + return specfem::quadrature::quadratures(gll); + }(); + + for (auto &Test : Tests) { + const auto [database_file, sources_file, stations_file] = + Test.get_databases(); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); + + const auto [sources, t0] = specfem::IO::read_sources( + sources_file, 0, 0, 0, specfem::simulation::type::forward); + + const auto receivers = specfem::IO::read_receivers(stations_file, 0); + + std::vector seismogram_types = { + specfem::enums::seismogram::type::displacement + }; + + assemblies.push_back(specfem::compute::assembly( + mesh, quadrature, sources, receivers, seismogram_types, t0, 0, 0, 0, + specfem::simulation::type::forward)); + } +} + +// Instantiate template functions + +template KOKKOS_FUNCTION + specfem::point::index + get_index(const int ielement, const int num_elements, const int iz, + const int ix); + +template KOKKOS_FUNCTION + specfem::point::index + get_index(const int ielement, const int num_elements, const int iz, + const int ix); diff --git a/tests/unit-tests/assembly/test_fixture.hpp b/tests/unit-tests/assembly/test_fixture/test_fixture.hpp similarity index 58% rename from tests/unit-tests/assembly/test_fixture.hpp rename to tests/unit-tests/assembly/test_fixture/test_fixture.hpp index 0fac266a..cdce7b28 100644 --- a/tests/unit-tests/assembly/test_fixture.hpp +++ b/tests/unit-tests/assembly/test_fixture/test_fixture.hpp @@ -1,6 +1,6 @@ #pragma once -#include "../MPI_environment.hpp" +#include "../../MPI_environment.hpp" #include "compute/assembly/assembly.hpp" #include "enumerations/specfem_enums.hpp" #include "mesh/mesh.hpp" @@ -18,22 +18,6 @@ KOKKOS_FUNCTION get_index(const int ielement, const int num_elements, const int iz, const int ix); -template <> -KOKKOS_FUNCTION specfem::point::index -get_index(const int ielement, const int num_elements, const int iz, - const int ix) { - return specfem::point::simd_index( - ielement, num_elements, iz, ix); -} - -template <> -KOKKOS_FUNCTION specfem::point::index -get_index(const int ielement, const int num_elements, const int iz, - const int ix) { - return specfem::point::index(ielement, iz, - ix); -} - // ------------------------------------------------------------------------ // Test configuration namespace test_configuration { @@ -80,20 +64,6 @@ struct Test { }; } // namespace test_configuration -// ------------------------------------------------------------------------ -// Reading test config - -void parse_test_config(const YAML::Node &yaml, - std::vector &tests) { - YAML::Node all_tests = yaml["Tests"]; - assert(all_tests.IsSequence()); - - for (auto N : all_tests) - tests.push_back(test_configuration::Test(N)); - - return; -} - // ------------------------------------------------------------------------ class ASSEMBLY : public ::testing::Test { @@ -129,39 +99,7 @@ class ASSEMBLY : public ::testing::Test { specfem::compute::assembly *p_assembly; }; - ASSEMBLY() { - - std::string config_filename = - "../../../tests/unit-tests/assembly/test_config.yaml"; - parse_test_config(YAML::LoadFile(config_filename), Tests); - - specfem::MPI::MPI *mpi = MPIEnvironment::get_mpi(); - - const auto quadrature = []() { - specfem::quadrature::gll::gll gll{}; - return specfem::quadrature::quadratures(gll); - }(); - - for (auto &Test : Tests) { - const auto [database_file, sources_file, stations_file] = - Test.get_databases(); - specfem::mesh::mesh mesh(database_file, mpi); - - const auto [sources, t0] = specfem::sources::read_sources( - sources_file, 0, 0, 0, specfem::simulation::type::forward); - - const auto receivers = - specfem::receivers::read_receivers(stations_file, 0); - - std::vector seismogram_types = { - specfem::enums::seismogram::type::displacement - }; - - assemblies.push_back(specfem::compute::assembly( - mesh, quadrature, sources, receivers, seismogram_types, t0, 0, 0, 0, - specfem::simulation::type::forward)); - } - } + ASSEMBLY(); Iterator begin() { return Iterator(&Tests[0], &assemblies[0]); } diff --git a/tests/unit-tests/assembly/test_fixture/test_fixture.tpp b/tests/unit-tests/assembly/test_fixture/test_fixture.tpp new file mode 100644 index 00000000..b2a24da5 --- /dev/null +++ b/tests/unit-tests/assembly/test_fixture/test_fixture.tpp @@ -0,0 +1,17 @@ +#include "test_fixture.hpp" + +template <> +KOKKOS_FUNCTION specfem::point::index +get_index(const int ielement, const int num_elements, const int iz, + const int ix) { + return specfem::point::simd_index( + ielement, num_elements, iz, ix); +} + +template <> +KOKKOS_FUNCTION specfem::point::index +get_index(const int ielement, const int num_elements, const int iz, + const int ix) { + return specfem::point::index(ielement, iz, + ix); +} diff --git a/tests/unit-tests/compute/acoustic/compute_properties_tests.cpp b/tests/unit-tests/compute/acoustic/compute_properties_tests.cpp index 2d0003c7..b462c901 100644 --- a/tests/unit-tests/compute/acoustic/compute_properties_tests.cpp +++ b/tests/unit-tests/compute/acoustic/compute_properties_tests.cpp @@ -1,6 +1,7 @@ #include "../../Kokkos_Environment.hpp" #include "../../MPI_environment.hpp" #include "../../utilities/include/interface.hpp" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "material/interface.hpp" #include "mesh/mesh.hpp" @@ -121,7 +122,8 @@ TEST(COMPUTE_TESTS, compute_acoustic_properties) { specfem::quadrature::gll::gll gll(0.0, 0.0, 5); specfem::quadrature::quadratures quadratures(gll); - specfem::mesh::mesh mesh(test_config.database_filename, mpi); + specfem::mesh::mesh mesh = + specfem::IO::read_mesh(test_config.database_filename, mpi); const int nspec = mesh.nspec; const int ngllz = gll.get_N(); diff --git a/tests/unit-tests/compute/coupled_interfaces/coupled_interfaces_tests.cpp b/tests/unit-tests/compute/coupled_interfaces/coupled_interfaces_tests.cpp index 54b784c8..f982a75e 100644 --- a/tests/unit-tests/compute/coupled_interfaces/coupled_interfaces_tests.cpp +++ b/tests/unit-tests/compute/coupled_interfaces/coupled_interfaces_tests.cpp @@ -1,6 +1,7 @@ #include "../../Kokkos_Environment.hpp" #include "../../MPI_environment.hpp" #include "../../utilities/include/interface.hpp" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "edge/interface.hpp" #include "material/interface.hpp" @@ -177,7 +178,8 @@ TEST(COMPUTE_TESTS, coupled_interfaces_tests) { std::cout << "Executing test: " << Test.name << std::endl; // Read mesh generated MESHFEM - specfem::mesh::mesh mesh(Test.databases.mesh.database_filename, mpi); + specfem::mesh::mesh mesh = + specfem::IO::read_mesh(Test.databases.mesh.database_filename, mpi); // Generate compute structs to be used by the solver specfem::compute::mesh assembly(mesh.control_nodes, quadratures); diff --git a/tests/unit-tests/compute/elastic/compute_properties_tests.cpp b/tests/unit-tests/compute/elastic/compute_properties_tests.cpp index 5b6626d0..ac7b9a30 100644 --- a/tests/unit-tests/compute/elastic/compute_properties_tests.cpp +++ b/tests/unit-tests/compute/elastic/compute_properties_tests.cpp @@ -1,6 +1,7 @@ #include "../../Kokkos_Environment.hpp" #include "../../MPI_environment.hpp" #include "../../utilities/include/interface.hpp" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "mesh/mesh.hpp" #include "quadrature/interface.hpp" @@ -75,7 +76,8 @@ TEST(COMPUTE_TESTS, compute_elastic_properties) { specfem::quadrature::gll::gll gll(0.0, 0.0, 5); specfem::quadrature::quadratures quadratures(gll); - specfem::mesh::mesh mesh(test_config.database_filename, mpi); + specfem::mesh::mesh mesh = + specfem::IO::read_mesh(test_config.database_filename, mpi); std::cout << mesh.print() << std::endl; diff --git a/tests/unit-tests/compute/index/compute_tests.cpp b/tests/unit-tests/compute/index/compute_tests.cpp index 860763b6..0b0ff4a3 100644 --- a/tests/unit-tests/compute/index/compute_tests.cpp +++ b/tests/unit-tests/compute/index/compute_tests.cpp @@ -1,6 +1,7 @@ #include "../../Kokkos_Environment.hpp" #include "../../MPI_environment.hpp" #include "../../utilities/include/interface.hpp" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "mesh/mesh.hpp" #include "quadrature/interface.hpp" @@ -80,7 +81,8 @@ TEST(COMPUTE_TESTS, compute_ibool) { specfem::quadrature::quadratures quadratures(gll); // Read mesh generated MESHFEM - specfem::mesh::mesh mesh(test_config.database_filename, mpi); + specfem::mesh::mesh mesh = + specfem::IO::read_mesh(test_config.database_filename, mpi); // Setup compute structs specfem::compute::mesh assembly(mesh.tags, mesh.control_nodes, diff --git a/tests/unit-tests/compute/partial_derivatives/compute_partial_derivatives_tests.cpp b/tests/unit-tests/compute/partial_derivatives/compute_partial_derivatives_tests.cpp index 2928e05c..c116e513 100644 --- a/tests/unit-tests/compute/partial_derivatives/compute_partial_derivatives_tests.cpp +++ b/tests/unit-tests/compute/partial_derivatives/compute_partial_derivatives_tests.cpp @@ -1,8 +1,8 @@ #include "../../Kokkos_Environment.hpp" #include "../../MPI_environment.hpp" #include "../../utilities/include/interface.hpp" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" -#include "mesh/mesh.hpp" #include "quadrature/interface.hpp" #include "yaml-cpp/yaml.h" #include @@ -74,7 +74,8 @@ TEST(COMPUTE_TESTS, compute_partial_derivatives) { specfem::quadrature::gll::gll gll(0.0, 0.0, 5); specfem::quadrature::quadratures quadratures(gll); - specfem::mesh::mesh mesh(test_config.database_filename, mpi); + specfem::mesh::mesh mesh = + specfem::IO::read_mesh(test_config.database_filename, mpi); specfem::compute::mesh compute_mesh(mesh.tags, mesh.control_nodes, quadratures); diff --git a/tests/unit-tests/displacement_tests/Newmark/acoustic/newmark_tests.cpp b/tests/unit-tests/displacement_tests/Newmark/acoustic/newmark_tests.cpp index 9bcb2384..4c81c233 100644 --- a/tests/unit-tests/displacement_tests/Newmark/acoustic/newmark_tests.cpp +++ b/tests/unit-tests/displacement_tests/Newmark/acoustic/newmark_tests.cpp @@ -1,6 +1,7 @@ #include "../../../Kokkos_Environment.hpp" #include "../../../MPI_environment.hpp" #include "../../../utilities/include/compare_array.h" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "constants.hpp" #include "domain/interface.hpp" @@ -62,13 +63,13 @@ TEST(DISPLACEMENT_TESTS, newmark_scheme_tests) { // Read mesh generated MESHFEM std::vector materials; - specfem::mesh::mesh mesh(database_file, materials, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); // Read sources // if start time is not explicitly specified then t0 is determined using // source frequencies and time shift auto [sources, t0] = - specfem::sources::read_sources(sources_file, setup.get_dt(), mpi); + specfem::IO::read_sources(sources_file, setup.get_dt(), mpi); // Generate compute structs to be used by the solver specfem::compute::compute compute(mesh.coorg, mesh.material_ind.knods, gllx, diff --git a/tests/unit-tests/displacement_tests/Newmark/elastic/newmark_tests.cpp b/tests/unit-tests/displacement_tests/Newmark/elastic/newmark_tests.cpp index 0753c5ae..9b492f96 100644 --- a/tests/unit-tests/displacement_tests/Newmark/elastic/newmark_tests.cpp +++ b/tests/unit-tests/displacement_tests/Newmark/elastic/newmark_tests.cpp @@ -1,6 +1,7 @@ #include "../../../Kokkos_Environment.hpp" #include "../../../MPI_environment.hpp" #include "../../../utilities/include/compare_array.h" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "constants.hpp" #include "domain/interface.hpp" @@ -62,13 +63,13 @@ TEST(DISPLACEMENT_TESTS, newmark_scheme_tests) { // Read mesh generated MESHFEM std::vector materials; - specfem::mesh::mesh mesh(database_file, materials, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); // Read sources // if start time is not explicitly specified then t0 is determined using // source frequencies and time shift auto [sources, t0] = - specfem::sources::read_sources(sources_file, setup.get_dt(), mpi); + specfem::IO::read_sources(sources_file, setup.get_dt(), mpi); // Generate compute structs to be used by the solver specfem::compute::compute compute(mesh.coorg, mesh.material_ind.knods, gllx, diff --git a/tests/unit-tests/displacement_tests/Newmark/newmark_tests.cpp b/tests/unit-tests/displacement_tests/Newmark/newmark_tests.cpp index 92e1958f..08669cfe 100644 --- a/tests/unit-tests/displacement_tests/Newmark/newmark_tests.cpp +++ b/tests/unit-tests/displacement_tests/Newmark/newmark_tests.cpp @@ -1,6 +1,9 @@ #include "../../Kokkos_Environment.hpp" #include "../../MPI_environment.hpp" #include "../../utilities/include/interface.hpp" +#include "IO/mesh/read_mesh.hpp" +#include "IO/receivers/read_receivers.hpp" +#include "IO/sources/read_sources.hpp" #include "compute/interface.hpp" #include "constants.hpp" #include "domain/domain.hpp" @@ -174,14 +177,14 @@ TEST(DISPLACEMENT_TESTS, newmark_scheme_tests) { const auto quadratures = setup.instantiate_quadrature(); // Read mesh generated MESHFEM - specfem::mesh::mesh mesh(database_file, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); const type_real dt = setup.get_dt(); const int nsteps = setup.get_nsteps(); // Read sources // if start time is not explicitly specified then t0 is determined using // source frequencies and time shift - auto [sources, t0] = specfem::sources::read_sources( + auto [sources, t0] = specfem::IO::read_sources( sources_file, nsteps, setup.get_t0(), dt, setup.get_simulation_type()); for (auto &source : sources) { @@ -196,8 +199,7 @@ TEST(DISPLACEMENT_TESTS, newmark_scheme_tests) { const auto stations_filename = setup.get_stations_file(); const auto angle = setup.get_receiver_angle(); - auto receivers = - specfem::receivers::read_receivers(stations_filename, angle); + auto receivers = specfem::IO::read_receivers(stations_filename, angle); std::cout << " Receiver information\n"; std::cout << "------------------------------" << std::endl; @@ -242,7 +244,7 @@ TEST(DISPLACEMENT_TESTS, newmark_scheme_tests) { specfem::enums::element::quadrature::static_quadrature_points<5> qp5; std::shared_ptr solver = - setup.instantiate_solver(setup.get_dt(), assembly, it, qp5); + setup.instantiate_solver(setup.get_dt(), assembly, it, qp5, {}); solver->run(); diff --git a/tests/unit-tests/domain/acoustic/rmass_inverse_tests.cpp b/tests/unit-tests/domain/acoustic/rmass_inverse_tests.cpp index 1a069803..ee6d9938 100644 --- a/tests/unit-tests/domain/acoustic/rmass_inverse_tests.cpp +++ b/tests/unit-tests/domain/acoustic/rmass_inverse_tests.cpp @@ -1,6 +1,7 @@ #include "../../Kokkos_Environment.hpp" #include "../../MPI_environment.hpp" #include "../../utilities/include/compare_array.h" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "constants.hpp" #include "domain/interface.hpp" @@ -59,12 +60,12 @@ TEST(DOMAIN_TESTS, rmass_inverse_elastic_test) { // Read mesh generated MESHFEM std::vector materials; - specfem::mesh::mesh mesh(database_file, materials, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); // Read sources // if start time is not explicitly specified then t0 is determined using // source frequencies and time shift - auto [sources, t0] = specfem::sources::read_sources(sources_file, 1e-5, mpi); + auto [sources, t0] = specfem::IO::read_sources(sources_file, 1e-5, mpi); // Generate compute structs to be used by the solver specfem::compute::compute compute(mesh.coorg, mesh.material_ind.knods, gllx, diff --git a/tests/unit-tests/domain/elastic/rmass_inverse_tests.cpp b/tests/unit-tests/domain/elastic/rmass_inverse_tests.cpp index 60f3eeb1..5d78af93 100644 --- a/tests/unit-tests/domain/elastic/rmass_inverse_tests.cpp +++ b/tests/unit-tests/domain/elastic/rmass_inverse_tests.cpp @@ -1,6 +1,7 @@ #include "../../Kokkos_Environment.hpp" #include "../../MPI_environment.hpp" #include "../../utilities/include/compare_array.h" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "constants.hpp" #include "domain/interface.hpp" @@ -59,12 +60,12 @@ TEST(DOMAIN_TESTS, rmass_inverse_elastic_test) { // Read mesh generated MESHFEM std::vector materials; - specfem::mesh::mesh mesh(database_file, materials, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); // Read sources // if start time is not explicitly specified then t0 is determined using // source frequencies and time shift - auto [sources, t0] = specfem::sources::read_sources(sources_file, 1e-5, mpi); + auto [sources, t0] = specfem::IO::read_sources(sources_file, 1e-5, mpi); // Generate compute structs to be used by the solver specfem::compute::compute compute(mesh.coorg, mesh.material_ind.knods, gllx, diff --git a/tests/unit-tests/domain/rmass_inverse_tests.cpp b/tests/unit-tests/domain/rmass_inverse_tests.cpp index 35e1e698..c20d66bb 100644 --- a/tests/unit-tests/domain/rmass_inverse_tests.cpp +++ b/tests/unit-tests/domain/rmass_inverse_tests.cpp @@ -1,6 +1,7 @@ #include "../Kokkos_Environment.hpp" #include "../MPI_environment.hpp" #include "../utilities/include/interface.hpp" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "constants.hpp" #include "domain/domain.hpp" @@ -116,7 +117,7 @@ TEST(DOMAIN_TESTS, rmass_inverse) { std::cout << "Reading mesh file: " << database_file << std::endl; // Read mesh generated MESHFEM - specfem::mesh::mesh mesh(database_file, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); std::cout << "Setting up sources and receivers" << std::endl; @@ -137,13 +138,14 @@ TEST(DOMAIN_TESTS, rmass_inverse) { const type_real dt = setup.get_dt(); specfem::domain::domain< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, specfem::enums::element::quadrature::static_quadrature_points<5> > elastic_domain_static(dt, assembly, qp5); specfem::domain::domain< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, specfem::enums::element::quadrature::static_quadrature_points<5> > acoustic_domain_static(dt, assembly, qp5); diff --git a/tests/unit-tests/mesh/mesh_tests.cpp b/tests/unit-tests/mesh/mesh_tests.cpp index 4fb030fb..662d2e57 100644 --- a/tests/unit-tests/mesh/mesh_tests.cpp +++ b/tests/unit-tests/mesh/mesh_tests.cpp @@ -1,5 +1,7 @@ #include "../Kokkos_Environment.hpp" #include "../MPI_environment.hpp" +#include "IO/mesh/impl/fortran/read_mesh_database.hpp" +#include "IO/mesh/read_mesh.hpp" #include "mesh/mesh.hpp" #include "yaml-cpp/yaml.h" #include @@ -78,6 +80,61 @@ void parse_test_config(const YAML::Node &yaml, // --------------------------------------------------------------------------- +/** + * + * Check if we can read fortran binary files correctly. TEST one just reading + * the header + * + * This test should be run on single and multiple nodes + * + */ +TEST(MESH_TESTS, fortran_binary_reader_header) { + + specfem::MPI::MPI *mpi = MPIEnvironment::get_mpi(); + std::string config_filename = + "../../../tests/unit-tests/mesh/test_config.yaml"; + std::vector Tests; + parse_test_config(YAML::LoadFile(config_filename), Tests); + int nspec, npgeo, nproc; + + for (auto Test : Tests) { + std::cout << "-------------------------------------------------------\n" + << "\033[0;32m[RUNNING]\033[0m Test: " << Test.name << "\n" + << "-------------------------------------------------------\n\n" + << std::endl; + try { + + std::ifstream stream; + stream.open(Test.databases.filenames[Test.configuration.processors - 1]); + + auto [nspec, npgeo, nproc] = + specfem::IO::mesh::impl::fortran::read_mesh_database_header(stream, + mpi); + stream.close(); + std::cout << "nspec = " << nspec << std::endl; + std::cout << "npgeo = " << npgeo << std::endl; + std::cout << "nproc = " << nproc << std::endl; + + std::cout << "--------------------------------------------------\n" + << "\033[0;32m[PASSED]\033[0m Test name: " << Test.name << "\n" + << "--------------------------------------------------\n\n" + << std::endl; + } catch (std::runtime_error &e) { + std::cout << " - Error: " << e.what() << std::endl; + FAIL() << "--------------------------------------------------\n" + << "\033[0;31m[FAILED]\033[0m Test failed\n" + << " - Test name: " << Test.name << "\n" + << " - Error: " << e.what() << "\n" + << "--------------------------------------------------\n\n" + << std::endl; + } + } + SUCCEED(); + return; +} + +// --------------------------------------------------------------------------- + /** * * Check if we can read fortran binary files correctly. @@ -99,7 +156,7 @@ TEST(MESH_TESTS, fortran_binary_reader) { << "-------------------------------------------------------\n\n" << std::endl; try { - specfem::mesh::mesh mesh( + specfem::IO::read_mesh( Test.databases.filenames[Test.configuration.processors - 1], mpi); std::cout << "--------------------------------------------------\n" << "\033[0;32m[PASSED]\033[0m Test name: " << Test.name << "\n" diff --git a/tests/unit-tests/seismogram/acoustic/seismogram_tests.cpp b/tests/unit-tests/seismogram/acoustic/seismogram_tests.cpp index f4d66364..2fd877af 100644 --- a/tests/unit-tests/seismogram/acoustic/seismogram_tests.cpp +++ b/tests/unit-tests/seismogram/acoustic/seismogram_tests.cpp @@ -2,6 +2,8 @@ #include "../../MPI_environment.hpp" // #include "../../utilities/include/compare_array.h" #include "IO/fortranio/interface.hpp" +#include "IO/mesh/read_mesh.hpp" +#include "IO/receivers/read_receivers.hpp" #include "compute/interface.hpp" #include "constants.hpp" #include "domain/domain.hpp" @@ -90,13 +92,13 @@ TEST(SEISMOGRAM_TESTS, acoustic_seismograms_test) { const auto quadratures = setup.instantiate_quadrature(); // Read mesh generated MESHFEM - specfem::mesh::mesh mesh(database_file, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); std::vector > sources(0); const auto angle = setup.get_receiver_angle(); const auto stations_filename = setup.get_stations_file(); - auto receivers = specfem::receivers::read_receivers(stations_filename, angle); + auto receivers = specfem::IO::read_receivers(stations_filename, angle); const auto stypes = setup.get_seismogram_types(); specfem::compute::assembly assembly(mesh, quadratures, sources, receivers, @@ -119,8 +121,8 @@ TEST(SEISMOGRAM_TESTS, acoustic_seismograms_test) { specfem::enums::element::quadrature::static_quadrature_points<5> qp5; specfem::domain::domain< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::acoustic, + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::acoustic, specfem::enums::element::quadrature::static_quadrature_points<5> > acoustic_domain_static(setup.get_dt(), assembly, qp5); diff --git a/tests/unit-tests/seismogram/elastic/seismogram_tests.cpp b/tests/unit-tests/seismogram/elastic/seismogram_tests.cpp index 5b4fe756..c5d489cf 100644 --- a/tests/unit-tests/seismogram/elastic/seismogram_tests.cpp +++ b/tests/unit-tests/seismogram/elastic/seismogram_tests.cpp @@ -2,6 +2,8 @@ #include "../../MPI_environment.hpp" // #include "../../utilities/include/compare_array.h" #include "IO/fortranio/interface.hpp" +#include "IO/mesh/read_mesh.hpp" +#include "IO/receivers/read_receivers.hpp" #include "compute/interface.hpp" #include "constants.hpp" #include "domain/domain.hpp" @@ -90,13 +92,13 @@ TEST(SEISMOGRAM_TESTS, elastic_seismograms_test) { const auto quadratures = setup.instantiate_quadrature(); // Read mesh generated MESHFEM - specfem::mesh::mesh mesh(database_file, mpi); + specfem::mesh::mesh mesh = specfem::IO::read_mesh(database_file, mpi); std::vector > sources(0); const auto angle = setup.get_receiver_angle(); const auto stations_filename = setup.get_stations_file(); - auto receivers = specfem::receivers::read_receivers(stations_filename, angle); + auto receivers = specfem::IO::read_receivers(stations_filename, angle); const auto stypes = setup.get_seismogram_types(); specfem::compute::assembly assembly(mesh, quadratures, sources, receivers, @@ -119,8 +121,8 @@ TEST(SEISMOGRAM_TESTS, elastic_seismograms_test) { specfem::enums::element::quadrature::static_quadrature_points<5> qp5; specfem::domain::domain< - specfem::wavefield::type::forward, specfem::dimension::type::dim2, - specfem::element::medium_tag::elastic, + specfem::wavefield::simulation_field::forward, + specfem::dimension::type::dim2, specfem::element::medium_tag::elastic, specfem::enums::element::quadrature::static_quadrature_points<5> > elastic_domain_static(setup.get_dt(), assembly, qp5); diff --git a/tests/unit-tests/source/source_location_tests.cpp b/tests/unit-tests/source/source_location_tests.cpp index a3a680bb..0f58abab 100644 --- a/tests/unit-tests/source/source_location_tests.cpp +++ b/tests/unit-tests/source/source_location_tests.cpp @@ -1,5 +1,6 @@ #include "../Kokkos_Environment.hpp" #include "../MPI_environment.hpp" +#include "IO/mesh/read_mesh.hpp" #include "compute/interface.hpp" #include "material/interface.hpp" #include "mesh/mesh.hpp" @@ -161,11 +162,12 @@ TEST(SOURCE_LOCATION_TESTS, compute_source_locations) { // Read mesh for binary database for the test std::vector > materials; - specfem::mesh::mesh mesh(test_config.database_file, materials, mpi); + specfem::mesh::mesh mesh = + specfem::IO::read_mesh(test_config.database_file, mpi); // read sources file auto [sources, t0] = - specfem::sources::read_sources(test_config.sources_file, 1.0, mpi); + specfem::IO::read_sources(test_config.sources_file, 1.0, mpi); // setup compute struct for future use specfem::compute::compute compute(mesh.coorg, mesh.material_ind.knods, gllx,