PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
Level.h
1#ifndef PBAT_SIM_VBD_MULTIGRID_LEVEL_H
2#define PBAT_SIM_VBD_MULTIGRID_LEVEL_H
3
4#include "HyperReduction.h"
5#include "pbat/Aliases.h"
6#include "pbat/sim/vbd/Data.h"
7#include "pbat/sim/vbd/Mesh.h"
8
9namespace pbat {
10namespace sim {
11namespace vbd {
12namespace multigrid {
13
14struct Level
15{
21 Level(Data const& data, VolumeMesh mesh);
26 void Prolong(Data& data) const;
33 void Smooth(Scalar dt, Index iters, Data& data);
39 void Reduce(Data const& data);
40
44 VolumeMesh mesh;
48
49 using BoolVector = Eigen::Vector<bool, Eigen::Dynamic>;
50
60
66 IndexVectorX GKptr, GKadj, GKilocal;
67
72
76 IndexVectorX GCFptr, GCFadj, GCFrank, GCFparent;
77 // HyperReduction HR; ///< Energy hyper reduction scheme
78};
79
80} // namespace multigrid
81} // namespace vbd
82} // namespace sim
83} // namespace pbat
84
85#endif // PBAT_SIM_VBD_MULTIGRID_LEVEL_H
PBAT's Vertex Block Descent (VBD) anka2024vbd API.
Definition AndersonIntegrator.cpp:10
PBAT simulation algorithms.
The main namespace of the library.
Definition Aliases.h:15
Eigen::Vector< Index, Eigen::Dynamic > IndexVectorX
Dynamic-size index vector type.
Definition Aliases.h:49
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic-size matrix type.
Definition Aliases.h:34
std::ptrdiff_t Index
Index type.
Definition Aliases.h:17
Eigen::Matrix< Index, Eigen::Dynamic, Eigen::Dynamic > IndexMatrixX
Dynamic-size index matrix type.
Definition Aliases.h:50
double Scalar
Scalar type.
Definition Aliases.h:18
VBD simulation configuration.
Definition Data.h:15
MatrixX NecVE
4x|4*#fine elems| coarse element shape functions at 4 vertices of fine elements
Definition Level.h:56
Level(Data const &data, VolumeMesh mesh)
Definition Level.cpp:29
void Reduce(Data const &data)
Definition Level.cpp:252
IndexVectorX GEadj
Coarse vertex -> fine element adjacency graph.
Definition Level.h:59
IndexVectorX GCFptr
Definition Level.h:76
IndexVectorX GKilocal
Coarse vertex -> fine vertex adjacency graph.
Definition Level.h:66
IndexMatrixX ilocalE
Definition Level.h:57
void Smooth(Scalar dt, Index iters, Data &data)
Definition Level.cpp:223
void Prolong(Data &data) const
Definition Level.cpp:212
IndexVectorX Padj
Parallel vertex partitions.
Definition Level.h:47
MatrixX u
3x|#cage verts| coarse displacement coefficients
Definition Level.h:45
MatrixX NecK
4x|#fine vertices| coarse element shape functions at fine vertices
Definition Level.h:65
VolumeMesh mesh
Coarse FEM mesh.
Definition Level.h:44
IndexVectorX GCFparent
Coarse element -> fine element adjacency graph.
Definition Level.h:76
IndexMatrixX ecVE
4x|#fine elems| coarse elements containing 4 vertices of fine elements
Definition Level.h:54
IndexVectorX ecK
|#fine vertices| coarse elements containing fine vertices
Definition Level.h:64
IndexVectorX colors
Coarse vertex graph coloring.
Definition Level.h:46
BoolVector bIsDirichletVertex
Definition Level.h:71