www.mooseframework.org
GrainForceAndTorqueSum.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 GRAINFORCEANDTORQUESUM_H
8 #define GRAINFORCEANDTORQUESUM_H
9 
11 #include "GeneralUserObject.h"
12 
13 // Forward Declarations
15 
16 template <>
17 InputParameters validParams<GrainForceAndTorqueSum>();
18 
23 class GrainForceAndTorqueSum : public GrainForceAndTorqueInterface, public GeneralUserObject
24 {
25 public:
26  GrainForceAndTorqueSum(const InputParameters & parameters);
27 
28  virtual void initialize();
29  virtual void execute(){};
30  virtual void finalize(){};
31 
32  virtual const std::vector<RealGradient> & getForceValues() const;
33  virtual const std::vector<RealGradient> & getTorqueValues() const;
34  virtual const std::vector<Real> & getForceCJacobians() const;
35  virtual const std::vector<std::vector<Real>> & getForceEtaJacobians() const;
36 
37 protected:
39  std::vector<UserObjectName> _sum_objects;
41  unsigned int _num_forces;
42  unsigned int _grain_num;
43 
44  std::vector<const GrainForceAndTorqueInterface *> _sum_forces;
45 
47  std::vector<RealGradient> _force_values;
48  std::vector<RealGradient> _torque_values;
49  std::vector<Real> _c_jacobians;
50  std::vector<std::vector<Real>> _eta_jacobians;
52 };
53 
54 #endif // GRAINFORCEANDTORQUESUM_H
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
std::vector< Real > _c_jacobians
std::vector< const GrainForceAndTorqueInterface * > _sum_forces
This class provides interface for extracting the forces and torques computed in other UserObjects...
GrainForceAndTorqueSum(const InputParameters &parameters)
This class is here to get the force and torque acting on a grain from different userobjects and sum t...
InputParameters validParams< GrainForceAndTorqueSum >()
virtual const std::vector< RealGradient > & getTorqueValues() const
virtual const std::vector< RealGradient > & getForceValues() const
std::vector< UserObjectName > _sum_objects
Vector of userobjects providing forces and torques acting on grains.
std::vector< std::vector< Real > > _eta_jacobians
unsigned int _num_forces
Total no. of userobjects that provides forces and torques acting on grains.
std::vector< RealGradient > _torque_values
virtual const std::vector< Real > & getForceCJacobians() const