NuTo
Numerics Tool
HandlerInterface.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <memory>
5 #include <Eigen/Core>
7 
8 namespace NuTo
9 {
10 
11 class CellInterface;
12 
13 namespace Visualize
14 {
15 
16 class UnstructuredGrid;
17 
20 {
21 public:
22  virtual ~HandlerInterface() = default;
23 
24  virtual std::unique_ptr<HandlerInterface> Clone() const = 0;
25 
29  virtual std::vector<int> WriteGeometry(const CellInterface& cell, UnstructuredGrid* grid) = 0;
30 
36  virtual void WriteDofValues(const CellInterface& cell, const DofType dof, std::vector<int> pointIds,
37  UnstructuredGrid* grid) = 0;
38 
44  virtual void CellData(int cellId, std::vector<Eigen::VectorXd> values, std::string name,
45  UnstructuredGrid* grid) = 0;
46 
53  virtual void PointData(const CellInterface& cell, std::function<Eigen::VectorXd(Eigen::VectorXd)> f,
54  std::vector<int> pointIds, std::string name, UnstructuredGrid* grid) = 0;
55 };
56 
57 } // namespace Visualize
58 } // namespace NuTo
virtual void WriteDofValues(const CellInterface &cell, const DofType dof, std::vector< int > pointIds, UnstructuredGrid *grid)=0
Write DOF values into the grid.
Interface for a handler class that visualizes a single cell.
Definition: HandlerInterface.h:19
virtual std::vector< int > WriteGeometry(const CellInterface &cell, UnstructuredGrid *grid)=0
Generate a visualize geometry for each cell and write it to the grid.
virtual void CellData(int cellId, std::vector< Eigen::VectorXd > values, std::string name, UnstructuredGrid *grid)=0
Write cell data into the grid.
visualization of unstructured grids
Definition: UnstructuredGrid.h:18
Definition: DofType.h:8
virtual std::unique_ptr< HandlerInterface > Clone() const =0
virtual void PointData(const CellInterface &cell, std::function< Eigen::VectorXd(Eigen::VectorXd)> f, std::vector< int > pointIds, std::string name, UnstructuredGrid *grid)=0
Write point data into the grid.
virtual ~HandlerInterface()=default
Definition: Exception.h:6
def Visualize(structure, file)
Definition: Truss1D2N.py:63
Definition: CellInterface.h:13