17std::unique_ptr<PairForce>
makePairForce(
const std::string &friction_law) {
18 if (friction_law !=
"coulomb_simple" && friction_law !=
"stick_slip") {
19 throw std::runtime_error(
20 "Unknown Contact.Friction_Law '" + friction_law +
21 "'. Supported: coulomb_simple, stick_slip.");
24 if (friction_law ==
"stick_slip")
25 return std::make_unique<StickSlipPairForce>();
26 return std::make_unique<PairForce>();
29std::unique_ptr<Damping>
makeDamping(
const std::string &name) {
30 if (name ==
"com_and_node" || name ==
"com")
31 return std::make_unique<Damping>();
32 if (name ==
"node" || name ==
"off")
34 throw std::runtime_error(
35 "Unknown Contact.Damping_Law '" + name +
36 "'. Supported: com_and_node, com, node, off.");
40 return damping_law ==
"com" || damping_law ==
"com_and_node";
44 return damping_law ==
"node" || damping_law ==
"com_and_node";