38 #ifdef LIBMESH_HAVE_XDR
80 #ifdef LIBMESH_HAVE_XDR
89 libmesh_error_msg(
"XDR Error: Accessing file: " << fn <<
" failed.");
104 mp_in.open(fn, std::ios::in);
108 libmesh_file_error(fn);
119 libmesh_file_error(fn);
125 libmesh_error_msg(
"Unrecognized file access type!");
133 const int bufLen = 12;
139 #ifdef LIBMESH_HAVE_XDR
146 std::ostringstream
name;
148 name <<
"DEAL 003:003";
151 name <<
"MGF 002:000";
157 libmesh_error_msg(
"Unknown orig " << orig);
160 std::sprintf(&buf[0],
"%s", name.str().c_str());
185 std::sprintf(&buf[0],
"%s %03d:%03d",
"DEAL", 3, 3);
188 std::sprintf(&buf[0],
"%s %03d:%03d",
"MGF ", 2, 0);
207 std::getline (
mp_in, buf_buf,
'\n');
208 libmesh_assert_less_equal (buf_buf.size(), bufLen);
210 buf_buf.copy (buf, std::string::npos);
220 mp_in.getline(buf, bufLen+1);
231 libmesh_error_msg(
"Unknown m_type" <<
m_type);
240 std::strncpy(name, &buf[0], 4);
243 if (std::strcmp (name,
"DEAL") == 0)
247 else if (std::strcmp (name,
"MGF ") == 0)
251 else if (std::strcmp (name,
"LIBM") == 0)
257 libmesh_error_msg(
"ERROR: No originating software can be determined for header string '" << name);
266 int totalSize = numvar*size;
271 #ifdef LIBMESH_HAVE_XDR
280 (xdrproc_t) xdr_int);
288 for (
int i=0; i<size; i++)
290 for (
int j=0; j<numvar; j++)
291 mp_out << array[i*numvar + j] <<
" ";
304 for (
int i=0; i<size; i++)
306 for (
int j=0; j<numvar; j++)
308 mp_in >> array[i*numvar + j];
319 libmesh_error_msg(
"Unknown m_type" <<
m_type);
329 int totalSize = numvar*size;
340 #ifdef LIBMESH_HAVE_XDR
351 (xdrproc_t) xdr_REAL);
359 std::ios_base::fmtflags out_flags =
mp_out.flags();
365 << std::setprecision(16);
367 for (
int i=0; i<size; i++)
369 for (
int j=0; j<numvar; j++)
370 mp_out << array[i*numvar + j] <<
" \t";
386 for (
int i=0; i<size; i++)
390 for (
int j=0; j<numvar; j++)
391 mp_in >> array[i*numvar + j];
401 libmesh_error_msg(
"Unknown m_type" <<
m_type);
unsigned int get_num_levels()
std::string name(const ElemQuality q)
void tokenize_first_line(const char *p)
libmesh_assert(remote_elem)
const class libmesh_nullptr_t libmesh_nullptr
void init(XdrIO_TYPE t, const char *fn, const char *type, int icnt)
int dataBlk(int *array, int numvar, int size)
LegacyXdrIO::FileFormat orig_flag
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LegacyXdrIO::FileFormat get_orig_flag() const
OStreamProxy out(std::cout)