BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_Mesh_VtkWriter.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#ifndef BELFEM_CL_MESH_VTKWRITER_HPP
13
#define BELFEM_CL_MESH_VTKWRITER_HPP
14
15
#include <fstream>
16
#include "
typedefs.hpp
"
17
#include "
cl_Mesh.hpp
"
18
#include "
cl_Map.hpp
"
19
20
namespace
belfem
21
{
22
namespace
mesh
23
{
24
class
VtkWriter
25
{
26
const
string
mFilePath;
27
28
Mesh
* mMesh;
29
30
std::ofstream mFile;
31
32
// map that connects node IDs to indices in that order as they
33
// have been written into the file
34
Map< id_t, int >
mNodeMap;
35
36
int
mNumberOfNodes ;
37
38
int
mNumberOfElements ;
39
40
//------------------------------------------------------------------------------
41
public
:
42
//------------------------------------------------------------------------------
43
44
VtkWriter
(
const
string
& aFilePath,
Mesh
* aMesh );
45
46
//------------------------------------------------------------------------------
47
48
~VtkWriter
() =
default
;
49
50
//------------------------------------------------------------------------------
51
private
:
52
//------------------------------------------------------------------------------
53
54
void
55
write_header();
56
57
//------------------------------------------------------------------------------
58
59
void
60
write_time();
61
62
//------------------------------------------------------------------------------
63
64
void
65
write_nodes();
66
67
//------------------------------------------------------------------------------
68
69
void
70
write_elements();
71
72
//------------------------------------------------------------------------------
73
74
void
75
write_element_fields();
76
77
//------------------------------------------------------------------------------
78
79
void
80
write_node_fields();
81
82
//------------------------------------------------------------------------------
83
};
84
//------------------------------------------------------------------------------
85
86
}
87
//------------------------------------------------------------------------------
88
}
89
#endif
//BELFEM_CL_MESH_VTKWRITER_HPP
cl_Map.hpp
cl_Mesh.hpp
belfem::Map< id_t, int >
belfem::Mesh
Top-level container for all mesh entities.
Definition
cl_Mesh.hpp:60
belfem::mesh::VtkWriter::~VtkWriter
~VtkWriter()=default
belfem::mesh::VtkWriter::VtkWriter
VtkWriter(const string &aFilePath, Mesh *aMesh)
Definition
cl_Mesh_VtkWriter.cpp:27
belfem::mesh
Definition
cl_EF_EdgeFunction.hpp:17
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
typedefs.hpp
src
mesh
cl_Mesh_VtkWriter.hpp
Generated by
1.18.0