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 (MooseVariableFEBase &, 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 23 of file GrainRigidBodyMotionBase.h.

Constructor & Destructor Documentation

◆ GrainRigidBodyMotionBase()

GrainRigidBodyMotionBase::GrainRigidBodyMotionBase ( const InputParameters &  parameters)

Definition at line 40 of file GrainRigidBodyMotionBase.C.

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

Member Function Documentation

◆ calculateAdvectionVelocity()

virtual void GrainRigidBodyMotionBase::calculateAdvectionVelocity ( )
inlineprotectedvirtual

◆ globalDoFEnabled()

bool GrainRigidBodyMotionBase::globalDoFEnabled ( MooseVariableFEBase &  ,
dof_id_type   
)
protectedvirtual

Definition at line 78 of file GrainRigidBodyMotionBase.C.

79 {
82  return false;
83 
84  return true;
85 }

◆ precalculateJacobian()

void GrainRigidBodyMotionBase::precalculateJacobian ( )
protectedvirtual

Definition at line 94 of file GrainRigidBodyMotionBase.C.

95 {
97 }

◆ precalculateOffDiagJacobian()

void GrainRigidBodyMotionBase::precalculateOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 100 of file GrainRigidBodyMotionBase.C.

101 {
103 }

◆ precalculateResidual()

void GrainRigidBodyMotionBase::precalculateResidual ( )
protectedvirtual

Definition at line 88 of file GrainRigidBodyMotionBase.C.

89 {
91 }

◆ timestepSetup()

void GrainRigidBodyMotionBase::timestepSetup ( )
virtual

Definition at line 72 of file GrainRigidBodyMotionBase.C.

73 {
74  _total_dofs = _subproblem.es().n_dofs();
75 }
unsigned int _total_dofs
get the total no. of dofs in the system

Member Data Documentation

◆ _base_name

std::string GrainRigidBodyMotionBase::_base_name
protected

base name specifying type of force density material

Definition at line 60 of file GrainRigidBodyMotionBase.h.

◆ _c

const VariableValue& GrainRigidBodyMotionBase::_c
protected

Variable value for the concentration.

Definition at line 46 of file GrainRigidBodyMotionBase.h.

◆ _c_dofs

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

local dof indices of variable c

Definition at line 50 of file GrainRigidBodyMotionBase.h.

◆ _c_var

unsigned int GrainRigidBodyMotionBase::_c_var
protected

◆ _grad_c

const VariableGradient& GrainRigidBodyMotionBase::_grad_c
protected

◆ _grad_vals

std::vector<const VariableGradient *> GrainRigidBodyMotionBase::_grad_vals
protected

Definition at line 57 of file GrainRigidBodyMotionBase.h.

Referenced by GrainRigidBodyMotionBase().

◆ _grain_force_c_jacobians

const std::vector<Real>& GrainRigidBodyMotionBase::_grain_force_c_jacobians
protected

◆ _grain_force_eta_jacobians

const std::vector<std::vector<Real> >& GrainRigidBodyMotionBase::_grain_force_eta_jacobians
protected

◆ _grain_force_torque

const GrainForceAndTorqueInterface& GrainRigidBodyMotionBase::_grain_force_torque
protected

getting userobject for calculating grain forces and torques

Definition at line 63 of file GrainRigidBodyMotionBase.h.

◆ _grain_forces

const std::vector<RealGradient>& GrainRigidBodyMotionBase::_grain_forces
protected

◆ _grain_ids

std::vector<unsigned int> GrainRigidBodyMotionBase::_grain_ids
protected

◆ _grain_torques

const std::vector<RealGradient>& GrainRigidBodyMotionBase::_grain_torques
protected

◆ _grain_tracker

const GrainTrackerInterface& GrainRigidBodyMotionBase::_grain_tracker
protected

◆ _grain_volumes

const VectorPostprocessorValue& GrainRigidBodyMotionBase::_grain_volumes
protected

◆ _mr

const Real GrainRigidBodyMotionBase::_mr
protected

◆ _mt

const Real GrainRigidBodyMotionBase::_mt
protected

◆ _op_num

const unsigned int GrainRigidBodyMotionBase::_op_num
protected

◆ _total_dofs

unsigned int GrainRigidBodyMotionBase::_total_dofs
protected

◆ _vals

std::vector<const VariableValue *> GrainRigidBodyMotionBase::_vals
protected

Variable value for the order parameters.

Definition at line 55 of file GrainRigidBodyMotionBase.h.

Referenced by GrainRigidBodyMotionBase().

◆ _vals_var

std::vector<unsigned int> GrainRigidBodyMotionBase::_vals_var
protected

◆ _var_dofs

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

Variable's local dof indices.

Definition at line 41 of file GrainRigidBodyMotionBase.h.

◆ _velocity_advection

RealGradient GrainRigidBodyMotionBase::_velocity_advection
protected

◆ _velocity_advection_jacobian

RealGradient GrainRigidBodyMotionBase::_velocity_advection_jacobian
protected

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