11 const Eigen::VectorXd &theta_n,
12 const double floor_fraction)
13 : weights_(
weights), theta_n_(theta_n)
17 if (!(floor_fraction > 0 && floor_fraction < 1))
18 log_and_throw_error(
"GrowthDissipationForm: floor_fraction must lie in (0, 1), got {}.", floor_fraction);
49 for (
int i = 0; i < x0.size(); ++i)
51 const double dx = x1(i) - x0(i);
52 if (dx >= 0 || x0(i) <=
floor_(i))
54 alpha = std::min(alpha, (
floor_(i) - x0(i)) / dx * 0.99);
56 return std::max(alpha, 0.0);
61 return (x1.array() > 0).all();
void log_and_throw_error(const std::string &msg)
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix