Another example is boost. The Pitchfork library keeps include/ and src/ together in the src/ directory whereas Boost follows the classic split of include/ and src/ files:
fortran.hpp#includes all fortran/read_<xxx>.hpp files.
IO.hpp#includes e.g. IO/sources.hpp, IO/receivers.hpp, IO/mesh.hpp, IO/operators.hpp, etc.
Such that, you would write:
#include <specfem/IO.hpp>
#include <specfem/quadrature.hpp>
#include <specfem/mesh.hpp>
#include <specfem/sources.hpp>
#include <specfem/receivers.hpp>
#include <specfem/setup.hpp>
int main() {
specfem::setup setup= specfem::IO::read_setup(...)
specfem::quadrature quadrature = specfem::quadrature::get_quadrature(...)
specfem::sources sources = specfem::IO::read_sources(...)
specfem::receivers = specfem::IO::read_receivers(...)
specfem::mesh mesh = specfem::IO::read_mesh(...)
specfem::assembly = specfem::assembly::create_assembly(
mesh, quadrature, sources, receivers, setup);
// ETC. I have been writing this for a bit now and started loosing patience...
}
Let me know if this is unclear, and how you feel about it. I think it would make sense to do this now instead of later, because things are getting quickly more complicated.
I think at the moment the library is a little hard to navigate, and I think I finally realized why. It does not really follow the "pitchfork" style:
Pitchfork example lib
Another example is boost. The Pitchfork library keeps
include/
andsrc/
together in thesrc/
directory whereasBoost
follows the classic split ofinclude/
andsrc/
files:Boost::Filesystem
See
include
directory specifically: include/boostI think it should be looks somewhat like this
fortran.hpp
#include
s allfortran/read_<xxx>.hpp
files.IO.hpp
#include
s e.g.IO/sources.hpp
,IO/receivers.hpp
,IO/mesh.hpp
,IO/operators.hpp
, etc.Such that, you would write:
Let me know if this is unclear, and how you feel about it. I think it would make sense to do this now instead of later, because things are getting quickly more complicated.