Commit 63f82073 authored by Sophie Wenzel-Teuber's avatar Sophie Wenzel-Teuber
Browse files

Changing the physical layout of the code (include and src) and adding inline

namespaces to reflect the physical layout logically.

Change log:
namespace and folder are interchangable in the following:
* general:
    - Change names of classes and files to Snake case, starting with a capital
      letter
    - Tidy documentation and add @briefs everywhere
    - Adding namespaces inside #ifdef __cplusplus pragmas to C-files, such that
      the members will appear at the correct location in the documentation
* flow:
    - Move most of the classes in the flow namespace to a detailed namespace
* piol:
    - Move communicator to utils namespace and rename CommunicatorInterface.hh
      to just Communicator.hh
    - Move Read and Write classes to namespace file and rename to Input_file and
      Output_file
    - Move Object read/Write-classes to object namespace inside namespace file
    - Move ExSeis[PIOL] to configuration namespace
    - Rename Binary_file to IO_driver and move to own namespace
    - Create metadata namespace with Trace_metadata_key (formerly Meta) and a
      rules namespace containing everything concerning the rules for SEGY files
    - Create namespace segy for utilities and Trace header offsets (formerly Tr)
    - Create sort namespace inside operations namespace for the sort operations
* utils:
    - Create Distributed_vector classes to namespace of the same name
    - Remove mpi namespace and create mpi_utils for utilities and move
      MPI_Distributed_vector to distributed_vector namespace and MPI_types to
      types namespace
    - Create types namespace for various kinds of type definitions
parent 1e5d8c12
Loading
Loading
Loading
Loading
+37 −40
Original line number Diff line number Diff line
@@ -145,46 +145,43 @@ include(third_party/third_party.cmake)
add_library(
    exseisdat

    src/PIOL_C_bindings.cc

    src/flow/Cache.cc
    src/flow/Flow_C_bindings.cc
    src/flow/RadonGatherState.cc
    src/flow/Set.cc

    src/piol/mpi/MPI_Binary_file.cc
    src/piol/segy/utils.cc

    src/CommunicatorMPI.cc
    src/ExSeis.cc
    src/ExSeisPIOL.cc
    src/ObjectInterface.cc
    src/ObjectSEGY.cc
    src/ReadInterface.cc
    src/ReadSEGY.cc
    src/ReadSEGYModel.cc
    src/Rule.cc
    src/Trace_metadata.cc
    src/WriteInterface.cc
    src/WriteSEGY.cc

    src/gather.cc
    src/minmax.cc
    src/sort.cc
    src/temporalfilter.cc

    src/utils/decomposition/block_decomposition.cc
    src/utils/encoding/character_encoding.cc
    src/utils/encoding/number_encoding.cc
    src/utils/logging/Log.cc
    src/utils/logging/Status.cc
    src/utils/mpi/MPI_error_to_string.cc
    src/utils/mpi/MPI_max_array_length.cc
    src/utils/signal_processing/AGC.cc
    src/utils/signal_processing/Gain_function.cc
    src/utils/signal_processing/Taper_function.cc
    src/utils/signal_processing/mute.cc
    src/utils/signal_processing/taper.cc
    src/exseisdat/flow/detail/Cache.cc
    src/exseisdat/flow/Flow_C_bindings.cc
    src/exseisdat/flow/detail/Radon_gather_state.cc
    src/exseisdat/flow/Set.cc

    src/exseisdat/piol/configuration/ExSeis.cc
    src/exseisdat/piol/configuration/ExSeisPIOL.cc
    src/exseisdat/piol/file/Input_file.cc
    src/exseisdat/piol/file/Input_file_segy.cc
    src/exseisdat/piol/file/object/ObjectInterface.cc
    src/exseisdat/piol/file/object/ObjectSEGY.cc
    src/exseisdat/piol/file/object/ReadSEGYModel.cc
    src/exseisdat/piol/file/Output_file.cc
    src/exseisdat/piol/file/Output_file_segy.cc
    src/exseisdat/piol/io_driver/IO_driver_mpi.cc
    src/exseisdat/piol/metadata/rules/Rule.cc
    src/exseisdat/piol/metadata/Trace_metadata.cc
    src/exseisdat/piol/operations/gather.cc
    src/exseisdat/piol/operations/minmax.cc
    src/exseisdat/piol/operations/sort_operations/sort.cc
    src/exseisdat/piol/PIOL_C_bindings.cc
    src/exseisdat/piol/segy/utils.cc

    src/exseisdat/utils/communicator/Communicator_mpi.cc
    src/exseisdat/utils/decomposition/block_decomposition.cc
    src/exseisdat/utils/encoding/character_encoding.cc
    src/exseisdat/utils/encoding/number_encoding.cc
    src/exseisdat/utils/logging/Log.cc
    src/exseisdat/utils/logging/Status.cc
    src/exseisdat/utils/mpi_utils/MPI_error_to_string.cc
    src/exseisdat/utils/mpi_utils/MPI_max_array_length.cc
    src/exseisdat/utils/signal_processing/AGC.cc
    src/exseisdat/utils/signal_processing/Gain_function.cc
    src/exseisdat/utils/signal_processing/Taper_function.cc
    src/exseisdat/utils/signal_processing/mute.cc
    src/exseisdat/utils/signal_processing/taper.cc
    src/exseisdat/utils/signal_processing/temporalfilter.cc
)

target_compile_features(exseisdat PUBLIC cxx_std_14)
+13 −5
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ configure_file(
    @ONLY
)

set(INCLUDE_DOXYFILE "@INCLUDE = Doxyfile")
set(INCLUDE_DOXYFILE "@INCLUDE = ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile-man.in
    ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-man
@@ -66,14 +66,22 @@ add_custom_command(
    COMMENT "Building the documentation..."
)

add_custom_target(make_man_directory)
add_custom_command(
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/man/exseis-extract-metadata.1
    TARGET make_man_directory PRE_BUILD
    COMMAND ${CMAKE_COMMAND} -E make_directory man
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)

add_custom_command(
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/man/man/exseis-extract-metadata.1
    COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-man"
    MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile-man.in
    DEPENDS
        make_man_directory
        ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile-man.in
        ${EXSEISDAT_DOCUMENTED_EXAMPLES}
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man
    COMMENT "Building the documentation..."
)

@@ -82,7 +90,7 @@ add_custom_target(
    doc ALL
    DEPENDS
        ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
        ${CMAKE_CURRENT_BINARY_DIR}/man/exseis-extract-metadata.1
        ${CMAKE_CURRENT_BINARY_DIR}/man/man/exseis-extract-metadata.1
)

# Set install target
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
PROJECT_NAME  = ExSeisDat

GENERATE_HTML = NO
GENERATE_XML = NO
GENERATE_MAN  = YES
INPUT         = @CMAKE_SOURCE_DIR@/util

+3 −2
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ WARN_AS_ERROR = YES
INPUT                  =         \
    @CMAKE_SOURCE_DIR@/doc/namespaces.dox \
    @CMAKE_SOURCE_DIR@/include   \
    @CMAKE_SOURCE_DIR@/util      \
    @CMAKE_SOURCE_DIR@/README.md \
    @CMAKE_CURRENT_BINARY_DIR@/examples/documented \
    @CMAKE_SOURCE_DIR@/examples/README.md
@@ -82,7 +81,9 @@ ENABLE_PREPROCESSING = YES
MACRO_EXPANSION        = YES
PREDEFINED             = __cplusplus
SEARCH_INCLUDES        = YES
INCLUDE_PATH           = 

GENERATE_XML           = YES
XML_NS_MEMB_FILE_SCOPE = YES

# Aliases for implicit members
ALIASES += special_member_functions="Special Member Functions"
+116 −0
Original line number Diff line number Diff line
@@ -18,6 +18,63 @@
///          etc.
///

///
/// @namespace exseis::utils::communicator
///
/// @brief Interface and implementations of a communicator that is used for
///        message passing between the processes.
///

///
/// @namespace exseis::utils::decomposition
///
/// @brief Functions for splitting ranges across processes.
///

///
/// @namespace exseis::utils::distributed_vector
///
/// @brief Interface and implementations of a vector that is distributed
///        over several processes.
///

///
/// @namespace exseis::utils::encoding
///
/// @brief Functions for different kinds of encodings.
///

///
/// @namespace exseis::utils::logging
///
/// @brief Logging utilities.
///

///
/// @namespace exseis::utils::mpi_utils
///
/// @brief MPI utilities.
///

///
/// @namespace exseis::utils::signal_processing
///
/// @brief Functions for processing seismic signals.
///

///
/// @namespace exseis::utils::types
///
/// @brief Aliases for fundamental types and conversions used throughout the
///        ExSeisDat project.
///

///
/// @namespace exseis::utils::types::mpi
///
/// @brief Aliases for MPI datatypes
///

///
/// @namespace exseis::piol
///
@@ -33,6 +90,65 @@
///          files.
///

///
/// @namespace exseis::piol::configuration
///
/// @brief Classes for storing configurations of the program.
///

///
/// @namespace exseis::piol::file
///
/// @brief Basic read and write classes.
///

///
<<<<<<< HEAD
=======
/// @namespace exseis::piol::file::object
///
/// @brief classes to.......
///
/// @todo document!
///

///
>>>>>>> b6d20c75c4294edab32b0cff7259765af98af594
/// @namespace exseis::piol::io_driver
///
/// @brief Interface and implementations that perform I/O operations
///

///
/// @namespace exseis::piol::metadata
///
/// @brief Seismic metadata utilities
///

///
/// @namespace exseis::piol::metadata::rules
///
/// @brief Rules associated with trace parameters
///

///
/// @namespace exseis::piol::operations
///
/// @brief Basic operations performed on the file data
///

///
/// @namespace exseis::piol::operations::sort_operations
///
/// @brief Classes and functions for sorting the data
///

///
/// @namespace exseis::piol::segy
///
/// @brief SEGY specific parameters and functions
///

///
/// @namespace exseis::flow
///
Loading