20 #ifndef __mast_libmesh_material_point_output_derivative_h__ 21 #define __mast_libmesh_material_point_output_derivative_h__ 31 #include <libmesh/nonlinear_implicit_system.h> 32 #include <libmesh/dof_map.h> 38 namespace libMeshWrapper {
44 template <
typename ScalarType,
51 "Scalar type of assembly and element operations must be same");
61 template <
typename VecType,
63 typename IndexingType,
67 const IndexingType &index,
68 const StorageType &stress,
76 sol_accessor(*c.sys, X);
78 using elem_vector_t =
typename ElemOpsType::vector_t;
82 libMesh::MeshBase::const_element_iterator
83 el = c.mesh->active_local_elements_begin(),
84 end_el = c.mesh->active_local_elements_end();
86 for ( ; el != end_el; ++el) {
91 sol_accessor.
init(*c.elem);
93 dqdX_e.setZero(sol_accessor.
n_dofs());
96 _e_ops->derivativeX(c, sol_accessor, index, stress, dqdX_e);
101 <ScalarType, VecType, elem_vector_t>
102 (dqdX, c.sys->get_dof_map(), sol_accessor.
dof_indices(), dqdX_e);
120 #endif // __mast_libmesh_material_point_output_derivative_h__ void set_elem_ops(ElemOpsType &e_ops)
virtual ~MaterialPointOutputDerivative()
void init(const libMesh::Elem &e)
void finalize(ValType &m)
const std::vector< libMesh::dof_id_type > & dof_indices() const
MaterialPointOutputDerivative()
std::enable_if< Dim< 3, ScalarType >::typesource_load_multiplier(const SourceLoadFieldType *f, const SectionAreaType *s, ContextType &c) { Assert0(f, "Invalid pointer");Assert0(s, "Invalid pointer");return f-> value(c) *s -> value(c)
std::enable_if< std::is_same< ScalarType, real_t >::value, void >::type constrain_and_add_vector(VecType &v, const libMesh::DofMap &dof_map, std::vector< libMesh::dof_id_type > &dof_indices, SubVecType &v_sub)
void assemble(ContextType &c, const VecType &X, const IndexingType &index, const StorageType &stress, VecType &dqdX)
provides a method for global assembly of derivative of output functional with respect to the solution...