mesh_data_unv_support.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2016 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 // C++ includes
21 #include <cstdio> // for std::sprintf
22 #include <fstream>
23 
24 // Local includes
25 #include "libmesh/libmesh_config.h"
26 #include "libmesh/mesh_data.h"
27 #include "libmesh/auto_ptr.h"
28 
29 #ifdef LIBMESH_HAVE_GZSTREAM
30 # include "gzstream.h" // For reading/writing compressed streams
31 #endif
32 
33 
34 namespace libMesh
35 {
36 
37 //------------------------------------------------------
38 // MeshData UNV support functions
39 void MeshData::read_unv (const std::string & file_name)
40 {
41  /*
42  * We better be active or in compatibility mode
43  */
45 
46  /*
47  * When reading data, make sure the id maps are ok
48  */
51 
52  /*
53  * clear the data, but keep the id maps
54  */
55  this->clear();
56 
57  /*
58  * We can read either ".unv", or ".unv.gz"
59  * files, provided zlib.h is there
60  */
61  if (file_name.rfind(".gz") < file_name.size())
62  {
63 #ifdef LIBMESH_HAVE_GZSTREAM
64  igzstream in_stream(file_name.c_str());
65  this->read_unv_implementation (in_stream);
66 #else
67  libmesh_error_msg("ERROR: You must have the zlib.h header files and libraries to read and write compressed streams.");
68 #endif
69  return;
70  }
71 
72  else
73  {
74  std::ifstream in_stream(file_name.c_str());
75  this->read_unv_implementation (in_stream);
76  return;
77  }
78 }
79 
80 
81 
82 
83 
84 
85 void MeshData::read_unv_implementation (std::istream & in_file)
86 {
87  /*
88  * This is the actual implementation of
89  * reading in UNV format. This enables
90  * to read either through the conventional
91  * C++ stream, or through a stream that
92  * allows to read .gz'ed files.
93  */
94  if ( !in_file.good() )
95  libmesh_error_msg("ERROR: Input file not good.");
96 
97  const std::string _label_dataset_mesh_data = "2414";
98 
99  /*
100  * locate the beginning of data set
101  * and read it.
102  */
103  {
104  std::string olds, news;
105 
106  while (true)
107  {
108  in_file >> olds >> news;
109 
110  /*
111  * Yes, really dirty:
112  *
113  * When we found a dataset, and the user does
114  * not want this dataset, we jump back here
115  */
116  go_and_find_the_next_dataset:
117 
118  /*
119  * a "-1" followed by a number means the beginning of a dataset
120  * stop combing at the end of the file
121  */
122  while( ((olds != "-1") || (news == "-1") ) && !in_file.eof() )
123  {
124  olds = news;
125  in_file >> news;
126  }
127 
128  if(in_file.eof())
129  break;
130 
131  /*
132  * if beginning of dataset
133  */
134  if (news == _label_dataset_mesh_data)
135  {
136 
137  /*
138  * Now read the data of interest.
139  * Start with the header. For
140  * explanation of the variable
141  * dataset_location, see below.
142  */
143  unsigned int dataset_location;
144 
145  /*
146  * the type of data (complex, real,
147  * float, double etc, see below)
148  */
149  unsigned int data_type;
150 
151  /*
152  * the number of floating-point values per entity
153  */
154  unsigned int NVALDC;
155 
156 
157  /*
158  * If there is no MeshDataUnvHeader object
159  * attached
160  */
162  {
163  /*
164  * Ignore the first lines that stand for
165  * analysis dataset label and name.
166  */
167  for(unsigned int i=0; i<3; i++)
168  in_file.ignore(256,'\n');
169 
170  /*
171  * Read the dataset location, where
172  * 1: Data at nodes
173  * 2: Data on elements
174  * other sets are currently not supported.
175  */
176  in_file >> dataset_location;
177 
178  /*
179  * Ignore five ID lines.
180  */
181  for(unsigned int i=0; i<6; i++)
182  in_file.ignore(256,'\n');
183 
184  /*
185  * These data are all of no interest to us...
186  */
187  unsigned int model_type,
188  analysis_type,
189  data_characteristic,
190  result_type;
191 
192  /*
193  * Read record 9.
194  */
195  in_file >> model_type // not used here
196  >> analysis_type // not used here
197  >> data_characteristic // not used here
198  >> result_type // not used here
199  >> data_type
200  >> NVALDC;
201 
202 
203  /*
204  * Ignore record 10 and 11
205  * (Integer analysis type specific data).
206  */
207  for (unsigned int i=0; i<3; i++)
208  in_file.ignore(256,'\n');
209 
210  /*
211  * Ignore record 12 and record 13. Since there
212  * exist UNV files with 'D' instead of 'e' as
213  * 10th-power char, it is safer to use a string
214  * to read the dummy reals.
215  */
216  {
217  std::string dummy_Real;
218  for (unsigned int i=0; i<12; i++)
219  in_file >> dummy_Real;
220  }
221 
222  }
223  else
224  {
225 
226  /*
227  * the read() method returns false when
228  * the user wanted a special header, and
229  * when the current header is _not_ the correct
230  * header
231  */
232  if (_unv_header->read(in_file))
233  {
234  dataset_location = _unv_header->dataset_location;
235  NVALDC = _unv_header->nvaldc;
236  data_type = _unv_header->data_type;
237  }
238  else
239  {
240  /*
241  * This is not the correct header. Go
242  * and find the next. For this to
243  * work correctly, shift to the
244  * next line, so that the "-1"
245  * disappears from olds
246  */
247  olds = news;
248  in_file >> news;
249 
250  /*
251  * No good style, i know...
252  */
253  goto go_and_find_the_next_dataset;
254  }
255 
256  }
257 
258  /*
259  * Check the location of the dataset.
260  */
261  if (dataset_location != 1)
262  libmesh_error_msg("ERROR: Currently only Data at nodes is supported.");
263 
264 
265  /*
266  * Now get the foreign node id number and the respective nodal data.
267  */
268  int f_n_id;
269  std::vector<Number> values;
270 
271  while(true)
272  {
273  in_file >> f_n_id;
274 
275  /*
276  * if node_nr = -1 then we have reached the end of the dataset.
277  */
278  if (f_n_id==-1)
279  break;
280 
281  /*
282  * Resize the values vector (usually data in three
283  * principle directions, i.e. NVALDC = 3).
284  */
285  values.resize(NVALDC);
286 
287  /*
288  * Read the meshdata for the respective node.
289  */
290  for (unsigned int data_cnt=0; data_cnt<NVALDC; data_cnt++)
291  {
292  /*
293  * Check what data type we are reading.
294  * 2,4: Real
295  * 5,6: Complex
296  * other data types are not supported yet.
297  * As again, these floats may also be written
298  * using a 'D' instead of an 'e'.
299  */
300  if (data_type == 2 || data_type == 4)
301  {
302  std::string buf;
303  in_file >> buf;
305 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
306  values[data_cnt] = Complex(std::atof(buf.c_str()), 0.);
307 #else
308  values[data_cnt] = std::atof(buf.c_str());
309 #endif
310  }
311 
312  else if(data_type == 5 || data_type == 6)
313 
314  {
315 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
316  Real re_val, im_val;
317 
318  std::string buf;
319  in_file >> buf;
320 
322  {
323  re_val = std::atof(buf.c_str());
324  in_file >> buf;
326  im_val = std::atof(buf.c_str());
327  }
328  else
329  {
330  re_val = std::atof(buf.c_str());
331  in_file >> im_val;
332  }
333 
334  values[data_cnt] = Complex(re_val,im_val);
335 #else
336 
337  libmesh_error_msg("ERROR: Complex data only supported when libMesh is configured with --enable-complex!");
338 #endif
339  }
340 
341  else
342  libmesh_error_msg("ERROR: Data type not supported.");
343 
344  } // end loop data_cnt
345 
346  /*
347  * Add the values vector to the MeshData data structure.
348  */
349  const Node * node = foreign_id_to_node(f_n_id);
350  _node_data.insert (std::make_pair(node, values));
351 
352  } // while(true)
353  }
354 
355 
356  else
357  {
358  /*
359  * all other datasets are ignored
360  */
361  }
362 
363  }
364  }
365 
366 
367  /*
368  * finished reading. Ready for use, provided
369  * there was any data contained in the file.
370  */
371  libmesh_assert ((this->_node_data.size() != 0) || (this->_elem_data.size() != 0));
372 
373  this->_node_data_closed = true;
374  this->_elem_data_closed = true;
375 }
376 
377 
378 
379 
380 
381 
382 void MeshData::write_unv (const std::string & file_name)
383 {
384  /*
385  * We better be active or in compatibility mode
386  */
387  libmesh_assert (this->_active || this->_compatibility_mode);
388 
389  /*
390  * make sure the id maps are ready
391  * and that we have data to write
392  */
395 
398 
399  if (file_name.rfind(".gz") < file_name.size())
400  {
401 #ifdef LIBMESH_HAVE_GZSTREAM
402  ogzstream out_stream(file_name.c_str());
403  this->write_unv_implementation (out_stream);
404 #else
405  libmesh_error_msg("ERROR: You must have the zlib.h header files and libraries to read and write compressed streams.");
406 #endif
407  return;
408 
409  }
410 
411  else
412  {
413  std::ofstream out_stream(file_name.c_str());
414  this->write_unv_implementation (out_stream);
415  return;
416  }
417 }
418 
419 
420 
421 
422 
423 
424 void MeshData::write_unv_implementation (std::ostream & out_file)
425 {
426  /*
427  * This is the actual implementation of writing
428  * unv files, either as .unv or as .unv.gz file
429  */
430  if ( !out_file.good() )
431  libmesh_error_msg("ERROR: Output file not good.");
432 
433 
434  /*
435  * the beginning marker of the dataset block for
436  * nodal/element-associated data (not to be confused
437  * with _desired_dataset_label!)
438  */
439  const std::string _label_dataset_mesh_data = "2414";
440 
441  /*
442  * Currently this function handles only nodal data.
443  */
444  libmesh_assert (!_node_data.empty());
445 
446  if (!_elem_data.empty())
447  libMesh::err << "WARNING: MeshData currently only supports nodal data for Universal files."
448  << std::endl
449  << " Will proceed writing only nodal data, ignoring element data."
450  << std::endl;
451 
452 
453  /*
454  * Write the beginning of the dataset.
455  */
456  out_file << " -1\n"
457  << " "
458  << _label_dataset_mesh_data
459  << "\n";
460 
461  /*
462  * Write the header
463  */
465  {
466  /*
467  * create a header that holds at
468  * least sufficient data to specify
469  * what this data set currently holds.
470  *
471  * The empty constructor automatically
472  * takes care of \p dataset_location
473  * and \p data_type.
474  */
475  MeshDataUnvHeader my_header;
476 
477  /*
478  * It remains to set the correct nvaldc...
479  */
480  my_header.nvaldc = this->n_val_per_node();
481 
482  /*
483  * and the correct data type. By default
484  * only distinguish complex or real data.
485  */
486 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
487  my_header.data_type = 5;
488 #else
489  my_header.data_type = 2;
490 #endif
491 
492  /*
493  * write this default header, then let
494  * the UniquePtr go out of scope. This
495  * will take care of memory management.
496  */
497  my_header.write (out_file);
498  }
499 
500  else
501  {
502  /*
503  * make sure our nvaldc coincide.
504  */
505  if (this->n_val_per_node() != _unv_header->nvaldc)
506  {
507  libMesh::err << "WARNING: nvaldc=" << _unv_header->nvaldc
508  << " of attached MeshDataUnvHeader object not valid!" << std::endl
509  << " re-set nvaldc to " << this->n_val_per_node() << std::endl;
510  _unv_header->nvaldc = this->n_val_per_node();
511  }
512 
513 
514  /*
515  * only issue a warning when data_type does
516  * not coincide. Perhaps user provided some
517  * other header in order to convert complex
518  * to real...
519  */
520 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
521  const unsigned int my_data_type = 5;
522 #else
523  const unsigned int my_data_type = 2;
524 #endif
525  if (my_data_type != _unv_header->data_type)
526  {
527  libMesh::err << "WARNING: data_type=" << _unv_header->data_type
528  << " of attached MeshDataUnvHeader differs from" << std::endl
529  << " default value=" << my_data_type
530  << " Perhaps the user wanted this," << std::endl
531  << " so I use the value from the MeshDataUnvHeader."
532  << std::endl;
533  }
534  _unv_header->write (out_file);
535  }
536 
537 
538  /*
539  * Write the foreign node number and the respective data.
540  */
541  std::map<const Node *,
542  std::vector<Number> >::const_iterator nit = _node_data.begin();
543 
544  char buf[27];
545  for (; nit != _node_data.end(); ++nit)
546  {
547  const Node * node = (*nit).first;
548 
549  unsigned int f_n_id = node_to_foreign_id (node);
550  std::sprintf(buf, "%10u\n", f_n_id);
551  out_file << buf;
552 
553  /* since we are iterating over our own map, this libmesh_assert
554  * should never break...
555  */
556  libmesh_assert (this->has_data(node));
557 
558  // const reference to the nodal values
559  const std::vector<Number> & values = this->get_data(node);
560 
561  for (unsigned int v_cnt=0; v_cnt<values.size(); v_cnt++)
562  {
563 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
564  std::sprintf(buf, "%13.5E%13.5E", values[v_cnt].real(),
565  values[v_cnt].imag());
566  out_file << buf;
567 #else
568  std::sprintf(buf, "%13.5E",
569  static_cast<double>(values[v_cnt]));
570  out_file << buf;
571 #endif
572  }
573 
574  out_file << "\n";
575 
576 
577  }
578 
579  /*
580  * Write end of the dataset.
581  */
582  out_file << " -1\n";
583 }
584 
585 
586 
587 
588 
589 //------------------------------------------------------
590 // MeshDataUnvHeader functions
592  dataset_label (0),
593  dataset_name ("libMesh mesh data"),
594  dataset_location (1), // default to nodal data
595  model_type (0),
596  analysis_type (0),
597  data_characteristic (0),
598  result_type (0),
599 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
600  data_type (5), // default to single precision complex
601 #else
602  data_type (2), // default to single precision real
603 #endif
604  nvaldc (3), // default to 3 (principle directions)
605  _desired_dataset_label (libMesh::invalid_uint)
606 {
607  id_lines_1_to_5.resize(5);
608  std::fill (id_lines_1_to_5.begin(), id_lines_1_to_5.end(), std::string("libMesh default"));
609  /*
610  * resize analysis specific data.
611  */
612  record_10.resize(8);
613  record_11.resize(2);
614  record_12.resize(6);
615  record_13.resize(6);
616 }
617 
618 
619 
620 
621 
623 {
624  // empty
625 }
626 
627 
628 
629 
630 bool MeshDataUnvHeader::read (std::istream & in_file)
631 {
632  in_file >> this->dataset_label;
633 
634  /*
635  * currently, we compare only the
636  * dataset_label with the _desired_dataset_label,
637  * but it may be easy to also compare the
638  * dataset_name.
639  *
640  * When the user provided a dataset label, and
641  * the current label does _not_ match, then just
642  * return false.
643  *
644  * Otherwise: when the current label matches,
645  * or when there is no desired dataset label,
646  * simply proceed.
647  */
649  (this->dataset_label != this->_desired_dataset_label))
650  return false;
651 
652 
653  in_file.ignore(256,'\n');
654  std::getline(in_file, dataset_name, '\n');
655 
656  in_file >> this->dataset_location;
657  in_file.ignore(256,'\n');
658 
659 
660  for (unsigned int n=0; n<5; n++)
661  std::getline(in_file, this->id_lines_1_to_5[n], '\n');
662 
663 
664  in_file >> this->model_type
665  >> this->analysis_type
666  >> this->data_characteristic
667  >> this->result_type
668  >> this->data_type
669  >> this->nvaldc;
670 
671  for (unsigned int i=0; i<8; i++)
672  in_file >> this->record_10[i];
673 
674  for (unsigned int i=0; i<2; i++)
675  in_file >> this->record_11[i];
676 
677 
678  /*
679  * There are UNV-files where floats are
680  * written with 'D' as the 10th-power
681  * character. Replace this 'D' by 'e',
682  * so that std::atof() can work fine.
683  */
684  std::string buf;
685  in_file >> buf;
686 
687  if (need_D_to_e(buf))
688  {
689  // have to convert _all_ 'D' to 'e'
690  this->record_12[0] = std::atof(buf.c_str());
691 
692  for (unsigned int i=1; i<6; i++)
693  {
694  in_file >> buf;
695  need_D_to_e(buf);
696  this->record_12[i] = std::atof(buf.c_str());
697  }
698 
699  for (unsigned int i=0; i<6; i++)
700  {
701  in_file >> buf;
702  need_D_to_e(buf);
703  this->record_13[i] = std::atof(buf.c_str());
704  }
705  }
706  else
707  {
708  // no 'D', the stream will recognize the floats
709  this->record_12[0] = std::atof(buf.c_str());
710 
711  for (unsigned int i=1; i<6; i++)
712  in_file >> this->record_12[i];
713 
714  for (unsigned int i=0; i<6; i++)
715  in_file >> this->record_13[i];
716  }
717 
718  /*
719  * no matter whether the user provided a desired
720  * dataset label or not: return true, b/c the
721  * non-match was already caught before.
722  */
723  return true;
724 }
725 
726 
727 
728 
729 void MeshDataUnvHeader::write (std::ostream & out_file)
730 {
731 
732 
733  char buf[82];
734 
735  std::sprintf(buf, "%6i\n",this->dataset_label);
736 
737  out_file << buf;
738 
739  out_file << this->dataset_name << "\n";
740 
741  std::sprintf(buf, "%6i\n",this->dataset_location);
742 
743  out_file << buf;
744 
745  for (unsigned int n=0; n<5; n++)
746  out_file << this->id_lines_1_to_5[n] << "\n";
747 
748  std::sprintf(buf, "%10i%10i%10i%10i%10i%10i\n",
751 
752  out_file << buf;
753 
754  std::sprintf(buf, "%10i%10i%10i%10i%10i%10i%10i%10i\n",
755  record_10[0], record_10[1], record_10[2], record_10[3],
756  record_10[4], record_10[5], record_10[6], record_10[7]);
757 
758  out_file << buf;
759 
760  std::sprintf(buf, "%10i%10i\n", record_11[0], record_11[1]);
761  out_file << buf;
762 
763  std::sprintf(buf, "%13.5E%13.5E%13.5E%13.5E%13.5E%13.5E\n",
764  static_cast<double>(record_12[0]),
765  static_cast<double>(record_12[1]),
766  static_cast<double>(record_12[2]),
767  static_cast<double>(record_12[3]),
768  static_cast<double>(record_12[4]),
769  static_cast<double>(record_12[5]));
770 
771  out_file << buf;
772 
773  std::sprintf(buf, "%13.5E%13.5E%13.5E%13.5E%13.5E%13.5E\n",
774  static_cast<double>(record_13[0]),
775  static_cast<double>(record_13[1]),
776  static_cast<double>(record_13[2]),
777  static_cast<double>(record_13[3]),
778  static_cast<double>(record_13[4]),
779  static_cast<double>(record_13[5]));
780 
781  out_file << buf;
782 }
783 
784 
785 
786 
787 
788 bool MeshDataUnvHeader::need_D_to_e (std::string & number)
789 {
790  // find "D" in string, start looking at 6th element, to improve speed.
791  // We dont expect a "D" earlier
792  std::string::size_type position = number.find("D",6);
793 
794  if(position!=std::string::npos) // npos means no position
795  {
796  // replace "D" in string
797  number.replace(position,1,"e");
798  return true;
799  }
800  else
801  // we assume that if this one number is written correctly, all numbers are
802  return false;
803 }
804 
805 
806 
807 void MeshDataUnvHeader::which_dataset (const unsigned int ds_label)
808 {
809  this->_desired_dataset_label = ds_label;
810 }
811 
812 
813 
815 {
816  this->dataset_label = omduh.dataset_label;
817  this->dataset_name = omduh.dataset_name;
818  this->dataset_location = omduh.dataset_location;
819  this->id_lines_1_to_5 = omduh.id_lines_1_to_5;
820 
821  this->model_type = omduh.model_type;
822  this->analysis_type = omduh.analysis_type;
824  this->result_type = omduh.result_type;
825 
826 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
827  /*
828  * in complex mode allow only
829  * values 5 or 6 (complex) for data_type
830  */
831  if ((omduh.data_type == 5) ||
832  (omduh.data_type == 6))
833  this->data_type = omduh.data_type;
834  else
835  {
836 # ifdef DEBUG
837  libMesh::err << "WARNING: MeshDataUnvHeader::operator=(): Other object has data_type for" << std::endl
838  << " real values. Will use default data_type=5 during assignment." << std::endl
839  << std::endl;
840 # endif
841  this->data_type = 5;
842  }
843 
844 #else
845 
846  /*
847  * in real mode allow only
848  * values 2 or 4 (real) for data_type
849  */
850  if ((omduh.data_type == 2) ||
851  (omduh.data_type == 4))
852  this->data_type = omduh.data_type;
853  else
854  {
855 # ifdef DEBUG
856  libMesh::err << "WARNING: Other MeshDataUnvHeader has data_type for complex values." << std::endl
857  << " Data import will likely _not_ work and result in infinite loop," << std::endl
858  << " provided the user forgot to re-size nvaldc to 2*nvaldc_old!" << std::endl
859  << std::endl;
860 # endif
861  this->data_type = 2;
862  }
863 
864 #endif
865 
866  this->nvaldc = omduh.nvaldc;
867 
868  this->record_10 = omduh.record_10;
869  this->record_11 = omduh.record_11;
870  this->record_12 = omduh.record_12;
871  this->record_13 = omduh.record_13;
872 
874 }
875 
876 
877 
878 
880 {
881  return (this->dataset_label == omduh.dataset_label &&
882  this->dataset_name == omduh.dataset_name &&
883  this->dataset_location == omduh.dataset_location &&
884  this->id_lines_1_to_5 == omduh.id_lines_1_to_5 &&
885 
886  this->model_type == omduh.model_type &&
887  this->analysis_type == omduh.analysis_type &&
888  this->data_characteristic == omduh.data_characteristic &&
889  this->result_type == omduh.result_type &&
890 
891  this->data_type == omduh.data_type &&
892  this->nvaldc == omduh.nvaldc &&
893 
894  this->record_10 == omduh.record_10 &&
895  this->record_11 == omduh.record_11 &&
896  this->record_12 == omduh.record_12 &&
897  this->record_13 == omduh.record_13 &&
898 
899  this->_desired_dataset_label == omduh._desired_dataset_label);
900 }
901 
902 } // namespace libMesh
bool _node_id_map_closed
Definition: mesh_data.h:575
unsigned int _desired_dataset_label
Definition: mesh_data.h:803
const std::vector< Number > & get_data(const Node *node) const
Definition: mesh_data.h:862
void read_unv_implementation(std::istream &in_file)
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:54
unsigned int data_characteristic
Definition: mesh_data.h:746
const unsigned int invalid_uint
Definition: libmesh.h:185
bool has_data(const Node *node) const
Definition: mesh_data.h:848
libmesh_assert(remote_elem)
std::vector< Real > record_13
Definition: mesh_data.h:775
void operator=(const MeshDataUnvHeader &omduh)
std::vector< int > record_10
Definition: mesh_data.h:768
void which_dataset(const unsigned int ds_label)
const class libmesh_nullptr_t libmesh_nullptr
unsigned int result_type
Definition: mesh_data.h:746
MPI_Datatype data_type
Definition: parallel.h:162
std::vector< Real > record_12
Definition: mesh_data.h:775
static bool need_D_to_e(std::string &number)
bool _elem_id_map_closed
Definition: mesh_data.h:593
std::vector< std::string > id_lines_1_to_5
Definition: mesh_data.h:735
unsigned int analysis_type
Definition: mesh_data.h:746
unsigned int dataset_label
Definition: mesh_data.h:719
unsigned int node_to_foreign_id(const Node *n) const
Definition: mesh_data.C:399
bool _compatibility_mode
Definition: mesh_data.h:614
bool _elem_data_closed
Definition: mesh_data.h:599
void read_unv(const std::string &file_name)
OStreamProxy err(std::cerr)
bool operator==(const MeshDataUnvHeader &omduh) const
std::vector< int > record_11
Definition: mesh_data.h:768
std::complex< Real > Complex
bool read(std::istream &in_file)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void write_unv(const std::string &file_name)
MeshDataUnvHeader * _unv_header
Definition: mesh_data.h:619
unsigned int n_val_per_node() const
Definition: mesh_data.C:603
const Node * foreign_id_to_node(const unsigned int fid) const
Definition: mesh_data.C:369
void write(std::ostream &out_file)
std::map< const Node *, std::vector< Number > > _node_data
Definition: mesh_data.h:525
unsigned int dataset_location
Definition: mesh_data.h:730
std::map< const Elem *, std::vector< Number > > _elem_data
Definition: mesh_data.h:549
void write_unv_implementation(std::ostream &out_file)
bool _node_data_closed
Definition: mesh_data.h:581