-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 108 #157
base: devel
Are you sure you want to change the base?
Conversation
Implements mesh reading as specfem::IO::read_mesh(...)
to become specfem::IO::read_sources. I also removes some unnecessary includes in the main binary for read_mesh that were omitted in the previous pull request.
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
… relevant unit tests.
|
||
namespace specfem { | ||
namespace IO { | ||
namespace mesh { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move these functions within the impl
namespace i.e. specfem::IO::impl::fortran::read_boundaries
. Functions within impl
namespace are implementation details and are not meant to exposed to the developer or directly used by another module within SPECFEM++. I started following this convension recently so only the recent implementations are compliant with this philosophy.
Issue 150 -- Implements read sources under the IO module.
template specfem::mesh::interface_container< | ||
specfem::element::medium_tag::elastic, | ||
specfem::element::medium_tag::acoustic> | ||
specfem::IO::mesh::fortran::read_interfaces< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You dont nacessarily need this explicit instantiation here, since, this function is only ever used by read_coupled_interfaces
. read_coupled_interfaces
knows the definition from above function and wouldn't use the explicit instantiation I believe.
@@ -1,6 +1,8 @@ | |||
#include "compute/interface.hpp" | |||
// #include "coupled_interface/interface.hpp" | |||
// #include "domain/interface.hpp" | |||
#include "IO/mesh/read_mesh.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have both includes within the same header? What would be the best name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about this while I was creating the read_sources
. I think:
IO
should contain read_mesh
, read_sources
, and read_receivers
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean we should move other IO routines fortran
, HDF5
and ASCII
to another namespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will create IO/interface.hpp
for the implementations of the read_<xxx>
functions, such that read_sources
, read_mesh
, and read_receivers
are in the IO namespace under the interface
header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean we should move other IO routines
fortran
,HDF5
andASCII
to another namespace?
retest this please |
Move receivers read to IO namespace
Description
This Pull request is addressing #108 and sub issues:
mesh(const std::string filename, const specfem::MPI::MPI *mpi);
to a function IO namespace since this constructors reads an external database file. The IO function should returnspecfem::mesh::mesh
instance. #146specfem::sources::read_sources(args...)
#150specfem::receivers::read_receivers(args...)
to IO namespace #169Checklist
Please make sure to check developer documentation on specfem docs.