31 #include <dolfin/common/types.h> 32 #include <dolfin/common/MPI.h> 33 #include "GenericFile.h" 49 template<
typename T>
class Array;
50 template<
typename T>
class MeshFunction;
51 template<
typename T>
class MeshValueCollection;
60 XMLFile(MPI_Comm mpi_comm,
const std::string filename);
68 void read(
Mesh& input);
70 void write(
const Mesh& output);
75 void read_vector(std::vector<double>& input,
76 std::vector<dolfin::la_index>& indices);
86 void read(
Table& input);
88 void write(
const Table& output);
97 { read_mesh_function(input,
"uint"); }
100 { write_mesh_function(output,
"uint"); }
104 { read_mesh_function(input,
"int"); }
107 { write_mesh_function(output,
"int"); }
111 { read_mesh_function(input,
"double"); }
114 { write_mesh_function(output,
"double"); }
118 { read_mesh_function(input,
"bool"); }
121 { write_mesh_function(input,
"bool"); }
125 { read_mesh_value_collection(input,
"uint"); }
128 { write_mesh_value_collection(output,
"uint"); }
132 { read_mesh_value_collection(input,
"int"); }
135 { write_mesh_value_collection(output,
"int"); }
139 { read_mesh_value_collection(input,
"double"); }
142 { write_mesh_value_collection(output,
"double"); }
146 { read_mesh_value_collection(input,
"bool"); }
149 { write_mesh_value_collection(input,
"bool"); }
155 const std::string type)
const;
158 template<
typename T>
void write_mesh_function(
const MeshFunction<T>& t,
159 const std::string type);
164 const std::string type)
const;
169 const std::string type);
172 void load_xml_doc(pugi::xml_document& xml_doc)
const;
175 void save_xml_doc(
const pugi::xml_document& xml_doc)
const;
178 const pugi::xml_node get_dolfin_xml_node(pugi::xml_document& xml_doc)
const;
180 static pugi::xml_node write_dolfin(pugi::xml_document& doc);
182 std::shared_ptr<std::ostream> outstream;
void read(MeshValueCollection< bool > &input)
MeshValueCollection (bool) input.
Definition: XMLFile.h:145
void write(const MeshValueCollection< std::size_t > &output)
MeshValueCollection (std::size_t) output.
Definition: XMLFile.h:127
void write(const MeshValueCollection< bool > &input)
MeshValueCollection (bool) output.
Definition: XMLFile.h:148
void read(MeshFunction< bool > &input)
MeshFunction (bool) input.
Definition: XMLFile.h:117
Base class for file I/O objects.
Definition: GenericFile.h:44
void write(const MeshFunction< std::size_t > &output)
MeshFunction (uint) output.
Definition: XMLFile.h:99
void read(MeshFunction< int > &input)
MeshFunction (int) input.
Definition: XMLFile.h:103
void read(MeshFunction< double > &input)
MeshFunction (double) input.
Definition: XMLFile.h:110
void read(MeshFunction< std::size_t > &input)
MeshFunction (uint) input.
Definition: XMLFile.h:96
void read(MeshValueCollection< double > &input)
MeshValueCollection (double) input.
Definition: XMLFile.h:138
I/O of DOLFIN objects in XML format.
Definition: XMLFile.h:55
Definition: Parameters.h:94
Definition: Function.h:65
Definition: GenericFile.h:38
void write(const MeshFunction< double > &output)
MeshFunction (double) output.
Definition: XMLFile.h:113
void read(MeshValueCollection< int > &input)
MeshValueCollection (int) input.
Definition: XMLFile.h:131
void read(MeshValueCollection< std::size_t > &input)
MeshValueCollection (std::size_t) input.
Definition: XMLFile.h:124
void write(const MeshFunction< bool > &input)
MeshFunction (bool) output.
Definition: XMLFile.h:120
void write(const MeshFunction< int > &output)
MeshFunction (int) output.
Definition: XMLFile.h:106
void write(const MeshValueCollection< double > &output)
MeshValueCollection (double) output.
Definition: XMLFile.h:141
This class defines a common interface for vectors.
Definition: GenericVector.h:47
void write(const MeshValueCollection< int > &output)
MeshValueCollection (int) output.
Definition: XMLFile.h:134