www.mooseframework.org
GrainRigidBodyMotionBase.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 GRAINRIGIDBODYMOTIONBASE_H
8 #define GRAINRIGIDBODYMOTIONBASE_H
9 
10 #include "NonlocalKernel.h"
12 
13 // Forward Declarations
16 
17 template <>
19 
20 class GrainRigidBodyMotionBase : public NonlocalKernel
21 
22 {
23 public:
24  GrainRigidBodyMotionBase(const InputParameters & parameters);
25 
26  virtual void timestepSetup();
27 
28 protected:
29  virtual bool globalDoFEnabled(MooseVariable & /*var*/, dof_id_type /*dof_index*/);
30 
31  virtual void precalculateResidual();
32  virtual void precalculateJacobian();
33  virtual void precalculateOffDiagJacobian(unsigned int jvar);
34 
35  virtual void calculateAdvectionVelocity() {}
36 
38  const std::vector<dof_id_type> & _var_dofs;
39 
41  unsigned int _c_var;
43  const VariableValue & _c;
45  const VariableGradient & _grad_c;
47  const std::vector<dof_id_type> & _c_dofs;
48 
50  const unsigned int _op_num;
52  std::vector<const VariableValue *> _vals;
53  std::vector<unsigned int> _vals_var;
54  std::vector<const VariableGradient *> _grad_vals;
55 
57  std::string _base_name;
58 
61  const std::vector<RealGradient> & _grain_forces;
62  const std::vector<RealGradient> & _grain_torques;
63  const std::vector<Real> & _grain_force_c_jacobians;
64  const std::vector<std::vector<Real>> & _grain_force_eta_jacobians;
65 
67  const Real _mt;
69  const Real _mr;
70 
73 
75  const VectorPostprocessorValue & _grain_volumes;
76 
78  unsigned int _total_dofs;
79 
81  RealGradient _velocity_advection;
84  std::vector<unsigned int> _grain_ids;
85 };
86 
87 #endif // GRAINRIGIDBODYMOTIONBASE_H
virtual void precalculateOffDiagJacobian(unsigned int jvar)
std::string _base_name
base name specifying type of force density material
const unsigned int _op_num
no. of order parameters
GrainRigidBodyMotionBase(const InputParameters &parameters)
This class defines the interface for the GrainTracking objects.
This class provides interface for extracting the forces and torques computed in other UserObjects...
RealGradient _velocity_advection
storing the advection velocity and corresponding jacobian entries calculated in userobjects ...
const std::vector< dof_id_type > & _var_dofs
Variable&#39;s local dof indices.
const Real _mr
constant value corresponding to grain rotation
const VariableGradient & _grad_c
Variable gradient for the concentration.
std::vector< unsigned int > _grain_ids
obtain the active grain ids
const GrainForceAndTorqueInterface & _grain_force_torque
getting userobject for calculating grain forces and torques
const std::vector< std::vector< Real > > & _grain_force_eta_jacobians
const VectorPostprocessorValue & _grain_volumes
The grain volumes.
const std::vector< RealGradient > & _grain_torques
const std::vector< RealGradient > & _grain_forces
std::vector< unsigned int > _vals_var
unsigned int _total_dofs
get the total no. of dofs in the system
const VariableValue & _c
Variable value for the concentration.
const GrainTrackerInterface & _grain_tracker
grain tracker object
virtual bool globalDoFEnabled(MooseVariable &, dof_id_type)
const std::vector< dof_id_type > & _c_dofs
local dof indices of variable c
unsigned int _c_var
int label for the Concentration
const Real _mt
constant value corresponding to grain translation
std::vector< const VariableValue * > _vals
Variable value for the order parameters.
InputParameters validParams< GrainRigidBodyMotionBase >()
std::vector< const VariableGradient * > _grad_vals
const std::vector< Real > & _grain_force_c_jacobians