Skip to content

Commit

Permalink
HexMesh: Enable user to control output with 8-bit ints
Browse files Browse the repository at this point in the history
  • Loading branch information
sayerhs committed Oct 4, 2017
1 parent 769459e commit 288f8c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion doc/manual/source/user/abl_mesh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ parameters.A sample input file is shown below
mesh_dimensions: [10, 10, 10]
.. confval:: output_db
.. confval:: output_db [nalu_abl_mesh]

The Exodus-II filename where the mesh is output. No default, must be provided
by the user.
Expand Down Expand Up @@ -102,6 +102,11 @@ parameters.A sample input file is shown below
Name of the element block created with HEX-8 elements. Default value:
``fluid_part``.

.. confval:: ioss_8bit_ints

Boolean flag that enables output of 8-bit ints when writing Exodus mesh.
Default value: true.

Boundary names
~~~~~~~~~~~~~~

Expand Down
6 changes: 5 additions & 1 deletion src/mesh/abl_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/

#include "mesh/HexBlockMesh.h"
#include "core/YamlUtils.h"

#include "stk_util/parallel/Parallel.hpp"
#include "stk_io/WriteMesh.hpp"
Expand Down Expand Up @@ -82,7 +83,10 @@ int main(int argc, char** argv)
blockMesh.run();

std::cout << "Writing mesh to file: " << output_db << std::endl;
mesh->set_64bit_flags();
bool set_64bit = true;
sierra::nalu::wind_utils::get_optional(node, "ioss_8bit_ints", set_64bit);

if (set_64bit) mesh->set_64bit_flags();
auto& stkio = mesh->stkio();
stkio.set_bulk_data(mesh->bulk());
mesh->write_database(output_db);
Expand Down

0 comments on commit 288f8c0

Please sign in to comment.