18#ifndef NODE_HELPER_HPP
19#define NODE_HELPER_HPP
28template<
DOF... D> vec
get_trial_position(
const shared_ptr<Node>&) {
throw std::logic_error(
"not implemented"); }
38template<
DOF... D> vec
get_trial_velocity(
const shared_ptr<Node>&) {
throw std::logic_error(
"not implemented"); }
44template<
DOF... D> vec
get_incre_velocity(
const shared_ptr<Node>&) {
throw std::logic_error(
"not implemented"); }
49 auto& t_dof = t_node->get_dof_identifier();
50 return !t_dof.empty() && t_dof.at(0) ==
DOF::U1;
54 auto& t_dof = t_node->get_dof_identifier();
55 return t_dof.size() > 1 && t_dof.at(0) ==
DOF::U1 && t_dof.at(1) ==
DOF::U2;
59 auto& t_dof = t_node->get_dof_identifier();
60 return t_dof.size() > 2 && t_dof.at(0) ==
DOF::U1 && t_dof.at(1) ==
DOF::U2 && t_dof.at(2) ==
DOF::U3;
64 vec t_vec = t_node->get_current_displacement().head(1);
65 if(
auto& t_coor = t_node->get_coordinate(); !t_coor.empty()) t_vec(0) += t_coor(0);
70 vec t_vec = t_node->get_trial_displacement().head(1);
71 if(
auto& t_coor = t_node->get_coordinate(); !t_coor.empty()) t_vec(0) += t_coor(0);
94 const auto& t_coor = t_node->get_coordinate();
95 vec t_vec = t_node->get_current_displacement().head(2);
96 for(
auto I = 0llu; I < std::min(2llu, t_coor.n_elem); ++I) t_vec(I) += t_coor(I);
101 const auto& t_coor = t_node->get_coordinate();
102 vec t_vec = t_node->get_trial_displacement().head(2);
103 for(
auto I = 0llu; I < std::min(2llu, t_coor.n_elem); ++I) t_vec(I) += t_coor(I);
126 const auto& t_coor = t_node->get_coordinate();
127 vec t_vec = t_node->get_current_displacement().head(3);
128 for(
auto I = 0llu; I < std::min(3llu, t_coor.n_elem); ++I) t_vec(I) += t_coor(I);
133 const auto& t_coor = t_node->get_coordinate();
134 vec t_vec = t_node->get_trial_displacement().head(3);
135 for(
auto I = 0llu; I < std::min(3llu, t_coor.n_elem); ++I) t_vec(I) += t_coor(I);
vec get_current_displacement(const shared_ptr< Node > &)
Definition NodeHelper.hpp:30
vec get_current_displacement< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:139
bool check_dof_definition< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:58
vec get_incre_displacement< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:87
vec get_trial_displacement< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:145
vec get_incre_velocity< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:89
vec get_incre_acceleration< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:123
vec get_current_acceleration(const shared_ptr< Node > &)
Definition NodeHelper.hpp:34
vec get_trial_acceleration< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:117
vec get_trial_displacement< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:113
vec get_trial_velocity< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:147
vec get_incre_acceleration< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:155
vec get_current_acceleration< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:143
vec get_incre_velocity< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:121
vec get_trial_position< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:100
vec get_current_velocity(const shared_ptr< Node > &)
Definition NodeHelper.hpp:32
vec get_current_velocity< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:77
vec get_trial_velocity< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:115
vec get_current_acceleration< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:79
vec get_trial_acceleration< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:149
vec get_trial_velocity< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:83
vec get_incre_velocity(const shared_ptr< Node > &)
Definition NodeHelper.hpp:44
vec get_incre_displacement(const shared_ptr< Node > &)
Definition NodeHelper.hpp:42
bool check_dof_definition(const shared_ptr< Node > &)
Definition NodeHelper.hpp:24
vec get_current_acceleration< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:111
vec get_current_position< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:93
vec get_current_position(const shared_ptr< Node > &)
Definition NodeHelper.hpp:26
vec get_current_position< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:63
vec get_current_displacement< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:75
vec get_incre_acceleration(const shared_ptr< Node > &)
Definition NodeHelper.hpp:46
vec get_incre_displacement< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:119
bool check_dof_definition< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:48
vec get_current_velocity< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:141
vec get_incre_acceleration< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:91
vec get_trial_position< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:69
vec get_trial_acceleration(const shared_ptr< Node > &)
Definition NodeHelper.hpp:40
vec get_trial_position(const shared_ptr< Node > &)
Definition NodeHelper.hpp:28
vec get_current_position< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:125
bool check_dof_definition< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:53
vec get_trial_displacement< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:81
vec get_current_displacement< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:107
vec get_trial_position< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:132
vec get_incre_displacement< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:151
vec get_trial_acceleration< DOF::U1 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:85
vec get_current_velocity< DOF::U1, DOF::U2 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:109
vec get_incre_velocity< DOF::U1, DOF::U2, DOF::U3 >(const shared_ptr< Node > &t_node)
Definition NodeHelper.hpp:153
vec get_trial_velocity(const shared_ptr< Node > &)
Definition NodeHelper.hpp:38
vec get_trial_displacement(const shared_ptr< Node > &)
Definition NodeHelper.hpp:36