22 {
23
24
25 bool check = false;
30
31 check = true;
32 }
33
34 if (!check) {
35
36
38 check = true;
39
41 check = true;
42
44 check = true;
45 }
46
47 if (check) {
48 throw std::runtime_error(
50 << "Error: Point p = ("
51 << p[0] << ", " << p[1] << ", " << p[2]
52 << ") does not belong to reference tet element = {("
53 << nodes[0].d_x << ", " << nodes[0].d_y << ", " << nodes[0].d_z
54 << "), ("
55 << nodes[1].d_x << "," << nodes[1].d_y << ", " << nodes[1].d_z
56 << "), ("
57 << nodes[2].d_x << "," << nodes[2].d_y << ", " << nodes[2].d_z
58 << "), ("
59 << nodes[3].d_x << "," << nodes[3].d_y << ", " << nodes[3].d_z
60 << ")}.\n"
61 << "Coordinates in reference element are: "
62 << "xi = " << p[0]
63 << ", eta = " << p[1]
64 << ", zeta = " << p[2] << "\n");
65 }
66}
Collects a message with stream syntax for use in an exception.
bool isGreater(const double &a, const double &b)
Returns true if a > b.
bool isLess(const double &a, const double &b)
Returns true if a < b.