Skip to content

Commit f950dd8

Browse files
committed
Consolidate hydro source files under src/hydro/
1 parent 79b7cd4 commit f950dd8

5 files changed

Lines changed: 25 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,11 @@ set(HYDROCHRONO_SOURCES
344344
src/hydro/config/config_loader.cpp
345345
src/hydro/config/setup_from_yaml.cpp
346346
src/hydro/config/yaml_discovery.cpp
347-
# Core library sources
348-
src/chloadaddedmass.cpp
349-
src/hydro_forces.cpp
350-
src/helper.cpp
347+
# Coupling module (consolidated under src/hydro/coupling/)
348+
src/hydro/coupling/added_mass.cpp
349+
# Core facade and utilities
350+
src/hydro/hydro_forces.cpp
351+
src/hydro/utils/helper.cpp
351352
# Hydro modules
352353
src/hydro/waves/wave_base.cpp
353354
src/hydro/waves/wave_utilities.cpp
@@ -470,7 +471,7 @@ message(STATUS "HYDROCHRONO_ENABLE_YAML_RUNNER: ${HYDROCHRONO_ENABLE_YAML_RUNNER
470471
if(HYDROCHRONO_ENABLE_YAML_RUNNER)
471472
add_executable(run_hydrochrono
472473
app/run_hydrochrono.cpp
473-
src/hydrochrono_runner/run_hydrochrono_from_yaml.cpp
474+
src/hydro/runner/run_from_yaml.cpp
474475
src/utils/misc_options.cpp
475476
)
476477

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*********************************************************************
2-
* @file chloadaddedmass.h
2+
* @file added_mass.cpp
33
*
4-
* @brief header file for added mass chload class.
4+
* @brief Implementation of ChLoadAddedMass class.
55
*********************************************************************/
66
#include <hydroc/coupling/added_mass.h>
77

@@ -68,4 +68,5 @@ void ChLoadAddedMass::LoadIntLoadResidual_Mv(ChVectorDynamic<>& R, const ChVecto
6868
// a_w).eigen();
6969
// since R is a vector, we can probably just do R += C*M*a with no need to separate w into a_x and a_w above
7070
R += c * m_jacobians->M * w;
71-
}
71+
}
72+
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
#include <hydroc/waves/irregular_wave.h>
6060
#include <hydroc/logging.h>
6161
#include <hydroc/core/system_state.h>
62-
#include "hydro/core/chrono_state_utils.h"
63-
#include "hydro/force_components/hydrostatics_component.h"
64-
#include "hydro/force_components/radiation_component.h"
65-
#include "hydro/force_components/excitation_component.h"
62+
#include "core/chrono_state_utils.h"
63+
#include "force_components/hydrostatics_component.h"
64+
#include "force_components/radiation_component.h"
65+
#include "force_components/excitation_component.h"
6666
#include <hydroc/core/hydro_system.h>
6767
#include <hydroc/coupling/chrono_coupler.h>
68-
#include "hydro/radiation/radiation_rirf_processing.h"
68+
#include "radiation/radiation_rirf_processing.h"
6969

7070
#include <chrono/physics/ChLoad.h>
7171
#include <unsupported/Eigen/Splines>

src/hydrochrono_runner/run_hydrochrono_from_yaml.cpp renamed to src/hydro/runner/run_from_yaml.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include <hydroc/version.h>
2-
#include "../hydro/config/yaml_discovery.h"
2+
#include "../config/yaml_discovery.h"
33
#include <hydroc/logging.h>
4-
#include "../hydro/config/setup_from_yaml.h"
5-
#include "../hydro/config/yaml_parser.h"
4+
#include "../config/setup_from_yaml.h"
5+
#include "../config/yaml_parser.h"
66
#include <hydroc/hydro_forces.h>
77
#include <hydroc/io/simulation_export.h>
88
#include <hydroc/waves/wave_base.h>

src/helper.cpp renamed to src/hydro/utils/helper.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*********************************************************************
2+
* @file helper.cpp
3+
*
4+
* @brief Implementation of helper utilities.
5+
*********************************************************************/
16
#include <hydroc/helper.h>
27

38
#include <cstdlib>
@@ -46,4 +51,5 @@ int hydroc::SetInitialEnvironment(int argc, char* argv[]) noexcept {
4651

4752
std::string hydroc::getDataDir() noexcept {
4853
return DATADIR.lexically_normal().generic_string();
49-
}
54+
}
55+

0 commit comments

Comments
 (0)