Skip to content

Commit 79b7cd4

Browse files
committed
reorganise include/ layout and promote headers; remove legacy files
1 parent 0741e77 commit 79b7cd4

33 files changed

Lines changed: 107 additions & 102 deletions

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ set(HYDROCHRONO_SOURCES
348348
src/chloadaddedmass.cpp
349349
src/hydro_forces.cpp
350350
src/helper.cpp
351-
src/wave_types.cpp
352351
# Hydro modules
353352
src/hydro/waves/wave_base.cpp
354353
src/hydro/waves/wave_utilities.cpp

app/run_hydrochrono.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @brief CLI entrypoint for the HydroChrono YAML-based runner
44
*/
55

6-
#include <hydroc/hydrochrono_runner/run_hydrochrono_from_yaml.h>
6+
#include <hydroc/runner/run_from_yaml.h>
77
#include <hydroc/version.h>
88
#include "../src/utils/misc_options.h"
99
#include <hydroc/logging.h>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*********************************************************************
2-
* @file hydro_force_component.h
2+
* @file force_component.h
33
* @brief Interface for hydrodynamic force components.
44
*********************************************************************/
55

6-
#ifndef HYDRO_CORE_HYDRO_FORCE_COMPONENT_H
7-
#define HYDRO_CORE_HYDRO_FORCE_COMPONENT_H
6+
#ifndef HYDROC_CORE_FORCE_COMPONENT_H
7+
#define HYDROC_CORE_FORCE_COMPONENT_H
88

9-
#include <hydroc/system_state.h>
9+
#include <hydroc/core/system_state.h>
1010

1111
namespace hydrochrono::hydro {
1212

@@ -61,5 +61,5 @@ class IHydroForceComponent {
6161

6262
} // namespace hydrochrono::hydro
6363

64-
#endif // HYDRO_CORE_HYDRO_FORCE_COMPONENT_H
64+
#endif // HYDROC_CORE_FORCE_COMPONENT_H
6565

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* @brief HydroSystem façade: orchestrates force components to compute total forces.
44
*********************************************************************/
55

6-
#ifndef HYDRO_CORE_HYDRO_SYSTEM_H
7-
#define HYDRO_CORE_HYDRO_SYSTEM_H
6+
#ifndef HYDROC_CORE_HYDRO_SYSTEM_H
7+
#define HYDROC_CORE_HYDRO_SYSTEM_H
88

9-
#include <hydroc/system_state.h>
10-
#include "hydro_force_component.h"
9+
#include <hydroc/core/system_state.h>
10+
#include <hydroc/core/force_component.h>
1111
#include <vector>
1212
#include <memory>
1313

@@ -112,5 +112,5 @@ class HydroSystem {
112112

113113
} // namespace hydrochrono::hydro
114114

115-
#endif // HYDRO_CORE_HYDRO_SYSTEM_H
115+
#endif // HYDROC_CORE_HYDRO_SYSTEM_H
116116

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* @brief Canonical type definitions for hydrodynamic force types.
44
*********************************************************************/
55

6-
#ifndef HYDRO_TYPES_H
7-
#define HYDRO_TYPES_H
6+
#ifndef HYDROC_CORE_HYDRO_TYPES_H
7+
#define HYDROC_CORE_HYDRO_TYPES_H
88

99
#include <Eigen/Dense>
1010
#include <vector>
@@ -28,5 +28,5 @@ using BodyForces = std::vector<GeneralizedForce>;
2828

2929
} // namespace hydrochrono::hydro
3030

31-
#endif // HYDRO_TYPES_H
31+
#endif // HYDROC_CORE_HYDRO_TYPES_H
3232

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
* @brief Common structs for body and system hydrodynamic state.
44
*********************************************************************/
55

6-
#ifndef HYDROC_SYSTEM_STATE_H
7-
#define HYDROC_SYSTEM_STATE_H
6+
#ifndef HYDROC_CORE_SYSTEM_STATE_H
7+
#define HYDROC_CORE_SYSTEM_STATE_H
88

99
#include <Eigen/Dense>
1010
#include <vector>
11-
#include <hydroc/hydro_types.h>
11+
#include <hydroc/core/hydro_types.h>
1212

1313
namespace hydrochrono::hydro {
1414

@@ -36,5 +36,5 @@ struct SystemState {
3636

3737
} // namespace hydrochrono::hydro
3838

39-
#endif // HYDROC_SYSTEM_STATE_H
39+
#endif // HYDROC_CORE_SYSTEM_STATE_H
4040

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#ifndef CHLOADADDEDMASS_H
2-
#define CHLOADADDEDMASS_H
31
/*********************************************************************
4-
* @file chloadaddedmass.h
2+
* @file added_mass.h
53
*
6-
* @brief header file for added mass chload class.
4+
* @brief Header file for added mass ChLoad class.
75
*********************************************************************/
8-
#pragma once
6+
7+
#ifndef HYDROC_COUPLING_ADDED_MASS_H
8+
#define HYDROC_COUPLING_ADDED_MASS_H
99

1010
#include <chrono/core/ChMatrix.h>
1111
#include <chrono/physics/ChBody.h>
@@ -16,7 +16,6 @@
1616
#include <chrono/physics/ChSystem.h>
1717

1818
using namespace chrono;
19-
// using namespace chrono::fea;
2019

2120
// =============================================================================
2221
class ChLoadAddedMass : public chrono::ChLoadCustomMultiple {
@@ -89,4 +88,5 @@ class ChLoadAddedMass : public chrono::ChLoadCustomMultiple {
8988
virtual bool IsStiff() override { return true; } // this to force the use of the inertial M, R and K matrices
9089
};
9190

92-
#endif
91+
#endif // HYDROC_COUPLING_ADDED_MASS_H
92+
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
/*********************************************************************
2-
* @file chrono_hydro_coupler.h
2+
* @file chrono_coupler.h
33
* @brief ChronoHydroCoupler: bridges Chrono bodies and HydroSystem.
44
*********************************************************************/
55

6-
#ifndef HYDRO_CHRONO_CHRONO_HYDRO_COUPLER_H
7-
#define HYDRO_CHRONO_CHRONO_HYDRO_COUPLER_H
6+
#ifndef HYDROC_COUPLING_CHRONO_COUPLER_H
7+
#define HYDROC_COUPLING_CHRONO_COUPLER_H
88

9-
#include <hydroc/system_state.h>
10-
#include "../core/hydro_system.h"
11-
#include "../core/chrono_state_utils.h"
9+
#include <hydroc/core/system_state.h>
10+
#include <hydroc/core/hydro_system.h>
1211
#include <chrono/physics/ChBody.h>
1312
#include <vector>
1413
#include <memory>
1514

1615
namespace hydrochrono::hydro {
1716

17+
// Forward declaration for internal utilities
18+
void BuildSystemStateFromChronoBodies(
19+
const std::vector<std::shared_ptr<chrono::ChBody>>& bodies,
20+
SystemState& out_state);
21+
1822
/**
1923
* @brief ChronoHydroCoupler: bridges Chrono bodies and HydroSystem.
2024
*
@@ -80,5 +84,5 @@ class ChronoHydroCoupler {
8084

8185
} // namespace hydrochrono::hydro
8286

83-
#endif // HYDRO_CHRONO_CHRONO_HYDRO_COUPLER_H
87+
#endif // HYDROC_COUPLING_CHRONO_COUPLER_H
8488

include/hydroc/hydro_forces.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
// Include hydro_types.h FIRST to ensure BodyForces and GeneralizedForce are available
4747
// before any other includes that might conflict (e.g., config/hydro_config.h)
48-
#include <hydroc/hydro_types.h>
48+
#include <hydroc/core/hydro_types.h>
4949

5050
// Standard includes
5151
#include <cstdio>
@@ -77,11 +77,12 @@
7777

7878
// Hydroc library includes
7979
#include <hydroc/io/h5_reader.h>
80-
#include <hydroc/wave_types.h>
81-
// Note: hydro_types.h is included at the top to avoid header guard conflicts
80+
#include <hydroc/waves/wave_base.h>
81+
#include <hydroc/waves/regular_wave.h>
82+
#include <hydroc/waves/irregular_wave.h>
8283

8384
// Public hydroc includes (for SystemState)
84-
#include <hydroc/system_state.h>
85+
#include <hydroc/core/system_state.h>
8586

8687
namespace hydrochrono::hydro {
8788
// Forward declarations

include/hydroc/hydrochrono_runner/run_hydrochrono_from_yaml.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)