21 STable3D::STable3D (
int nr)
27 for (i = 0; i < nr; i++)
34 inline void Sort3 (
int &r,
int &c,
int &
f)
45 t = r; r = c; c =
f; f =
t;
55 t =
f; f = c; c = r; r =
t;
64 int STable3D::Push (
int r,
int c,
int f)
68 MFEM_ASSERT(r != c && c != f && f != r,
69 "STable3D::Push : r = " << r <<
", c = " << c <<
", f = " << f);
73 for (node = Rows[r]; node != NULL; node = node->
Prev)
82 #ifdef MFEM_USE_MEMALLOC
83 node = NodesMem.Alloc ();
97 int STable3D::operator() (
int r,
int c,
int f)
const
103 for (node = Rows[r]; node != NULL; node = node->
Prev)
106 if (node->
Floor == f)
112 MFEM_ABORT(
"(r,c,f) = (" << r <<
"," << c <<
"," << f <<
")");
117 int STable3D::Index (
int r,
int c,
int f)
const
128 for (node = Rows[r]; node != NULL; node = node->
Prev)
131 if (node->
Floor == f)
140 int STable3D::Push4 (
int r,
int c,
int f,
int t)
142 MFEM_ASSERT(r != c && r != f && r != t && c != f && c != t && f != t,
143 " r = " << r <<
", c = " << c <<
", f = " << f <<
", t = " << t);
148 if (max < c) { max = c, i = 1; }
149 if (max < f) { max =
f, i = 2; }
150 if (max < t) { i = 3; }
167 int STable3D::operator() (
int r,
int c,
int f,
int t)
const
172 if (max < c) { max = c, i = 1; }
173 if (max < f) { max =
f, i = 2; }
174 if (max < t) { i = 3; }
179 return (*
this)(c,
f,
t);
181 return (*
this)(r,
f,
t);
183 return (*
this)(r,c,
t);
185 return (*
this)(r,c,
f);
191 STable3D::~STable3D ()
193 #ifdef MFEM_USE_MEMALLOC
196 for (
int i = 0; i < Size; i++)
199 while (node_p != NULL)
202 node_p = node_p->
Prev;
210 void STable3D::Print(std::ostream & os)
const
213 for (
int row = 0; row < Size; row++)
216 while (node_p != NULL)
220 <<
' ' << node_p->
Floor
223 node_p = node_p->
Prev;
void Sort3(int &r, int &c, int &f)
double f(const Vector &p)