44/* ********************************************************************
55 * @file hydro_forces.h
66 *
7- * @brief Header file of TestHydro main class and helper classes
7+ * @brief Header file of HydroForces main class and helper classes
88 * ComponentFunc and ForceFunc6d.
99 *
1010 * ARCHITECTURE:
11- * TestHydro is a thin adapter over HydroSystem + ChronoHydroCoupler.
11+ * HydroForces is a thin adapter over HydroSystem + ChronoHydroCoupler.
1212 * Force computation is handled internally by HydroSystem, which owns:
1313 * - HydrostaticsComponent (restoring forces + buoyancy)
1414 * - RadiationComponent (RIRF convolution, owns velocity history)
1919 * opposes motion.)
2020 *
2121 * MAIN RESPONSIBILITIES:
22- * - TestHydro : Façade over HydroSystem; provides Chrono force callbacks
22+ * - HydroForces : Façade over HydroSystem; provides Chrono force callbacks
2323 * - ForceFunc6d: Wraps 6-DOF force/torque callbacks for Chrono bodies
2424 * - ComponentFunc: Per-DOF force function for Chrono's ChForce system
2525 *
3131 * These are the single source of truth for component configuration.
3232 *
3333 * INTERACTIONS:
34- * - Used by setup_hydro_from_yaml to create and configure TestHydro instances
34+ * - Used by setup_hydro_from_yaml to create and configure HydroForces instances
3535 * - Called by Chrono during simulation via ChForce callbacks
3636 * - Reads HDF5 data through H5FileInfo (not directly exposed here)
3737 * - Uses WaveBase hierarchy for wave excitation (passed in constructor)
@@ -88,7 +88,7 @@ class ChronoHydroCoupler;
8888}
8989
9090class ForceFunc6d ;
91- class TestHydro ;
91+ class HydroForces ;
9292
9393// ─────────────────────────────────────────────────────────────────────────────
9494// Degrees of Freedom Constant
@@ -159,9 +159,9 @@ class ForceFunc6d {
159159 * @brief Initializes hydro force info from H5FileInfo and the ChBody this force will be applied to.
160160 *
161161 * @param object The body in the system to which this 6-dimensional force is being applied.
162- * @param all_hydro_forces_user The TestHydro class where the total force on all bodies is calculated.
162+ * @param all_hydro_forces_user The HydroForces class where the total force on all bodies is calculated.
163163 */
164- ForceFunc6d (std::shared_ptr<chrono::ChBody> object, TestHydro * all_hydro_forces_user);
164+ ForceFunc6d (std::shared_ptr<chrono::ChBody> object, HydroForces * all_hydro_forces_user);
165165
166166 /* *
167167 * @brief Copy constructor that ensures the force is only added to a body once.
@@ -208,7 +208,7 @@ class ForceFunc6d {
208208 std::shared_ptr<ComponentFunc> force_ptrs_[kDofPerBody ]; // /< Pointers to the forces.
209209 std::shared_ptr<chrono::ChForce> chrono_force_; // /< Chrono force for the body.
210210 std::shared_ptr<chrono::ChForce> chrono_torque_; // /< Chrono torque for the body.
211- TestHydro * all_hydro_forces_; // /< Pointer to TestHydro for calculations.
211+ HydroForces * all_hydro_forces_; // /< Pointer to HydroForces for calculations.
212212};
213213
214214// Forward declaration of ChLoadAddedMass (defined in added_mass.h, included in .cpp)
@@ -226,22 +226,21 @@ struct HydroProfileStats {
226226
227227// ═══════════════════════════════════════════════════════════════════════════════
228228//
229- // TestHydro — Primary Hydrodynamics Façade / Adapter
229+ // HydroForces — Primary Hydrodynamics Façade / Adapter
230230//
231231// ═══════════════════════════════════════════════════════════════════════════════
232232/* *
233233 * @brief Primary hydrodynamics façade for HydroChrono applications.
234234 *
235- * TestHydro is the main user-facing object for attaching hydrodynamic forces to
236- * Chrono bodies. Despite its name (a historical artifact), it is NOT a test-only
237- * class — it is the production hydrodynamics adapter used by all workflows.
235+ * HydroForces is the main user-facing object for attaching hydrodynamic forces to
236+ * Chrono bodies. This is the production hydrodynamics adapter used by all workflows.
238237 *
239- * @note The name "TestHydro" is retained for backward compatibility. New code
240- * may use the alias `HydroForces` for clarity (see below) .
238+ * @note The historical name "TestHydro" is retained as an alias for backward
239+ * compatibility. New code should use `HydroForces`.
241240 *
242241 * ## What It Does
243242 *
244- * TestHydro bridges three layers:
243+ * HydroForces bridges three layers:
245244 * 1. **Chrono bodies** — The physical bodies in the Chrono simulation.
246245 * 2. **HydroSystem (core)** — Chrono-free hydrodynamic force computation.
247246 * 3. **Chrono force callbacks** — ChForce functions that Chrono calls each timestep.
@@ -256,16 +255,16 @@ struct HydroProfileStats {
256255 *
257256 * // Attach hydrodynamic forces (with or without waves)
258257 * std::vector<std::shared_ptr<ChBody>> bodies = {body1};
259- * TestHydro hydro(bodies, "path/to/hydro_data.h5");
258+ * HydroForces hydro(bodies, "path/to/hydro_data.h5");
260259 * hydro.AddWaves(std::make_shared<RegularWave>(...));
261260 *
262- * // Run simulation — Chrono automatically queries TestHydro for forces
261+ * // Run simulation — Chrono automatically queries HydroForces for forces
263262 * @endcode
264263 *
265264 * ## Used By
266265 *
267- * - **C++ tests and demos** — Directly instantiate TestHydro with bodies and H5 file.
268- * - **YAML runner (hydrochrono.exe)** — SetupHydroFromYAML creates TestHydro internally.
266+ * - **C++ tests and demos** — Directly instantiate HydroForces with bodies and H5 file.
267+ * - **YAML runner (hydrochrono.exe)** — SetupHydroFromYAML creates HydroForces internally.
269268 *
270269 * ## Architecture Notes
271270 *
@@ -279,16 +278,16 @@ struct HydroProfileStats {
279278 * to determine body order. Internally, body indices are **1-based** in the callback
280279 * interface (CoordinateFuncForBody) to match this naming convention.
281280 *
282- * @see HydroForces (alias below )
281+ * @see TestHydro (backwards-compatibility alias )
283282 * @see HydroSystem (Chrono-free hydrodynamic core)
284283 * @see ChronoHydroCoupler (extracts state from Chrono bodies)
285284 */
286- class TestHydro {
285+ class HydroForces {
287286 public:
288- TestHydro () = delete ;
287+ HydroForces () = delete ;
289288
290289 /* *
291- * @brief Main constructor for initializing the TestHydro class.
290+ * @brief Main constructor for initializing the HydroForces class.
292291 *
293292 * Sets up vector of bodies, h5 file info, and hydro inputs. If no waves are given,
294293 * this constructor defaults to using NoWave.
@@ -297,16 +296,16 @@ class TestHydro {
297296 * @param h5_file_name Name of the h5 file where hydro data is stored.
298297 * @param waves WaveBase object. Defaults to NoWave if not provided.
299298 */
300- TestHydro (std::vector<std::shared_ptr<chrono::ChBody>> user_bodies,
301- std::string h5_file_name,
302- std::shared_ptr<WaveBase> waves = std::make_shared<NoWave>());
299+ HydroForces (std::vector<std::shared_ptr<chrono::ChBody>> user_bodies,
300+ std::string h5_file_name,
301+ std::shared_ptr<WaveBase> waves = std::make_shared<NoWave>());
303302
304303 // Destructor (defined in .cpp to allow unique_ptr to incomplete type)
305- ~TestHydro ();
304+ ~HydroForces ();
306305
307306 // Deleted copy constructor and assignment operator for safety.
308- TestHydro (const TestHydro & old) = delete ;
309- TestHydro & operator =(const TestHydro & rhs) = delete ;
307+ HydroForces (const HydroForces & old) = delete ;
308+ HydroForces & operator =(const HydroForces & rhs) = delete ;
310309
311310 /* *
312311 * @brief Adds waves class to force calculations depending on if regular or irregular waves.
@@ -518,7 +517,7 @@ class TestHydro {
518517 std::unique_ptr<hydrochrono::hydro::ExcitationComponent> CreateExcitationComponent () const ;
519518
520519 // Factory: creates HydrostaticsComponent with current equilibrium/stiffness data.
521- // Used by both the TestHydro constructor and EnsureHydroSystemAndCoupler()
520+ // Used by both the HydroForces constructor and EnsureHydroSystemAndCoupler()
522521 // to ensure consistent construction.
523522 std::unique_ptr<hydrochrono::hydro::HydrostaticsComponent> CreateHydrostaticsComponent () const ;
524523
@@ -534,20 +533,18 @@ class TestHydro {
534533};
535534
536535// ─────────────────────────────────────────────────────────────────────────────
537- // Public Alias for Clarity
536+ // Backwards-Compatibility Alias
538537// ─────────────────────────────────────────────────────────────────────────────
539538/* *
540- * @brief Alias for TestHydro — the primary hydrodynamics façade .
539+ * @brief Backwards-compatibility alias for HydroForces .
541540 *
542- * HydroForces is the recommended name for new code. The underlying class
543- * is TestHydro (historical name retained for backward compatibility) .
541+ * TestHydro is the historical name for the main hydrodynamics façade.
542+ * It is retained as an alias for backward compatibility with existing code .
544543 *
545- * Usage:
546- * @code{.cpp}
547- * HydroForces hydro(bodies, "hydro_data.h5");
548- * hydro.AddWaves(my_waves);
549- * @endcode
544+ * @note Prefer `HydroForces` for new code.
545+ *
546+ * @deprecated Use HydroForces instead.
550547 */
551- using HydroForces = TestHydro ;
548+ using TestHydro = HydroForces ;
552549
553550#endif
0 commit comments