Compare commits

...
Author SHA1 Message Date
Stowell, Mark L 19ce2ae7ae make style 2024-05-31 14:43:05 -07:00
Stowell, Mark L 15528aab92 Adding Exodus II output option to mesh-explorer 2024-05-31 14:36:11 -07:00
Edward Palmer 7ddf970839 Merge branch 'master' into exodus-writer-dev 2024-05-31 17:46:04 +01:00
Edward Palmer 394fc7752a Removes temporary output meshes to avoid false positives. 2024-05-31 16:44:56 +00:00
Edward Palmer 2d13ff1b55 Temporary mesh output files are now placed in current directory. 2024-05-31 16:39:09 +00:00
Edward Palmer c2996e371f Moves ExodusII labels into their own namespace to avoid polluting mfem namespace. 2024-05-31 16:21:06 +00:00
Edward Palmer 85d5c16d2d Renamed "WriteExodusII" to "PrintExodusII" to be consistent. 2024-05-31 15:40:07 +00:00
Edward Palmer 41bd81dde6 Moves "WriteExodusII" further down to live with the Print methods. 2024-05-31 15:37:29 +00:00
Tzanio Kolev fc61580ce9 Merge branch 'master' into exodus-writer-dev 2024-05-26 14:26:08 -07:00
Tzanio Kolev 647721158b Merge branch 'master' into exodus-writer-dev 2024-05-21 11:34:47 -07:00
Edward Palmer 49905582a4 Address compiler warning for unused function used in the unit tests. 2024-04-05 09:44:23 +00:00
Edward Palmer 88532305ee Address build issue. 2024-04-04 17:17:20 +00:00
Edward Palmer a2bc150e07 Updated changelog. 2024-04-04 16:25:55 +00:00
Edward Palmer 0be7c747d2 Merge branch 'master' into exodus-writer-dev 2024-04-04 15:56:26 +00:00
Edward Palmer 76274ae97e Minor changes to increase readability. 2024-04-04 15:54:34 +00:00
Edward Palmer e141cda81e Updated documentation. 2024-04-04 15:47:09 +00:00
Edward Palmer faf3b4aa0e Addresses compiler warnings. 2024-04-04 15:05:00 +00:00
Edward Palmer bb202161ca Commented-out mixed second-order writer test since current reader cannot handle multiple element types. 2024-04-04 14:28:11 +00:00
Edward Palmer 64958e87cf Added test comments. 2024-04-04 14:24:16 +00:00
Edward Palmer 4d3954b55f Added test files; added additional unit tests. 2024-04-04 14:22:26 +00:00
Edward Palmer ecfc46899d Added mapping for Pyramid14 (cannot test until reader is able to handle higher-order pyramids). 2024-04-04 14:17:26 +00:00
Edward Palmer bcd6642def Added support for Wedge18. 2024-04-04 14:16:27 +00:00
Edward Palmer 5f0f47a74e Added Hex27 test. 2024-04-03 16:04:48 +00:00
Edward Palmer 338f0871f8 Added Hex27 support to writer. 2024-04-03 16:04:41 +00:00
Edward Palmer 92bed9fb79 Updated the "elem_type" names. 2024-04-03 14:07:49 +00:00
Edward Palmer 0ad8e9baeb Added handling of second-order Tet (Tet10) elements to exodus writer. 2024-04-03 13:48:39 +00:00
Edward Palmer e03ac32a45 Added test case for Tet10; added additional dofs checks. 2024-04-03 13:47:55 +00:00
Edward Palmer c52d78cfba Reordered globals; updated documentation; switched set to unordered_set. 2024-04-03 09:40:50 +00:00
Edward Palmer 053714172d Added safety check method. 2024-04-03 09:34:39 +00:00
Edward Palmer 9aafe2359c Moved all mesh writer methods into new method. 2024-04-03 09:31:40 +00:00
Edward Palmer b073699823 Moved ExodusII file information writer methods into a new method. 2024-04-03 09:29:31 +00:00
Edward Palmer ab583da367 WriteElementBlocks now contains all methods related to this. 2024-04-03 09:24:01 +00:00
Edward Palmer e364280499 Merged methods for writing boundary info. 2024-04-03 09:17:12 +00:00
Edward Palmer b16d912a1c Updated documentation; merged methods. 2024-04-03 09:12:33 +00:00
Edward Palmer c9bdcb6123 Added global named C string labels. 2024-04-02 16:09:33 +00:00
Edward Palmer d9e44fe045 Added a GenerateLabel method. 2024-04-02 15:46:19 +00:00
Edward Palmer 9134b4a852 Added a macro to check NetCDF status. 2024-04-02 15:03:07 +00:00
Edward Palmer 1189596e43 Added DefineAndPutVar method to simplify code. 2024-04-02 14:44:29 +00:00
Edward Palmer 0e21c9c4b0 WriteNodalCoordinates is now a single method. 2024-04-02 14:33:03 +00:00
Edward Palmer 8bb16b0789 Moved nc_redef and nc_enddef into methods. 2024-04-02 14:26:15 +00:00
Edward Palmer 65f7701dd7 Replaced nc_put_att_text. 2024-04-02 14:18:36 +00:00
Edward Palmer 4e4a06f029 Added PutAtt method. 2024-04-02 14:13:43 +00:00
Edward Palmer ac628bbf90 Added PutVar wrapper method. 2024-04-02 13:56:25 +00:00
Edward Palmer 6ec073b11d Added safety check to ensure mesh is first-order. 2024-04-02 13:56:15 +00:00
Edward Palmer 0b98e6f60d Updated documentation. 2024-03-28 12:23:43 +00:00
Edward Palmer 6e5cb10eb8 Reordered methods. 2024-03-28 11:51:56 +00:00
Edward Palmer 04b45a754e Added a static method for writing to a file. 2024-03-28 11:35:52 +00:00
Edward Palmer bc9a6f2452 Added DefineVar wrapper method. 2024-03-28 11:17:14 +00:00
Edward Palmer bdf757e611 Added a DefineDimension wrapper around nc_def_dim. 2024-03-28 11:09:59 +00:00
Edward Palmer 30d92e799c Add functionality now added to class. 2024-03-28 10:49:33 +00:00
Edward Palmer f53e668305 writing nodal variables is now done in a method. 2024-03-28 10:34:48 +00:00
Edward Palmer aa5a18d32d Sideset information now stored inside class. 2024-03-28 10:23:24 +00:00
Edward Palmer 172c50d117 writing element block parameters now handled in class method. 2024-03-28 10:08:31 +00:00
Edward Palmer 35ef4f981d Added database/api versions, floating point word size, max line/name lengths. 2024-03-28 09:51:05 +00:00
Edward Palmer 954607032a Added CreateEmptyFile, WriteTitle and WriteNumOFElements methods. 2024-03-28 09:41:38 +00:00
Edward Palmer 6a1b8d8c74 Removed mesh argument from methods. 2024-03-28 09:18:34 +00:00
Edward Palmer 65c63619ec Converted functions to methods in class. 2024-03-28 09:13:41 +00:00
Edward Palmer 90e4be3cb5 STarted writing a class to encapsulate writing. 2024-03-28 09:03:07 +00:00
Edward Palmer 084e415793 Commented-out test cases that cannot be run with existing ReadCubit ExodusII reader. 2024-03-27 16:34:42 +00:00
Edward Palmer 4060712ac9 Removed unused dimension definition; Added support for writing mixed first-order meshes.
(cherry picked from commit 4c111d6f9198f418d32df98fd5e711455f73170a)
2024-03-27 16:33:52 +00:00
Edward Palmer a630a42413 Commented-out Wedge6 and Pyramid5 tests since the files cannot be read until ReadCubit is updated in a separate PR. 2024-03-27 14:20:02 +00:00
Edward Palmer 44da879029 Added Pyramid5 test case.
(cherry picked from commit 2f90b786a0228892f76f926af5e0fe04ab741977)
2024-03-27 14:12:23 +00:00
Edward Palmer 54e9d983f9 Added Pyramid5 support.
(cherry picked from commit 679b1e4c3f9298513627d27ea130b5e87b80350c)
2024-03-27 14:12:13 +00:00
Edward Palmer e368c9fc0f Added ExodusII Wedge6 test case.
(cherry picked from commit 0e69f28a5f357fc44d22f52b1cd5f7a63e492b2b)
2024-03-27 14:12:02 +00:00
Edward Palmer 3bfcce4423 Added Wedge6 support to ExodusII writer.
(cherry picked from commit 9412dac5c4dde84732d2f8e82787eac3f9e48906)
2024-03-27 14:11:50 +00:00
Edward Palmer d494a1fb26 Added Tet4 test ExodusII file. 2024-03-27 11:17:36 +00:00
Edward Palmer 242a121538 Added MFEM to ExodusII side map for Hex8. 2024-03-27 11:17:18 +00:00
Edward Palmer c976e7e291 Fixed incorrect variable name. 2024-03-27 11:07:39 +00:00
Edward Palmer 0d2ae842be Added Tet4 test case and a comparison test function. 2024-03-27 11:05:07 +00:00
Edward Palmer 9b8ce93b2f Updated exodus_writer to handle Tet4. 2024-03-27 10:42:06 +00:00
Edward Palmer 24d7f9d091 Added ExodusII writer Hex8 test case. 2024-03-22 18:42:25 +00:00
Edward Palmer a15dfc7eb9 Added dummy variable to get-around bug in libMesh which prevents the x-coordinate from being read. 2024-03-22 18:21:49 +00:00
Edward Palmer 3208151873 Added info for timesteps, updated file size info, added info for block element types. 2024-03-22 15:36:23 +00:00
Edward Palmer 5615e68dad Removed NETCDF_4 flag (not supported by some programs). Manually setting nc_enddef and nc_redef. 2024-03-22 12:38:42 +00:00
Edward Palmer 3f59a4e587 Added header information. 2024-03-22 12:37:39 +00:00
Edward Palmer 87ce6cc007 Added line length and version number info. 2024-03-21 16:24:15 +00:00
Edward Palmer 09d75174dd Fixed incorrect dimensions passed to nc_def_var. 2024-03-21 15:27:05 +00:00
Edward Palmer 9c83c0b7a5 Rewritten function to generate Exodus II boundary info. 2024-03-21 11:40:47 +00:00
Edward Palmer 77ec6aca54 Corrected the side_ids_for_boundary_id mapping. 2024-03-20 16:08:59 +00:00
Edward Palmer 382c86adfe Updated Exodus II writer to write boundary element IDs and side IDs to file. 2024-03-19 18:19:22 +00:00
Edward Palmer c18af85f8b Now also writing the number of elements for each sideset. 2024-03-19 18:05:05 +00:00
Edward Palmer 06de29029a Added incomplete functiono "GenerateExodusIISidesetsFromMesh" which generates key information about each boundary which can then be written to the file. 2024-03-19 17:58:27 +00:00
Edward Palmer 9a59db9629 Added function to write block IDs. 2024-03-19 17:39:17 +00:00
Edward Palmer b56f4573d7 Added function to write sideset boundary IDs to file. 2024-03-19 17:33:31 +00:00
Edward Palmer 42c763d38b Fixed naming for number of nodes per element variable. 2024-03-19 16:54:32 +00:00
Edward Palmer 4a40591684 Added WriteNodeConnectivityForBlock; fixed naming of one of the variables. 2024-03-19 16:46:30 +00:00
Edward Palmer b5da6d92c1 Now defining some element block parameters. 2024-03-19 14:40:31 +00:00
Edward Palmer 6337adffbe Rewritten GenerateExodusIIElementBlocksFromMesh to make use of element attributes. 2024-03-19 13:53:26 +00:00
Edward Palmer 5b5657d387 Writing coordinates to file. 2024-03-19 13:38:07 +00:00
Edward Palmer 3195a20695 Added function to get num_nodes for an MFEM mesh. 2024-03-18 16:35:00 +00:00
Edward Palmer 35418e1bae Added a function to generate sideset information from an MFEM mesh. 2024-03-18 16:15:30 +00:00
Edward Palmer 428aa7b1a1 Added function to generate Exodus II element blocks from MFEM mesh. 2024-03-18 16:01:03 +00:00
Edward Palmer 825181ea5b Setting title, num_dim, num_elem. 2024-03-18 15:42:49 +00:00
Edward Palmer 204fe6fa02 Added test_exodus_writer file for Exodus II writer unit tests. 2024-03-18 15:00:28 +00:00
Edward Palmer 488babc78c Added WriteExodusII method to the Mesh; added exodus_writer cpp file; updated cmakelists. 2024-03-18 15:00:05 +00:00
17 changed files with 1313 additions and 0 deletions
+3
View File
@@ -35,6 +35,9 @@ Meshing improvements
- Added support for internal boundary elements in nonconforming meshes.
- Added ExodusII output capability. The writer can handle first-order (Pyramid5,
Wedge6, Hex8, Tet4) and second-order FE types (Pyramid14, Wedge18, Hex27, Tet10).
- The ReadCubit Genesis mesh importer has been rewritten to improve readability.
Discretization improvements
+1
View File
@@ -12,6 +12,7 @@
set(SRCS
attribute_sets.cpp
element.cpp
exodus_writer.cpp
face_nbr_geom.cpp
gmsh.cpp
hexahedron.cpp
File diff suppressed because it is too large Load Diff
+5
View File
@@ -2331,6 +2331,11 @@ public:
bool high_order_output=false,
int compression_level=0);
#ifdef MFEM_USE_NETCDF
/// @brief Export a mesh to an Exodus II file.
void PrintExodusII(const std::string fpath);
#endif
/** @brief Prints the mesh with boundary elements given by the boundary of
the subdomains, so that the boundary of subdomain i has boundary
attribute i+1. */
+12
View File
@@ -386,6 +386,9 @@ int main (int argc, char *argv[])
"S) Save in MFEM serial format\n"
"T) Save in MFEM parallel format using the current partitioning\n"
"V) Save in VTK format (only linear and quadratic meshes)\n"
#ifdef MFEM_USE_NETCDF
"X) Save in Exodus II format (only linear and quadratic meshes)\n"
#endif
"D) Save as a DataCollection\n"
"q) Quit\n"
#ifdef MFEM_USE_ZLIB
@@ -1288,6 +1291,15 @@ int main (int argc, char *argv[])
cout << "New VTK mesh file: " << omesh_file << endl;
}
#ifdef MFEM_USE_NETCDF
if (mk == 'X')
{
const char omesh_file[] = "mesh-explorer.e";
mesh->PrintExodusII(omesh_file);
cout << "New Exodus II mesh file: " << omesh_file << endl;
}
#endif
if (mk == 'D')
{
cout << "What type of DataCollection?\n"
+1
View File
@@ -56,6 +56,7 @@ set(UNIT_TESTS_SRCS
mesh/test_submesh.cpp
mesh/test_vtu.cpp
mesh/test_nurbs.cpp
mesh/test_exodus_writer.cpp
fem/test_1d_bilininteg.cpp
fem/test_2d_bilininteg.cpp
fem/test_3d_bilininteg.cpp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+273
View File
@@ -0,0 +1,273 @@
// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM library. For more information and source code
// availability visit https://mfem.org.
//
// MFEM is free software; you can redistribute it and/or modify it under the
// terms of the BSD-3 license. We welcome feedback and contributions, see file
// CONTRIBUTING.md for details.
#include "mfem.hpp"
#include "unit_tests.hpp"
using namespace mfem;
#ifdef MFEM_USE_NETCDF
static void CompareMeshes(Mesh & mesh1, Mesh & mesh2)
{
REQUIRE(mesh1.GetNE() == mesh2.GetNE());
REQUIRE(mesh1.GetNV() == mesh2.GetNV());
REQUIRE(mesh1.GetNBE() == mesh2.GetNBE());
REQUIRE(mesh1.GetNFaces() == mesh2.GetNFaces());
const FiniteElementSpace * fespace1 = mesh1.GetNodalFESpace();
const FiniteElementSpace * fespace2 = mesh2.GetNodalFESpace();
// Check elements.
Array<int> element_faces1, element_faces2;
Array<int> element_orient1, element_orient2;
Array<int> dofs1, dofs2;
for (int ielement = 0; ielement < mesh1.GetNE(); ielement++)
{
int attr1 = mesh1.GetAttribute(ielement);
int attr2 = mesh2.GetAttribute(ielement);
REQUIRE(attr1 == attr2);
Element::Type type1 = mesh1.GetElementType(ielement);
Element::Type type2 = mesh2.GetElementType(ielement);
REQUIRE(type1 == type2);
mesh1.GetElementFaces(ielement, element_faces1, element_orient1);
mesh2.GetElementFaces(ielement, element_faces2, element_orient2);
REQUIRE(element_faces1 == element_faces2);
REQUIRE(element_orient1 == element_orient2);
if (fespace1 && fespace2)
{
fespace1->GetElementDofs(ielement, dofs1);
fespace2->GetElementDofs(ielement, dofs2);
}
else
{
mesh1.GetElementVertices(ielement, dofs1);
mesh2.GetElementVertices(ielement, dofs2);
}
REQUIRE(dofs1 == dofs2);
}
// Check bdr elements.
for (int ibdr_element = 0; ibdr_element < mesh1.GetNBE(); ibdr_element++)
{
int attr1 = mesh1.GetBdrAttribute(ibdr_element);
int attr2 = mesh2.GetBdrAttribute(ibdr_element);
REQUIRE(attr1 == attr2);
Element::Type type1 = mesh1.GetBdrElementType(ibdr_element);
Element::Type type2 = mesh2.GetBdrElementType(ibdr_element);
REQUIRE(type1 == type2);
int face_index1 = mesh1.GetBdrElementFaceIndex(ibdr_element);
int face_index2 = mesh2.GetBdrElementFaceIndex(ibdr_element);
REQUIRE(face_index1 == face_index2);
}
// Check face vertices.
Array<int> face_vertices1, face_vertices2;
for (int iface_index = 0; iface_index < mesh1.GetNFaces(); iface_index++)
{
mesh1.GetFaceVertices(iface_index, face_vertices1);
mesh2.GetFaceVertices(iface_index, face_vertices2);
REQUIRE(face_vertices1 == face_vertices2);
}
}
#endif
TEST_CASE("ExodusII Write Hex8", "[Mesh]")
{
#ifdef MFEM_USE_NETCDF
// Load Exodus II mesh from file.
std::string fpath_original = "data/simple-cube-hex8.e";
Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// Write generated Exodus II mesh to file.
std::string fpath_generated = "simple-cube-hex8-out.e";
original_mesh.PrintExodusII(fpath_generated);
// Load generated Exodus II mesh.
Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
CompareMeshes(original_mesh, generated_mesh);
// Remove temporary file.
REQUIRE(remove(fpath_generated.c_str()) == 0);
#endif
}
TEST_CASE("ExodusII Write Hex27", "[Mesh]")
{
#ifdef MFEM_USE_NETCDF
// Load Exodus II mesh from file.
std::string fpath_original = "data/simple-cube-hex27.e";
Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// Write generated Exodus II mesh to file.
std::string fpath_generated = "simple-cube-hex27-out.e";
original_mesh.PrintExodusII(fpath_generated);
// Load generated Exodus II mesh.
Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
CompareMeshes(original_mesh, generated_mesh);
REQUIRE(remove(fpath_generated.c_str()) == 0);
#endif
}
TEST_CASE("ExodusII Write Tet4", "[Mesh]")
{
#ifdef MFEM_USE_NETCDF
// Load Exodus II mesh from file. NB: - Do NOT refine as this changes vertex ordering!
std::string fpath_original = "data/simple-cube-tet4.e";
Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// Write generated Exodus II mesh to file.
std::string fpath_generated = "simple-cube-tet4-out.e";
original_mesh.PrintExodusII(fpath_generated);
// Load generated Exodus II mesh.
Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
CompareMeshes(original_mesh, generated_mesh);
REQUIRE(remove(fpath_generated.c_str()) == 0);
#endif
}
TEST_CASE("ExodusII Write Tet10", "[Mesh]")
{
#ifdef MFEM_USE_NETCDF
// Load Exodus II mesh from file.
std::string fpath_original = "data/simple-cube-tet10.e";
Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// Write generated Exodus II mesh to file.
std::string fpath_generated = "simple-cube-tet10-out.e";
original_mesh.PrintExodusII(fpath_generated);
// Load generated Exodus II mesh.
Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
CompareMeshes(original_mesh, generated_mesh);
REQUIRE(remove(fpath_generated.c_str()) == 0);
#endif
}
// TEST_CASE("ExodusII Write Wedge6", "[Mesh]")
// {
// #ifdef MFEM_USE_NETCDF
// std::string fpath_original = "data/simple-cube-wedge6.e";
// Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// std::string fpath_generated = "simple-cube-wedge6-out.e";
// original_mesh.PrintExodusII(fpath_generated);
// Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
// CompareMeshes(original_mesh, generated_mesh);
//
// REQUIRE(remove(fpath_generated.c_str()) == 0);
// #endif
// }
// TEST_CASE("ExodusII Write Wedge18", "[Mesh]")
// {
// #ifdef MFEM_USE_NETCDF
// std::string fpath_original = "data/simple-cube-wedge18.e";
// Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// std::string fpath_generated = "simple-cube-wedge18-out.e";
// original_mesh.PrintExodusII(fpath_generated);
// Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
// CompareMeshes(original_mesh, generated_mesh);
// REQUIRE(remove(fpath_generated.c_str()) == 0);
// #endif
// }
// TEST_CASE("ExodusII Write Pyramid5", "[Mesh]")
// {
// #ifdef MFEM_USE_NETCDF
// std::string fpath_original = "data/simple-cube-pyramid5.e";
// Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// std::string fpath_generated = "simple-cube-pyramid5-out.e";
// original_mesh.PrintExodusII(fpath_generated);
// Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
// CompareMeshes(original_mesh, generated_mesh);
// REQUIRE(remove(fpath_generated.c_str()) == 0);
// #endif
// }
// TEST_CASE("ExodusII Write Pyramid14", "[Mesh]")
// {
// #ifdef MFEM_USE_NETCDF
// std::string fpath_original = "data/simple-cube-pyramid14.e";
// Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// std::string fpath_generated = "simple-cube-pyramid14-out.e";
// original_mesh.PrintExodusII(fpath_generated);
// Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
// CompareMeshes(original_mesh, generated_mesh);
// REQUIRE(remove(fpath_generated.c_str()) == 0);
// #endif
// }
// TEST_CASE("ExodusII Write Mixed First-Order", "[Mesh]")
// {
// #ifdef MFEM_USE_NETCDF
// // Contains Hex8, Tet4, Wedge6, Pyramid5 elements.
// std::string fpath_original = "data/simple-cube-multi-element-order1.e";
// Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// std::string fpath_generated = "simple-cube-multi-element-order1-out.e";
// original_mesh.PrintExodusII(fpath_generated);
// Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
// CompareMeshes(original_mesh, generated_mesh);
// REQUIRE(remove(fpath_generated.c_str()) == 0);
// #endif
// }
// TEST_CASE("ExodusII Write Mixed Second-Order", "[Mesh]")
// {
// #ifdef MFEM_USE_NETCDF
// // Contains Hex27 and Tet10 elements.
// std::string fpath_original = "data/simple-cube-multi-element-order2.e";
// Mesh original_mesh = Mesh::LoadFromFile(fpath_original, 0, 0, true);
// std::string fpath_generated = "simple-cube-multi-element-order2-out.e";
// original_mesh.PrintExodusII(fpath_generated);
// Mesh generated_mesh = Mesh::LoadFromFile(fpath_generated, 0, 0, true);
// CompareMeshes(original_mesh, generated_mesh);
// REQUIRE(remove(fpath_generated.c_str()) == 0);
// #endif
// }