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
123 for (node = Rows[r]; node != NULL; node = node->
Prev)
126 if (node->
Floor == f)
135 int STable3D::Push4 (
int r,
int c,
int f,
int t)
137 MFEM_ASSERT(r != c && r != f && r != t && c != f && c != t && f != t,
138 " r = " << r <<
", c = " << c <<
", f = " << f <<
", t = " << t);
143 if (max < c) { max = c, i = 1; }
144 if (max < f) { max = f, i = 2; }
145 if (max < t) { i = 3; }
162 int STable3D::operator() (
int r,
int c,
int f,
int t)
const
167 if (max < c) { max = c, i = 1; }
168 if (max < f) { max = f, i = 2; }
169 if (max < t) { i = 3; }
174 return (*
this)(c,f,t);
176 return (*
this)(r,f,t);
178 return (*
this)(r,c,t);
180 return (*
this)(r,c,f);
186 STable3D::~STable3D ()
188 #ifdef MFEM_USE_MEMALLOC
191 for (
int i = 0; i < Size; i++)
194 while (node_p != NULL)
197 node_p = node_p->
Prev;
205 void STable3D::Print(std::ostream &
out)
const
207 out << NElem << endl;
208 for (
int row = 0; row < Size; row++)
211 while (node_p != NULL)
215 <<
' ' << node_p->
Floor
218 node_p = node_p->
Prev;
void Sort3(int &r, int &c, int &f)
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...