HydroChrono icon indicating copy to clipboard operation
HydroChrono copied to clipboard

Default waves (no waves) crashes in multibody systems

Open zur-quin opened this issue 2 years ago • 0 comments

Currently, multibody demos for decay tests have lines like these in order to run without crashing:

    auto default_dont_add_waves = std::make_shared<NoWave>(3);

    // set up hydro forces
    std::vector<std::shared_ptr<ChBody>> bodies;
    bodies.push_back(base);
    bodies.push_back(flapFore);
    bodies.push_back(flapAft);
    TestHydro hydroforces(bodies, h5fname, default_dont_add_waves);

(From F3OF demo) Where the default_dont_add_waves object is required to be passed. Ideally, this object should be omitted from the demo set up. If no wave object is given to hydroforces constructor, then the default should be a NoWave object with correct size for number of bodies. In other words, the above code should be replaced with:

    // set up hydro forces
    std::vector<std::shared_ptr<ChBody>> bodies;
    bodies.push_back(base);
    bodies.push_back(flapFore);
    bodies.push_back(flapAft);
    TestHydro hydroforces(bodies, h5fname);

to have the same results. Note, this works for single body systems since the default is a NoWave(1) object.

Tasks for this issue:

  • [ ] Default NoWave should account for multibody systems as described above
  • [ ] Remove default_dont_add_waves objects from multibody decay demos to prove functionality, and increase readability

zur-quin avatar May 30 '23 18:05 zur-quin