www.mooseframework.org
ComputeGrainForceAndTorque.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #ifndef COMPUTEGRAINFORCEANDTORQUE_H
8 #define COMPUTEGRAINFORCEANDTORQUE_H
9 
10 #include "ShapeElementUserObject.h"
12 #include "DerivativeMaterialInterface.h"
13 
14 // Forward Declarations
17 
18 template <>
20 
24 class ComputeGrainForceAndTorque : public DerivativeMaterialInterface<ShapeElementUserObject>,
26 {
27 public:
28  ComputeGrainForceAndTorque(const InputParameters & parameters);
29 
30  virtual void initialize();
31  virtual void execute();
32  virtual void executeJacobian(unsigned int jvar);
33  virtual void finalize();
34  virtual void threadJoin(const UserObject & y);
35 
36  virtual const std::vector<RealGradient> & getForceValues() const;
37  virtual const std::vector<RealGradient> & getTorqueValues() const;
38  virtual const std::vector<Real> & getForceCJacobians() const;
39  virtual const std::vector<std::vector<Real>> & getForceEtaJacobians() const;
40 
41 protected:
42  unsigned int _qp;
43 
44  VariableName _c_name;
45  unsigned int _c_var;
47  MaterialPropertyName _dF_name;
48  const MaterialProperty<std::vector<RealGradient>> & _dF;
50  const MaterialProperty<std::vector<RealGradient>> & _dFdc;
52  unsigned int _op_num;
55  unsigned int _grain_num;
56  unsigned int _ncomp;
57 
58  std::vector<unsigned int> _vals_var;
59  std::vector<VariableName> _vals_name;
60  std::vector<const MaterialProperty<std::vector<Real>> *> _dFdgradeta;
61  std::vector<const MaterialProperty<Real> *> _test_derivatives;
62 
64  std::vector<RealGradient> _force_values;
65  std::vector<RealGradient> _torque_values;
66 
68  std::vector<Real> _force_torque_store;
70  std::vector<Real> _force_torque_c_jacobian_store;
71  std::vector<std::vector<Real>> _force_torque_eta_jacobian_store;
72 
73  unsigned int _total_dofs;
74 };
75 
76 #endif // COMPUTEGRAINFORCEANDTORQUE_H
const GrainTrackerInterface & _grain_tracker
provide UserObject for calculating grain volumes and centers
ComputeGrainForceAndTorque(const InputParameters &parameters)
std::vector< Real > _force_torque_c_jacobian_store
vector storing jacobian of grain force and torque values
std::vector< const MaterialProperty< Real > * > _test_derivatives
This class defines the interface for the GrainTracking objects.
This class provides interface for extracting the forces and torques computed in other UserObjects...
std::vector< RealGradient > _force_values
providing grain forces, torques and their jacobians w. r. t c
InputParameters validParams< ComputeGrainForceAndTorque >()
virtual void executeJacobian(unsigned int jvar)
std::vector< std::vector< Real > > _force_torque_eta_jacobian_store
const MaterialProperty< std::vector< RealGradient > > & _dF
virtual void threadJoin(const UserObject &y)
std::vector< RealGradient > _torque_values
std::vector< const MaterialProperty< std::vector< Real > > * > _dFdgradeta
This class is here to get the force and torque acting on a grain.
virtual const std::vector< std::vector< Real > > & getForceEtaJacobians() const
virtual const std::vector< RealGradient > & getTorqueValues() const
virtual const std::vector< RealGradient > & getForceValues() const
std::vector< unsigned int > _vals_var
MaterialPropertyName _dF_name
material property that provides force density
unsigned int _op_num
no. of order parameters
const MaterialProperty< std::vector< RealGradient > > & _dFdc
material property that provides jacobian of force density with respect to c
std::vector< VariableName > _vals_name
virtual const std::vector< Real > & getForceCJacobians() const
std::vector< Real > _force_torque_store
vector storing grain force and torque values