31 #ifdef LIBMESH_HAVE_GZSTREAM 33 # include "gzstream.h" 42 void bzip_file (
const std::string & unzipped_name)
44 #ifdef LIBMESH_HAVE_BZIP 45 LOG_SCOPE(
"system(bzip2)",
"XdrIO");
47 std::string system_string =
"bzip2 -f ";
48 system_string += unzipped_name;
49 if (std::system(system_string.c_str()))
50 libmesh_file_error(system_string);
52 libmesh_error_msg(
"ERROR: need bzip2/bunzip2 to create " << unzipped_name <<
".bz2");
56 std::string unzip_file (
const std::string &
name)
58 std::ostringstream pid_suffix;
59 pid_suffix <<
'_' << getpid();
61 std::string new_name =
name;
62 if (
name.size() -
name.rfind(
".bz2") == 4)
64 #ifdef LIBMESH_HAVE_BZIP 65 new_name.erase(new_name.end() - 4, new_name.end());
66 new_name += pid_suffix.str();
67 LOG_SCOPE(
"system(bunzip2)",
"XdrIO");
68 std::string system_string =
"bunzip2 -f -k -c ";
69 system_string +=
name +
" > " + new_name;
70 if (std::system(system_string.c_str()))
71 libmesh_file_error(system_string);
73 libmesh_error_msg(
"ERROR: need bzip2/bunzip2 to open .bz2 file " <<
name);
76 else if (
name.size() -
name.rfind(
".xz") == 3)
78 #ifdef LIBMESH_HAVE_XZ 79 new_name.erase(new_name.end() - 3, new_name.end());
80 new_name += pid_suffix.str();
81 LOG_SCOPE(
"system(xz -d)",
"XdrIO");
82 std::string system_string =
"xz -f -d -k -c ";
83 system_string +=
name +
" > " + new_name;
84 if (std::system(system_string.c_str()))
85 libmesh_file_error(system_string);
87 libmesh_error_msg(
"ERROR: need xz to open .xz file " <<
name);
93 void xzip_file (
const std::string & unzipped_name)
95 #ifdef LIBMESH_HAVE_XZ 96 LOG_SCOPE(
"system(xz)",
"XdrIO");
98 std::string system_string =
"xz -f ";
99 system_string += unzipped_name;
100 if (std::system(system_string.c_str()))
101 libmesh_file_error(system_string);
103 libmesh_error_msg(
"ERROR: need xz to create " << unzipped_name <<
".xz");
109 void remove_unzipped_file (
const std::string &
name)
111 std::ostringstream pid_suffix;
112 pid_suffix <<
'_' << getpid();
116 if (
name.size() -
name.rfind(
".bz2") == 4)
118 std::string new_name(
name.begin(),
name.end()-4);
119 new_name += pid_suffix.str();
120 std::remove(new_name.c_str());
122 if (
name.size() -
name.rfind(
".xz") == 3)
124 std::string new_name(
name.begin(),
name.end()-3);
125 new_name += pid_suffix.str();
126 std::remove(new_name.c_str());
140 #ifdef LIBMESH_HAVE_XDR
174 #ifdef LIBMESH_HAVE_XDR 178 libmesh_file_error(
name.c_str());
180 xdrstdio_create (
xdrs.get(),
fp, (
mode ==
ENCODE) ? XDR_ENCODE : XDR_DECODE);
183 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
184 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
185 <<
"The XDR interface is not available in this installation");
200 #ifdef LIBMESH_HAVE_GZSTREAM 201 igzstream * inf =
new igzstream;
204 inf->open(
name.c_str(), std::ios::in);
206 libmesh_error_msg(
"ERROR: need gzstream to handle .gz files!!!");
211 std::ifstream * inf =
new std::ifstream;
215 std::string new_name = unzip_file(
name);
217 inf->open(new_name.c_str(), std::ios::in);
220 libmesh_assert(
in.get());
223 libmesh_file_error(
name);
235 #ifdef LIBMESH_HAVE_GZSTREAM 236 ogzstream * outf =
new ogzstream;
237 libmesh_assert(outf);
241 libmesh_error_msg(
"ERROR: need gzstream to handle .gz files!!!");
246 std::ofstream * outf =
new std::ofstream;
247 libmesh_assert(outf);
250 std::string new_name =
name;
253 new_name.erase(new_name.end() - 4, new_name.end());
256 new_name.erase(new_name.end() - 3, new_name.end());
261 libmesh_assert(
out.get());
262 libmesh_assert (
out->good());
267 libmesh_error_msg(
"Invalid mode = " <<
mode);
280 #ifdef LIBMESH_HAVE_XDR 284 xdr_destroy (
xdrs.get());
296 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
297 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
298 <<
"The XDR interface is not available in this installation");
307 if (
in.get() !=
nullptr)
320 if (
out.get() !=
nullptr)
335 libmesh_error_msg(
"Invalid mode = " <<
mode);
348 #ifdef LIBMESH_HAVE_XDR 358 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
359 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
360 <<
"The XDR interface is not available in this installation");
370 if (
in.get() !=
nullptr)
377 if (
out.get() !=
nullptr)
383 libmesh_error_msg(
"Invalid mode = " <<
mode);
398 #ifdef LIBMESH_HAVE_XDR 410 libmesh_assert(feof(
fp));
411 libmesh_assert(!ferror(
fp));
415 libmesh_assert(!ferror(
fp));
426 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
427 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
428 <<
"The XDR interface is not available in this installation");
437 libmesh_assert(
in.get());
448 libmesh_assert(
in->eof());
449 libmesh_assert(!
in->fail());
453 libmesh_assert(
in->good());
469 #ifdef LIBMESH_HAVE_XDR 475 template <
typename T>
476 xdrproc_t xdr_translator();
478 template <
typename T>
479 bool xdr_translate(XDR * x, T & a)
481 return (xdr_translator<T>())(x, &a, 0);
485 bool xdr_translate(XDR * x,
489 std::copy(s.begin(), s.end(), sptr);
496 bool b = xdr_string(x, &begin, length);
499 length = cast_int<unsigned int>(std::strlen(sptr));
501 std::copy(sptr, sptr+length, s.begin());
506 template <
typename T>
507 bool xdr_translate(XDR * x, std::complex<T> & a)
509 T r = a.real(), i = a.imag();
510 bool b1 = xdr_translate(x, r);
511 bool b2 = xdr_translate(x, i);
512 a = std::complex<T>(r,i);
516 template <
typename T>
517 bool xdr_translate(XDR * x, std::vector<T> & a)
519 unsigned int length = cast_int<unsigned int>(a.size());
520 xdr_u_int(x, &length);
524 return xdr_vector(x, reinterpret_cast<char *>(a.data()), length,
sizeof(T),
525 xdr_translator<T>());
531 template <
typename T>
532 bool xdr_translate(XDR * x, std::vector<std::complex<T>> & a)
534 unsigned int length = cast_int<unsigned int>(a.size());
535 bool b = xdr_u_int(x, &length);
538 if (!xdr_translate(x, val))
544 bool xdr_translate(XDR * x, std::vector<std::string> & s)
546 unsigned int length = cast_int<unsigned int>(s.size());
547 bool b = xdr_u_int(x, &length);
550 if (!xdr_translate(x, val))
556 xdrproc_t xdr_translator<int>()
560 if (
sizeof(
int) <= 4)
561 return (xdrproc_t)(xdr_int);
562 else if (
sizeof(
int) ==
sizeof(
long long))
563 return (xdrproc_t)(xdr_longlong_t);
564 else if (
sizeof(
int) ==
sizeof(long))
565 return (xdrproc_t)(xdr_long);
571 xdrproc_t xdr_translator<unsigned int>()
575 if (
sizeof(
unsigned int) <= 4)
576 return (xdrproc_t)(xdr_u_int);
577 else if (
sizeof(
unsigned int) ==
sizeof(
unsigned long))
578 return (xdrproc_t)(xdr_u_long);
579 else if (
sizeof(
unsigned int) ==
sizeof(
unsigned long long))
580 return (xdrproc_t)(xdr_u_longlong_t);
586 xdrproc_t xdr_translator<long int>()
590 if (
sizeof(
long int) <= 4)
591 return (xdrproc_t)(xdr_long);
592 else if (
sizeof(
long int) ==
sizeof(
long long))
593 return (xdrproc_t)(xdr_longlong_t);
599 xdrproc_t xdr_translator<unsigned long int>()
603 if (
sizeof(
unsigned long int) <= 4)
604 return (xdrproc_t)(xdr_u_long);
605 else if (
sizeof(
unsigned long int) ==
sizeof(
unsigned long long))
606 return (xdrproc_t)(xdr_u_longlong_t);
620 xdrproc_t xdr_translator<long long>() {
return (xdrproc_t)(xdr_longlong_t); }
623 xdrproc_t xdr_translator<unsigned long long>() {
return (xdrproc_t)(xdr_u_longlong_t); }
626 xdrproc_t xdr_translator<short int>() {
return (xdrproc_t)(xdr_short); }
629 xdrproc_t xdr_translator<unsigned short int>() {
return (xdrproc_t)(xdr_u_short); }
632 xdrproc_t xdr_translator<char>() {
return (xdrproc_t)(xdr_char); }
635 xdrproc_t xdr_translator<signed char>() {
return (xdrproc_t)(xdr_char); }
638 xdrproc_t xdr_translator<unsigned char>() {
return (xdrproc_t)(xdr_u_char); }
641 xdrproc_t xdr_translator<float>() {
return (xdrproc_t)(xdr_float); }
644 xdrproc_t xdr_translator<double>() {
return (xdrproc_t)(xdr_double); }
648 xdrproc_t xdr_translator<long double>() {
return (xdrproc_t)(xdr_double); }
654 template <
typename T>
661 template <
typename T>
666 a = std::complex<T>(r,i);
677 for (
unsigned int c=0; c<std::strlen(
comm); c++)
681 a.push_back(
comm[c]);
685 template <
typename T>
688 unsigned int length=0;
689 data(length,
"# vector length");
692 for (std::size_t i=0; i<a.size(); i++)
694 libmesh_assert(
in.get());
695 libmesh_assert (
in->good());
701 template <
typename T>
704 unsigned int length=0;
705 data(length,
"# vector length x 2 (complex)");
708 for (std::size_t i=0; i<a.size(); i++)
711 libmesh_assert(
in.get());
712 libmesh_assert (
in->good());
714 a[i] = std::complex<T>(r,im);
719 template <
typename T>
722 template <
typename T>
725 *
out << a.real() <<
"\t " << a.imag();
728 template <
typename T>
731 std::size_t length = a.size();
732 data(length,
"# vector length");
734 for (std::size_t i=0; i<a.size(); i++)
736 libmesh_assert(
out.get());
737 libmesh_assert (
out->good());
743 template <
typename T>
746 std::size_t length=a.size();
747 data(length,
"# vector length x 2 (complex)");
749 for (std::size_t i=0; i<a.size(); i++)
751 libmesh_assert(
out.get());
752 libmesh_assert (
out->good());
760 template <
typename T>
768 #ifdef LIBMESH_HAVE_XDR 772 xdr_translate(
xdrs.get(), a);
776 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
777 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
778 <<
"The XDR interface is not available in this installation");
786 libmesh_assert(
in.get());
787 libmesh_assert (
in->good());
796 libmesh_assert(
out.get());
797 libmesh_assert (
out->good());
802 *
out << std::scientific
803 << std::setprecision(16);
809 if (std::string(comment_in) !=
"")
810 *
out <<
"\t " << comment_in;
819 libmesh_error_msg(
"Invalid mode = " <<
mode);
824 template <
typename T>
831 #ifdef LIBMESH_HAVE_XDR 833 libmesh_assert (this->
is_open());
835 unsigned int size_of_type = cast_int<unsigned int>(
sizeof(T));
837 xdr_vector(
xdrs.get(),
841 xdr_translator<T>());
843 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
844 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
845 <<
"The XDR interface is not available in this installation");
853 #ifdef LIBMESH_HAVE_XDR 855 libmesh_assert (this->
is_open());
857 unsigned int size_of_type = cast_int<unsigned int>(
sizeof(T));
860 xdr_vector(
xdrs.get(),
864 xdr_translator<T>());
866 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
867 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
868 <<
"The XDR interface is not available in this installation");
876 libmesh_assert(
in.get());
877 libmesh_assert (
in->good());
879 for (
unsigned int i=0; i<len; i++)
881 libmesh_assert(
in.get());
882 libmesh_assert (
in->good());
891 libmesh_assert(
out.get());
892 libmesh_assert (
out->good());
897 *
out << std::scientific
898 << std::setprecision(16);
901 for (
unsigned int i=0; i<len; i++)
903 libmesh_assert(
out.get());
904 libmesh_assert (
out->good());
905 *
out << val[i] <<
" ";
909 const unsigned imax =
std::min(line_break, len);
913 for (
unsigned int i=0; i<imax; i++)
915 libmesh_assert(
out.get());
916 libmesh_assert (
out->good());
923 libmesh_assert(
out.get());
924 libmesh_assert (
out->good());
933 libmesh_error_msg(
"Invalid mode = " <<
mode);
940 void Xdr::data_stream (
double * val,
const unsigned int len,
const unsigned int line_break)
947 #ifdef LIBMESH_HAVE_XDR 949 libmesh_assert (this->
is_open());
952 xdr_vector(
xdrs.get(),
956 (xdrproc_t) xdr_double);
960 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
961 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
962 <<
"The XDR interface is not available in this installation");
970 libmesh_assert(
in.get());
971 libmesh_assert (
in->good());
973 for (
unsigned int i=0; i<len; i++)
975 libmesh_assert(
in.get());
976 libmesh_assert (
in->good());
985 libmesh_assert(
out.get());
986 libmesh_assert (
out->good());
989 std::ios_base::fmtflags out_flags =
out->flags();
994 *
out << std::scientific
995 << std::setprecision(16);
998 for (
unsigned int i=0; i<len; i++)
1000 libmesh_assert(
out.get());
1001 libmesh_assert (
out->good());
1002 *
out << val[i] <<
' ';
1006 const unsigned imax =
std::min(line_break, len);
1010 for (
unsigned int i=0; i<imax; i++)
1012 libmesh_assert(
out.get());
1013 libmesh_assert (
out->good());
1020 libmesh_assert(
out.get());
1021 libmesh_assert (
out->good());
1027 out->flags(out_flags);
1033 libmesh_error_msg(
"Invalid mode = " <<
mode);
1046 #ifdef LIBMESH_HAVE_XDR 1048 libmesh_assert (this->
is_open());
1051 xdr_vector(
xdrs.get(),
1055 (xdrproc_t) xdr_float);
1059 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
1060 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
1061 <<
"The XDR interface is not available in this installation");
1069 libmesh_assert(
in.get());
1070 libmesh_assert (
in->good());
1072 for (
unsigned int i=0; i<len; i++)
1074 libmesh_assert(
in.get());
1075 libmesh_assert (
in->good());
1084 libmesh_assert(
out.get());
1085 libmesh_assert (
out->good());
1088 std::ios_base::fmtflags out_flags =
out->flags();
1093 *
out << std::scientific
1094 << std::setprecision(16);
1097 for (
unsigned int i=0; i<len; i++)
1099 libmesh_assert(
out.get());
1100 libmesh_assert (
out->good());
1101 *
out << val[i] <<
' ';
1105 const unsigned imax =
std::min(line_break, len);
1109 for (
unsigned int i=0; i<imax; i++)
1111 libmesh_assert(
out.get());
1112 libmesh_assert (
out->good());
1119 libmesh_assert(
out.get());
1120 libmesh_assert (
out->good());
1126 out->flags(out_flags);
1132 libmesh_error_msg(
"Invalid mode = " <<
mode);
1136 void Xdr::data_stream (
long double * val,
const unsigned int len,
const unsigned int line_break)
1143 #ifdef LIBMESH_HAVE_XDR 1145 libmesh_assert (this->
is_open());
1161 std::vector<double> io_buffer (len);
1165 for (
unsigned int i=0, cnt=0; i<len; i++)
1166 io_buffer[cnt++] =
double(val[i]);
1168 xdr_vector(
xdrs.get(),
1169 reinterpret_cast<char *
>(io_buffer.data()),
1172 (xdrproc_t) xdr_double);
1176 for (
unsigned int i=0, cnt=0; i<len; i++)
1178 val[i] = io_buffer[cnt++];
1184 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
1185 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
1186 <<
"The XDR interface is not available in this installation");
1194 libmesh_assert(
in.get());
1195 libmesh_assert (
in->good());
1197 for (
unsigned int i=0; i<len; i++)
1199 libmesh_assert(
in.get());
1200 libmesh_assert (
in->good());
1209 libmesh_assert(
out.get());
1210 libmesh_assert (
out->good());
1213 std::ios_base::fmtflags out_flags =
out->flags();
1218 *
out << std::scientific
1219 << std::setprecision(16);
1222 for (
unsigned int i=0; i<len; i++)
1224 libmesh_assert(
out.get());
1225 libmesh_assert (
out->good());
1226 *
out << val[i] <<
' ';
1230 const unsigned imax =
std::min(line_break, len);
1234 for (
unsigned int i=0; i<imax; i++)
1236 libmesh_assert(
out.get());
1237 libmesh_assert (
out->good());
1244 libmesh_assert(
out.get());
1245 libmesh_assert (
out->good());
1251 out->flags(out_flags);
1257 libmesh_error_msg(
"Invalid mode = " <<
mode);
1262 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 1264 void Xdr::data_stream (std::complex<double> * val,
const unsigned int len,
const unsigned int line_break)
1271 #ifdef LIBMESH_HAVE_XDR 1273 libmesh_assert (this->
is_open());
1278 std::vector<double> io_buffer (2*len);
1282 for (
unsigned int i=0, cnt=0; i<len; i++)
1284 io_buffer[cnt++] = val[i].real();
1285 io_buffer[cnt++] = val[i].imag();
1288 xdr_vector(
xdrs.get(),
1289 reinterpret_cast<char *
>(io_buffer.data()),
1292 (xdrproc_t) xdr_double);
1296 for (
unsigned int i=0, cnt=0; i<len; i++)
1298 double re = io_buffer[cnt++];
1299 double im = io_buffer[cnt++];
1300 val[i] = std::complex<double>(re,im);
1305 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
1306 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
1307 <<
"The XDR interface is not available in this installation");
1315 libmesh_assert(
in.get());
1316 libmesh_assert (
in->good());
1318 for (
unsigned int i=0; i<len; i++)
1320 libmesh_assert(
in.get());
1321 libmesh_assert (
in->good());
1324 val[i] = std::complex<double>(re,im);
1332 libmesh_assert(
out.get());
1333 libmesh_assert (
out->good());
1336 std::ios_base::fmtflags out_flags =
out->flags();
1341 *
out << std::scientific
1342 << std::setprecision(16);
1345 for (
unsigned int i=0; i<len; i++)
1347 libmesh_assert(
out.get());
1348 libmesh_assert (
out->good());
1349 *
out << val[i].real() <<
' ';
1350 *
out << val[i].imag() <<
' ';
1354 const unsigned imax =
std::min(line_break, len);
1358 for (
unsigned int i=0; i<imax; i++)
1360 libmesh_assert(
out.get());
1361 libmesh_assert (
out->good());
1362 *
out << val[cnt].real() <<
' ';
1363 *
out << val[cnt].imag();
1370 libmesh_assert(
out.get());
1371 libmesh_assert (
out->good());
1377 out->flags(out_flags);
1383 libmesh_error_msg(
"Invalid mode = " <<
mode);
1388 void Xdr::data_stream (std::complex<long double> * val,
const unsigned int len,
const unsigned int line_break)
1395 #ifdef LIBMESH_HAVE_XDR 1397 libmesh_assert (this->
is_open());
1407 std::vector<double> io_buffer (2*len);
1411 for (
unsigned int i=0, cnt=0; i<len; i++)
1413 io_buffer[cnt++] = val[i].real();
1414 io_buffer[cnt++] = val[i].imag();
1417 xdr_vector(
xdrs.get(),
1418 reinterpret_cast<char *
>(io_buffer.data()),
1421 (xdrproc_t) xdr_double);
1425 for (
unsigned int i=0, cnt=0; i<len; i++)
1427 double re = io_buffer[cnt++];
1428 double im = io_buffer[cnt++];
1429 val[i] = std::complex<long double>(re, im);
1434 libmesh_error_msg(
"ERROR: Functionality is not available.\n" \
1435 <<
"Make sure LIBMESH_HAVE_XDR is defined at build time\n" \
1436 <<
"The XDR interface is not available in this installation");
1444 libmesh_assert(
in.get());
1445 libmesh_assert (
in->good());
1447 for (
unsigned int i=0; i<len; i++)
1449 libmesh_assert(
in.get());
1450 libmesh_assert (
in->good());
1453 val[i] = std::complex<long double>(re,im);
1461 libmesh_assert(
out.get());
1462 libmesh_assert (
out->good());
1466 std::ios_base::fmtflags out_flags =
out->flags();
1474 *
out << std::scientific
1475 << std::setprecision(std::numeric_limits<long double>::digits10);
1478 for (
unsigned int i=0; i<len; i++)
1480 libmesh_assert(
out.get());
1481 libmesh_assert (
out->good());
1482 *
out << val[i].real() <<
' ' << val[i].imag() <<
' ';
1486 const unsigned imax =
std::min(line_break, len);
1490 for (
unsigned int i=0; i<imax; i++)
1492 libmesh_assert(
out.get());
1493 libmesh_assert (
out->good());
1494 *
out << val[cnt].real() <<
' ' << val[cnt].imag();
1501 libmesh_assert(
out.get());
1502 libmesh_assert (
out->good());
1508 out->flags(out_flags);
1514 libmesh_error_msg(
"Invalid mode = " <<
mode);
1517 #endif // # LIBMESH_USE_COMPLEX_NUMBERS 1531 libmesh_assert(
in.get());
1532 libmesh_assert (
in->good());
1539 libmesh_assert(
out.get());
1540 libmesh_assert (
out->good());
1541 *
out <<
"\t " << comment_in <<
'\n';
1546 libmesh_error_msg(
"Invalid mode = " <<
mode);
1555 template void Xdr::data<int> (
int &,
const char *);
1556 template void Xdr::data<unsigned int> (
unsigned int &,
const char *);
1557 template void Xdr::data<unsigned short int> (
unsigned short int &,
const char *);
1558 template void Xdr::data<short int> (
short int &,
const char *);
1559 template void Xdr::data<unsigned long int> (
unsigned long int &,
const char *);
1560 template void Xdr::data<unsigned long long> (
unsigned long long &,
const char *);
1561 template void Xdr::data<long int> (
long int &,
const char *);
1562 template void Xdr::data<long long> (
long long &,
const char *);
1563 template void Xdr::data<char> (
char &,
const char *);
1564 template void Xdr::data<signed char> (
signed char &,
const char *);
1565 template void Xdr::data<unsigned char> (
unsigned char &,
const char *);
1566 template void Xdr::data<float> (
float &,
const char *);
1567 template void Xdr::data<double> (
double &,
const char *);
1568 template void Xdr::data<long double> (
long double &,
const char *);
1569 template void Xdr::data<std::complex<float>> (std::complex<float> &,
const char *);
1570 template void Xdr::data<std::complex<double>> (std::complex<double> &,
const char *);
1571 template void Xdr::data<std::complex<long double>> (std::complex<long double> &,
const char *);
1572 template void Xdr::data<std::string> (std::string &,
const char *);
1573 template void Xdr::data<std::vector<int>> (std::vector<int> &,
const char *);
1574 template void Xdr::data<std::vector<unsigned int>> (std::vector<unsigned int> &,
const char *);
1575 template void Xdr::data<std::vector<short int>> (std::vector<short int> &,
const char *);
1576 template void Xdr::data<std::vector<unsigned short int>> (std::vector<unsigned short int> &,
const char *);
1577 template void Xdr::data<std::vector<long int>> (std::vector<long int> &,
const char *);
1578 template void Xdr::data<std::vector<long long>> (std::vector<long long> &,
const char *);
1579 template void Xdr::data<std::vector<unsigned long int>> (std::vector<unsigned long int> &,
const char *);
1580 template void Xdr::data<std::vector<unsigned long long>> (std::vector<unsigned long long> &,
const char *);
1581 template void Xdr::data<std::vector<char>> (std::vector<char> &,
const char *);
1582 template void Xdr::data<std::vector<signed char>> (std::vector<signed char> &,
const char *);
1583 template void Xdr::data<std::vector<unsigned char>> (std::vector<unsigned char> &,
const char *);
1584 template void Xdr::data<std::vector<float>> (std::vector<float> &,
const char *);
1585 template void Xdr::data<std::vector<double>> (std::vector<double> &,
const char *);
1586 template void Xdr::data<std::vector<long double>> (std::vector<long double> &,
const char *);
1587 template void Xdr::data<std::vector<std::complex<float>>> (std::vector<std::complex<float>> &,
const char *);
1588 template void Xdr::data<std::vector<std::complex<double>>> (std::vector<std::complex<double>> &,
const char *);
1589 template void Xdr::data<std::vector<std::complex<long double>>> (std::vector<std::complex<long double>> &,
const char *);
1590 template void Xdr::data<std::vector<std::string>> (std::vector<std::string> &,
const char *);
1591 template void Xdr::data_stream<unsigned char> (
unsigned char * val,
const unsigned int len,
const unsigned int line_break);
1592 template void Xdr::data_stream<short int> (
short int * val,
const unsigned int len,
const unsigned int line_break);
1593 template void Xdr::data_stream<int> (
int * val,
const unsigned int len,
const unsigned int line_break);
1594 template void Xdr::data_stream<long long> (
long long * val,
const unsigned int len,
const unsigned int line_break);
1595 template void Xdr::data_stream<unsigned short int> (
unsigned short int * val,
const unsigned int len,
const unsigned int line_break);
1596 template void Xdr::data_stream<unsigned int> (
unsigned int * val,
const unsigned int len,
const unsigned int line_break);
1597 template void Xdr::data_stream<unsigned long int> (
unsigned long int * val,
const unsigned int len,
const unsigned int line_break);
1598 template void Xdr::data_stream<unsigned long long> (
unsigned long long * val,
const unsigned int len,
const unsigned int line_break);
std::string name(const ElemQuality q)
void data(T &a, const char *comment="")
const unsigned int xdr_MAX_STRING_LENGTH
const unsigned int invalid_uint
char comm[xdr_MAX_STRING_LENGTH]
void comment(std::string &)
std::unique_ptr< std::istream > in
std::unique_ptr< std::ostream > out
std::unique_ptr< XDR > xdrs
void open(const std::string &name)
Xdr(const std::string &name="", const XdrMODE m=UNKNOWN)
void data_stream(T *val, const unsigned int len, const unsigned int line_break=libMesh::invalid_uint)
OStreamProxy out(std::cout)
long double min(long double a, double b)