www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GrainRigidBodyMotionBase Class Reference

#include <GrainRigidBodyMotionBase.h>

Inheritance diagram for GrainRigidBodyMotionBase:
[legend]

Public Member Functions

 GrainRigidBodyMotionBase (const InputParameters &parameters)
 
virtual void timestepSetup ()
 

Protected Member Functions

virtual bool globalDoFEnabled (MooseVariable &, dof_id_type)
 
virtual void precalculateResidual ()
 
virtual void precalculateJacobian ()
 
virtual void precalculateOffDiagJacobian (unsigned int jvar)
 
virtual void calculateAdvectionVelocity ()
 

Protected Attributes

const std::vector< dof_id_type > & _var_dofs
 Variable's local dof indices. More...
 
unsigned int _c_var
 int label for the Concentration More...
 
const VariableValue & _c
 Variable value for the concentration. More...
 
const VariableGradient & _grad_c
 Variable gradient for the concentration. More...
 
const std::vector< dof_id_type > & _c_dofs
 local dof indices of variable c More...
 
const unsigned int _op_num
 no. of order parameters More...
 
std::vector< const VariableValue * > _vals
 Variable value for the order parameters. More...
 
std::vector< unsigned int > _vals_var
 
std::vector< const VariableGradient * > _grad_vals
 
std::string _base_name
 base name specifying type of force density material More...
 
const GrainForceAndTorqueInterface_grain_force_torque
 getting userobject for calculating grain forces and torques More...
 
const std::vector< RealGradient > & _grain_forces
 
const std::vector< RealGradient > & _grain_torques
 
const std::vector< Real > & _grain_force_c_jacobians
 
const std::vector< std::vector< Real > > & _grain_force_eta_jacobians
 
const Real _mt
 constant value corresponding to grain translation More...
 
const Real _mr
 constant value corresponding to grain rotation More...
 
const GrainTrackerInterface_grain_tracker
 grain tracker object More...
 
const VectorPostprocessorValue & _grain_volumes
 The grain volumes. More...
 
unsigned int _total_dofs
 get the total no. of dofs in the system More...
 
RealGradient _velocity_advection
 storing the advection velocity and corresponding jacobian entries calculated in userobjects More...
 
RealGradient _velocity_advection_jacobian
 
std::vector< unsigned int > _grain_ids
 obtain the active grain ids More...
 

Detailed Description

Definition at line 20 of file GrainRigidBodyMotionBase.h.

Constructor & Destructor Documentation

GrainRigidBodyMotionBase::GrainRigidBodyMotionBase ( const InputParameters &  parameters)

Definition at line 37 of file GrainRigidBodyMotionBase.C.

38  : NonlocalKernel(parameters),
39  _var_dofs(_var.dofIndices()),
40  _c_var(coupled("c")),
41  _c(coupledValue("c")),
42  _grad_c(coupledGradient("c")),
43  _c_dofs(getVar("c", 0)->dofIndices()),
44  _op_num(coupledComponents("v")),
45  _vals(_op_num),
48  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
49  _grain_force_torque(getUserObject<GrainForceAndTorqueInterface>("grain_force")),
54  _mt(getParam<Real>("translation_constant")),
55  _mr(getParam<Real>("rotation_constant")),
56  _grain_tracker(getUserObject<GrainTrackerInterface>("grain_tracker_object")),
57  _grain_volumes(getVectorPostprocessorValue("grain_volumes", "feature_volumes"))
58 {
59  // Loop through grains and load coupled variables into the arrays
60  for (unsigned int i = 0; i < _op_num; ++i)
61  {
62  _vals[i] = &coupledValue("v", i);
63  _vals_var[i] = coupled("v", i);
64  _grad_vals[i] = &coupledGradient("v", i);
65  }
66 }
std::string _base_name
base name specifying type of force density material
const unsigned int _op_num
no. of order parameters
virtual const std::vector< std::vector< Real > > & getForceEtaJacobians() const =0
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.
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
const VariableValue & _c
Variable value for the concentration.
const GrainTrackerInterface & _grain_tracker
grain tracker object
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
virtual const std::vector< Real > & getForceCJacobians() const =0
virtual const std::vector< RealGradient > & getTorqueValues() const =0
std::vector< const VariableValue * > _vals
Variable value for the order parameters.
virtual const std::vector< RealGradient > & getForceValues() const =0
std::vector< const VariableGradient * > _grad_vals
const std::vector< Real > & _grain_force_c_jacobians

Member Function Documentation

virtual void GrainRigidBodyMotionBase::calculateAdvectionVelocity ( )
inlineprotectedvirtual
bool GrainRigidBodyMotionBase::globalDoFEnabled ( MooseVariable &  ,
dof_id_type   
)
protectedvirtual

Definition at line 75 of file GrainRigidBodyMotionBase.C.

76 {
79  return false;
80 
81  return true;
82 }
void GrainRigidBodyMotionBase::precalculateJacobian ( )
protectedvirtual

Definition at line 91 of file GrainRigidBodyMotionBase.C.

92 {
94 }
void GrainRigidBodyMotionBase::precalculateOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 97 of file GrainRigidBodyMotionBase.C.

98 {
100 }
void GrainRigidBodyMotionBase::precalculateResidual ( )
protectedvirtual

Definition at line 85 of file GrainRigidBodyMotionBase.C.

86 {
88 }
void GrainRigidBodyMotionBase::timestepSetup ( )
virtual

Definition at line 69 of file GrainRigidBodyMotionBase.C.

70 {
71  _total_dofs = _subproblem.es().n_dofs();
72 }
unsigned int _total_dofs
get the total no. of dofs in the system

Member Data Documentation

std::string GrainRigidBodyMotionBase::_base_name
protected

base name specifying type of force density material

Definition at line 57 of file GrainRigidBodyMotionBase.h.

const VariableValue& GrainRigidBodyMotionBase::_c
protected

Variable value for the concentration.

Definition at line 43 of file GrainRigidBodyMotionBase.h.

const std::vector<dof_id_type>& GrainRigidBodyMotionBase::_c_dofs
protected

local dof indices of variable c

Definition at line 47 of file GrainRigidBodyMotionBase.h.

unsigned int GrainRigidBodyMotionBase::_c_var
protected
const VariableGradient& GrainRigidBodyMotionBase::_grad_c
protected
std::vector<const VariableGradient *> GrainRigidBodyMotionBase::_grad_vals
protected

Definition at line 54 of file GrainRigidBodyMotionBase.h.

Referenced by GrainRigidBodyMotionBase().

const std::vector<Real>& GrainRigidBodyMotionBase::_grain_force_c_jacobians
protected
const std::vector<std::vector<Real> >& GrainRigidBodyMotionBase::_grain_force_eta_jacobians
protected
const GrainForceAndTorqueInterface& GrainRigidBodyMotionBase::_grain_force_torque
protected

getting userobject for calculating grain forces and torques

Definition at line 60 of file GrainRigidBodyMotionBase.h.

const std::vector<RealGradient>& GrainRigidBodyMotionBase::_grain_forces
protected
std::vector<unsigned int> GrainRigidBodyMotionBase::_grain_ids
protected
const std::vector<RealGradient>& GrainRigidBodyMotionBase::_grain_torques
protected
const GrainTrackerInterface& GrainRigidBodyMotionBase::_grain_tracker
protected
const VectorPostprocessorValue& GrainRigidBodyMotionBase::_grain_volumes
protected
const Real GrainRigidBodyMotionBase::_mr
protected
const Real GrainRigidBodyMotionBase::_mt
protected
const unsigned int GrainRigidBodyMotionBase::_op_num
protected
unsigned int GrainRigidBodyMotionBase::_total_dofs
protected
std::vector<const VariableValue *> GrainRigidBodyMotionBase::_vals
protected

Variable value for the order parameters.

Definition at line 52 of file GrainRigidBodyMotionBase.h.

Referenced by GrainRigidBodyMotionBase().

std::vector<unsigned int> GrainRigidBodyMotionBase::_vals_var
protected
const std::vector<dof_id_type>& GrainRigidBodyMotionBase::_var_dofs
protected

Variable's local dof indices.

Definition at line 38 of file GrainRigidBodyMotionBase.h.

RealGradient GrainRigidBodyMotionBase::_velocity_advection
protected
RealGradient GrainRigidBodyMotionBase::_velocity_advection_jacobian
protected

The documentation for this class was generated from the following files: