Skip to content
Snippets Groups Projects

Feature/data output

1 file
+ 57
56
Compare changes
  • Side-by-side
  • Inline
+ 57
56
@@ -21,56 +21,6 @@ class VTKWriter
template <typename DataType> struct VTKType {};
template <> struct VTKType<int8_t>
{
inline const static std::string name{"Int8"};
};
template <> struct VTKType<uint8_t>
{
inline const static std::string name{"UInt8"};
};
template <> struct VTKType<int16_t>
{
inline const static std::string name{"Int16"};
};
template <> struct VTKType<uint16_t>
{
inline const static std::string name{"UInt16"};
};
template <> struct VTKType<int32_t>
{
inline const static std::string name{"Int32"};
};
template <> struct VTKType<uint32_t>
{
inline const static std::string name{"UInt32"};
};
template <> struct VTKType<int64_t>
{
inline const static std::string name{"Int64"};
};
template <> struct VTKType<uint64_t>
{
inline const static std::string name{"UInt64"};
};
template <> struct VTKType<float>
{
inline const static std::string name{"Float32"};
};
template <> struct VTKType<double>
{
inline const static std::string name{"Float64"};
};
template <typename DataType>
void _write_array(std::ofstream& os,
const std::string& name,
@@ -136,9 +86,9 @@ class VTKWriter
}
template <typename DataType>
void _write_node_value(std::ofstream& os,
const std::string& name,
const CellValue<const DataType>& item_value) {}
void _write_node_value(std::ofstream&,
const std::string&,
const CellValue<const DataType>&) {}
template <typename DataType>
void _write_cell_value(std::ofstream& os,
@@ -172,9 +122,9 @@ class VTKWriter
}
template <typename DataType>
void _write_cell_value(std::ofstream& os,
const std::string& name,
const NodeValue<const DataType>& item_value) {}
void _write_cell_value(std::ofstream&,
const std::string&,
const NodeValue<const DataType>&) {}
public:
template <typename MeshType>
@@ -309,4 +259,55 @@ class VTKWriter
~VTKWriter() = default;
};
template <>
struct VTKWriter::VTKType<int8_t>
{
inline const static std::string name{"Int8"};
};
template <> struct VTKWriter::VTKType<uint8_t>
{
inline const static std::string name{"UInt8"};
};
template <> struct VTKWriter::VTKType<int16_t>
{
inline const static std::string name{"Int16"};
};
template <> struct VTKWriter::VTKType<uint16_t>
{
inline const static std::string name{"UInt16"};
};
template <> struct VTKWriter::VTKType<int32_t>
{
inline const static std::string name{"Int32"};
};
template <> struct VTKWriter::VTKType<uint32_t>
{
inline const static std::string name{"UInt32"};
};
template <> struct VTKWriter::VTKType<int64_t>
{
inline const static std::string name{"Int64"};
};
template <> struct VTKWriter::VTKType<uint64_t>
{
inline const static std::string name{"UInt64"};
};
template <> struct VTKWriter::VTKType<float>
{
inline const static std::string name{"Float32"};
};
template <> struct VTKWriter::VTKType<double>
{
inline const static std::string name{"Float64"};
};
#endif // VTK_WRITER_HPP
Loading