20 #ifndef __mast_linear_continuum_stress_h__ 21 #define __mast_linear_continuum_stress_h__ 28 namespace Elasticity {
29 namespace LinearContinuum {
32 template <
typename FEVarType,
33 typename MaterialPropertyType,
89 template <
typename AccessorType>
92 AccessorType &stress)
const {
99 "Incorrect stress vector dimension");
101 const typename FEVarType::fe_shape_deriv_t
104 Assert2(c.qp < fe.n_q_points(),
105 c.qp, fe.n_q_points(),
106 "Invalid quadrature point index");
108 typename Eigen::Matrix<scalar_t, n_strain, 1>
111 typename MaterialPropertyType::value_t
125 stress = m * epsilon;
129 template <
typename AccessorType,
typename ScalarFieldType>
131 const ScalarFieldType &f,
132 AccessorType &dstress)
const {
140 "Incorrect stress vector dimension");
142 const typename FEVarType::fe_shape_deriv_t
145 Assert2(c.qp < fe.n_q_points(),
146 c.qp, fe.n_q_points(),
147 "Invalid quadrature point index");
149 typename Eigen::Matrix<scalar_t, n_strain, 1>
153 typename MaterialPropertyType::value_t
173 dstress = dm * epsilon + m * depsilon;
177 template <
typename AccessorType>
179 AccessorType &stress_adj)
const {
184 const typename FEVarType::fe_shape_deriv_t
187 Assert2(c.qp < fe.n_q_points(),
188 c.qp, fe.n_q_points(),
189 "Invalid quadrature point index");
193 "Incorrect stress adjoint accessor rows");
195 Assert2(stress_adj.cols() == 2*fe.n_basis(),
196 stress_adj.cols(), 2*fe.n_basis(),
197 "Incorrect stress adjoint accessor rows");
200 typename Eigen::Matrix<scalar_t, n_strain, 1>
203 typename MaterialPropertyType::value_t
232 #endif // __mast_linear_continuum_stress_h__ typename FEVarType::scalar_t var_scalar_t
const FEVarType * _sens_fe_var_data
typename FEVarType::scalar_t scalar_t
void derivative(ContextType &c, const ScalarFieldType &f, AccessorType &dstress) const
typename FEVarType::fe_shape_deriv_t::scalar_t nodal_scalar_t
const FEVarType * _fe_var_data
const MaterialPropertyType * _property
void set_section_property(const MaterialPropertyType &p)
void left_multiply(T1 &r, const T2 &m) const
[R] = [M] * [this]
std::enable_if< Dim==2, void >::type strain(const FEVarType &fe_var, const uint_t qp, typename Eigen::Matrix< VarScalarType, 3, 1 > &epsilon, MAST::Numerics::FEMOperatorMatrix< NodalScalarType > &Bmat)
void set_fe_var_data(const FEVarType &fe_data)
sens_fe_data provides the solution
#define Assert0(cond, msg)
#define Assert2(cond, v1, v2, msg)
static const uint_t n_strain
void set_fe_var_sensitivity_data(const FEVarType &sens_fe_data)
sens_fe_data provides the sensitivity of solution
void adjoint_derivative(ContextType &c, AccessorType &stress_adj) const
void reinit(uint_t n_interpolated_vars, uint_t n_discrete_vars, uint_t n_discrete_dofs_per_var)
this initializes the operator for number of rows and variables, assuming that all variables has the s...
void compute(ContextType &c, AccessorType &stress) const