Skip to content

Commit 560698d

Browse files
authored
Merge pull request #85 from Project-SEA-Stack/refactor/wave-class-cleanup
Refactor wave classes: decouple parameters, frequency-domain excitation, code quality cleanup
2 parents 9ed4224 + 1a3f8e2 commit 560698d

38 files changed

Lines changed: 77135 additions & 81106 deletions

data/reference_data/sphere/hc_ref_sphere_irreg_waves.txt

Lines changed: 36283 additions & 36283 deletions
Large diffs are not rendered by default.

data/reference_data/sphere/hc_ref_sphere_irreg_waves_eta.txt

Lines changed: 36408 additions & 36408 deletions
Large diffs are not rendered by default.

data/reference_data/sphere/hc_ref_sphere_irreg_waves_eta_consistency.txt

Lines changed: 3999 additions & 7999 deletions
Large diffs are not rendered by default.

demos/f3of/demo_f3of_dt1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ int main(int argc, char* argv[]) {
153153
// ---------------- End DT specific set up, now add hydro forces ----------------------------------
154154

155155
// define wave parameters (not used in this demo TODO have hydroforces constructor without hydro inputs)
156-
auto default_dont_add_waves = std::make_shared<NoWave>(3);
156+
auto default_dont_add_waves = std::make_shared<NoWave>();
157157

158158
// set up hydro forces
159159
std::vector<std::shared_ptr<ChBody>> bodies;

demos/f3of/demo_f3of_dt2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ int main(int argc, char* argv[]) {
158158
system.AddLink(base_rev);
159159

160160
// define wave parameters (not used in this demo TODO have hydroforces constructor without hydro inputs)
161-
auto default_dont_add_waves = std::make_shared<NoWave>(3);
161+
auto default_dont_add_waves = std::make_shared<NoWave>();
162162

163163
// set up hydro forces
164164
std::vector<std::shared_ptr<ChBody>> bodies;

demos/f3of/demo_f3of_dt3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ int main(int argc, char* argv[]) {
155155
anchor->SetConstrainedCoords(true, true, true, true, true, true); // x, y, z, Rx, Ry, Rz
156156

157157
// define wave parameters (not used in this demo TODO have hydroforces constructor without hydro inputs)
158-
auto default_dont_add_waves = std::make_shared<NoWave>(3);
158+
auto default_dont_add_waves = std::make_shared<NoWave>();
159159

160160
// set up hydro forces
161161
std::vector<std::shared_ptr<ChBody>> bodies;

demos/oswec/demo_oswec_decay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ int main(int argc, char* argv[]) {
184184
revolute->Initialize(base_body, flap_body, ChFramed(ChVector3d(0.0, 0.0, -8.9), revoluteRot));
185185
system.AddLink(revolute);
186186

187-
auto default_dont_add_waves = std::make_shared<NoWave>(2);
187+
auto default_dont_add_waves = std::make_shared<NoWave>();
188188

189189
//// attach hydrodynamic forces to body
190190
std::vector<std::shared_ptr<ChBody>> bodies;

demos/oswec/demo_oswec_reg_waves.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ int main(int argc, char* argv[]) {
198198
bodies.push_back(flap_body);
199199
bodies.push_back(base_body);
200200

201-
auto my_hydro_inputs = std::make_shared<RegularWave>(static_cast<unsigned int>(bodies.size()));
201+
auto my_hydro_inputs = std::make_shared<RegularWave>();
202202
my_hydro_inputs->regular_wave_amplitude_ = 0.01;
203203
my_hydro_inputs->regular_wave_omega_ = (2 * CH_PI) / (periods[reg_wave_num - 1]);
204204

demos/rm3/demo_rm3_decay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ int main(int argc, char* argv[]) {
116116
prismatic_pto->SetDampingCoefficient(0.0);
117117
system.AddLink(prismatic_pto);
118118

119-
auto default_dont_add_waves = std::make_shared<NoWave>(2);
119+
auto default_dont_add_waves = std::make_shared<NoWave>();
120120

121121
// attach hydrodynamic forces to body
122122
std::vector<std::shared_ptr<ChBody>> bodies;

demos/rm3/demo_rm3_reg_waves.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int main(int argc, char* argv[]) {
133133
bodies.push_back(plate_body2);
134134

135135
// define wave parameters
136-
auto my_hydro_inputs = std::make_shared<RegularWave>(static_cast<unsigned int>(bodies.size()));
136+
auto my_hydro_inputs = std::make_shared<RegularWave>();
137137
my_hydro_inputs->regular_wave_amplitude_ = 1.0;
138138
my_hydro_inputs->regular_wave_omega_ = 2.10;
139139

0 commit comments

Comments
 (0)