Skip to content

Commit

Permalink
Merge pull request #430 from Xiangyu-Hu/fix/default_command_line_opti…
Browse files Browse the repository at this point in the history
…on_in_test_cases

switch command option in cases to default
  • Loading branch information
Xiangyu-Hu authored Sep 8, 2023
2 parents 0e474ac + b07d2e5 commit 88cb56e
Show file tree
Hide file tree
Showing 61 changed files with 183 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation leaflet_inner(leaflet);
//----------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_0d_regression_test/regression_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation diffusion_body_inner_relation(diffusion_body);
ContactRelation temperature_observer_contact(temperature_observer, {&diffusion_body});
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_T_shaped_pipe/src/T_shaped_pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation water_block_inner(water_block);
ComplexRelation water_block_complex_relation(water_block_inner, {&wall_boundary});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main(int ac, char *av[])
/** Tag for running particle relaxation for the initially body-fitted distribution */
sph_system.setRunParticleRelaxation(false);
/** Tag for starting with relaxed body-fitted particles distribution */
sph_system.setReloadParticles(true);
sph_system.setReloadParticles(false);
sph_system.handleCommandlineOptions(ac, av);
IOEnvironment io_environment(sph_system);
//----------------------------------------------------------------------
Expand Down Expand Up @@ -159,6 +159,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation ball_inner(ball);
SurfaceContactRelation ball_contact(ball, {&wall_boundary});
Expand Down
5 changes: 4 additions & 1 deletion tests/2d_examples/test_2d_collision/collision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int main(int ac, char *av[])
/** Tag for running particle relaxation for the initially body-fitted distribution */
sph_system.setRunParticleRelaxation(false);
/** Tag for starting with relaxed body-fitted particles distribution */
sph_system.setReloadParticles(true);
sph_system.setReloadParticles(false);
sph_system.handleCommandlineOptions(ac, av);
IOEnvironment io_environment(sph_system);
//----------------------------------------------------------------------
Expand Down Expand Up @@ -163,6 +163,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation free_ball_inner(free_ball);
SurfaceContactRelation free_ball_contact(free_ball, {&wall_boundary});
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_dambreak/Dambreak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
ComplexRelation water_block_complex(water_block, {&wall_boundary});
ContactRelation fluid_observer_contact(fluid_observer, {&water_block});
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_dambreak_python/dambreak_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ class Environment : public PreSettingCase
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
ComplexRelation water_block_complex;
ContactRelation fluid_observer_contact;
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_depolarization/depolarization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation muscle_body_inner_relation(muscle_body);
ContactRelation voltage_observer_contact_relation(voltage_observer, {&muscle_body});
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_diffusion/diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation diffusion_body_inner_relation(diffusion_body);
ContactRelation temperature_observer_contact(temperature_observer, {&diffusion_body});
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_elastic_gate/elastic_gate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
ComplexRelation water_block_complex_relation(water_block, RealBodyVector{&wall_boundary, &gate});
InnerRelation gate_inner_relation(gate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int main(int ac, char *av[])
// Tag for run particle relaxation for the initial body fitted distribution.
sph_system.setRunParticleRelaxation(false);
// Tag for computation start with relaxed body fitted particles distribution.
sph_system.setReloadParticles(true);
sph_system.setReloadParticles(false);
// Handle command line arguments and override the tags for particle relaxation and reload.
sph_system.handleCommandlineOptions(ac, av);
IOEnvironment io_environment(sph_system);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation water_body_inner(water_body);
InteractionWithUpdate<KernelGradientWithCorrectionInner> kernel_gradient_update(water_body_inner);
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_filling_tank/filling_tank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
ComplexRelation water_body_complex(water_body, {&wall});
ContactRelation fluid_observer_contact_relation(fluid_observer, {&water_body});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main(int ac, char *av[])
/** Tag for run particle relaxation for the initial body fitted distribution. */
sph_system.setRunParticleRelaxation(false);
/** Tag for computation start with relaxed body fitted particles distribution. */
sph_system.setReloadParticles(true);
sph_system.setReloadParticles(false);
// handle command line arguments
#ifdef BOOST_AVAILABLE
sph_system.handleCommandlineOptions(ac, av);
Expand Down Expand Up @@ -46,6 +46,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
ComplexRelation water_block_complex(water_block, {&cylinder});
ContactRelation cylinder_contact(cylinder, {&water_block});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main(int ac, char *av[])
/** Tag for run particle relaxation for the initial body fitted distribution. */
sph_system.setRunParticleRelaxation(false);
/** Tag for computation start with relaxed body fitted particles distribution. */
sph_system.setReloadParticles(true);
sph_system.setReloadParticles(false);
/** handle command line arguments. */
sph_system.handleCommandlineOptions(ac, av);
IOEnvironment io_environment(sph_system);
Expand All @@ -43,6 +43,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation water_block_inner(water_block);
ComplexRelation water_block_complex(water_block_inner, {&cylinder});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main(int ac, char *av[])
/** Tag for run particle relaxation for the initial body fitted distribution. */
sph_system.setRunParticleRelaxation(false);
/** Tag for computation start with relaxed body fitted particles distribution. */
sph_system.setReloadParticles(true);
sph_system.setReloadParticles(false);
/** handle command line arguments. */
sph_system.handleCommandlineOptions(ac, av);
IOEnvironment io_environment(sph_system);
Expand Down Expand Up @@ -49,6 +49,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
AdaptiveInnerRelation water_block_inner(water_block);
AdaptiveContactRelation water_contact(water_block, {&cylinder});
Expand Down Expand Up @@ -260,6 +263,5 @@ int main(int ac, char *av[])
tt = t4 - t1 - interval;
std::cout << "Total wall time for computation: " << tt.seconds() << " seconds." << std::endl;


return 0;
}
6 changes: 4 additions & 2 deletions tests/2d_examples/test_2d_fsi2/fsi2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ int main(int ac, char *av[])
//----------------------------------------------------------------------
SPHSystem sph_system(system_domain_bounds, resolution_ref);
sph_system.setRunParticleRelaxation(false); // Tag for run particle relaxation for body-fitted distribution
sph_system.setReloadParticles(true); // Tag for computation with save particles distribution
sph_system.setReloadParticles(false); // Tag for computation with save particles distribution
#ifdef BOOST_AVAILABLE
sph_system.handleCommandlineOptions(ac, av); // handle command line arguments
#endif
Expand Down Expand Up @@ -96,6 +96,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation insert_body_inner(insert_body);
ComplexRelation water_block_complex(water_block, RealBodyVector{&wall_boundary, &insert_body});
Expand Down Expand Up @@ -302,6 +305,5 @@ int main(int ac, char *av[])
write_beam_tip_displacement.testResult();
}


return 0;
}
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_heat_transfer/heat_transfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation fluid_body_inner(thermofluid_body);
InnerRelation solid_body_inner(thermosolid_body);
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_hydrostatic_fsi/hydrostatic_fsi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation water_block_inner(water_block);
InnerRelation gate_inner(gate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation water_block_inner(water_block);
InnerRelation structure_inner(structure);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation beam_body_inner(beam_body);
ContactRelation beam_observer_contact(beam_observer, {&beam_body});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation beam_body_inner(beam_body);
ContactRelation beam_observer_contact(beam_observer, {&beam_body});
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_owsc/owsc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation water_block_inner(water_block);
InnerRelation flap_inner(flap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation input_body_inner(input_body);
//----------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_plate/2d_plate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation plate_body_inner(plate_body);
ContactRelation plate_observer_contact(plate_observer, {&plate_body});
Expand Down
3 changes: 3 additions & 0 deletions tests/2d_examples/test_2d_self_contact/self_contact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ int main(int ac, char *av[])
// Define body relation map.
// The contact map gives the topological connections between the bodies.
// Basically the the range of bodies to build neighbor particle lists.
// Generally, we first define all the inner relations, then the contact relations.
// At last, we define the complex relaxations by combining previous defined
// inner and contact relations.
//----------------------------------------------------------------------
InnerRelation beam_body_inner(beam_body);
ContactRelation beam_observer_contact(beam_observer, {&beam_body});
Expand Down
Loading

0 comments on commit 88cb56e

Please sign in to comment.