www.mooseframework.org
ConstantGrainForceAndTorque.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 CONSTANTGRAINFORCEANDTORQUE_H
8 #define CONSTANTGRAINFORCEANDTORQUE_H
9 
10 #include "GeneralUserObject.h"
12 
13 // Forward Declarations
15 
16 template <>
18 
22 class ConstantGrainForceAndTorque : public GrainForceAndTorqueInterface, public GeneralUserObject
23 {
24 public:
25  ConstantGrainForceAndTorque(const InputParameters & parameters);
26 
27  virtual void initialize();
28  virtual void execute() {}
29  virtual void finalize() {}
30 
31  virtual const std::vector<RealGradient> & getForceValues() const;
32  virtual const std::vector<RealGradient> & getTorqueValues() const;
33  virtual const std::vector<Real> & getForceCJacobians() const;
34  virtual const std::vector<std::vector<Real>> & getForceEtaJacobians() const;
35 
36 protected:
38  std::vector<Real> _F;
40  std::vector<Real> _M;
41 
42  unsigned int _grain_num;
43  unsigned int _ncomp;
44 
46  std::vector<RealGradient> _force_values;
47  std::vector<RealGradient> _torque_values;
48  std::vector<Real> _c_jacobians;
49  std::vector<std::vector<Real>> _eta_jacobians;
51 };
52 
53 #endif // CONSTANTGRAINFORCEANDTORQUE_H
ConstantGrainForceAndTorque(const InputParameters &parameters)
std::vector< Real > _M
Applied torque on particles, size should be 3 times no. of grains.
virtual const std::vector< RealGradient > & getForceValues() const
This class provides interface for extracting the forces and torques computed in other UserObjects...
This class is here to get the force and torque acting on a grain.
InputParameters validParams< ConstantGrainForceAndTorque >()
std::vector< Real > _F
Applied force on particles, size should be 3 times no. of grains.
std::vector< RealGradient > _torque_values
std::vector< std::vector< Real > > _eta_jacobians
virtual const std::vector< Real > & getForceCJacobians() const
virtual const std::vector< std::vector< Real > > & getForceEtaJacobians() const
std::vector< RealGradient > _force_values
providing grain forces, torques and their jacobians w. r. t c
virtual const std::vector< RealGradient > & getTorqueValues() const