Skip to content

Default waves (no waves) crashes in multibody systems #27

@zur-quin

Description

@zur-quin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions