18 const std::filesystem::path& file,
19 const std::string& position_attr_name)
23 if (file.extension().empty()) {
24 assert(!position_attr_name.empty());
25 std::array<bool, 4> out = {{
false,
false,
false,
false}};
29 ParaviewWriter writer(file, position_attr_name, mesh, out[0], out[1], out[2], out[3]);
31 }
else if (file.extension() ==
".hdf5") {
34 throw std::runtime_error(std::string(
"Unknown file type: ") + file.string());
59 if (opts.
type ==
".vtu") {
62 std::string name = std::visit([](
const auto& v) -> std::string{
63 using T = std::decay_t<
decltype(v)>;
64 if constexpr(std::is_same_v<T,std::string>) {
66 }
else if constexpr(std::is_same_v<T,wmtk::attribute::MeshAttributeHandle>) {
70 std::array<bool, 4> out = {{
false,
false,
false,
false}};
76 }
else if (opts.
type ==
".hdf5") {
79 throw std::runtime_error(
80 fmt::format(
"Unable to write file [{}] of extension [{}]",