61 bool check(
bool verbose =
false)
const {
63 #define CMD "Sandals::" << this->name << "::check(...): "
66 if (
type == Type::ERK && (!this->A.isLowerTriangular() || !this->A.diagonal().isZero())) {
69 }
else if (
type == Type::DIRK && (!this->A.isLowerTriangular() || this->A.diagonal().isZero())) {
72 }
else if (
type == Type::IRK && this->A.isZero()) {
79 if (this->order != computed_order) {
81 << this->order <<
".");
86 if (!this->is_embedded && (this->order_e != -1 || !this->b_e.isZero())) {
95 if (this->order_e != computed_order_e) {
97 <<
" ≠ " << this->order_e <<
".");
119 #define CMD "Sandals::" << this->name << "::tableau_order(...): "
123 Real tolerance{std::pow(EPSILON, 2.0/3.0)};
126 Real tmp{(
A*Vector::Ones() -
c).norm()};
127 if (tmp > tolerance) {
134 if (std::abs(tmp - 1.0) > tolerance) {
142 tmp =
b.transpose() *
c;
143 if (std::abs(tmp - 1.0/2.0) > tolerance) {
152 tmp =
b.transpose() * c_2;
153 if (std::abs(tmp - 1.0/3.0) > tolerance) {
159 tmp =
b.transpose() * Ac;
160 if (std::abs(tmp - 1.0/6.0) > tolerance) {
169 tmp =
b.transpose() * c_3;
170 if (std::abs(tmp - 1.0/4.0) > tolerance) {
175 Vector cAc{
c.array() * Ac.array()};
176 tmp =
b.transpose() * cAc;
177 if (std::abs(tmp - 1.0/8.0) > tolerance) {
182 Vector bA{(
b.transpose() *
A).transpose()};
183 tmp = bA.transpose() * c_2;
184 if (std::abs(tmp - 1.0/12.0) > tolerance) {
189 tmp =
b.transpose() *
A *
A *
c;
190 if (std::abs(tmp - 1.0/24.0) > tolerance) {
199 tmp =
b.transpose() * c_4;
200 if (std::abs(tmp - 1.0/5.0) > tolerance) {
205 Vector b_c2{
b.array() * c_2.array()};
206 tmp = b_c2.transpose() * Ac;
207 if (std::abs(tmp - 1.0/10.0) > tolerance) {
212 Vector b_Ac{
b.array() * Ac.array()};
213 tmp = b_Ac.transpose() * Ac;
214 if (std::abs(tmp - 1.0/20.0) > tolerance) {
221 tmp = b_c.transpose() * Ac2;
222 if (std::abs(tmp - 1.0/15.0) > tolerance) {
228 tmp =
b.transpose() * Ac3;
229 if (std::abs(tmp - 1.0/20.0) > tolerance) {
235 tmp = b_c.transpose() * AAc;
236 if (std::abs(tmp - 1.0/30.0) > tolerance) {
241 tmp = bA.transpose() * (
c.array() * Ac.array()).matrix();
242 if (std::abs(tmp - 1.0/40.0) > tolerance) {
247 tmp = bA.transpose() * Ac2;
248 if (std::abs(tmp - 1.0/60.0) > tolerance) {
253 tmp = bA.transpose() * AAc;
254 if (std::abs(tmp - 1.0/120.0) > tolerance) {
263 tmp =
b.transpose() * c_5;
264 if (std::abs(tmp - 1.0/6.0) > tolerance) {
269 tmp = (
b.array() * c_3.array()).matrix().transpose() * Ac;
270 if (std::abs(tmp - 1.0/12.0) > tolerance) {
275 Vector Ac_2{Ac.array().pow(2)};
276 tmp = b_c.transpose() * Ac_2;
277 if (std::abs(tmp - 1.0/24.0) > tolerance) {
282 tmp = b_c2.transpose() * Ac2;
283 if (std::abs(tmp - 1.0/18.0) > tolerance) {
288 tmp =
b.transpose() * (Ac2.array() * Ac.array()).matrix();
289 if (std::abs(tmp - 1.0/36.0) > tolerance) {
294 tmp = b_c.transpose() * Ac3;
295 if (std::abs(tmp - 1.0/24.0) > tolerance) {
301 tmp =
b.transpose() * Ac4;
302 if (std::abs(tmp - 1.0/30.0) > tolerance) {
307 Vector bc2A{
A.transpose() * b_c2};
308 tmp = bc2A.transpose() * Ac;
309 if (std::abs(tmp - 1.0/36.0) > tolerance) {
314 tmp = b_Ac.transpose() * AAc;
315 if (std::abs(tmp - 1.0/72.0) > tolerance) {
320 Vector bcA{b_c.transpose() *
A};
321 tmp = bcA.transpose() * cAc;
322 if (std::abs(tmp - 1.0/48.0) > tolerance) {
327 tmp = (bA.array() * c_2.array()).matrix().transpose() * Ac;
328 if (std::abs(tmp - 1.0/60.0) > tolerance) {
333 tmp = bA.transpose() * Ac_2;
334 if (std::abs(tmp - 1.0/120.0) > tolerance) {
339 tmp = bcA.transpose() * Ac2;
340 if (std::abs(tmp - 1.0/72.0) > tolerance) {
345 Vector bA_c{bA.array() *
c.array()};
346 tmp = bA_c.transpose() * Ac2;
347 if (std::abs(tmp - 1.0/90.0) > tolerance) {
352 tmp = bA.transpose() * Ac3;
353 if (std::abs(tmp - 1.0/120.0) > tolerance) {
358 tmp = bcA.transpose() * AAc;
359 if (std::abs(tmp - 1.0/144.0) > tolerance) {
364 tmp = bA_c.transpose() * AAc;
365 if (std::abs(tmp - 1.0/180.0) > tolerance) {
371 tmp = bA.transpose() * AcAc;
372 if (std::abs(tmp - 1.0/240.0) > tolerance) {
377 tmp = bA.transpose() *
A *
A * c_2;
378 if (std::abs(tmp - 1.0/360.0) > tolerance) {
383 tmp = bA.transpose() *
A *
A * Ac;
384 if (std::abs(tmp - 1.0/720.0) > tolerance) {