36 using container_type = std::vector<std::shared_ptr<Constraint>>;
44 void reset_forces()
const {
45 for (
auto const &constraint : *
this) {
46 constraint->reset_force();
50 container_type m_constraints;
53 bool contains(std::shared_ptr<Constraint>
const &constraint)
const noexcept {
54 return std::ranges::find(*
this, constraint) != end();
56 void add(std::shared_ptr<Constraint>
const &constraint);
57 void remove(std::shared_ptr<Constraint>
const &constraint);
70 if (not m_constraints.empty()) {
71 throw std::runtime_error(
"The box size can not be changed because there "
72 "are active constraints.");