MFEM  v4.2.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
vtk.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
2 // at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3 // LICENSE and NOTICE for details. LLNL-CODE-806117.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability visit https://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the BSD-3 license. We welcome feedback and contributions, see file
10 // CONTRIBUTING.md for details.
11 
12 #ifndef MFEM_VTK
13 #define MFEM_VTK
14 
15 #include "../fem/geom.hpp"
16 
17 namespace mfem
18 {
19 
20 // Helpers for writing to the VTK format
21 
22 enum class VTKFormat
23 {
24  ASCII,
25  BINARY,
26  BINARY32
27 };
28 
29 /// Create the VTK element connectivity array for a given element geometry and
30 /// refinement level. Converts node numbers from MFEM to VTK ordering.
32  int ref);
33 
34 /// Outputs encoded binary data in the format needed by VTK. The binary data
35 /// will be base 64 encoded, and compressed if @a compression_level is not
36 /// zero. The proper header will be prepended to the data.
37 void WriteVTKEncodedCompressed(std::ostream &out, const void *bytes,
38  uint32_t nbytes, int compression_level);
39 
40 int BarycentricToVTKTriangle(int *b, int ref);
41 
42 const char *VTKByteOrder();
43 
44 } // namespace mfem
45 
46 #endif
const Geometry::Type geom
Definition: ex1.cpp:40
int BarycentricToVTKTriangle(int *b, int ref)
Definition: vtk.cpp:21
double b
Definition: lissajous.cpp:42
VTKFormat
Definition: vtk.hpp:22
const char * VTKByteOrder()
Definition: vtk.cpp:461
void WriteVTKEncodedCompressed(std::ostream &out, const void *bytes, uint32_t nbytes, int compression_level)
Definition: vtk.cpp:418
void CreateVTKElementConnectivity(Array< int > &con, Geometry::Type geom, int ref)
Definition: vtk.cpp:357
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
Definition: globals.hpp:66