|
dune-vtk 2.12
|
Loading...
Searching...
No Matches
vtkreader.impl.hh
Go to the documentation of this file.
36 DUNE_THROW(Dune::Vtk::VtkError, "File has unknown file-extension '" << ext << "'. Allowed are only '.vtu' and '.pvtu'.");
43void VtkReader<Grid,Creator,Field>::readSerialFileFromStream (std::ifstream& input, bool fillCreator)
137 format_ = compressor_ != Vtk::CompressorTypes::NONE ? Vtk::FormatTypes::COMPRESSED : Vtk::FormatTypes::BINARY;
146 VTK_ASSERT_MSG(data_format == "appended", "Attribute 'offset' only supported by appended mode");
194 Vtk::mapDataTypes<std::is_floating_point, std::is_integral>(dataArray_["Points"].type, header_type,
203 Vtk::mapDataTypes<std::is_floating_point, std::is_integral>(d.second.type, header_type,
249void VtkReader<Grid,Creator,Field>::readParallelFileFromStream (std::ifstream& input, int /* commRank */, int /* commSize */, bool fillCreator)
265 VTK_ASSERT_MSG(attr["type"] == "PUnstructuredGrid", "VtkReader supports PUnstructuredGrid types");
320 using S = std::conditional_t<(sizeof(T) <= 1), std::uint16_t, T>; // problem when reading chars as ints
577 if (uncompress(uncompressed_buffer, &uncompressed_space, compressed_buffer, compressed_space) != Z_OK) {
620void VtkReader<Grid,Creator,Field>::readAppended (std::ifstream& input, std::vector<FloatType>& values, HeaderType offset)
733std::uint64_t VtkReader<Grid,Creator,Field>::findAppendedDataPosition (std::ifstream& input) const
747std::map<std::string, std::string> VtkReader<Grid,Creator,Field>::parseXml (std::string const& line, bool& closed)
#define VTK_ASSERT_MSG(cond, text)
check if condition cond holds; otherwise, throw a VtkError with a message.
Definition errors.hh:19
#define VTK_ASSERT(cond)
check if condition cond holds; otherwise, throw a VtkError.
Definition errors.hh:29
Definition writer.hh:16
std::string & ltrim(std::string &str)
trim a string from the left
Definition string.hh:28
std::string & trim(std::string &str)
trim a string from both sides
Definition string.hh:50
@ COMPRESSED
@ BINARY
Sections skipRestOfDataArray(IStream &input, Sections section, Sections parent_section)
Definition vtkreader.impl.hh:342
std::string to_lower(std::string input)
convert all characters in a string to upper case
Definition string.hh:20
Sections readDataArray(IStream &input, std::vector< T > &values, std::size_t max_size, Sections section, Sections parent_section)
Definition vtkreader.impl.hh:316
@ UINT32
@ INT64
@ INT32
@ UNKNOWN
@ UINT64
@ UINT8
bool exists(Path const &p)
Test whether the path is a valid (existing and accessible) file / directory.
Definition filesystem.cc:133
const char * name()
int id()
int size() const
void clear()
bool empty() const
#define DUNE_THROW(E,...)
line
Definition errors.hh:12
Definition filesystem.hh:13
Path extension() const
Returns the file extension path component.
Definition filesystem.cc:76
std::string string() const
Return the path as string.
Definition filesystem.cc:26
typename GridCreator::GlobalCoordinate GlobalCoordinate
Type of global world coordinates.
Definition vtkreader.hh:66
void readParallelFileFromStream(std::ifstream &input, int rank, int size, bool create=true)
Read the grid from and input stream, referring to a .pvtu file, into the GridFactory factory_.
Definition vtkreader.impl.hh:249
void readSerialFileFromStream(std::ifstream &input, bool create=true)
Read the grid from an input stream, referring to a .vtu file, into the GridFactory factory_.
Definition vtkreader.impl.hh:43
void read(std::string const &filename, bool fillCreator=true)
Read the grid from file with filename into the GridCreator.
Definition vtkreader.impl.hh:20
void fillGridCreator(bool insertPieces=true)
Definition vtkreader.impl.hh:684
Definition vtkreader.hh:346
T abort(T... args)
T begin(T... args)
T clear(T... args)
T copy(T... args)
T data(T... args)
T end(T... args)
T endl(T... args)
T gcount(T... args)
T get(T... args)
T getline(T... args)
T is_open(T... args)
T push_back(T... args)
T read(T... args)
T reserve(T... args)
T resize(T... args)
T seekg(T... args)
T size(T... args)
T stod(T... args)
T stoul(T... args)
T tellg(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8