BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_VTK_MeshView.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, through
4 * 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_VTK_MESHVIEW_HPP
13#define BELFEM_CL_VTK_MESHVIEW_HPP
14
15#include "vtktypes.hpp"
16#include "cl_Mesh.hpp"
17
18namespace belfem
19{
20 namespace vtk
21 {
33 {
34 mesh::Block * mBlock ;
35
36 UnstructuredGrid mGrid ;
37 DataSetMapper mMapper ;
38 Actor mActor ;
39
40 public:
41 BlockActor( Points aPoints,
42 Map< id_t, vtkIdType > & aNodeMap,
43 Map< id_t, vtkIdType > & aElementMap,
44 mesh::Block * aBlock );
45
46 ~BlockActor() = default;
47
48 inline mesh::Block * block() { return mBlock; }
49
51 inline Actor actor() { return mActor; }
52 };
53
55 {
56 mesh::SideSet * mSideSet ;
57
58 UnstructuredGrid mGrid ;
59 DataSetMapper mMapper ;
60 Actor mActor ;
61
62 public:
63 SideSetActor( Points aPoints,
64 Map< id_t, vtkIdType > & aNodeMap,
65 Map< id_t, vtkIdType > & aElementMap,
66 mesh::SideSet * aSideSet );
67
68 ~SideSetActor() = default;
69
70 inline mesh::SideSet * sideset() { return mSideSet; }
71
73 inline Actor actor() { return mActor; }
74 };
75
90 {
91
92 belfem::Mesh * mMesh ;
93 Points mPoints ;
94 Map< id_t, vtkIdType > mNodeMap ;
95 Map< id_t, vtkIdType > mElementMap ;
96
97 Cell< BlockActor * > mBlocks ;
98 Cell< SideSetActor * > mSideSets ;
99
100 public:
101
102 MeshView( belfem::Mesh * aMesh ) ;
103
104 ~MeshView();
105
107 inline Cell< BlockActor * > & blocks() { return mBlocks; }
108
110 inline Cell< SideSetActor * > & sidesets() { return mSideSets; }
111
114
118 void set_user_transform( const Transform & aTransform );
119
120 };
121 }
122}
123#endif //BELFEM_CL_VTK_MESHVIEW_HPP
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
Definition cl_Block.hpp:27
Definition cl_SideSet.hpp:29
Actor actor()
The VTK actor; ownership stays with this wrapper.
Definition cl_VTK_MeshView.hpp:51
BlockActor(Points aPoints, Map< id_t, vtkIdType > &aNodeMap, Map< id_t, vtkIdType > &aElementMap, mesh::Block *aBlock)
Definition cl_VTK_MeshView.cpp:24
mesh::Block * block()
Definition cl_VTK_MeshView.hpp:48
Cell< Actor > actors()
All VTK actors (blocks + sidesets), for handing to a renderer.
Definition cl_VTK_MeshView.cpp:170
Cell< SideSetActor * > & sidesets()
The per-sideset actor wrappers; ownership stays with this view.
Definition cl_VTK_MeshView.hpp:110
void set_user_transform(const Transform &aTransform)
Definition cl_VTK_MeshView.cpp:190
Cell< BlockActor * > & blocks()
The per-block actor wrappers; ownership stays with this view.
Definition cl_VTK_MeshView.hpp:107
MeshView(belfem::Mesh *aMesh)
Definition cl_VTK_MeshView.cpp:121
mesh::SideSet * sideset()
Definition cl_VTK_MeshView.hpp:70
Actor actor()
The VTK actor; ownership stays with this wrapper.
Definition cl_VTK_MeshView.hpp:73
SideSetActor(Points aPoints, Map< id_t, vtkIdType > &aNodeMap, Map< id_t, vtkIdType > &aElementMap, mesh::SideSet *aSideSet)
Definition cl_VTK_MeshView.cpp:74
Definition vtktools.cpp:21
void Actor
Definition vtktypes.hpp:52
void Points
Definition vtktypes.hpp:59
void DataSetMapper
Definition vtktypes.hpp:58
void UnstructuredGrid
Definition vtktypes.hpp:62
void Transform
Definition vtktypes.hpp:56
USER GUIDES:
Definition cl_Capacitor.cpp:16