20 #ifndef __mast_pressure_load_h__ 21 #define __mast_pressure_load_h__ 29 namespace Elasticity {
31 template <
typename FEVarType,
32 typename PressureFieldType,
33 typename SectionAreaType,
42 using vector_t =
typename Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>;
43 using matrix_t =
typename Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>;
74 const typename FEVarType::fe_shape_deriv_t
77 for (
uint_t i=0; i<fe.n_q_points(); i++) {
82 for (
uint_t j=0; j<Dim; j++) {
88 for (
uint_t k=0; k<fe.n_basis(); k++)
89 res(j*fe.n_basis() + k) -= fe.detJxW(i) * fe.phi(i, k) * p * nj;
96 template <
typename ScalarFieldType>
98 const ScalarFieldType& f,
106 const typename FEVarType::fe_shape_deriv_t
109 for (
uint_t i=0; i<fe.n_q_points(); i++) {
115 for (
uint_t j=0; j<Dim; j++) {
121 for (
uint_t k=0; k<fe.n_basis(); k++)
122 res(j*fe.n_basis() + k) -= fe.detJxW(i) * fe.phi(i, k) * p * nj;
141 #endif // __mast_pressure_load_h__ void set_section_area(const SectionAreaType &s)
typename FEVarType::scalar_t scalar_t
const SectionAreaType * _section
const PressureFieldType * _pressure
void compute(ContextType &c, vector_t &res, matrix_t *jac=nullptr) const
void derivative(ContextType &c, const ScalarFieldType &f, vector_t &res, matrix_t *jac=nullptr) const
void set_pressure(const PressureFieldType &p)
virtual ~SurfacePressureLoad()
typename FEVarType::fe_shape_deriv_t::scalar_t basis_scalar_t
#define Assert0(cond, msg)
typename Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > vector_t
const FEVarType * _fe_var_data
void set_fe_var_data(const FEVarType &fe)
typename Eigen::Matrix< scalar_t, Eigen::Dynamic, Eigen::Dynamic > matrix_t