30 #ifndef _LibPhysic_Dof_H
31 #define _LibPhysic_Dof_H
37 #include "GranOO3/3rdParty/Eigen/Dense"
56 static const int N = NUM;
68 Eigen::Map<Eigen::Matrix<double, NUM, 1>>
array()
const;
90 _global_index_for_dof(),
96 template <
int NUM> Eigen::Map<Eigen::Matrix<double, NUM, 1>>
98 return Eigen::Map<Eigen::Matrix<double, NUM, 1>>(_ptr, NUM);
101 template <
int NUM>
int
103 return _global_index_for_dof[d];
106 template <
int NUM>
void
108 _global_index_for_dof[d] = index;
111 template <
int NUM>
unsigned int
116 template <
int NUM>
void
121 template <
int NUM>
void
123 std::fill(_bc_state.begin(), _bc_state.end(), s);
126 template <
int NUM>
void
128 std::fill(_bc_state.begin(), _bc_state.end(),
DOF::FREE);
int get_global_index_for_dof(unsigned int) const
Definition: Dof.hpp:102
std::array< int, NUM > _global_index_for_dof
Definition: Dof.hpp:81
std::array< DOF::State, NUM > DofStateArrayT
Definition: Dof.hpp:62
int _global_index
Definition: Dof.hpp:80
const double *& _ptr
Definition: Dof.hpp:79
void set_bc_state(unsigned int, DOF::State)
Definition: Dof.hpp:117
static const int N
Definition: Dof.hpp:56
unsigned int get_bc_state(unsigned int) const
Definition: Dof.hpp:112
void clear_bc()
Definition: Dof.hpp:127
std::array< int, NUM > DofArrayT
Definition: Dof.hpp:61
void set_global_index_for_dof(unsigned int, unsigned int index)
Definition: Dof.hpp:107
Eigen::Map< Eigen::Matrix< double, NUM, 1 > > array() const
Definition: Dof.hpp:97
std::array< DOF::State,NUM > _bc_state
Definition: Dof.hpp:82
Dof(const double *&)
Definition: Dof.hpp:87
Mecha
Definition: Dof.hpp:45
@ X
Definition: Dof.hpp:45
@ RX
Definition: Dof.hpp:45
@ Y
Definition: Dof.hpp:45
@ RZ
Definition: Dof.hpp:45
@ RY
Definition: Dof.hpp:45
@ Z
Definition: Dof.hpp:45
State
Definition: Dof.hpp:44
@ FIXED
Definition: Dof.hpp:44
@ PRESCRIBED
Definition: Dof.hpp:44
@ FREE
Definition: Dof.hpp:44
Definition: Common.hpp:198