DOLFIN-X
DOLFIN-X C++ interface
VTKWriter.h
1 // Copyright (C) 2010 Garth N. Wells
2 //
3 // This file is part of DOLFINX (https://www.fenicsproject.org)
4 //
5 // SPDX-License-Identifier: LGPL-3.0-or-later
6 
7 #pragma once
8 
9 #include <complex>
10 #include <string>
11 
12 namespace dolfinx
13 {
14 namespace fem
15 {
16 template <typename T>
17 class Function;
18 }
19 namespace mesh
20 {
21 class Mesh;
22 }
23 
24 namespace io
25 {
26 
28 
29 class VTKWriter
30 {
31 public:
33  static void write_mesh(const mesh::Mesh& mesh, std::size_t cell_dim,
34  std::string file);
35 
37  static void write_cell_data(const fem::Function<double>& u, std::string file);
38 
40  static void write_cell_data(const fem::Function<std::complex<double>>& u,
41  std::string file);
42 };
43 } // namespace io
44 } // namespace dolfinx
This class represents a function in a finite element function space , given by.
Definition: Function.h:46
Write VTK mesh::Mesh representation.
Definition: VTKWriter.h:30
static void write_mesh(const mesh::Mesh &mesh, std::size_t cell_dim, std::string file)
mesh::Mesh writer
Definition: VTKWriter.cpp:325
static void write_cell_data(const fem::Function< double > &u, std::string file)
Cell data writer.
Definition: VTKWriter.cpp:331
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:57