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

Keeps track of stuff related to assembling. More...

#include <Assembly.h>

Classes

class  FEShapeData
 
class  VectorFEShapeData
 

Public Member Functions

 Assembly (SystemBase &sys, THREAD_ID tid)
 
virtual ~Assembly ()
 
void buildFE (FEType type)
 Build FEs with a type. More...
 
void buildFaceFE (FEType type)
 Build FEs for a face with a type. More...
 
void buildNeighborFE (FEType type)
 Build FEs for a neighbor with a type. More...
 
void buildFaceNeighborFE (FEType type)
 Build FEs for a neighbor face with a type. More...
 
void buildVectorFE (FEType type)
 Build Vector FEs with a type. More...
 
void buildVectorFaceFE (FEType type)
 Build Vector FEs for a face with a type. More...
 
void buildVectorNeighborFE (FEType type)
 Build Vector FEs for a neighbor with a type. More...
 
void buildVectorFaceNeighborFE (FEType type)
 Build Vector FEs for a neighbor face with a type. More...
 
FEBase *& getFE (FEType type, unsigned int dim)
 Get a reference to a pointer that will contain the current volume FE. More...
 
FEBase *& getFENeighbor (FEType type, unsigned int dim)
 Get a reference to a pointer that will contain the current 'neighbor' FE. More...
 
FEBase *& getFEFace (FEType type, unsigned int dim)
 Get a reference to a pointer that will contain the current "face" FE. More...
 
FEBase *& getFEFaceNeighbor (FEType type, unsigned int dim)
 Get a reference to a pointer that will contain the current "neighbor" FE. More...
 
FEVectorBase *& getVectorFE (FEType type, unsigned int dim)
 Get a reference to a pointer that will contain the current volume FEVector. More...
 
FEVectorBase *& getVectorFENeighbor (FEType type, unsigned int dim)
 GetVector a reference to a pointer that will contain the current 'neighbor' FE. More...
 
FEVectorBase *& getVectorFEFace (FEType type, unsigned int dim)
 GetVector a reference to a pointer that will contain the current "face" FE. More...
 
FEVectorBase *& getVectorFEFaceNeighbor (FEType type, unsigned int dim)
 GetVector a reference to a pointer that will contain the current "neighbor" FE. More...
 
QBase *& qRule ()
 Returns the reference to the current quadrature being used. More...
 
const MooseArray< Point > & qPoints ()
 Returns the reference to the quadrature points. More...
 
const MooseArray< Point > & physicalPoints ()
 The current points in physical space where we have reinited through reinitAtPhysical() More...
 
const MooseArray< Real > & JxW ()
 Returns the reference to the transformed jacobian weights. More...
 
const MooseArray< Real > & coordTransformation ()
 Returns the reference to the coordinate transformation coefficients. More...
 
const Moose::CoordinateSystemTypecoordSystem ()
 Get the coordinate system type. More...
 
QBase *& qRuleFace ()
 Returns the reference to the current quadrature being used on a current face. More...
 
const MooseArray< Point > & qPointsFace ()
 Returns the reference to the current quadrature being used. More...
 
const MooseArray< Real > & JxWFace ()
 Returns the reference to the transformed jacobian weights on a current face. More...
 
const MooseArray< Point > & normals ()
 Returns the array of normals for quadrature points on a current side. More...
 
const Elem *& elem ()
 Return the current element. More...
 
const SubdomainIDcurrentSubdomainID () const
 Return the current subdomain ID. More...
 
void setCurrentSubdomainID (SubdomainID i)
 set the current subdomain ID More...
 
const Real & elemVolume ()
 Returns the reference to the current element volume. More...
 
unsigned int & side ()
 Returns the current side. More...
 
unsigned int & neighborSide ()
 Returns the current neighboring side. More...
 
const Elem *& sideElem ()
 Returns the side element. More...
 
const Real & sideElemVolume ()
 Returns the reference to the volume of current side element. More...
 
const Elem *& neighbor ()
 Return the neighbor element. More...
 
const SubdomainIDcurrentNeighborSubdomainID () const
 Return the current subdomain ID. More...
 
void setCurrentNeighborSubdomainID (SubdomainID i)
 set the current subdomain ID More...
 
const Real & neighborVolume ()
 Returns the reference to the current neighbor volume. More...
 
QBase *& qRuleNeighbor ()
 Returns the reference to the current quadrature being used on a current neighbor. More...
 
const MooseArray< Real > & JxWNeighbor ()
 Returns the reference to the transformed jacobian weights on a current face. More...
 
const Node *& node ()
 Returns the reference to the node. More...
 
const Node *& nodeNeighbor ()
 Returns the reference to the neighboring node. More...
 
void createQRules (QuadratureType type, Order order, Order volume_order, Order face_order)
 Creates the volume, face and arbitrary qrules based on the orders passed in. More...
 
void setVolumeQRule (QBase *qrule, unsigned int dim)
 Set the qrule to be used for volume integration. More...
 
void setFaceQRule (QBase *qrule, unsigned int dim)
 Set the qrule to be used for face integration. More...
 
void setNeighborQRule (QBase *qrule, unsigned int dim)
 Set the qrule to be used for neighbor integration. More...
 
void reinit (const Elem *elem)
 Reinitialize objects (JxW, q_points, ...) for an elements. More...
 
void reinitAtPhysical (const Elem *elem, const std::vector< Point > &physical_points)
 Reinitialize the assembly data at specific physical point in the given element. More...
 
void reinit (const Elem *elem, const std::vector< Point > &reference_points)
 Reinitialize the assembly data at specific points in the reference element. More...
 
void reinit (const Elem *elem, unsigned int side)
 Reinitialize the assembly data on an side of an element. More...
 
void reinitElemAndNeighbor (const Elem *elem, unsigned int side, const Elem *neighbor, unsigned int neighbor_side)
 Reinitialize an element and its neighbor along a particular side. More...
 
void reinitNeighborAtPhysical (const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points)
 Reinitializes the neighbor at the physical coordinates on neighbor side given. More...
 
void reinitNeighborAtPhysical (const Elem *neighbor, const std::vector< Point > &physical_points)
 Reinitializes the neighbor at the physical coordinates within element given. More...
 
void reinitNeighbor (const Elem *neighbor, const std::vector< Point > &reference_points)
 
void reinit (const Node *node)
 Reinitialize assembly data for a node. More...
 
void init (const CouplingMatrix *cm)
 Initialize the Assembly object and set the CouplingMatrix for use throughout. More...
 
void init ()
 Deprecated init method. More...
 
void initNonlocalCoupling ()
 Create pair of variables requiring nonlocal jacobian contributions. More...
 
void prepareJacobianBlock ()
 Sizes and zeroes the Jacobian blocks used for the current element. More...
 
void prepareResidual ()
 Sizes and zeroes the residual for the current element. More...
 
void prepare ()
 
void prepareNonlocal ()
 
void prepareVariable (MooseVariableFEBase *var)
 Used for preparing the dense residual and jacobian blocks for one particular variable. More...
 
void prepareVariableNonlocal (MooseVariableFEBase *var)
 
void prepareNeighbor ()
 
void prepareBlock (unsigned int ivar, unsigned jvar, const std::vector< dof_id_type > &dof_indices)
 
void prepareBlockNonlocal (unsigned int ivar, unsigned jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices)
 
void prepareScalar ()
 
void prepareOffDiagScalar ()
 
template<typename T >
void copyShapes (MooseVariableFE< T > &v)
 
void copyShapes (unsigned int var)
 
template<typename T >
void copyFaceShapes (MooseVariableFE< T > &v)
 
void copyFaceShapes (unsigned int var)
 
template<typename T >
void copyNeighborShapes (MooseVariableFE< T > &v)
 
void copyNeighborShapes (unsigned int var)
 
void addResidual (NumericVector< Number > &residual, TagID tag_id=0)
 
void addResidual (const std::map< TagName, TagID > &tags)
 
void addResidualNeighbor (NumericVector< Number > &residual, TagID tag_id=0)
 
void addResidualNeighbor (const std::map< TagName, TagID > &tags)
 
void addResidualScalar (TagID tag_id)
 
void addResidualScalar (const std::map< TagName, TagID > &tags)
 
void cacheResidual ()
 Takes the values that are currently in _sub_Re and appends them to the cached values. More...
 
void cacheResidualContribution (dof_id_type dof, Real value, TagID tag_id)
 Cache individual residual contributions. More...
 
void cacheResidualContribution (dof_id_type dof, Real value, const std::set< TagID > &tags)
 Cache individual residual contributions. More...
 
void cacheResidualNodes (const DenseVector< Number > &res, std::vector< dof_id_type > &dof_index, TagID tag=0)
 Lets an external class cache residual at a set of nodes. More...
 
void cacheResidualNeighbor ()
 Takes the values that are currently in _sub_Ke and appends them to the cached values. More...
 
void addCachedResiduals ()
 
void addCachedResidual (NumericVector< Number > &residual, TagID tag_id)
 Adds the values that have been cached by calling cacheResidual() and or cacheResidualNeighbor() to the residual. More...
 
void setResidual (NumericVector< Number > &residual, TagID tag_id=0)
 
void setResidualNeighbor (NumericVector< Number > &residual, TagID tag_id=0)
 
void addJacobian ()
 
void addJacobianCoupledVarPair (MooseVariableBase *ivar, MooseVariableBase *jvar)
 Adds element matrix for ivar rows and jvar columns. More...
 
void addJacobianNonlocal ()
 
void addJacobianBlock (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices)
 
void addJacobianBlockNonlocal (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices)
 
void addJacobianNeighbor ()
 
void addJacobianNeighbor (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices)
 
void addJacobianScalar ()
 
void addJacobianOffDiagScalar (unsigned int ivar)
 
void cacheJacobian ()
 Takes the values that are currently in _sub_Kee and appends them to the cached values. More...
 
void cacheJacobianCoupledVarPair (MooseVariableBase *ivar, MooseVariableBase *jvar)
 Caches element matrix for ivar rows and jvar columns. More...
 
void cacheJacobianNonlocal ()
 Takes the values that are currently in _sub_Keg and appends them to the cached values. More...
 
void cacheJacobianNeighbor ()
 Takes the values that are currently in the neighbor Dense Matrices and appends them to the cached values. More...
 
void addCachedJacobian (SparseMatrix< Number > &jacobian)
 Adds the values that have been cached by calling cacheJacobian() and or cacheJacobianNeighbor() to the jacobian matrix. More...
 
void addCachedJacobian ()
 
DenseVector< Number > & residualBlock (unsigned int var_num, TagID tag_id=0)
 
DenseVector< Number > & residualBlockNeighbor (unsigned int var_num, TagID tag_id=0)
 
DenseMatrix< Number > & jacobianBlock (unsigned int ivar, unsigned int jvar, TagID tag=0)
 
DenseMatrix< Number > & jacobianBlockNonlocal (unsigned int ivar, unsigned int jvar, TagID tag=0)
 
DenseMatrix< Number > & jacobianBlockNeighbor (Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, TagID tag=0)
 
void cacheJacobianBlock (DenseMatrix< Number > &jac_block, std::vector< dof_id_type > &idof_indices, std::vector< dof_id_type > &jdof_indices, Real scaling_factor, TagID tag=0)
 
void cacheJacobianBlockNonlocal (DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, TagID tag=0)
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & couplingEntries ()
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > & nonlocalCouplingEntries ()
 
const VariablePhiValuephi () const
 
const VariablePhiValuephi (MooseVariable &) const
 
const VariablePhiGradientgradPhi () const
 
const VariablePhiGradientgradPhi (MooseVariable &) const
 
const VariablePhiSecondsecondPhi () const
 
const VariablePhiSecondsecondPhi (MooseVariable &) const
 
const VariablePhiValuephiFace () const
 
const VariablePhiValuephiFace (MooseVariable &) const
 
const VariablePhiGradientgradPhiFace () const
 
const VariablePhiGradientgradPhiFace (MooseVariable &) const
 
const VariablePhiSecondsecondPhiFace (MooseVariable &) const
 
const VariablePhiValuephiNeighbor (MooseVariable &) const
 
const VariablePhiGradientgradPhiNeighbor (MooseVariable &) const
 
const VariablePhiSecondsecondPhiNeighbor (MooseVariable &) const
 
const VariablePhiValuephiFaceNeighbor (MooseVariable &) const
 
const VariablePhiGradientgradPhiFaceNeighbor (MooseVariable &) const
 
const VariablePhiSecondsecondPhiFaceNeighbor (MooseVariable &) const
 
const VectorVariablePhiValuephi (VectorMooseVariable &) const
 
const VectorVariablePhiGradientgradPhi (VectorMooseVariable &) const
 
const VectorVariablePhiSecondsecondPhi (VectorMooseVariable &) const
 
const VectorVariablePhiCurlcurlPhi (VectorMooseVariable &) const
 
const VectorVariablePhiValuephiFace (VectorMooseVariable &) const
 
const VectorVariablePhiGradientgradPhiFace (VectorMooseVariable &) const
 
const VectorVariablePhiSecondsecondPhiFace (VectorMooseVariable &) const
 
const VectorVariablePhiCurlcurlPhiFace (VectorMooseVariable &) const
 
const VectorVariablePhiValuephiNeighbor (VectorMooseVariable &) const
 
const VectorVariablePhiGradientgradPhiNeighbor (VectorMooseVariable &) const
 
const VectorVariablePhiSecondsecondPhiNeighbor (VectorMooseVariable &) const
 
const VectorVariablePhiCurlcurlPhiNeighbor (VectorMooseVariable &) const
 
const VectorVariablePhiValuephiFaceNeighbor (VectorMooseVariable &) const
 
const VectorVariablePhiGradientgradPhiFaceNeighbor (VectorMooseVariable &) const
 
const VectorVariablePhiSecondsecondPhiFaceNeighbor (VectorMooseVariable &) const
 
const VectorVariablePhiCurlcurlPhiFaceNeighbor (VectorMooseVariable &) const
 
VariablePhiValuephi (MooseVariable &)
 
VariablePhiGradientgradPhi (MooseVariable &)
 
VariablePhiSecondsecondPhi (MooseVariable &)
 
VariablePhiValuephiFace (MooseVariable &)
 
VariablePhiGradientgradPhiFace (MooseVariable &)
 
VariablePhiSecondsecondPhiFace (MooseVariable &)
 
VariablePhiValuephiNeighbor (MooseVariable &)
 
VariablePhiGradientgradPhiNeighbor (MooseVariable &)
 
VariablePhiSecondsecondPhiNeighbor (MooseVariable &)
 
VariablePhiValuephiFaceNeighbor (MooseVariable &)
 
VariablePhiGradientgradPhiFaceNeighbor (MooseVariable &)
 
VariablePhiSecondsecondPhiFaceNeighbor (MooseVariable &)
 
VectorVariablePhiValuephi (VectorMooseVariable &)
 
VectorVariablePhiGradientgradPhi (VectorMooseVariable &)
 
VectorVariablePhiSecondsecondPhi (VectorMooseVariable &)
 
VectorVariablePhiCurlcurlPhi (VectorMooseVariable &)
 
VectorVariablePhiValuephiFace (VectorMooseVariable &)
 
VectorVariablePhiGradientgradPhiFace (VectorMooseVariable &)
 
VectorVariablePhiSecondsecondPhiFace (VectorMooseVariable &)
 
VectorVariablePhiCurlcurlPhiFace (VectorMooseVariable &)
 
VectorVariablePhiValuephiNeighbor (VectorMooseVariable &)
 
VectorVariablePhiGradientgradPhiNeighbor (VectorMooseVariable &)
 
VectorVariablePhiSecondsecondPhiNeighbor (VectorMooseVariable &)
 
VectorVariablePhiCurlcurlPhiNeighbor (VectorMooseVariable &)
 
VectorVariablePhiValuephiFaceNeighbor (VectorMooseVariable &)
 
VectorVariablePhiGradientgradPhiFaceNeighbor (VectorMooseVariable &)
 
VectorVariablePhiSecondsecondPhiFaceNeighbor (VectorMooseVariable &)
 
VectorVariablePhiCurlcurlPhiFaceNeighbor (VectorMooseVariable &)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhi (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhi (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecondfeSecondPhi (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhiFace (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhiFace (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecondfeSecondPhiFace (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhiNeighbor (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhiNeighbor (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecondfeSecondPhiNeighbor (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhiFaceNeighbor (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhiFaceNeighbor (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecondfeSecondPhiFaceNeighbor (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurlfeCurlPhi (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurlfeCurlPhiFace (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurlfeCurlPhiNeighbor (FEType type)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurlfeCurlPhiFaceNeighbor (FEType type)
 
void cacheJacobianContribution (numeric_index_type i, numeric_index_type j, Real value, TagID tag=0)
 Caches the Jacobian entry 'value', to eventually be added/set in the (i,j) location of the matrix. More...
 
void cacheJacobianContribution (numeric_index_type i, numeric_index_type j, Real value, const std::set< TagID > &tags)
 
void setCachedJacobianContributions ()
 Sets previously-cached Jacobian values via SparseMatrix::set() calls. More...
 
void zeroCachedJacobianContributions ()
 Zero out previously-cached Jacobian rows. More...
 
void addCachedJacobianContributions ()
 Adds previously-cached Jacobian values via SparseMatrix::add() calls. More...
 
void setXFEM (std::shared_ptr< XFEMInterface > xfem)
 Set the pointer to the XFEM controller object. More...
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhi (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhi (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhi (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiFace (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiFace (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiFace (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiFaceNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiFaceNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiFaceNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhi (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiFace (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiFaceNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhi (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhi (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhi (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiFace (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiFace (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiFace (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiFaceNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiFaceNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiFaceNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhi (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiFace (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiNeighbor (FEType type)
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiFaceNeighbor (FEType type)
 

Public Attributes

std::map< FEType, bool > _need_second_derivative
 
std::map< FEType, bool > _need_second_derivative_neighbor
 
std::map< FEType, bool > _need_curl
 

Protected Member Functions

void reinitFE (const Elem *elem)
 Just an internal helper function to reinit the volume FE objects. More...
 
void reinitFEFace (const Elem *elem, unsigned int side)
 Just an internal helper function to reinit the face FE objects. More...
 
void reinitFEFaceNeighbor (const Elem *neighbor, const std::vector< Point > &reference_points)
 
void reinitFENeighbor (const Elem *neighbor, const std::vector< Point > &reference_points)
 
void setCoordinateTransformation (const QBase *qrule, const MooseArray< Point > &q_points)
 
void computeCurrentElemVolume ()
 
void computeCurrentFaceVolume ()
 
void computeCurrentNeighborVolume ()
 
void addResidualBlock (NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, Real scaling_factor)
 
void cacheResidualBlock (std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, Real scaling_factor)
 
void setResidualBlock (NumericVector< Number > &residual, DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, Real scaling_factor)
 
void addJacobianBlock (SparseMatrix< Number > &jacobian, DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor)
 
void clearCachedJacobianContributions ()
 Clear any currently cached jacobian contributions. More...
 
void modifyWeightsDueToXFEM (const Elem *elem)
 Update the integration weights for XFEM partial elements. More...
 
void modifyFaceWeightsDueToXFEM (const Elem *elem, unsigned int side=0)
 Update the face integration weights for XFEM partial elements. More...
 

Protected Attributes

SystemBase_sys
 
const CouplingMatrix * _cm
 Coupling matrices. More...
 
const CouplingMatrix & _nonlocal_cm
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
 Entries in the coupling matrix for field variables. More...
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableScalar * > > _cm_fs_entry
 Entries in the coupling matrix for field variables vs scalar variables. More...
 
std::vector< std::pair< MooseVariableScalar *, MooseVariableFEBase * > > _cm_sf_entry
 Entries in the coupling matrix for scalar variables vs field variables. More...
 
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
 Entries in the coupling matrix for scalar variables. More...
 
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_nonlocal_entry
 Entries in the coupling matrix for field variables for nonlocal calculations. More...
 
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
 Flag that indicates if the jacobian block was used. More...
 
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
 
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_neighbor_used
 Flag that indicates if the jacobian block for neighbor was used. More...
 
const DofMap & _dof_map
 DOF map. More...
 
THREAD_ID _tid
 Thread number (id) More...
 
MooseMesh_mesh
 
unsigned int _mesh_dimension
 
std::shared_ptr< XFEMInterface_xfem
 The XFEM controller. More...
 
std::map< FEType, FEBase * > _current_fe
 The "volume" fe object that matches the current elem. More...
 
std::map< FEType, FEBase * > _current_fe_face
 The "face" fe object that matches the current elem. More...
 
std::map< FEType, FEBase * > _current_fe_neighbor
 The "neighbor" fe object that matches the current elem. More...
 
std::map< FEType, FEBase * > _current_fe_face_neighbor
 The "neighbor face" fe object that matches the current elem. More...
 
std::map< FEType, FEVectorBase * > _current_vector_fe
 The "volume" vector fe object that matches the current elem. More...
 
std::map< FEType, FEVectorBase * > _current_vector_fe_face
 The "face" vector fe object that matches the current elem. More...
 
std::map< FEType, FEVectorBase * > _current_vector_fe_neighbor
 The "neighbor" vector fe object that matches the current elem. More...
 
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
 The "neighbor face" vector fe object that matches the current elem. More...
 
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
 Each dimension's actual fe objects indexed on type. More...
 
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
 Each dimension's actual vector fe objects indexed on type. More...
 
std::map< unsigned int, FEBase ** > _holder_fe_helper
 Each dimension's helper objects. More...
 
FEBase * _current_fe_helper
 The current helper object for transforming coordinates. More...
 
QBase * _current_qrule
 The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac kernels) More...
 
QBase * _current_qrule_volume
 The current volumetric quadrature for the element. More...
 
ArbitraryQuadrature_current_qrule_arbitrary
 The current arbitrary quadrature rule used within the element interior. More...
 
MooseArray< Point > _current_q_points
 The current list of quadrature points. More...
 
MooseArray< Real > _current_JxW
 The current list of transformed jacobian weights. More...
 
Moose::CoordinateSystemType _coord_type
 The coordinate system. More...
 
MooseArray< Real > _coord
 The current coordinate transformation coefficients. More...
 
std::map< unsigned int, QBase * > _holder_qrule_volume
 Holds volume qrules for each dimension. More...
 
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_arbitrary
 Holds arbitrary qrules for each dimension. More...
 
std::map< unsigned int, const std::vector< Point > * > _holder_q_points
 Holds pointers to the dimension's q_points. More...
 
std::map< unsigned int, const std::vector< Real > * > _holder_JxW
 Holds pointers to the dimension's transformed jacobian weights. More...
 
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
 types of finite elements More...
 
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
 types of vector finite elements More...
 
std::map< unsigned int, FEBase ** > _holder_fe_face_helper
 Each dimension's helper objects. More...
 
FEBase * _current_fe_face_helper
 helper object for transforming coordinates More...
 
QBase * _current_qrule_face
 quadrature rule used on faces More...
 
ArbitraryQuadrature_current_qface_arbitrary
 The current arbitrary quadrature rule used on element faces. More...
 
MooseArray< Point > _current_q_points_face
 The current quadrature points on a face. More...
 
MooseArray< Real > _current_JxW_face
 The current transformed jacobian weights on a face. More...
 
MooseArray< Point > _current_normals
 The current Normal vectors at the quadrature points. More...
 
std::map< unsigned int, QBase * > _holder_qrule_face
 Holds face qrules for each dimension. More...
 
std::map< unsigned int, ArbitraryQuadrature * > _holder_qface_arbitrary
 Holds arbitrary face qrules for each dimension. More...
 
std::map< unsigned int, const std::vector< Point > * > _holder_q_points_face
 Holds pointers to the dimension's q_points on a face. More...
 
std::map< unsigned int, const std::vector< Real > * > _holder_JxW_face
 Holds pointers to the dimension's transformed jacobian weights on a face. More...
 
std::map< unsigned int, const std::vector< Point > * > _holder_normals
 Holds pointers to the dimension's normal vectors. More...
 
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
 types of finite elements More...
 
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
 
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
 
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
 
std::map< unsigned int, FEBase ** > _holder_fe_neighbor_helper
 Each dimension's helper objects. More...
 
std::map< unsigned int, FEBase ** > _holder_fe_face_neighbor_helper
 
QBase * _current_qrule_neighbor
 quadrature rule used on neighbors More...
 
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_neighbor
 Holds arbitrary qrules for each dimension. More...
 
MooseArray< Real > _current_JxW_neighbor
 The current transformed jacobian weights on a neighbor's face. More...
 
MooseArray< Real > _coord_neighbor
 The current coordinate transformation coefficients. More...
 
const Elem * _current_elem
 The current "element" we are currently on. More...
 
SubdomainID _current_subdomain_id
 The current subdomain ID. More...
 
Real _current_elem_volume
 Volume of the current element. More...
 
unsigned int _current_side
 The current side of the selected element (valid only when working with sides) More...
 
const Elem * _current_side_elem
 The current "element" making up the side we are currently on. More...
 
Real _current_side_volume
 Volume of the current side element. More...
 
const Elem * _current_neighbor_elem
 The current neighbor "element". More...
 
SubdomainID _current_neighbor_subdomain_id
 The current neighbor subdomain ID. More...
 
unsigned int _current_neighbor_side
 The current side of the selected neighboring element (valid only when working with sides) More...
 
const Elem * _current_neighbor_side_elem
 The current side element of the ncurrent neighbor element. More...
 
bool _need_neighbor_elem_volume
 true is apps need to compute neighbor element volume More...
 
Real _current_neighbor_volume
 Volume of the current neighbor. More...
 
const Node * _current_node
 The current node we are working with. More...
 
const Node * _current_neighbor_node
 The current neighboring node we are working with. More...
 
bool _current_elem_volume_computed
 Boolean to indicate whether current element volumes has been computed. More...
 
bool _current_side_volume_computed
 Boolean to indicate whether current element side volumes has been computed. More...
 
MooseArray< Point > _current_physical_points
 This will be filled up with the physical points passed into reinitAtPhysical() if it is called. Invalid at all other times. More...
 
std::vector< std::vector< DenseVector< Number > > > _sub_Re
 residual contributions for each variable from the element More...
 
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
 residual contributions for each variable from the neighbor More...
 
DenseVector< Number > _tmp_Re
 auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) More...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
 jacobian contributions <Tag, ivar, jvar> More...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
 jacobian contributions from the element and neighbor <Tag, ivar, jvar> More...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
 jacobian contributions from the neighbor and element <Tag, ivar, jvar> More...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
 jacobian contributions from the neighbor <Tag, ivar, jvar> More...
 
DenseMatrix< Number > _tmp_Ke
 auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) More...
 
VariablePhiValue _phi
 
VariablePhiGradient _grad_phi
 
VariablePhiSecond _second_phi
 
VariablePhiValue _phi_face
 
VariablePhiGradient _grad_phi_face
 
VariablePhiSecond _second_phi_face
 
VariablePhiValue _phi_neighbor
 
VariablePhiGradient _grad_phi_neighbor
 
VariablePhiSecond _second_phi_neighbor
 
VariablePhiValue _phi_face_neighbor
 
VariablePhiGradient _grad_phi_face_neighbor
 
VariablePhiSecond _second_phi_face_neighbor
 
VectorVariablePhiValue _vector_phi
 
VectorVariablePhiGradient _vector_grad_phi
 
VectorVariablePhiSecond _vector_second_phi
 
VectorVariablePhiCurl _vector_curl_phi
 
VectorVariablePhiValue _vector_phi_face
 
VectorVariablePhiGradient _vector_grad_phi_face
 
VectorVariablePhiSecond _vector_second_phi_face
 
VectorVariablePhiCurl _vector_curl_phi_face
 
VectorVariablePhiValue _vector_phi_neighbor
 
VectorVariablePhiGradient _vector_grad_phi_neighbor
 
VectorVariablePhiSecond _vector_second_phi_neighbor
 
VectorVariablePhiCurl _vector_curl_phi_neighbor
 
VectorVariablePhiValue _vector_phi_face_neighbor
 
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
 
VectorVariablePhiSecond _vector_second_phi_face_neighbor
 
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
 
std::map< FEType, FEShapeData * > _fe_shape_data
 Shape function values, gradients, second derivatives for each FE type. More...
 
std::map< FEType, FEShapeData * > _fe_shape_data_face
 
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
 
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
 
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
 Shape function values, gradients, second derivatives for each vector FE type. More...
 
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
 
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
 
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
 
std::vector< std::vector< Real > > _cached_residual_values
 Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) More...
 
std::vector< std::vector< dof_id_type > > _cached_residual_rows
 Where the cached values should go (the first vector is for TIME vs NONTIME) More...
 
unsigned int _max_cached_residuals
 
std::vector< std::vector< Real > > _cached_jacobian_values
 Values cached by calling cacheJacobian() More...
 
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
 Row where the corresponding cached value should go. More...
 
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
 Column where the corresponding cached value should go. More...
 
unsigned int _max_cached_jacobians
 
unsigned int _block_diagonal_matrix
 Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take some shortcuts. More...
 
std::vector< dof_id_type > _temp_dof_indices
 Temporary work vector to keep from reallocating it. More...
 
std::vector< Point > _temp_reference_points
 Temporary work data for reinitAtPhysical() More...
 
std::vector< std::vector< Real > > _cached_jacobian_contribution_vals
 Storage for cached Jacobian entries. More...
 
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_rows
 
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_cols
 

Detailed Description

Keeps track of stuff related to assembling.

Definition at line 56 of file Assembly.h.

Constructor & Destructor Documentation

◆ Assembly()

Assembly::Assembly ( SystemBase sys,
THREAD_ID  tid 
)

Definition at line 34 of file Assembly.C.

35  : _sys(sys),
37  _dof_map(_sys.dofMap()),
38  _tid(tid),
39  _mesh(sys.mesh()),
41  _current_qrule(NULL),
45  _current_qrule_face(NULL),
48 
49  _current_elem(NULL),
51  _current_side(0),
52  _current_side_elem(NULL),
59  _current_node(NULL),
63 
64  _cached_residual_values(2), // The 2 is for TIME and NONTIME
65  _cached_residual_rows(2), // The 2 is for TIME and NONTIME
66 
70 {
71  // Build fe's for the helpers
72  buildFE(FEType(FIRST, LAGRANGE));
73  buildFaceFE(FEType(FIRST, LAGRANGE));
74  buildNeighborFE(FEType(FIRST, LAGRANGE));
75  buildFaceNeighborFE(FEType(FIRST, LAGRANGE));
76 
77  // Build an FE helper object for this type for each dimension up to the dimension of the current
78  // mesh
79  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
80  {
81  _holder_fe_helper[dim] = &_fe[dim][FEType(FIRST, LAGRANGE)];
82  (*_holder_fe_helper[dim])->get_phi();
83  (*_holder_fe_helper[dim])->get_dphi();
84  (*_holder_fe_helper[dim])->get_xyz();
85  (*_holder_fe_helper[dim])->get_JxW();
86 
87  _holder_fe_face_helper[dim] = &_fe_face[dim][FEType(FIRST, LAGRANGE)];
88  (*_holder_fe_face_helper[dim])->get_phi();
89  (*_holder_fe_face_helper[dim])->get_dphi();
90  (*_holder_fe_face_helper[dim])->get_xyz();
91  (*_holder_fe_face_helper[dim])->get_JxW();
92  (*_holder_fe_face_helper[dim])->get_normals();
93 
94  _holder_fe_face_neighbor_helper[dim] = &_fe_face_neighbor[dim][FEType(FIRST, LAGRANGE)];
95  (*_holder_fe_face_neighbor_helper[dim])->get_xyz();
96  (*_holder_fe_face_neighbor_helper[dim])->get_JxW();
97  (*_holder_fe_face_neighbor_helper[dim])->get_normals();
98 
99  _holder_fe_neighbor_helper[dim] = &_fe_neighbor[dim][FEType(FIRST, LAGRANGE)];
100  (*_holder_fe_neighbor_helper[dim])->get_xyz();
101  (*_holder_fe_neighbor_helper[dim])->get_JxW();
102  }
103 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:1114
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:1183
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:1093
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:230
std::map< unsigned int, FEBase ** > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:1085
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
Definition: Assembly.h:1291
unsigned int _max_cached_residuals
Definition: Assembly.h:1293
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:1089
std::map< unsigned int, FEBase ** > _holder_fe_face_neighbor_helper
Definition: Assembly.h:1151
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:1191
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:1185
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:1175
MooseMesh & _mesh
Definition: Assembly.h:1053
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:1163
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:1167
const CouplingMatrix & nonlocalCouplingMatrix() const
Definition: SubProblem.h:496
unsigned int _block_diagonal_matrix
Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take s...
Definition: Assembly.h:1305
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:211
unsigned int _mesh_dimension
Definition: Assembly.h:1055
QBase * _current_qrule_volume
The current volumetric quadrature for the element.
Definition: Assembly.h:1091
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1049
unsigned int _max_cached_jacobians
Definition: Assembly.h:1302
const CouplingMatrix & _nonlocal_cm
Definition: Assembly.h:1032
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:1179
virtual DofMap & dofMap()
Gets the dof map.
Definition: SystemBase.C:885
QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:1154
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2099
std::map< unsigned int, FEBase ** > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:1150
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:1145
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:249
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:188
virtual SubProblem & subproblem()
Definition: SystemBase.h:103
ArbitraryQuadrature * _current_qface_arbitrary
The current arbitrary quadrature rule used on element faces.
Definition: Assembly.h:1124
std::map< unsigned int, FEBase ** > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:1118
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:1081
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:1173
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1288
const Node * _current_node
The current node we are working with.
Definition: Assembly.h:1187
virtual MooseMesh & mesh()
Definition: SystemBase.h:102
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:1169
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:1181
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:1193
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:1146
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:1099
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:1171
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:1122
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition: Assembly.h:1189

◆ ~Assembly()

Assembly::~Assembly ( )
virtual

Definition at line 105 of file Assembly.C.

106 {
107  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
108  for (auto & it : _fe[dim])
109  delete it.second;
110 
111  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
112  for (auto & it : _fe_face[dim])
113  delete it.second;
114 
115  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
116  for (auto & it : _fe_neighbor[dim])
117  delete it.second;
118 
119  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
120  for (auto & it : _fe_face_neighbor[dim])
121  delete it.second;
122 
123  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
124  for (auto & it : _vector_fe[dim])
125  delete it.second;
126 
127  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
128  for (auto & it : _vector_fe_face[dim])
129  delete it.second;
130 
131  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
132  for (auto & it : _vector_fe_neighbor[dim])
133  delete it.second;
134 
135  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
136  for (auto & it : _vector_fe_face_neighbor[dim])
137  delete it.second;
138 
139  for (auto & it : _holder_qrule_volume)
140  delete it.second;
141 
142  for (auto & it : _holder_qrule_arbitrary)
143  delete it.second;
144 
145  for (auto & it : _holder_qface_arbitrary)
146  delete it.second;
147 
148  for (auto & it : _holder_qrule_face)
149  delete it.second;
150 
151  for (auto & it : _holder_qrule_neighbor)
152  delete it.second;
153 
154  for (auto & it : _fe_shape_data)
155  delete it.second;
156 
157  for (auto & it : _fe_shape_data_face)
158  delete it.second;
159 
160  for (auto & it : _fe_shape_data_neighbor)
161  delete it.second;
162 
163  for (auto & it : _fe_shape_data_face_neighbor)
164  delete it.second;
165 
166  for (auto & it : _vector_fe_shape_data)
167  delete it.second;
168 
169  for (auto & it : _vector_fe_shape_data_face)
170  delete it.second;
171 
172  for (auto & it : _vector_fe_shape_data_neighbor)
173  delete it.second;
174 
175  for (auto & it : _vector_fe_shape_data_face_neighbor)
176  delete it.second;
177 
178  delete _current_side_elem;
180 
182 
183  _coord.release();
185 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:1114
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:1196
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:1083
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition: Assembly.h:1160
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:1101
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1284
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_neighbor
Holds arbitrary qrules for each dimension.
Definition: Assembly.h:1156
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:1148
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1279
unsigned int _mesh_dimension
Definition: Assembly.h:1055
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1285
std::map< unsigned int, QBase * > _holder_qrule_face
Holds face qrules for each dimension.
Definition: Assembly.h:1132
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1278
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:1145
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_arbitrary
Holds arbitrary qrules for each dimension.
Definition: Assembly.h:1105
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:1116
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:1081
std::map< unsigned int, ArbitraryQuadrature * > _holder_qface_arbitrary
Holds arbitrary face qrules for each dimension.
Definition: Assembly.h:1134
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1282
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:51
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:1147
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:1181
std::map< unsigned int, QBase * > _holder_qrule_volume
Holds volume qrules for each dimension.
Definition: Assembly.h:1103
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:1146
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1276
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1277
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1283
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:1171

Member Function Documentation

◆ addCachedJacobian() [1/2]

void Assembly::addCachedJacobian ( SparseMatrix< Number > &  jacobian)

Adds the values that have been cached by calling cacheJacobian() and or cacheJacobianNeighbor() to the jacobian matrix.

Note that this will also clear the cache.

Definition at line 1821 of file Assembly.C.

1822 {
1823  mooseDeprecated(" Please use addCachedJacobian() ");
1824 
1826 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
void addCachedJacobian()
Definition: Assembly.C:1829

◆ addCachedJacobian() [2/2]

void Assembly::addCachedJacobian ( )

Definition at line 1829 of file Assembly.C.

Referenced by addCachedJacobian().

1830 {
1832  {
1833  mooseAssert(_cached_jacobian_rows.size() == _cached_jacobian_cols.size(),
1834  "Error: Cached data sizes MUST be the same!");
1835  for (unsigned int i = 0; i < _cached_jacobian_rows.size(); i++)
1836  mooseAssert(_cached_jacobian_rows[i].size() == _cached_jacobian_cols[i].size(),
1837  "Error: Cached data sizes MUST be the same for a given tag!");
1838  }
1839 
1840  for (unsigned int i = 0; i < _cached_jacobian_rows.size(); i++)
1841  if (_sys.hasMatrix(i))
1842  for (unsigned int j = 0; j < _cached_jacobian_rows[i].size(); j++)
1843  _sys.getMatrix(i).add(_cached_jacobian_rows[i][j],
1844  _cached_jacobian_cols[i][j],
1845  _cached_jacobian_values[i][j]);
1846 
1847  for (unsigned int i = 0; i < _cached_jacobian_rows.size(); i++)
1848  {
1849  if (!_sys.hasMatrix(i))
1850  continue;
1851 
1854 
1855  // Try to be more efficient from now on
1856  // The 2 is just a fudge factor to keep us from having to grow the vector during assembly
1857  _cached_jacobian_values[i].clear();
1859 
1860  _cached_jacobian_rows[i].clear();
1862 
1863  _cached_jacobian_cols[i].clear();
1865  }
1866 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:1298
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:1296
unsigned int _max_cached_jacobians
Definition: Assembly.h:1302
virtual bool checkNonlocalCouplingRequirement()
Definition: SubProblem.h:62
virtual SubProblem & subproblem()
Definition: SystemBase.h:103
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:772
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:1300

◆ addCachedJacobianContributions()

void Assembly::addCachedJacobianContributions ( )

Adds previously-cached Jacobian values via SparseMatrix::add() calls.

Definition at line 2201 of file Assembly.C.

Referenced by NonlinearSystemBase::computeJacobianInternal(), ComputeNodalKernelBCJacobiansThread::onNode(), and ComputeNodalKernelJacobiansThread::onNode().

2202 {
2203  for (auto tag = beginIndex(_cached_jacobian_contribution_rows);
2205  tag++)
2206  if (_sys.hasMatrix(tag))
2207  {
2208  // TODO: Use SparseMatrix::set_values() for efficiency
2209  for (unsigned int i = 0; i < _cached_jacobian_contribution_vals[tag].size(); ++i)
2213  }
2214 
2216 }
SystemBase & _sys
Definition: Assembly.h:1028
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
std::vector< std::vector< Real > > _cached_jacobian_contribution_vals
Storage for cached Jacobian entries.
Definition: Assembly.h:1316
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_cols
Definition: Assembly.h:1318
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:772
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_rows
Definition: Assembly.h:1317
void clearCachedJacobianContributions()
Clear any currently cached jacobian contributions.
Definition: Assembly.C:2219

◆ addCachedResidual()

void Assembly::addCachedResidual ( NumericVector< Number > &  residual,
TagID  tag_id 
)

Adds the values that have been cached by calling cacheResidual() and or cacheResidualNeighbor() to the residual.

Note that this will also clear the cache.

Definition at line 1664 of file Assembly.C.

Referenced by addCachedResiduals().

1665 {
1666  if (!_sys.hasVector(tag_id))
1667  {
1668  // Only clean up things when tag exists
1669  if (_sys.subproblem().vectorTagExists(tag_id))
1670  {
1671  _cached_residual_values[tag_id].clear();
1672  _cached_residual_rows[tag_id].clear();
1673  }
1674  return;
1675  }
1676 
1677  std::vector<Real> & cached_residual_values = _cached_residual_values[tag_id];
1678  std::vector<dof_id_type> & cached_residual_rows = _cached_residual_rows[tag_id];
1679 
1680  mooseAssert(cached_residual_values.size() == cached_residual_rows.size(),
1681  "Number of cached residuals and number of rows must match!");
1682  if (cached_residual_values.size())
1683  residual.add_vector(cached_residual_values, cached_residual_rows);
1684 
1685  if (_max_cached_residuals < cached_residual_values.size())
1686  _max_cached_residuals = cached_residual_values.size();
1687 
1688  // Try to be more efficient from now on
1689  // The 2 is just a fudge factor to keep us from having to grow the vector during assembly
1690  cached_residual_values.clear();
1691  cached_residual_values.reserve(_max_cached_residuals * 2);
1692 
1693  cached_residual_rows.clear();
1694  cached_residual_rows.reserve(_max_cached_residuals * 2);
1695 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
Definition: Assembly.h:1291
unsigned int _max_cached_residuals
Definition: Assembly.h:1293
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:670
virtual SubProblem & subproblem()
Definition: SystemBase.h:103
virtual bool vectorTagExists(TagID tag)
Check to see if a particular Tag exists.
Definition: SubProblem.h:100
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1288

◆ addCachedResiduals()

void Assembly::addCachedResiduals ( )

Definition at line 1649 of file Assembly.C.

1650 {
1651  for (auto tag = beginIndex(_cached_residual_values); tag < _cached_residual_values.size(); tag++)
1652  {
1653  if (!_sys.hasVector(tag))
1654  {
1655  _cached_residual_values[tag].clear();
1656  _cached_residual_rows[tag].clear();
1657  continue;
1658  }
1659  addCachedResidual(_sys.getVector(tag), tag);
1660  }
1661 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
Definition: Assembly.h:1291
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:670
void addCachedResidual(NumericVector< Number > &residual, TagID tag_id)
Adds the values that have been cached by calling cacheResidual() and or cacheResidualNeighbor() to th...
Definition: Assembly.C:1664
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1288
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:720

◆ addJacobian()

void Assembly::addJacobian ( )

Definition at line 1884 of file Assembly.C.

1885 {
1886  for (const auto & it : _cm_ff_entry)
1887  addJacobianCoupledVarPair(it.first, it.second);
1888 
1889  for (const auto & it : _cm_sf_entry)
1890  addJacobianCoupledVarPair(it.first, it.second);
1891 
1892  for (const auto & it : _cm_fs_entry)
1893  addJacobianCoupledVarPair(it.first, it.second);
1894 }
std::vector< std::pair< MooseVariableFEBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:1036
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1034
void addJacobianCoupledVarPair(MooseVariableBase *ivar, MooseVariableBase *jvar)
Adds element matrix for ivar rows and jvar columns.
Definition: Assembly.C:1869
std::vector< std::pair< MooseVariableScalar *, MooseVariableFEBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:1038

◆ addJacobianBlock() [1/2]

void Assembly::addJacobianBlock ( SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices 
)

Definition at line 2036 of file Assembly.C.

Referenced by addJacobianCoupledVarPair(), addJacobianNeighbor(), and addJacobianNonlocal().

2041 {
2042  DenseMatrix<Number> & ke = jacobianBlock(ivar, jvar);
2043 
2044  // stick it into the matrix
2045  std::vector<dof_id_type> di(dof_indices);
2046  dof_map.constrain_element_matrix(ke, di, false);
2047 
2048  Real scaling_factor = _sys.getVariable(_tid, ivar).scalingFactor();
2049  if (scaling_factor != 1.0)
2050  {
2051  _tmp_Ke = ke;
2052  _tmp_Ke *= scaling_factor;
2053  jacobian.add_matrix(_tmp_Ke, di);
2054  }
2055  else
2056  jacobian.add_matrix(ke, di);
2057 }
SystemBase & _sys
Definition: Assembly.h:1028
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:934
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1217
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:101
DofMap & dof_map
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ addJacobianBlock() [2/2]

void Assembly::addJacobianBlock ( SparseMatrix< Number > &  jacobian,
DenseMatrix< Number > &  jac_block,
const std::vector< dof_id_type > &  idof_indices,
const std::vector< dof_id_type > &  jdof_indices,
Real  scaling_factor 
)
protected

Definition at line 1738 of file Assembly.C.

1743 {
1744  if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m())
1745  {
1746  std::vector<dof_id_type> di(idof_indices);
1747  std::vector<dof_id_type> dj(jdof_indices);
1748  _dof_map.constrain_element_matrix(jac_block, di, dj, false);
1749 
1750  if (scaling_factor != 1.0)
1751  {
1752  _tmp_Ke = jac_block;
1753  _tmp_Ke *= scaling_factor;
1754  jacobian.add_matrix(_tmp_Ke, di, dj);
1755  }
1756  else
1757  jacobian.add_matrix(jac_block, di, dj);
1758  }
1759 }
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1217
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1049

◆ addJacobianBlockNonlocal()

void Assembly::addJacobianBlockNonlocal ( SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
const std::vector< dof_id_type > &  idof_indices,
const std::vector< dof_id_type > &  jdof_indices 
)

Definition at line 2060 of file Assembly.C.

2066 {
2067  DenseMatrix<Number> & keg = jacobianBlockNonlocal(ivar, jvar);
2068 
2069  std::vector<dof_id_type> di(idof_indices);
2070  std::vector<dof_id_type> dg(jdof_indices);
2071  dof_map.constrain_element_matrix(keg, di, dg, false);
2072 
2073  Real scaling_factor = _sys.getVariable(_tid, ivar).scalingFactor();
2074  if (scaling_factor != 1.0)
2075  {
2076  _tmp_Ke = keg;
2077  _tmp_Ke *= scaling_factor;
2078  jacobian.add_matrix(_tmp_Ke, di, dg);
2079  }
2080  else
2081  jacobian.add_matrix(keg, di, dg);
2082 }
SystemBase & _sys
Definition: Assembly.h:1028
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1217
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:101
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:941
DofMap & dof_map
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ addJacobianCoupledVarPair()

void Assembly::addJacobianCoupledVarPair ( MooseVariableBase ivar,
MooseVariableBase jvar 
)
inline

Adds element matrix for ivar rows and jvar columns.

Definition at line 1869 of file Assembly.C.

Referenced by addJacobian(), addJacobianOffDiagScalar(), and addJacobianScalar().

1870 {
1871  auto i = ivar->number();
1872  auto j = jvar->number();
1873  for (unsigned int tag = beginIndex(_jacobian_block_used); tag < _jacobian_block_used.size();
1874  tag++)
1875  if (_jacobian_block_used[tag][i][j] && _sys.hasMatrix(tag))
1877  jacobianBlock(i, j, tag),
1878  ivar->dofIndices(),
1879  jvar->dofIndices(),
1880  ivar->scalingFactor());
1881 }
SystemBase & _sys
Definition: Assembly.h:1028
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices)
Definition: Assembly.C:2036
unsigned int number() const
Get variable number coming from libMesh.
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:934
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:1044
std::vector< dof_id_type > & dofIndices()
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:772
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ addJacobianNeighbor() [1/2]

void Assembly::addJacobianNeighbor ( )

Definition at line 1918 of file Assembly.C.

1919 {
1920  for (const auto & it : _cm_ff_entry)
1921  {
1922  auto ivar = it.first;
1923  auto jvar = it.second;
1924  auto i = ivar->number();
1925  auto j = jvar->number();
1926  for (auto tag = beginIndex(_jacobian_block_neighbor_used);
1927  tag < _jacobian_block_neighbor_used.size();
1928  tag++)
1929  if (_jacobian_block_neighbor_used[tag][i][j] && _sys.hasMatrix(tag))
1930  {
1933  ivar->dofIndices(),
1934  jvar->dofIndicesNeighbor(),
1935  ivar->scalingFactor());
1936 
1939  ivar->dofIndicesNeighbor(),
1940  jvar->dofIndices(),
1941  ivar->scalingFactor());
1942 
1945  ivar->dofIndicesNeighbor(),
1946  jvar->dofIndicesNeighbor(),
1947  ivar->scalingFactor());
1948  }
1949  }
1950 }
SystemBase & _sys
Definition: Assembly.h:1028
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices)
Definition: Assembly.C:2036
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1034
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:772
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:948
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_neighbor_used
Flag that indicates if the jacobian block for neighbor was used.
Definition: Assembly.h:1047

◆ addJacobianNeighbor() [2/2]

void Assembly::addJacobianNeighbor ( SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
std::vector< dof_id_type > &  neighbor_dof_indices 
)

Definition at line 2085 of file Assembly.C.

2091 {
2092  DenseMatrix<Number> & kee = jacobianBlock(ivar, jvar);
2093  DenseMatrix<Number> & ken = jacobianBlockNeighbor(Moose::ElementNeighbor, ivar, jvar);
2094  DenseMatrix<Number> & kne = jacobianBlockNeighbor(Moose::NeighborElement, ivar, jvar);
2095  DenseMatrix<Number> & knn = jacobianBlockNeighbor(Moose::NeighborNeighbor, ivar, jvar);
2096 
2097  std::vector<dof_id_type> di(dof_indices);
2098  std::vector<dof_id_type> dn(neighbor_dof_indices);
2099  // stick it into the matrix
2100  dof_map.constrain_element_matrix(kee, di, false);
2101  dof_map.constrain_element_matrix(ken, di, dn, false);
2102  dof_map.constrain_element_matrix(kne, dn, di, false);
2103  dof_map.constrain_element_matrix(knn, dn, false);
2104 
2105  Real scaling_factor = _sys.getVariable(_tid, ivar).scalingFactor();
2106  if (scaling_factor != 1.0)
2107  {
2108  _tmp_Ke = ken;
2109  _tmp_Ke *= scaling_factor;
2110  jacobian.add_matrix(_tmp_Ke, di, dn);
2111 
2112  _tmp_Ke = kne;
2113  _tmp_Ke *= scaling_factor;
2114  jacobian.add_matrix(_tmp_Ke, dn, di);
2115 
2116  _tmp_Ke = knn;
2117  _tmp_Ke *= scaling_factor;
2118  jacobian.add_matrix(_tmp_Ke, dn);
2119  }
2120  else
2121  {
2122  jacobian.add_matrix(ken, di, dn);
2123  jacobian.add_matrix(kne, dn, di);
2124  jacobian.add_matrix(knn, dn);
2125  }
2126 }
SystemBase & _sys
Definition: Assembly.h:1028
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:934
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1217
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:101
DofMap & dof_map
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:948
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ addJacobianNonlocal()

void Assembly::addJacobianNonlocal ( )

Definition at line 1897 of file Assembly.C.

1898 {
1899  for (const auto & it : _cm_nonlocal_entry)
1900  {
1901  auto ivar = it.first;
1902  auto jvar = it.second;
1903  auto i = ivar->number();
1904  auto j = jvar->number();
1905  for (auto tag = beginIndex(_jacobian_block_nonlocal_used);
1906  tag < _jacobian_block_nonlocal_used.size();
1907  tag++)
1908  if (_jacobian_block_nonlocal_used[tag][i][j] && _sys.hasMatrix(tag))
1910  jacobianBlockNonlocal(i, j, tag),
1911  ivar->dofIndices(),
1912  jvar->allDofIndices(),
1913  ivar->scalingFactor());
1914  }
1915 }
SystemBase & _sys
Definition: Assembly.h:1028
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices)
Definition: Assembly.C:2036
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:1045
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:941
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:1042
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:772

◆ addJacobianOffDiagScalar()

void Assembly::addJacobianOffDiagScalar ( unsigned int  ivar)

Definition at line 2136 of file Assembly.C.

2137 {
2138  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2140  for (const auto & var_j : vars)
2141  addJacobianCoupledVarPair(&var_i, var_j);
2142 }
SystemBase & _sys
Definition: Assembly.h:1028
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:550
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
void addJacobianCoupledVarPair(MooseVariableBase *ivar, MooseVariableBase *jvar)
Adds element matrix for ivar rows and jvar columns.
Definition: Assembly.C:1869
Class for scalar variables (they are different).
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a scalar variable with specified number.
Definition: SystemBase.C:134

◆ addJacobianScalar()

void Assembly::addJacobianScalar ( )

Definition at line 2129 of file Assembly.C.

2130 {
2131  for (const auto & it : _cm_ss_entry)
2132  addJacobianCoupledVarPair(it.first, it.second);
2133 }
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition: Assembly.h:1040
void addJacobianCoupledVarPair(MooseVariableBase *ivar, MooseVariableBase *jvar)
Adds element matrix for ivar rows and jvar columns.
Definition: Assembly.C:1869

◆ addResidual() [1/2]

void Assembly::addResidual ( NumericVector< Number > &  residual,
TagID  tag_id = 0 
)

Definition at line 1530 of file Assembly.C.

Referenced by addResidual().

1531 {
1532  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
1533  for (const auto & var : vars)
1535  residual, _sub_Re[tag_id][var->number()], var->dofIndices(), var->scalingFactor());
1536 }
SystemBase & _sys
Definition: Assembly.h:1028
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:550
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
std::vector< std::vector< DenseVector< Number > > > _sub_Re
residual contributions for each variable from the element
Definition: Assembly.h:1199
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:1470

◆ addResidual() [2/2]

void Assembly::addResidual ( const std::map< TagName, TagID > &  tags)

Definition at line 1539 of file Assembly.C.

1540 {
1541  for (auto & tag : tags)
1542  if (_sys.hasVector(tag.second))
1543  addResidual(_sys.getVector(tag.second), tag.second);
1544 }
SystemBase & _sys
Definition: Assembly.h:1028
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:670
void addResidual(NumericVector< Number > &residual, TagID tag_id=0)
Definition: Assembly.C:1530
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:720

◆ addResidualBlock()

void Assembly::addResidualBlock ( NumericVector< Number > &  residual,
DenseVector< Number > &  res_block,
const std::vector< dof_id_type > &  dof_indices,
Real  scaling_factor 
)
protected

Definition at line 1470 of file Assembly.C.

Referenced by addResidual(), addResidualNeighbor(), and addResidualScalar().

1474 {
1475  if (dof_indices.size() > 0 && res_block.size())
1476  {
1477  _temp_dof_indices = dof_indices;
1478  _dof_map.constrain_element_vector(res_block, _temp_dof_indices, false);
1479 
1480  if (scaling_factor != 1.0)
1481  {
1482  _tmp_Re = res_block;
1483  _tmp_Re *= scaling_factor;
1484  residual.add_vector(_tmp_Re, _temp_dof_indices);
1485  }
1486  else
1487  {
1488  residual.add_vector(res_block, _temp_dof_indices);
1489  }
1490  }
1491 }
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1203
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1049
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:1308

◆ addResidualNeighbor() [1/2]

void Assembly::addResidualNeighbor ( NumericVector< Number > &  residual,
TagID  tag_id = 0 
)

Definition at line 1547 of file Assembly.C.

Referenced by addResidualNeighbor().

1548 {
1549  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
1550  for (const auto & var : vars)
1552  residual, _sub_Rn[tag_id][var->number()], var->dofIndicesNeighbor(), var->scalingFactor());
1553 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
residual contributions for each variable from the neighbor
Definition: Assembly.h:1201
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:550
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:1470

◆ addResidualNeighbor() [2/2]

void Assembly::addResidualNeighbor ( const std::map< TagName, TagID > &  tags)

Definition at line 1556 of file Assembly.C.

1557 {
1558  for (auto & tag : tags)
1559  if (_sys.hasVector(tag.second))
1560  addResidualNeighbor(_sys.getVector(tag.second), tag.second);
1561 }
SystemBase & _sys
Definition: Assembly.h:1028
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:670
void addResidualNeighbor(NumericVector< Number > &residual, TagID tag_id=0)
Definition: Assembly.C:1547
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:720

◆ addResidualScalar() [1/2]

void Assembly::addResidualScalar ( TagID  tag_id)

Definition at line 1564 of file Assembly.C.

Referenced by addResidualScalar().

1565 {
1566  // add the scalar variables residuals
1567  const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
1568  for (const auto & var : vars)
1569  if (_sys.hasVector(tag_id))
1571  _sub_Re[tag_id][var->number()],
1572  var->dofIndices(),
1573  var->scalingFactor());
1574 }
SystemBase & _sys
Definition: Assembly.h:1028
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:555
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:670
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
std::vector< std::vector< DenseVector< Number > > > _sub_Re
residual contributions for each variable from the element
Definition: Assembly.h:1199
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:720
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:1470

◆ addResidualScalar() [2/2]

void Assembly::addResidualScalar ( const std::map< TagName, TagID > &  tags)

Definition at line 1577 of file Assembly.C.

1578 {
1579  for (auto & tag : tags)
1580  addResidualScalar(tag.second);
1581 }
void addResidualScalar(TagID tag_id)
Definition: Assembly.C:1564

◆ buildFaceFE()

void Assembly::buildFaceFE ( FEType  type)

Build FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 211 of file Assembly.C.

Referenced by Assembly(), feCurlPhiFace(), feGradPhiFace(), fePhiFace(), feSecondPhiFace(), and getFEFace().

212 {
214  _fe_shape_data_face[type] = new FEShapeData;
215 
216  // Build an FE object for this type for each dimension up to the dimension of the current mesh
217  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
218  {
219  if (!_fe_face[dim][type])
220  _fe_face[dim][type] = FEGenericBase<Real>::build(dim, type).release();
221 
222  _fe_face[dim][type]->get_phi();
223  _fe_face[dim][type]->get_dphi();
225  _fe_face[dim][type]->get_d2phi();
226  }
227 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:1114
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:915
unsigned int _mesh_dimension
Definition: Assembly.h:1055
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1277

◆ buildFaceNeighborFE()

void Assembly::buildFaceNeighborFE ( FEType  type)

Build FEs for a neighbor face with a type.

Parameters
typeThe type of FE

Definition at line 249 of file Assembly.C.

Referenced by Assembly(), feCurlPhiFaceNeighbor(), feGradPhiFaceNeighbor(), fePhiFaceNeighbor(), feSecondPhiFaceNeighbor(), and getFEFaceNeighbor().

250 {
252  _fe_shape_data_face_neighbor[type] = new FEShapeData;
253 
254  // Build an FE object for this type for each dimension up to the dimension of the current mesh
255  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
256  {
257  if (!_fe_face_neighbor[dim][type])
258  _fe_face_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
259 
260  _fe_face_neighbor[dim][type]->get_phi();
261  _fe_face_neighbor[dim][type]->get_dphi();
263  _fe_face_neighbor[dim][type]->get_d2phi();
264  }
265 }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1279
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:916
unsigned int _mesh_dimension
Definition: Assembly.h:1055
MatType type
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:1146

◆ buildFE()

void Assembly::buildFE ( FEType  type)

Build FEs with a type.

Parameters
typeThe type of FE

Definition at line 188 of file Assembly.C.

Referenced by Assembly(), feCurlPhi(), feGradPhi(), fePhi(), feSecondPhi(), and getFE().

189 {
190  if (!_fe_shape_data[type])
191  _fe_shape_data[type] = new FEShapeData;
192 
193  // Build an FE object for this type for each dimension up to the dimension of the current mesh
194  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
195  {
196  if (!_fe[dim][type])
197  _fe[dim][type] = FEGenericBase<Real>::build(dim, type).release();
198 
199  _fe[dim][type]->get_phi();
200  _fe[dim][type]->get_dphi();
201  // Pre-request xyz. We have always computed xyz, but due to
202  // recent optimizations in libmesh, we now need to explicity
203  // request it, since apps (Yak) may rely on it being computed.
204  _fe[dim][type]->get_xyz();
206  _fe[dim][type]->get_d2phi();
207  }
208 }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:915
unsigned int _mesh_dimension
Definition: Assembly.h:1055
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:1081
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1276

◆ buildNeighborFE()

void Assembly::buildNeighborFE ( FEType  type)

Build FEs for a neighbor with a type.

Parameters
typeThe type of FE

Definition at line 230 of file Assembly.C.

Referenced by Assembly(), feCurlPhiNeighbor(), feGradPhiNeighbor(), fePhiNeighbor(), feSecondPhiNeighbor(), and getFENeighbor().

231 {
233  _fe_shape_data_neighbor[type] = new FEShapeData;
234 
235  // Build an FE object for this type for each dimension up to the dimension of the current mesh
236  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
237  {
238  if (!_fe_neighbor[dim][type])
239  _fe_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
240 
241  _fe_neighbor[dim][type]->get_phi();
242  _fe_neighbor[dim][type]->get_dphi();
244  _fe_neighbor[dim][type]->get_d2phi();
245  }
246 }
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:916
unsigned int _mesh_dimension
Definition: Assembly.h:1055
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1278
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:1145
MatType type

◆ buildVectorFaceFE()

void Assembly::buildVectorFaceFE ( FEType  type)

Build Vector FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 298 of file Assembly.C.

Referenced by getVectorFEFace().

299 {
301  _vector_fe_shape_data_face[type] = new VectorFEShapeData;
302 
303  unsigned int min_dim;
304  if (type.family == LAGRANGE_VEC)
305  min_dim = 0;
306  else
307  min_dim = 2;
308 
309  // Build an VectorFE object for this type for each dimension up to the dimension of the current
310  // mesh
311  // Note that NEDELEC_ONE elements can only be built for dimension > 2. The for loop logic should
312  // be modified for LAGRANGE_VEC
313  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
314  {
315  if (!_vector_fe_face[dim][type])
316  _vector_fe_face[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
317 
318  _vector_fe_face[dim][type]->get_phi();
319  _vector_fe_face[dim][type]->get_dphi();
320  _vector_fe_face[dim][type]->get_curl_phi();
321  }
322 }
unsigned int _mesh_dimension
Definition: Assembly.h:1055
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:1116
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1283

◆ buildVectorFaceNeighborFE()

void Assembly::buildVectorFaceNeighborFE ( FEType  type)

Build Vector FEs for a neighbor face with a type.

Parameters
typeThe type of FE

Definition at line 352 of file Assembly.C.

Referenced by getVectorFEFaceNeighbor().

353 {
355  _vector_fe_shape_data_face_neighbor[type] = new VectorFEShapeData;
356 
357  unsigned int min_dim;
358  if (type.family == LAGRANGE_VEC)
359  min_dim = 0;
360  else
361  min_dim = 2;
362 
363  // Build an VectorFE object for this type for each dimension up to the dimension of the current
364  // mesh
365  // Note that NEDELEC_ONE elements can only be built for dimension > 2. The for loop logic should
366  // be modified for LAGRANGE_VEC
367  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
368  {
369  if (!_vector_fe_face_neighbor[dim][type])
371  FEGenericBase<VectorValue<Real>>::build(dim, type).release();
372 
373  _vector_fe_face_neighbor[dim][type]->get_phi();
374  _vector_fe_face_neighbor[dim][type]->get_dphi();
375  _vector_fe_face_neighbor[dim][type]->get_curl_phi();
376  }
377 }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:1148
unsigned int _mesh_dimension
Definition: Assembly.h:1055
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1285
MatType type

◆ buildVectorFE()

void Assembly::buildVectorFE ( FEType  type)

Build Vector FEs with a type.

Parameters
typeThe type of FE

Definition at line 268 of file Assembly.C.

Referenced by getVectorFE().

269 {
271  _vector_fe_shape_data[type] = new VectorFEShapeData;
272 
273  unsigned int min_dim;
274  if (type.family == LAGRANGE_VEC)
275  min_dim = 0;
276  else
277  min_dim = 2;
278 
279  // Build an FE object for this type for each dimension up to the dimension of the current mesh
280  // Note that NEDELEC_ONE elements can only be built for dimension > 2. The for loop logic should
281  // be modified for LAGRANGE_VEC
282  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
283  {
284  if (!_vector_fe[dim][type])
285  _vector_fe[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
286 
287  _vector_fe[dim][type]->get_phi();
288  _vector_fe[dim][type]->get_dphi();
289  _vector_fe[dim][type]->get_curl_phi();
290  // Pre-request xyz. We have always computed xyz, but due to
291  // recent optimizations in libmesh, we now need to explicity
292  // request it, since apps (Yak) may rely on it being computed.
293  _vector_fe[dim][type]->get_xyz();
294  }
295 }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:1083
unsigned int _mesh_dimension
Definition: Assembly.h:1055
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1282

◆ buildVectorNeighborFE()

void Assembly::buildVectorNeighborFE ( FEType  type)

Build Vector FEs for a neighbor with a type.

Parameters
typeThe type of FE

Definition at line 325 of file Assembly.C.

Referenced by getVectorFENeighbor().

326 {
328  _vector_fe_shape_data_neighbor[type] = new VectorFEShapeData;
329 
330  unsigned int min_dim;
331  if (type.family == LAGRANGE_VEC)
332  min_dim = 0;
333  else
334  min_dim = 2;
335 
336  // Build an VectorFE object for this type for each dimension up to the dimension of the current
337  // mesh
338  // Note that NEDELEC_ONE elements can only be built for dimension > 2. The for loop logic should
339  // be modified for LAGRANGE_VEC
340  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
341  {
342  if (!_vector_fe_neighbor[dim][type])
343  _vector_fe_neighbor[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
344 
345  _vector_fe_neighbor[dim][type]->get_phi();
346  _vector_fe_neighbor[dim][type]->get_dphi();
347  _vector_fe_neighbor[dim][type]->get_curl_phi();
348  }
349 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1284
unsigned int _mesh_dimension
Definition: Assembly.h:1055
MatType type
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:1147

◆ cacheJacobian()

void Assembly::cacheJacobian ( )

Takes the values that are currently in _sub_Kee and appends them to the cached values.

Definition at line 1968 of file Assembly.C.

1969 {
1970  for (const auto & it : _cm_ff_entry)
1971  cacheJacobianCoupledVarPair(it.first, it.second);
1972 
1973  for (const auto & it : _cm_fs_entry)
1974  cacheJacobianCoupledVarPair(it.first, it.second);
1975 
1976  for (const auto & it : _cm_sf_entry)
1977  cacheJacobianCoupledVarPair(it.first, it.second);
1978 }
std::vector< std::pair< MooseVariableFEBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:1036
void cacheJacobianCoupledVarPair(MooseVariableBase *ivar, MooseVariableBase *jvar)
Caches element matrix for ivar rows and jvar columns.
Definition: Assembly.C:1953
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1034
std::vector< std::pair< MooseVariableScalar *, MooseVariableFEBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:1038

◆ cacheJacobianBlock()

void Assembly::cacheJacobianBlock ( DenseMatrix< Number > &  jac_block,
std::vector< dof_id_type > &  idof_indices,
std::vector< dof_id_type > &  jdof_indices,
Real  scaling_factor,
TagID  tag = 0 
)

Definition at line 1762 of file Assembly.C.

Referenced by cacheJacobianCoupledVarPair(), cacheJacobianNeighbor(), NodalConstraint::computeJacobian(), and NonlinearSystemBase::constraintJacobians().

1767 {
1768  // Only cache data when the matrix exists
1769  if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m() &&
1770  _sys.hasMatrix(tag))
1771  {
1772  std::vector<dof_id_type> di(idof_indices);
1773  std::vector<dof_id_type> dj(jdof_indices);
1774  _dof_map.constrain_element_matrix(jac_block, di, dj, false);
1775 
1776  if (scaling_factor != 1.0)
1777  jac_block *= scaling_factor;
1778 
1779  for (unsigned int i = 0; i < di.size(); i++)
1780  for (unsigned int j = 0; j < dj.size(); j++)
1781  {
1782  _cached_jacobian_values[tag].push_back(jac_block(i, j));
1783  _cached_jacobian_rows[tag].push_back(di[i]);
1784  _cached_jacobian_cols[tag].push_back(dj[j]);
1785  }
1786  }
1787  jac_block.zero();
1788 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:1298
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:1296
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1049
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:1300

◆ cacheJacobianBlockNonlocal()

void Assembly::cacheJacobianBlockNonlocal ( DenseMatrix< Number > &  jac_block,
const std::vector< dof_id_type > &  idof_indices,
const std::vector< dof_id_type > &  jdof_indices,
Real  scaling_factor,
TagID  tag = 0 
)

Definition at line 1791 of file Assembly.C.

Referenced by cacheJacobianNonlocal().

1796 {
1797  if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m() &&
1798  _sys.hasMatrix(tag))
1799  {
1800  std::vector<dof_id_type> di(idof_indices);
1801  std::vector<dof_id_type> dj(jdof_indices);
1802  _dof_map.constrain_element_matrix(jac_block, di, dj, false);
1803 
1804  if (scaling_factor != 1.0)
1805  jac_block *= scaling_factor;
1806 
1807  for (unsigned int i = 0; i < di.size(); i++)
1808  for (unsigned int j = 0; j < dj.size(); j++)
1809  if (jac_block(i, j) != 0.0) // no storage allocated for unimplemented jacobian terms,
1810  // maintaining maximum sparsity possible
1811  {
1812  _cached_jacobian_values[tag].push_back(jac_block(i, j));
1813  _cached_jacobian_rows[tag].push_back(di[i]);
1814  _cached_jacobian_cols[tag].push_back(dj[j]);
1815  }
1816  }
1817  jac_block.zero();
1818 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:1298
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:1296
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1049
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:1300

◆ cacheJacobianContribution() [1/2]

void Assembly::cacheJacobianContribution ( numeric_index_type  i,
numeric_index_type  j,
Real  value,
TagID  tag = 0 
)

Caches the Jacobian entry 'value', to eventually be added/set in the (i,j) location of the matrix.

We use numeric_index_type for the index arrays (rather than dof_id_type) since that is what the SparseMatrix interface uses, but at the time of this writing, those two types are equivalent.

Definition at line 2145 of file Assembly.C.

Referenced by cacheJacobianContribution(), VectorNodalBC::computeJacobian(), NodalBC::computeJacobian(), NodalKernel::computeJacobian(), VectorNodalBC::computeOffDiagJacobian(), NodalBC::computeOffDiagJacobian(), and NodalKernel::computeOffDiagJacobian().

2149 {
2150  _cached_jacobian_contribution_rows[tag].push_back(i);
2151  _cached_jacobian_contribution_cols[tag].push_back(j);
2152  _cached_jacobian_contribution_vals[tag].push_back(value);
2153 }
std::vector< std::vector< Real > > _cached_jacobian_contribution_vals
Storage for cached Jacobian entries.
Definition: Assembly.h:1316
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_cols
Definition: Assembly.h:1318
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_rows
Definition: Assembly.h:1317

◆ cacheJacobianContribution() [2/2]

void Assembly::cacheJacobianContribution ( numeric_index_type  i,
numeric_index_type  j,
Real  value,
const std::set< TagID > &  tags 
)

Definition at line 2156 of file Assembly.C.

2160 {
2161  for (auto tag : tags)
2162  if (_sys.hasMatrix(tag))
2163  cacheJacobianContribution(i, j, value, tag);
2164 }
SystemBase & _sys
Definition: Assembly.h:1028
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
void cacheJacobianContribution(numeric_index_type i, numeric_index_type j, Real value, TagID tag=0)
Caches the Jacobian entry &#39;value&#39;, to eventually be added/set in the (i,j) location of the matrix...
Definition: Assembly.C:2145

◆ cacheJacobianCoupledVarPair()

void Assembly::cacheJacobianCoupledVarPair ( MooseVariableBase ivar,
MooseVariableBase jvar 
)
inline

Caches element matrix for ivar rows and jvar columns.

Definition at line 1953 of file Assembly.C.

Referenced by cacheJacobian().

1954 {
1955  auto i = ivar->number();
1956  auto j = jvar->number();
1957  for (unsigned int tag = beginIndex(_jacobian_block_used); tag < _jacobian_block_used.size();
1958  tag++)
1959  if (_jacobian_block_used[tag][i][j] && _sys.hasMatrix(tag))
1960  cacheJacobianBlock(jacobianBlock(i, j, tag),
1961  ivar->dofIndices(),
1962  jvar->dofIndices(),
1963  ivar->scalingFactor(),
1964  tag);
1965 }
SystemBase & _sys
Definition: Assembly.h:1028
unsigned int number() const
Get variable number coming from libMesh.
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:934
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:1044
void cacheJacobianBlock(DenseMatrix< Number > &jac_block, std::vector< dof_id_type > &idof_indices, std::vector< dof_id_type > &jdof_indices, Real scaling_factor, TagID tag=0)
Definition: Assembly.C:1762
std::vector< dof_id_type > & dofIndices()
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ cacheJacobianNeighbor()

void Assembly::cacheJacobianNeighbor ( )

Takes the values that are currently in the neighbor Dense Matrices and appends them to the cached values.

Definition at line 2002 of file Assembly.C.

2003 {
2004  for (const auto & it : _cm_ff_entry)
2005  {
2006  auto ivar = it.first;
2007  auto jvar = it.second;
2008  auto i = ivar->number();
2009  auto j = jvar->number();
2010 
2011  for (auto tag = beginIndex(_jacobian_block_neighbor_used);
2012  tag < _jacobian_block_neighbor_used.size();
2013  tag++)
2014  if (_jacobian_block_neighbor_used[tag][i][j] && _sys.hasMatrix(tag))
2015  {
2017  ivar->dofIndices(),
2018  jvar->dofIndicesNeighbor(),
2019  ivar->scalingFactor(),
2020  tag);
2022  ivar->dofIndicesNeighbor(),
2023  jvar->dofIndices(),
2024  ivar->scalingFactor(),
2025  tag);
2027  ivar->dofIndicesNeighbor(),
2028  jvar->dofIndicesNeighbor(),
2029  ivar->scalingFactor(),
2030  tag);
2031  }
2032  }
2033 }
SystemBase & _sys
Definition: Assembly.h:1028
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1034
void cacheJacobianBlock(DenseMatrix< Number > &jac_block, std::vector< dof_id_type > &idof_indices, std::vector< dof_id_type > &jdof_indices, Real scaling_factor, TagID tag=0)
Definition: Assembly.C:1762
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:948
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_neighbor_used
Flag that indicates if the jacobian block for neighbor was used.
Definition: Assembly.h:1047

◆ cacheJacobianNonlocal()

void Assembly::cacheJacobianNonlocal ( )

Takes the values that are currently in _sub_Keg and appends them to the cached values.

Definition at line 1981 of file Assembly.C.

1982 {
1983  for (const auto & it : _cm_nonlocal_entry)
1984  {
1985  auto ivar = it.first;
1986  auto jvar = it.second;
1987  auto i = ivar->number();
1988  auto j = jvar->number();
1989  for (auto tag = beginIndex(_jacobian_block_nonlocal_used);
1990  tag < _jacobian_block_nonlocal_used.size();
1991  tag++)
1992  if (_jacobian_block_nonlocal_used[tag][i][j] && _sys.hasMatrix(tag))
1994  ivar->dofIndices(),
1995  jvar->allDofIndices(),
1996  ivar->scalingFactor(),
1997  tag);
1998  }
1999 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:1045
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:766
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:941
void cacheJacobianBlockNonlocal(DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, TagID tag=0)
Definition: Assembly.C:1791
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:1042

◆ cacheResidual()

void Assembly::cacheResidual ( )

Takes the values that are currently in _sub_Re and appends them to the cached values.

Definition at line 1584 of file Assembly.C.

1585 {
1586  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
1587  for (const auto & var : vars)
1588  {
1589  for (auto tag = beginIndex(_cached_residual_values); tag < _cached_residual_values.size();
1590  tag++)
1591  if (_sys.hasVector(tag))
1593  _cached_residual_rows[tag],
1594  _sub_Re[tag][var->number()],
1595  var->dofIndices(),
1596  var->scalingFactor());
1597  }
1598 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
Definition: Assembly.h:1291
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:670
void cacheResidualBlock(std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:1494
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:550
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
std::vector< std::vector< DenseVector< Number > > > _sub_Re
residual contributions for each variable from the element
Definition: Assembly.h:1199
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1288

◆ cacheResidualBlock()

void Assembly::cacheResidualBlock ( std::vector< Real > &  cached_residual_values,
std::vector< dof_id_type > &  cached_residual_rows,
DenseVector< Number > &  res_block,
std::vector< dof_id_type > &  dof_indices,
Real  scaling_factor 
)
protected

Definition at line 1494 of file Assembly.C.

Referenced by cacheResidual(), and cacheResidualNeighbor().

1499 {
1500  if (dof_indices.size() > 0 && res_block.size())
1501  {
1502  _temp_dof_indices = dof_indices;
1503  _dof_map.constrain_element_vector(res_block, _temp_dof_indices, false);
1504 
1505  if (scaling_factor != 1.0)
1506  {
1507  _tmp_Re = res_block;
1508  _tmp_Re *= scaling_factor;
1509 
1510  for (unsigned int i = 0; i < _tmp_Re.size(); i++)
1511  {
1512  cached_residual_values.push_back(_tmp_Re(i));
1513  cached_residual_rows.push_back(_temp_dof_indices[i]);
1514  }
1515  }
1516  else
1517  {
1518  for (unsigned int i = 0; i < res_block.size(); i++)
1519  {
1520  cached_residual_values.push_back(res_block(i));
1521  cached_residual_rows.push_back(_temp_dof_indices[i]);
1522  }
1523  }
1524  }
1525 
1526  res_block.zero();
1527 }
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1203
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1049
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:1308

◆ cacheResidualContribution() [1/2]

void Assembly::cacheResidualContribution ( dof_id_type  dof,
Real  value,
TagID  tag_id 
)

Cache individual residual contributions.

These will ultimately get added to the residual when addCachedResidual() is called.

Parameters
dofThe degree of freedom to add the residual contribution to
valueThe value of the residual contribution.
TagIDthe contribution should go to the tagged residual

Definition at line 1601 of file Assembly.C.

Referenced by cacheResidualContribution(), TimeNodalKernel::computeResidual(), and NodalKernel::computeResidual().

1602 {
1603  _cached_residual_values[tag_id].push_back(value);
1604  _cached_residual_rows[tag_id].push_back(dof);
1605 }
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
Definition: Assembly.h:1291
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1288

◆ cacheResidualContribution() [2/2]

void Assembly::cacheResidualContribution ( dof_id_type  dof,
Real  value,
const std::set< TagID > &  tags 
)

Cache individual residual contributions.

These will ultimately get added to the residual when addCachedResidual() is called.

Parameters
dofThe degree of freedom to add the residual contribution to
valueThe value of the residual contribution.
tagsthe contribution should go to all tags

Definition at line 1608 of file Assembly.C.

1609 {
1610  for (auto & tag : tags)
1611  cacheResidualContribution(dof, value, tag);
1612 }
void cacheResidualContribution(dof_id_type dof, Real value, TagID tag_id)
Cache individual residual contributions.
Definition: Assembly.C:1601

◆ cacheResidualNeighbor()

void Assembly::cacheResidualNeighbor ( )

Takes the values that are currently in _sub_Ke and appends them to the cached values.

Definition at line 1615 of file Assembly.C.

1616 {
1617  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
1618  for (const auto & var : vars)
1619  {
1620  for (auto tag = beginIndex(_cached_residual_values); tag < _cached_residual_values.size();
1621  tag++)
1622  {
1623  if (_sys.hasVector(tag))
1625  _cached_residual_rows[tag],
1626  _sub_Rn[tag][var->number()],
1627  var->dofIndicesNeighbor(),
1628  var->scalingFactor());
1629  }
1630  }
1631 }
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
Definition: Assembly.h:1291
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:670
void cacheResidualBlock(std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:1494
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
residual contributions for each variable from the neighbor
Definition: Assembly.h:1201
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:550
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1288

◆ cacheResidualNodes()

void Assembly::cacheResidualNodes ( const DenseVector< Number > &  res,
std::vector< dof_id_type > &  dof_index,
TagID  tag = 0 
)

Lets an external class cache residual at a set of nodes.

Definition at line 1634 of file Assembly.C.

Referenced by NodalConstraint::computeResidual().

1637 {
1638  // Add the residual value and dof_index to cached_residual_values and cached_residual_rows
1639  // respectively.
1640  // This is used by NodalConstraint.C to cache the residual calculated for master and slave node.
1641  for (unsigned int i = 0; i < dof_index.size(); ++i)
1642  {
1643  _cached_residual_values[tag].push_back(res(i));
1644  _cached_residual_rows[tag].push_back(dof_index[i]);
1645  }
1646 }
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
Definition: Assembly.h:1291
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1288

◆ clearCachedJacobianContributions()

void Assembly::clearCachedJacobianContributions ( )
protected

Clear any currently cached jacobian contributions.

This is automatically called by setCachedJacobianContributions and addCachedJacobianContributions

Definition at line 2219 of file Assembly.C.

Referenced by addCachedJacobianContributions(), setCachedJacobianContributions(), and zeroCachedJacobianContributions().

2220 {
2221  for (auto tag = beginIndex(_cached_jacobian_contribution_rows);
2223  tag++)
2224  {
2225  unsigned int orig_size = _cached_jacobian_contribution_rows[tag].size();
2226 
2230 
2231  // It's possible (though massively unlikely) that clear() will
2232  // change the capacity of the vectors, so let's be paranoid and
2233  // explicitly reserve() the same amount of memory to avoid multiple
2234  // push_back() induced allocations. We reserve 20% more than the
2235  // original size that was cached to account for variations in the
2236  // number of BCs assigned to each thread (for when the Jacobian
2237  // contributions are computed threaded).
2238  _cached_jacobian_contribution_rows[tag].reserve(1.2 * orig_size);
2239  _cached_jacobian_contribution_cols[tag].reserve(1.2 * orig_size);
2240  _cached_jacobian_contribution_vals[tag].reserve(1.2 * orig_size);
2241  }
2242 }
std::vector< std::vector< Real > > _cached_jacobian_contribution_vals
Storage for cached Jacobian entries.
Definition: Assembly.h:1316
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_cols
Definition: Assembly.h:1318
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_rows
Definition: Assembly.h:1317

◆ computeCurrentElemVolume()

void Assembly::computeCurrentElemVolume ( )
protected

Definition at line 761 of file Assembly.C.

Referenced by reinit().

762 {
764  return;
765 
767 
769  for (unsigned int qp = 0; qp < _current_qrule->n_points(); qp++)
771 
773 }
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:1089
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:1101
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:1191
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:1167
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:1097
void setCoordinateTransformation(const QBase *qrule, const MooseArray< Point > &q_points)
Definition: Assembly.C:731
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:1095

◆ computeCurrentFaceVolume()

void Assembly::computeCurrentFaceVolume ( )
protected

Definition at line 776 of file Assembly.C.

Referenced by reinit().

777 {
779  return;
780 
782 
784  for (unsigned int qp = 0; qp < _current_qrule_face->n_points(); qp++)
786 
788 }
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:1101
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:1128
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:1173
void setCoordinateTransformation(const QBase *qrule, const MooseArray< Point > &q_points)
Definition: Assembly.C:731
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:1193
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:1126
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:1122

◆ computeCurrentNeighborVolume()

void Assembly::computeCurrentNeighborVolume ( )
protected

◆ coordSystem()

const Moose::CoordinateSystemType& Assembly::coordSystem ( )
inline

Get the coordinate system type.

Returns
A reference to the coordinate system type

Definition at line 240 of file Assembly.h.

240 { return _coord_type; }
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:1099

◆ coordTransformation()

const MooseArray<Real>& Assembly::coordTransformation ( )
inline

Returns the reference to the coordinate transformation coefficients.

Returns
A reference. Make sure to store this as a reference!

Definition at line 234 of file Assembly.h.

234 { return _coord; }
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:1101

◆ copyFaceShapes() [1/2]

template<typename T >
void Assembly::copyFaceShapes ( MooseVariableFE< T > &  v)

Definition at line 1408 of file Assembly.C.

Referenced by copyFaceShapes().

1409 {
1410  phiFace(v).shallowCopy(v.phiFace());
1412  if (v.computingSecond())
1414 }
const VariablePhiSecond & secondPhiFace(MooseVariable &) const
Definition: Assembly.h:659
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:279
const FieldVariablePhiGradient & gradPhiFace()
const VariablePhiValue & phiFace() const
Definition: Assembly.h:655
const FieldVariablePhiSecond & secondPhiFace()
const FieldVariablePhiValue & phiFace()
bool computingSecond()
Whether or not this variable is computing any second derivatives.
const VariablePhiGradient & gradPhiFace() const
Definition: Assembly.h:657

◆ copyFaceShapes() [2/2]

void Assembly::copyFaceShapes ( unsigned int  var)

Definition at line 1417 of file Assembly.C.

1418 {
1419  try
1420  {
1421  MooseVariable & v = _sys.getFieldVariable<Real>(_tid, var);
1422  copyFaceShapes(v);
1423  }
1424  catch (std::out_of_range & e)
1425  {
1426  VectorMooseVariable & v = _sys.getFieldVariable<RealVectorValue>(_tid, var);
1427  copyFaceShapes(v);
1428  if (v.computingCurl())
1430  }
1431 }
SystemBase & _sys
Definition: Assembly.h:1028
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:279
const FieldVariablePhiCurl & curlPhi()
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:121
bool computingCurl()
Whether or not this variable is computing the curl.
void copyFaceShapes(MooseVariableFE< T > &v)
Definition: Assembly.C:1408
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:1245

◆ copyNeighborShapes() [1/2]

template<typename T >
void Assembly::copyNeighborShapes ( MooseVariableFE< T > &  v)

Definition at line 1435 of file Assembly.C.

Referenced by copyNeighborShapes().

1436 {
1437  if (v.usesPhiNeighbor())
1438  {
1441  }
1442  if (v.usesGradPhiNeighbor())
1443  {
1446  }
1447  if (v.usesSecondPhiNeighbor())
1448  {
1451  }
1452 }
const FieldVariablePhiSecond & secondPhiNeighbor()
const VariablePhiSecond & secondPhiFaceNeighbor(MooseVariable &) const
Definition: Assembly.h:673
bool usesSecondPhiNeighbor()
Whether or not this variable is actually using the shape function second derivative on a neighbor...
bool usesPhiNeighbor()
Whether or not this variable is actually using the shape function value.
const VariablePhiGradient & gradPhiFaceNeighbor(MooseVariable &) const
Definition: Assembly.h:669
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:279
bool usesGradPhiNeighbor()
Whether or not this variable is actually using the shape function gradient.
const FieldVariablePhiValue & phiNeighbor()
const FieldVariablePhiValue & phiFaceNeighbor()
const VariablePhiGradient & gradPhiNeighbor(MooseVariable &) const
Definition: Assembly.h:662
const VariablePhiValue & phiNeighbor(MooseVariable &) const
Definition: Assembly.h:661
const FieldVariablePhiGradient & gradPhiFaceNeighbor()
const FieldVariablePhiGradient & gradPhiNeighbor()
const FieldVariablePhiSecond & secondPhiFaceNeighbor()
const VariablePhiSecond & secondPhiNeighbor(MooseVariable &) const
Definition: Assembly.h:663
const VariablePhiValue & phiFaceNeighbor(MooseVariable &) const
Definition: Assembly.h:668

◆ copyNeighborShapes() [2/2]

void Assembly::copyNeighborShapes ( unsigned int  var)

Definition at line 1455 of file Assembly.C.

1456 {
1457  try
1458  {
1459  MooseVariable & v = _sys.getFieldVariable<Real>(_tid, var);
1460  copyNeighborShapes(v);
1461  }
1462  catch (std::out_of_range & e)
1463  {
1464  VectorMooseVariable & v = _sys.getFieldVariable<RealVectorValue>(_tid, var);
1465  copyNeighborShapes(v);
1466  }
1467 }
SystemBase & _sys
Definition: Assembly.h:1028
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
void copyNeighborShapes(MooseVariableFE< T > &v)
Definition: Assembly.C:1435
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:121

◆ copyShapes() [1/2]

template<typename T >
void Assembly::copyShapes ( MooseVariableFE< T > &  v)

Definition at line 1381 of file Assembly.C.

Referenced by copyShapes().

1382 {
1383  phi(v).shallowCopy(v.phi());
1384  gradPhi(v).shallowCopy(v.gradPhi());
1385  if (v.computingSecond())
1387 }
const FieldVariablePhiSecond & secondPhi()
const VariablePhiSecond & secondPhi() const
Definition: Assembly.h:652
const VariablePhiValue & phi() const
Definition: Assembly.h:648
const VariablePhiGradient & gradPhi() const
Definition: Assembly.h:650
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:279
const FieldVariablePhiGradient & gradPhi()
const FieldVariablePhiValue & phi()
bool computingSecond()
Whether or not this variable is computing any second derivatives.

◆ copyShapes() [2/2]

void Assembly::copyShapes ( unsigned int  var)

Definition at line 1390 of file Assembly.C.

1391 {
1392  try
1393  {
1394  MooseVariable & v = _sys.getFieldVariable<Real>(_tid, var);
1395  copyShapes(v);
1396  }
1397  catch (std::out_of_range & e)
1398  {
1399  VectorMooseVariable & v = _sys.getFieldVariable<RealVectorValue>(_tid, var);
1400  copyShapes(v);
1401  if (v.computingCurl())
1402  curlPhi(v).shallowCopy(v.curlPhi());
1403  }
1404 }
SystemBase & _sys
Definition: Assembly.h:1028
const VectorVariablePhiCurl & curlPhi(VectorMooseVariable &) const
Definition: Assembly.h:687
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:279
const FieldVariablePhiCurl & curlPhi()
void copyShapes(MooseVariableFE< T > &v)
Definition: Assembly.C:1381
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:121
bool computingCurl()
Whether or not this variable is computing the curl.

◆ couplingEntries()

std::vector<std::pair<MooseVariableFEBase *, MooseVariableFEBase *> >& Assembly::couplingEntries ( )
inline

Definition at line 638 of file Assembly.h.

639  {
640  return _cm_ff_entry;
641  }
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1034

◆ createQRules()

void Assembly::createQRules ( QuadratureType  type,
Order  order,
Order  volume_order,
Order  face_order 
)

Creates the volume, face and arbitrary qrules based on the orders passed in.

Definition at line 387 of file Assembly.C.

388 {
389  _holder_qrule_volume.clear();
390  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
391  _holder_qrule_volume[dim] = QBase::build(type, dim, volume_order).release();
392 
393  _holder_qrule_face.clear();
394  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
395  _holder_qrule_face[dim] = QBase::build(type, dim - 1, face_order).release();
396 
397  _holder_qrule_neighbor.clear();
398  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
399  _holder_qrule_neighbor[dim] = new ArbitraryQuadrature(dim, face_order);
400 
401  _holder_qrule_arbitrary.clear();
402  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
403  _holder_qrule_arbitrary[dim] = new ArbitraryQuadrature(dim, order);
404 }
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_neighbor
Holds arbitrary qrules for each dimension.
Definition: Assembly.h:1156
unsigned int _mesh_dimension
Definition: Assembly.h:1055
std::map< unsigned int, QBase * > _holder_qrule_face
Holds face qrules for each dimension.
Definition: Assembly.h:1132
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_arbitrary
Holds arbitrary qrules for each dimension.
Definition: Assembly.h:1105
MatType type
std::map< unsigned int, QBase * > _holder_qrule_volume
Holds volume qrules for each dimension.
Definition: Assembly.h:1103

◆ curlPhi() [1/2]

const VectorVariablePhiCurl& Assembly::curlPhi ( VectorMooseVariable ) const
inline

Definition at line 687 of file Assembly.h.

Referenced by copyShapes().

687 { return _vector_curl_phi; }
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:1240

◆ curlPhi() [2/2]

VectorVariablePhiCurl& Assembly::curlPhi ( VectorMooseVariable )
inline

Definition at line 757 of file Assembly.h.

757 { return _vector_curl_phi; }
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:1240

◆ curlPhiFace() [1/2]

const VectorVariablePhiCurl& Assembly::curlPhiFace ( VectorMooseVariable ) const
inline

Definition at line 698 of file Assembly.h.

699  {
700  return _vector_curl_phi_face;
701  }
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:1245

◆ curlPhiFace() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiFace ( VectorMooseVariable )
inline

Definition at line 762 of file Assembly.h.

762 { return _vector_curl_phi_face; }
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:1245

◆ curlPhiFaceNeighbor() [1/2]

const VectorVariablePhiCurl& Assembly::curlPhiFaceNeighbor ( VectorMooseVariable ) const
inline

Definition at line 732 of file Assembly.h.

733  {
735  }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:1255

◆ curlPhiFaceNeighbor() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiFaceNeighbor ( VectorMooseVariable )
inline

Definition at line 790 of file Assembly.h.

791  {
793  }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:1255

◆ curlPhiNeighbor() [1/2]

const VectorVariablePhiCurl& Assembly::curlPhiNeighbor ( VectorMooseVariable ) const
inline

Definition at line 715 of file Assembly.h.

716  {
718  }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:1250

◆ curlPhiNeighbor() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiNeighbor ( VectorMooseVariable )
inline

Definition at line 773 of file Assembly.h.

774  {
776  }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:1250

◆ currentNeighborSubdomainID()

const SubdomainID& Assembly::currentNeighborSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 321 of file Assembly.h.

SubdomainID _current_neighbor_subdomain_id
The current neighbor subdomain ID.
Definition: Assembly.h:1177

◆ currentSubdomainID()

const SubdomainID& Assembly::currentSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 275 of file Assembly.h.

275 { return _current_subdomain_id; }
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:1165

◆ elem()

const Elem*& Assembly::elem ( )
inline

Return the current element.

Returns
A reference. Make sure to store this as a reference!

Definition at line 270 of file Assembly.h.

Referenced by modifyFaceWeightsDueToXFEM(), modifyWeightsDueToXFEM(), reinit(), reinitAtPhysical(), reinitElemAndNeighbor(), reinitFE(), and reinitFEFace().

270 { return _current_elem; }
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:1163

◆ elemVolume()

const Real& Assembly::elemVolume ( )
inline

Returns the reference to the current element volume.

Returns
A reference. Make sure to store this as a reference!

Definition at line 286 of file Assembly.h.

286 { return _current_elem_volume; }
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:1167

◆ feCurlPhi() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiCurl& Assembly::feCurlPhi ( FEType  type)
inline

Definition at line 884 of file Assembly.h.

Referenced by MooseVariableFE< Real >::curlPhi().

885  {
886  _need_curl[type] = true;
887  buildFE(type);
888  return _fe_shape_data[type]->_curl_phi;
889  }
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:188
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1276
std::map< FEType, bool > _need_curl
Definition: Assembly.h:917

◆ feCurlPhi() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiCurl& Assembly::feCurlPhi ( FEType  type)

◆ feCurlPhi() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiCurl& Assembly::feCurlPhi ( FEType  type)

Definition at line 2387 of file Assembly.C.

2388 {
2389  _need_curl[type] = true;
2391  return _vector_fe_shape_data[type]->_curl_phi;
2392 }
void buildVectorFE(FEType type)
Build Vector FEs with a type.
Definition: Assembly.C:268
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1282
std::map< FEType, bool > _need_curl
Definition: Assembly.h:917

◆ feCurlPhiFace() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiCurl& Assembly::feCurlPhiFace ( FEType  type)
inline

Definition at line 892 of file Assembly.h.

Referenced by MooseVariableFE< Real >::curlPhiFace().

893  {
894  _need_curl[type] = true;
895  buildFaceFE(type);
896  return _fe_shape_data_face[type]->_curl_phi;
897  }
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:211
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1277
std::map< FEType, bool > _need_curl
Definition: Assembly.h:917

◆ feCurlPhiFace() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiCurl& Assembly::feCurlPhiFace ( FEType  type)

◆ feCurlPhiFace() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiCurl& Assembly::feCurlPhiFace ( FEType  type)

Definition at line 2396 of file Assembly.C.

2397 {
2398  _need_curl[type] = true;
2400  return _vector_fe_shape_data_face[type]->_curl_phi;
2401 }
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:298
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1283
std::map< FEType, bool > _need_curl
Definition: Assembly.h:917

◆ feCurlPhiFaceNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiCurl& Assembly::feCurlPhiFaceNeighbor ( FEType  type)
inline

Definition at line 908 of file Assembly.h.

Referenced by MooseVariableFE< Real >::curlPhiFaceNeighbor().

909  {
910  _need_curl[type] = true;
912  return _fe_shape_data_face_neighbor[type]->_curl_phi;
913  }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1279
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:249
MatType type
std::map< FEType, bool > _need_curl
Definition: Assembly.h:917

◆ feCurlPhiFaceNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiCurl& Assembly::feCurlPhiFaceNeighbor ( FEType  type)

◆ feCurlPhiFaceNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiCurl& Assembly::feCurlPhiFaceNeighbor ( FEType  type)

Definition at line 2414 of file Assembly.C.

2415 {
2416  _need_curl[type] = true;
2418  return _vector_fe_shape_data_face_neighbor[type]->_curl_phi;
2419 }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:352
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1285
MatType type
std::map< FEType, bool > _need_curl
Definition: Assembly.h:917

◆ feCurlPhiNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiCurl& Assembly::feCurlPhiNeighbor ( FEType  type)
inline

Definition at line 900 of file Assembly.h.

Referenced by MooseVariableFE< Real >::curlPhiNeighbor().

901  {
902  _need_curl[type] = true;
904  return _fe_shape_data_neighbor[type]->_curl_phi;
905  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:230
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1278
MatType type
std::map< FEType, bool > _need_curl
Definition: Assembly.h:917

◆ feCurlPhiNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiCurl& Assembly::feCurlPhiNeighbor ( FEType  type)

◆ feCurlPhiNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiCurl& Assembly::feCurlPhiNeighbor ( FEType  type)

Definition at line 2405 of file Assembly.C.

2406 {
2407  _need_curl[type] = true;
2409  return _vector_fe_shape_data_neighbor[type]->_curl_phi;
2410 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1284
MatType type
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:325
std::map< FEType, bool > _need_curl
Definition: Assembly.h:917

◆ feGradPhi() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiGradient& Assembly::feGradPhi ( FEType  type)
inline

Definition at line 803 of file Assembly.h.

804  {
805  buildFE(type);
806  return _fe_shape_data[type]->_grad_phi;
807  }
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:188
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1276

◆ feGradPhi() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiGradient& Assembly::feGradPhi ( FEType  type)

◆ feGradPhi() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiGradient& Assembly::feGradPhi ( FEType  type)

Definition at line 2295 of file Assembly.C.

2296 {
2298  return _vector_fe_shape_data[type]->_grad_phi;
2299 }
void buildVectorFE(FEType type)
Build Vector FEs with a type.
Definition: Assembly.C:268
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1282

◆ feGradPhiFace() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiGradient& Assembly::feGradPhiFace ( FEType  type)
inline

Definition at line 825 of file Assembly.h.

826  {
827  buildFaceFE(type);
828  return _fe_shape_data_face[type]->_grad_phi;
829  }
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:211
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1277

◆ feGradPhiFace() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiGradient& Assembly::feGradPhiFace ( FEType  type)

◆ feGradPhiFace() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiGradient& Assembly::feGradPhiFace ( FEType  type)

Definition at line 2320 of file Assembly.C.

2321 {
2323  return _vector_fe_shape_data_face[type]->_grad_phi;
2324 }
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:298
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1283

◆ feGradPhiFaceNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiGradient& Assembly::feGradPhiFaceNeighbor ( FEType  type)
inline

Definition at line 869 of file Assembly.h.

870  {
872  return _fe_shape_data_face_neighbor[type]->_grad_phi;
873  }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1279
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:249
MatType type

◆ feGradPhiFaceNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiGradient& Assembly::feGradPhiFaceNeighbor ( FEType  type)

◆ feGradPhiFaceNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiGradient& Assembly::feGradPhiFaceNeighbor ( FEType  type)

Definition at line 2370 of file Assembly.C.

2371 {
2373  return _vector_fe_shape_data_face_neighbor[type]->_grad_phi;
2374 }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:352
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1285
MatType type

◆ feGradPhiNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiGradient& Assembly::feGradPhiNeighbor ( FEType  type)
inline

Definition at line 847 of file Assembly.h.

848  {
850  return _fe_shape_data_neighbor[type]->_grad_phi;
851  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:230
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1278
MatType type

◆ feGradPhiNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiGradient& Assembly::feGradPhiNeighbor ( FEType  type)

◆ feGradPhiNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiGradient& Assembly::feGradPhiNeighbor ( FEType  type)

Definition at line 2345 of file Assembly.C.

2346 {
2348  return _vector_fe_shape_data_neighbor[type]->_grad_phi;
2349 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1284
MatType type
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:325

◆ fePhi() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiValue& Assembly::fePhi ( FEType  type)
inline

Definition at line 796 of file Assembly.h.

797  {
798  buildFE(type);
799  return _fe_shape_data[type]->_phi;
800  }
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:188
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1276

◆ fePhi() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiValue& Assembly::fePhi ( FEType  type)

◆ fePhi() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiValue& Assembly::fePhi ( FEType  type)

Definition at line 2287 of file Assembly.C.

2288 {
2290  return _vector_fe_shape_data[type]->_phi;
2291 }
void buildVectorFE(FEType type)
Build Vector FEs with a type.
Definition: Assembly.C:268
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1282

◆ fePhiFace() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiValue& Assembly::fePhiFace ( FEType  type)
inline

Definition at line 818 of file Assembly.h.

819  {
820  buildFaceFE(type);
821  return _fe_shape_data_face[type]->_phi;
822  }
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:211
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1277

◆ fePhiFace() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiValue& Assembly::fePhiFace ( FEType  type)

◆ fePhiFace() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiValue& Assembly::fePhiFace ( FEType  type)

Definition at line 2312 of file Assembly.C.

2313 {
2315  return _vector_fe_shape_data_face[type]->_phi;
2316 }
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:298
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1283

◆ fePhiFaceNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiValue& Assembly::fePhiFaceNeighbor ( FEType  type)
inline

Definition at line 862 of file Assembly.h.

863  {
865  return _fe_shape_data_face_neighbor[type]->_phi;
866  }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1279
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:249
MatType type

◆ fePhiFaceNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiValue& Assembly::fePhiFaceNeighbor ( FEType  type)

◆ fePhiFaceNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiValue& Assembly::fePhiFaceNeighbor ( FEType  type)

Definition at line 2362 of file Assembly.C.

2363 {
2366 }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:352
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1285
MatType type

◆ fePhiNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiValue& Assembly::fePhiNeighbor ( FEType  type)
inline

Definition at line 840 of file Assembly.h.

841  {
843  return _fe_shape_data_neighbor[type]->_phi;
844  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:230
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1278
MatType type

◆ fePhiNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiValue& Assembly::fePhiNeighbor ( FEType  type)

◆ fePhiNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiValue& Assembly::fePhiNeighbor ( FEType  type)

Definition at line 2337 of file Assembly.C.

2338 {
2340  return _vector_fe_shape_data_neighbor[type]->_phi;
2341 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1284
MatType type
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:325

◆ feSecondPhi() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiSecond& Assembly::feSecondPhi ( FEType  type)
inline

Definition at line 810 of file Assembly.h.

Referenced by MooseVariableFE< Real >::secondPhi().

811  {
813  buildFE(type);
814  return _fe_shape_data[type]->_second_phi;
815  }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:915
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:188
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1276

◆ feSecondPhi() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiSecond& Assembly::feSecondPhi ( FEType  type)

◆ feSecondPhi() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiSecond& Assembly::feSecondPhi ( FEType  type)

Definition at line 2303 of file Assembly.C.

2304 {
2305  _need_second_derivative[type] = true;
2307  return _vector_fe_shape_data[type]->_second_phi;
2308 }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:915
void buildVectorFE(FEType type)
Build Vector FEs with a type.
Definition: Assembly.C:268
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1282

◆ feSecondPhiFace() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiSecond& Assembly::feSecondPhiFace ( FEType  type)
inline

Definition at line 832 of file Assembly.h.

Referenced by MooseVariableFE< Real >::secondPhiFace().

833  {
835  buildFaceFE(type);
836  return _fe_shape_data_face[type]->_second_phi;
837  }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:915
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:211
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1277

◆ feSecondPhiFace() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiSecond& Assembly::feSecondPhiFace ( FEType  type)

◆ feSecondPhiFace() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiSecond& Assembly::feSecondPhiFace ( FEType  type)

Definition at line 2328 of file Assembly.C.

2329 {
2330  _need_second_derivative[type] = true;
2332  return _vector_fe_shape_data_face[type]->_second_phi;
2333 }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:915
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:298
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1283

◆ feSecondPhiFaceNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiSecond& Assembly::feSecondPhiFaceNeighbor ( FEType  type)
inline

Definition at line 876 of file Assembly.h.

Referenced by MooseVariableFE< Real >::secondPhiFaceNeighbor().

877  {
880  return _fe_shape_data_face_neighbor[type]->_second_phi;
881  }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1279
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:916
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:249
MatType type

◆ feSecondPhiFaceNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiSecond& Assembly::feSecondPhiFaceNeighbor ( FEType  type)

◆ feSecondPhiFaceNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiSecond& Assembly::feSecondPhiFaceNeighbor ( FEType  type)

Definition at line 2378 of file Assembly.C.

2379 {
2382  return _vector_fe_shape_data_face_neighbor[type]->_second_phi;
2383 }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:352
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:916
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1285
MatType type

◆ feSecondPhiNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiSecond& Assembly::feSecondPhiNeighbor ( FEType  type)
inline

Definition at line 854 of file Assembly.h.

Referenced by MooseVariableFE< Real >::secondPhiNeighbor().

855  {
858  return _fe_shape_data_neighbor[type]->_second_phi;
859  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:230
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:916
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1278
MatType type

◆ feSecondPhiNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiSecond& Assembly::feSecondPhiNeighbor ( FEType  type)

◆ feSecondPhiNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiSecond& Assembly::feSecondPhiNeighbor ( FEType  type)

Definition at line 2353 of file Assembly.C.

2354 {
2357  return _vector_fe_shape_data_neighbor[type]->_second_phi;
2358 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1284
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:916
MatType type
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:325

◆ getFE()

FEBase*& Assembly::getFE ( FEType  type,
unsigned int  dim 
)
inline

Get a reference to a pointer that will contain the current volume FE.

Parameters
typeThe type of FE
dimThe dimension of the current volume
Returns
A reference to the pointer. Make sure to store this as a reference!

Definition at line 116 of file Assembly.h.

Referenced by MortarConstraint::computeJacobian(), MooseVariableFE< Real >::MooseVariableFE(), and MortarConstraint::reinit().

117  {
118  buildFE(type);
119  return _fe[dim][type];
120  }
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:188
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:1081
MatType type

◆ getFEFace()

FEBase*& Assembly::getFEFace ( FEType  type,
unsigned int  dim 
)
inline

Get a reference to a pointer that will contain the current "face" FE.

Parameters
typeThe type of FE
dimThe dimension of the current face
Returns
A reference to the pointer. Make sure to store this as a reference!

Definition at line 140 of file Assembly.h.

141  {
142  buildFaceFE(type);
143  return _fe_face[dim][type];
144  }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:1114
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:211
MatType type

◆ getFEFaceNeighbor()

FEBase*& Assembly::getFEFaceNeighbor ( FEType  type,
unsigned int  dim 
)
inline

Get a reference to a pointer that will contain the current "neighbor" FE.

Parameters
typeThe type of FE
dimThe dimension of the neighbor face
Returns
A reference to the pointer. Make sure to store this as a reference!

Definition at line 152 of file Assembly.h.

153  {
155  return _fe_face_neighbor[dim][type];
156  }
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:249
MatType type
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:1146

◆ getFENeighbor()

FEBase*& Assembly::getFENeighbor ( FEType  type,
unsigned int  dim 
)
inline

Get a reference to a pointer that will contain the current 'neighbor' FE.

Parameters
typeThe type of FE
dimThe dimension of the current volume
Returns
A reference to the pointer. Make sure to store this as a reference!

Definition at line 128 of file Assembly.h.

129  {
131  return _fe_neighbor[dim][type];
132  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:230
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:1145
MatType type

◆ getVectorFE()

FEVectorBase*& Assembly::getVectorFE ( FEType  type,
unsigned int  dim 
)
inline

Get a reference to a pointer that will contain the current volume FEVector.

Parameters
typeThe type of FEVector
dimThe dimension of the current volume
Returns
A reference to the pointer. Make sure to store this as a reference!

Definition at line 164 of file Assembly.h.

Referenced by MooseVariableFE< Real >::MooseVariableFE().

165  {
167  return _vector_fe[dim][type];
168  }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:1083
void buildVectorFE(FEType type)
Build Vector FEs with a type.
Definition: Assembly.C:268
MatType type

◆ getVectorFEFace()

FEVectorBase*& Assembly::getVectorFEFace ( FEType  type,
unsigned int  dim 
)
inline

GetVector a reference to a pointer that will contain the current "face" FE.

Parameters
typeThe type of FE
dimThe dimension of the current face
Returns
A reference to the pointer. Make sure to store this as a reference!

Definition at line 188 of file Assembly.h.

189  {
191  return _vector_fe_face[dim][type];
192  }
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:298
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:1116
MatType type

◆ getVectorFEFaceNeighbor()

FEVectorBase*& Assembly::getVectorFEFaceNeighbor ( FEType  type,
unsigned int  dim 
)
inline

GetVector a reference to a pointer that will contain the current "neighbor" FE.

Parameters
typeThe type of FE
dimThe dimension of the neighbor face
Returns
A reference to the pointer. Make sure to store this as a reference!

Definition at line 200 of file Assembly.h.

201  {
203  return _vector_fe_face_neighbor[dim][type];
204  }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:352
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:1148
MatType type

◆ getVectorFENeighbor()

FEVectorBase*& Assembly::getVectorFENeighbor ( FEType  type,
unsigned int  dim 
)
inline

GetVector a reference to a pointer that will contain the current 'neighbor' FE.

Parameters
typeThe type of FE
dimThe dimension of the current volume
Returns
A reference to the pointer. Make sure to store this as a reference!

Definition at line 176 of file Assembly.h.

177  {
179  return _vector_fe_neighbor[dim][type];
180  }
MatType type
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:1147
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:325

◆ gradPhi() [1/5]

const VariablePhiGradient& Assembly::gradPhi ( ) const
inline

Definition at line 650 of file Assembly.h.

Referenced by copyShapes().

650 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:1221

◆ gradPhi() [2/5]

const VariablePhiGradient& Assembly::gradPhi ( MooseVariable ) const
inline

Definition at line 651 of file Assembly.h.

651 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:1221

◆ gradPhi() [3/5]

const VectorVariablePhiGradient& Assembly::gradPhi ( VectorMooseVariable ) const
inline

Definition at line 679 of file Assembly.h.

680  {
681  return _vector_grad_phi;
682  }
VectorVariablePhiGradient _vector_grad_phi
Definition: Assembly.h:1238

◆ gradPhi() [4/5]

VariablePhiGradient& Assembly::gradPhi ( MooseVariable )
inline

Definition at line 739 of file Assembly.h.

739 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:1221

◆ gradPhi() [5/5]

VectorVariablePhiGradient& Assembly::gradPhi ( VectorMooseVariable )
inline

Definition at line 755 of file Assembly.h.

755 { return _vector_grad_phi; }
VectorVariablePhiGradient _vector_grad_phi
Definition: Assembly.h:1238

◆ gradPhiFace() [1/5]

const VariablePhiGradient& Assembly::gradPhiFace ( ) const
inline

Definition at line 657 of file Assembly.h.

Referenced by copyFaceShapes().

657 { return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:1225

◆ gradPhiFace() [2/5]

const VariablePhiGradient& Assembly::gradPhiFace ( MooseVariable ) const
inline

Definition at line 658 of file Assembly.h.

658 { return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:1225

◆ gradPhiFace() [3/5]

const VectorVariablePhiGradient& Assembly::gradPhiFace ( VectorMooseVariable ) const
inline

Definition at line 690 of file Assembly.h.

691  {
692  return _vector_grad_phi_face;
693  }
VectorVariablePhiGradient _vector_grad_phi_face
Definition: Assembly.h:1243

◆ gradPhiFace() [4/5]

VariablePhiGradient& Assembly::gradPhiFace ( MooseVariable )
inline

Definition at line 743 of file Assembly.h.

743 { return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:1225

◆ gradPhiFace() [5/5]

VectorVariablePhiGradient& Assembly::gradPhiFace ( VectorMooseVariable )
inline

Definition at line 760 of file Assembly.h.

760 { return _vector_grad_phi_face; }
VectorVariablePhiGradient _vector_grad_phi_face
Definition: Assembly.h:1243

◆ gradPhiFaceNeighbor() [1/4]

const VariablePhiGradient& Assembly::gradPhiFaceNeighbor ( MooseVariable ) const
inline

Definition at line 669 of file Assembly.h.

Referenced by copyNeighborShapes().

670  {
672  }
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:1233

◆ gradPhiFaceNeighbor() [2/4]

const VectorVariablePhiGradient& Assembly::gradPhiFaceNeighbor ( VectorMooseVariable ) const
inline

Definition at line 724 of file Assembly.h.

725  {
727  }
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition: Assembly.h:1253

◆ gradPhiFaceNeighbor() [3/4]

VariablePhiGradient& Assembly::gradPhiFaceNeighbor ( MooseVariable )
inline

Definition at line 751 of file Assembly.h.

751 { return _grad_phi_face_neighbor; }
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:1233

◆ gradPhiFaceNeighbor() [4/4]

VectorVariablePhiGradient& Assembly::gradPhiFaceNeighbor ( VectorMooseVariable )
inline

Definition at line 782 of file Assembly.h.

783  {
785  }
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition: Assembly.h:1253

◆ gradPhiNeighbor() [1/4]

const VariablePhiGradient& Assembly::gradPhiNeighbor ( MooseVariable ) const
inline

Definition at line 662 of file Assembly.h.

Referenced by copyNeighborShapes().

662 { return _grad_phi_neighbor; }
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:1229

◆ gradPhiNeighbor() [2/4]

const VectorVariablePhiGradient& Assembly::gradPhiNeighbor ( VectorMooseVariable ) const
inline

Definition at line 707 of file Assembly.h.

708  {
710  }
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition: Assembly.h:1248

◆ gradPhiNeighbor() [3/4]

VariablePhiGradient& Assembly::gradPhiNeighbor ( MooseVariable )
inline

Definition at line 747 of file Assembly.h.

747 { return _grad_phi_neighbor; }
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:1229

◆ gradPhiNeighbor() [4/4]

VectorVariablePhiGradient& Assembly::gradPhiNeighbor ( VectorMooseVariable )
inline

Definition at line 765 of file Assembly.h.

766  {
768  }
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition: Assembly.h:1248

◆ init() [1/2]

void Assembly::init ( const CouplingMatrix *  cm)

Initialize the Assembly object and set the CouplingMatrix for use throughout.

Definition at line 987 of file Assembly.C.

988 {
989  _cm = cm;
990 
991  unsigned int n_vars = _sys.nVariables();
992 
993  _cm_ss_entry.clear();
994  _cm_sf_entry.clear();
995  _cm_fs_entry.clear();
996  _cm_ff_entry.clear();
997 
998  auto & vars = _sys.getVariables(_tid);
999 
1000  _block_diagonal_matrix = true;
1001  for (auto & ivar : vars)
1002  {
1003  auto i = ivar->number();
1004  for (const auto & j : ConstCouplingRow(i, *_cm))
1005  {
1006  if (_sys.isScalarVariable(j))
1007  {
1008  auto & jvar = _sys.getScalarVariable(_tid, j);
1009  _cm_fs_entry.push_back(std::make_pair(ivar, &jvar));
1010  _block_diagonal_matrix = false;
1011  }
1012  else
1013  {
1014  auto & jvar = _sys.getVariable(_tid, j);
1015  _cm_ff_entry.push_back(std::make_pair(ivar, &jvar));
1016  if (i != j)
1017  _block_diagonal_matrix = false;
1018  }
1019  }
1020  }
1021 
1022  auto & scalar_vars = _sys.getScalarVariables(_tid);
1023 
1024  for (auto & ivar : scalar_vars)
1025  {
1026  auto i = ivar->number();
1027  for (const auto & j : ConstCouplingRow(i, *_cm))
1028  if (_sys.isScalarVariable(j))
1029  {
1030  auto & jvar = _sys.getScalarVariable(_tid, j);
1031  _cm_ss_entry.push_back(std::make_pair(ivar, &jvar));
1032  }
1033  else
1034  {
1035  auto & jvar = _sys.getVariable(_tid, j);
1036  _cm_sf_entry.push_back(std::make_pair(ivar, &jvar));
1037  }
1038  }
1039 
1040  if (_block_diagonal_matrix && scalar_vars.size() != 0)
1041  _block_diagonal_matrix = false;
1042 
1043  auto num_vector_tags = _sys.subproblem().numVectorTags();
1044  auto num_matrix_tags = _sys.subproblem().numMatrixTags();
1045 
1046  _sub_Re.resize(num_vector_tags);
1047  _sub_Rn.resize(num_vector_tags);
1048  for (auto i = beginIndex(_sub_Re); i < _sub_Re.size(); i++)
1049  {
1050  _sub_Re[i].resize(n_vars);
1051  _sub_Rn[i].resize(n_vars);
1052  }
1053 
1054  _cached_residual_values.resize(num_vector_tags);
1055  _cached_residual_rows.resize(num_vector_tags);
1056 
1057  _cached_jacobian_values.resize(num_matrix_tags);
1058  _cached_jacobian_rows.resize(num_matrix_tags);
1059  _cached_jacobian_cols.resize(num_matrix_tags);
1060 
1061  // Element matrices
1062  _sub_Kee.resize(num_matrix_tags);
1063  _sub_Keg.resize(num_matrix_tags);
1064  _sub_Ken.resize(num_matrix_tags);
1065  _sub_Kne.resize(num_matrix_tags);
1066  _sub_Knn.resize(num_matrix_tags);
1067 
1068  _jacobian_block_used.resize(num_matrix_tags);
1069  _jacobian_block_neighbor_used.resize(num_matrix_tags);
1070  _jacobian_block_nonlocal_used.resize(num_matrix_tags);
1071 
1072  for (unsigned int tag = 0; tag < num_matrix_tags; tag++)
1073  {
1074  _sub_Keg[tag].resize(n_vars);
1075  _sub_Ken[tag].resize(n_vars);
1076  _sub_Kne[tag].resize(n_vars);
1077  _sub_Knn[tag].resize(n_vars);
1078  _sub_Kee[tag].resize(n_vars);
1079 
1080  _jacobian_block_used[tag].resize(n_vars);
1081  _jacobian_block_neighbor_used[tag].resize(n_vars);
1082  _jacobian_block_nonlocal_used[tag].resize(n_vars);
1083  for (unsigned int i = 0; i < n_vars; ++i)
1084  {
1086  {
1087  _sub_Kee[tag][i].resize(n_vars);
1088  _sub_Keg[tag][i].resize(n_vars);
1089  _sub_Ken[tag][i].resize(n_vars);
1090  _sub_Kne[tag][i].resize(n_vars);
1091  _sub_Knn[tag][i].resize(n_vars);
1092  }
1093  else
1094  {
1095  _sub_Kee[tag][i].resize(1);
1096  _sub_Keg[tag][i].resize(1);
1097  _sub_Ken[tag][i].resize(1);
1098  _sub_Kne[tag][i].resize(1);
1099  _sub_Knn[tag][i].resize(1);
1100  }
1101  _jacobian_block_used[tag][i].resize(n_vars);
1102  _jacobian_block_neighbor_used[tag][i].resize(n_vars);
1103  _jacobian_block_nonlocal_used[tag][i].resize(n_vars);
1104  }
1105  }
1106 
1107  // Cached Jacobian contributions
1108  _cached_jacobian_contribution_vals.resize(num_matrix_tags);
1109  _cached_jacobian_contribution_rows.resize(num_matrix_tags);
1110  _cached_jacobian_contribution_cols.resize(num_matrix_tags);
1111 }
std::vector< std::pair< MooseVariableFEBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:1036
SystemBase & _sys
Definition: Assembly.h:1028
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
Definition: Assembly.h:1291
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:1298
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:555
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
residual contributions for each variable from the neighbor
Definition: Assembly.h:1201
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:550
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:1045
virtual unsigned int numVectorTags()
The total number of tags.
Definition: SubProblem.h:110
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1034
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition: Assembly.h:1214
unsigned int _block_diagonal_matrix
Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take s...
Definition: Assembly.h:1305
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:1296
const CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:1031
std::vector< std::vector< Real > > _cached_jacobian_contribution_vals
Storage for cached Jacobian entries.
Definition: Assembly.h:1316
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition: Assembly.h:1210
virtual unsigned int nVariables() const
Get the number of variables in this system.
Definition: SystemBase.C:661
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:101
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition: Assembly.h:1040
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition: Assembly.h:1212
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_cols
Definition: Assembly.h:1318
std::vector< std::vector< DenseVector< Number > > > _sub_Re
residual contributions for each variable from the element
Definition: Assembly.h:1199
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:1044
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
jacobian contributions <Tag, ivar, jvar>
Definition: Assembly.h:1206
virtual SubProblem & subproblem()
Definition: SystemBase.h:103
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1288
std::vector< std::pair< MooseVariableScalar *, MooseVariableFEBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:1038
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
Definition: Assembly.h:1207
virtual bool isScalarVariable(unsigned int var_name) const
Definition: SystemBase.C:655
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_rows
Definition: Assembly.h:1317
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_neighbor_used
Flag that indicates if the jacobian block for neighbor was used.
Definition: Assembly.h:1047
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:1300
virtual unsigned int numMatrixTags()
The total number of tags.
Definition: SubProblem.h:145
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a scalar variable with specified number.
Definition: SystemBase.C:134

◆ init() [2/2]

void Assembly::init ( )

Deprecated init method.

◆ initNonlocalCoupling()

void Assembly::initNonlocalCoupling ( )

Create pair of variables requiring nonlocal jacobian contributions.

Definition at line 1114 of file Assembly.C.

1115 {
1116  _cm_nonlocal_entry.clear();
1117 
1118  auto & vars = _sys.getVariables(_tid);
1119 
1120  for (auto & ivar : vars)
1121  {
1122  auto i = ivar->number();
1123  for (const auto & j : ConstCouplingRow(i, _nonlocal_cm))
1124  if (!_sys.isScalarVariable(j))
1125  {
1126  auto & jvar = _sys.getVariable(_tid, j);
1127  _cm_nonlocal_entry.push_back(std::make_pair(ivar, &jvar));
1128  }
1129  }
1130 }
SystemBase & _sys
Definition: Assembly.h:1028
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:550
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1051
const CouplingMatrix & _nonlocal_cm
Definition: Assembly.h:1032
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:101
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:1042
virtual bool isScalarVariable(unsigned int var_name) const
Definition: SystemBase.C:655

◆ jacobianBlock()

DenseMatrix< Number > & Assembly::jacobianBlock ( unsigned int  ivar,
unsigned int  jvar,
TagID  tag = 0 
)

Definition at line 934 of file Assembly.C.

Referenced by addJacobianBlock(), addJacobianCoupledVarPair(), addJacobianNeighbor(), cacheJacobianCoupledVarPair(), ElemElemConstraint::computeElemNeighJacobian(), MassLumpedTimeDerivative::computeJacobian(), EigenKernel::computeJacobian(), VectorKernel::computeJacobian(), NonlocalIntegratedBC::computeJacobian(), NonlocalKernel::computeJacobian(), KernelGrad::computeJacobian(), KernelValue::computeJacobian(), MortarConstraint::computeJacobian(), NonlocalIntegratedBC::computeJacobianBlock(), MortarConstraint::computeJacobianSide(), EigenKernel::computeOffDiagJacobian(), VectorKernel::computeOffDiagJacobian(), NonlocalKernel::computeOffDiagJacobian(), KernelGrad::computeOffDiagJacobian(), KernelValue::computeOffDiagJacobian(), VectorKernel::computeOffDiagJacobianScalar(), prepareBlock(), prepareJacobianBlock(), TaggingInterface::prepareMatrixTag(), prepareOffDiagScalar(), prepareScalar(), and prepareVariable().

935 {
936  _jacobian_block_used[tag][ivar][jvar] = 1;
937  return _sub_Kee[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
938 }
unsigned int _block_diagonal_matrix
Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take s...
Definition: Assembly.h:1305
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:1044
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
jacobian contributions <Tag, ivar, jvar>
Definition: Assembly.h:1206

◆ jacobianBlockNeighbor()

DenseMatrix< Number > & Assembly::jacobianBlockNeighbor ( Moose::DGJacobianType  type,
unsigned int  ivar,
unsigned int  jvar,
TagID  tag = 0 
)

Definition at line 948 of file Assembly.C.

Referenced by addJacobianNeighbor(), cacheJacobianNeighbor(), ElemElemConstraint::computeElemNeighJacobian(), EqualValueEmbeddedConstraint::computeJacobian(), NodeElemConstraint::computeJacobian(), NodeFaceConstraint::computeJacobian(), EqualValueEmbeddedConstraint::computeOffDiagJacobian(), NodeElemConstraint::computeOffDiagJacobian(), NodeFaceConstraint::computeOffDiagJacobian(), TaggingInterface::prepareMatrixTagNeighbor(), and prepareNeighbor().

952 {
953  _jacobian_block_neighbor_used[tag][ivar][jvar] = 1;
955  {
956  switch (type)
957  {
958  default:
960  return _sub_Kee[tag][ivar][0];
962  return _sub_Ken[tag][ivar][0];
964  return _sub_Kne[tag][ivar][0];
966  return _sub_Knn[tag][ivar][0];
967  }
968  }
969  else
970  {
971  switch (type)
972  {
973  default:
975  return _sub_Kee[tag][ivar][jvar];
977  return _sub_Ken[tag][ivar][jvar];
979  return _sub_Kne[tag][ivar][jvar];
981  return _sub_Knn[tag][ivar][jvar];
982  }
983  }
984 }
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition: Assembly.h:1214
unsigned int _block_diagonal_matrix
Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take s...
Definition: Assembly.h:1305
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition: Assembly.h:1210
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition: Assembly.h:1212
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
jacobian contributions <Tag, ivar, jvar>
Definition: Assembly.h:1206
MatType type
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_neighbor_used
Flag that indicates if the jacobian block for neighbor was used.
Definition: Assembly.h:1047

◆ jacobianBlockNonlocal()

DenseMatrix< Number > & Assembly::jacobianBlockNonlocal ( unsigned int  ivar,
unsigned int  jvar,
TagID  tag = 0 
)

Definition at line 941 of file Assembly.C.

Referenced by addJacobianBlockNonlocal(), addJacobianNonlocal(), cacheJacobianNonlocal(), NonlocalKernel::computeNonlocalJacobian(), NonlocalIntegratedBC::computeNonlocalJacobian(), NonlocalIntegratedBC::computeNonlocalOffDiagJacobian(), NonlocalKernel::computeNonlocalOffDiagJacobian(), prepareBlockNonlocal(), prepareNonlocal(), and prepareVariableNonlocal().

942 {
943  _jacobian_block_nonlocal_used[tag][ivar][jvar] = 1;
944  return _sub_Keg[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
945 }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:1045
unsigned int _block_diagonal_matrix
Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take s...
Definition: Assembly.h:1305
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
Definition: Assembly.h:1207

◆ JxW()

const MooseArray<Real>& Assembly::JxW ( )
inline

Returns the reference to the transformed jacobian weights.

Returns
A reference. Make sure to store this as a reference!

Definition at line 228 of file Assembly.h.

Referenced by reinitNeighbor().

228 { return _current_JxW; }
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:1097

◆ JxWFace()

const MooseArray<Real>& Assembly::JxWFace ( )
inline

Returns the reference to the transformed jacobian weights on a current face.

Returns
A reference. Make sure to store this as a reference!

Definition at line 258 of file Assembly.h.

258 { return _current_JxW_face; }
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:1128

◆ JxWNeighbor()

const MooseArray<Real>& Assembly::JxWNeighbor ( )
inline

Returns the reference to the transformed jacobian weights on a current face.

Returns
A reference. Make sure to store this as a reference!

Definition at line 344 of file Assembly.h.

344 { return _current_JxW_neighbor; }
MooseArray< Real > _current_JxW_neighbor
The current transformed jacobian weights on a neighbor&#39;s face.
Definition: Assembly.h:1158

◆ modifyFaceWeightsDueToXFEM()

void Assembly::modifyFaceWeightsDueToXFEM ( const Elem *  elem,
unsigned int  side = 0 
)
protected

Update the face integration weights for XFEM partial elements.

This only affects the weights if XFEM is used and if the element is cut.

Parameters
elemThe element for which the weights are adjusted
sideThe side of element for which the weights are adjusted

Definition at line 2265 of file Assembly.C.

Referenced by reinitFEFace().

2266 {
2267  mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
2268 
2270  return;
2271 
2272  MooseArray<Real> xfem_face_weight_multipliers;
2273  if (_xfem->getXFEMFaceWeights(
2274  xfem_face_weight_multipliers, elem, _current_qrule_face, _current_q_points_face, side))
2275  {
2276  mooseAssert(xfem_face_weight_multipliers.size() == _current_JxW_face.size(),
2277  "Size of weight multipliers in xfem doesn't match number of quadrature points");
2278  for (unsigned i = 0; i < xfem_face_weight_multipliers.size(); i++)
2279  _current_JxW_face[i] = _current_JxW_face[i] * xfem_face_weight_multipliers[i];
2280 
2281  xfem_face_weight_multipliers.release();
2282  }
2283 }
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:1093
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:1058
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:1128
unsigned int & side()
Returns the current side.
Definition: Assembly.h:292
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:245
const Elem *& elem()
Return the current element.
Definition: Assembly.h:270
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:51
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:1126
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:1122

◆ modifyWeightsDueToXFEM()

void Assembly::modifyWeightsDueToXFEM ( const Elem *  elem)
protected

Update the integration weights for XFEM partial elements.

This only affects the weights if XFEM is used and if the element is cut.

Parameters
elemThe element for which the weights are adjusted

Definition at line 2245 of file Assembly.C.

Referenced by reinitFE().

2246 {
2247  mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
2248 
2250  return;
2251 
2252  MooseArray<Real> xfem_weight_multipliers;
2253  if (_xfem->getXFEMWeights(xfem_weight_multipliers, elem, _current_qrule, _current_q_points))
2254  {
2255  mooseAssert(xfem_weight_multipliers.size() == _current_JxW.size(),
2256  "Size of weight multipliers in xfem doesn't match number of quadrature points");
2257  for (unsigned i = 0; i < xfem_weight_multipliers.size(); i++)
2258  _current_JxW[i] = _current_JxW[i] * xfem_weight_multipliers[i];
2259 
2260  xfem_weight_multipliers.release();
2261  }
2262 }
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:1093
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:1089
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:1058
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:245
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:1097
const Elem *& elem()
Return the current element.
Definition: Assembly.h:270
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:51
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:1095

◆ neighbor()

const Elem*& Assembly::neighbor ( )
inline

Return the neighbor element.

Returns
A reference. Make sure to store this as a reference!

Definition at line 316 of file Assembly.h.

Referenced by reinitElemAndNeighbor(), reinitFEFaceNeighbor(), reinitFENeighbor(), reinitNeighbor(), and reinitNeighborAtPhysical().

316 { return _current_neighbor_elem; }
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:1175

◆ neighborSide()

unsigned int& Assembly::neighborSide ( )
inline

Returns the current neighboring side.

Returns
A reference. Make sure to store this as a reference!

Definition at line 298 of file Assembly.h.

298 { return _current_neighbor_side; }
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:1179

◆ neighborVolume()

const Real & Assembly::neighborVolume ( )

Returns the reference to the current neighbor volume.

Returns
A reference. Make sure to store this as a reference!

Definition at line 380 of file Assembly.C.

Referenced by InternalSideUserObject::getNeighborElemVolume(), InterfaceKernel::getNeighborElemVolume(), and DGKernel::getNeighborElemVolume().

381 {
384 }
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:1183
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:1185

◆ node()

const Node*& Assembly::node ( )
inline

Returns the reference to the node.

Returns
A reference. Make sure to store this as a reference!

Definition at line 350 of file Assembly.h.

Referenced by reinit().

350 { return _current_node; }
const Node * _current_node
The current node we are working with.
Definition: Assembly.h:1187

◆ nodeNeighbor()

const Node*& Assembly::nodeNeighbor ( )
inline

Returns the reference to the neighboring node.

Returns
A reference. Make sure to store this as a reference!

Definition at line 356 of file Assembly.h.

356 { return _current_neighbor_node; }
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition: Assembly.h:1189

◆ nonlocalCouplingEntries()

std::vector<std::pair<MooseVariableFEBase *, MooseVariableFEBase *> >& Assembly::nonlocalCouplingEntries ( )
inline

Definition at line 642 of file Assembly.h.

643  {
644  return _cm_nonlocal_entry;
645  }
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:1042

◆ normals()

const MooseArray<Point>& Assembly::normals ( )
inline

Returns the array of normals for quadrature points on a current side.

Returns
A reference. Make sure to store this as a reference!

Definition at line 264 of file Assembly.h.

264 { return _current_normals; }
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:1130

◆ phi() [1/5]

const VariablePhiValue& Assembly::phi ( ) const
inline

Definition at line 648 of file Assembly.h.

Referenced by copyShapes().

648 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:1220

◆ phi() [2/5]

const VariablePhiValue& Assembly::phi ( MooseVariable ) const
inline

Definition at line 649 of file Assembly.h.

649 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:1220

◆ phi() [3/5]

const VectorVariablePhiValue& Assembly::phi ( VectorMooseVariable ) const
inline

Definition at line 678 of file Assembly.h.

678 { return _vector_phi; }
VectorVariablePhiValue _vector_phi
Definition: Assembly.h:1237

◆ phi() [4/5]

VariablePhiValue& Assembly::phi ( MooseVariable )
inline

Definition at line 738 of file Assembly.h.

738 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:1220

◆ phi() [5/5]

VectorVariablePhiValue& Assembly::phi ( VectorMooseVariable )
inline

Definition at line 754 of file Assembly.h.

754 { return _vector_phi; }
VectorVariablePhiValue _vector_phi
Definition: Assembly.h:1237

◆ phiFace() [1/5]

const VariablePhiValue& Assembly::phiFace ( ) const
inline

Definition at line 655 of file Assembly.h.

Referenced by copyFaceShapes().

655 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:1224

◆ phiFace() [2/5]

const VariablePhiValue& Assembly::phiFace ( MooseVariable ) const
inline

Definition at line 656 of file Assembly.h.

656 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:1224

◆ phiFace() [3/5]

const VectorVariablePhiValue& Assembly::phiFace ( VectorMooseVariable ) const
inline

Definition at line 689 of file Assembly.h.

689 { return _vector_phi_face; }
VectorVariablePhiValue _vector_phi_face
Definition: Assembly.h:1242

◆ phiFace() [4/5]

VariablePhiValue& Assembly::phiFace ( MooseVariable )
inline

Definition at line 742 of file Assembly.h.

742 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:1224

◆ phiFace() [5/5]

VectorVariablePhiValue& Assembly::phiFace ( VectorMooseVariable )
inline

Definition at line 759 of file Assembly.h.

759 { return _vector_phi_face; }
VectorVariablePhiValue _vector_phi_face
Definition: Assembly.h:1242

◆ phiFaceNeighbor() [1/4]

const VariablePhiValue& Assembly::phiFaceNeighbor ( MooseVariable ) const
inline

Definition at line 668 of file Assembly.h.

Referenced by copyNeighborShapes().

668 { return _phi_face_neighbor; }
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:1232

◆ phiFaceNeighbor() [2/4]

const VectorVariablePhiValue& Assembly::phiFaceNeighbor ( VectorMooseVariable ) const
inline

Definition at line 720 of file Assembly.h.

721  {
723  }
VectorVariablePhiValue _vector_phi_face_neighbor
Definition: Assembly.h:1252

◆ phiFaceNeighbor() [3/4]

VariablePhiValue& Assembly::phiFaceNeighbor ( MooseVariable )
inline

Definition at line 750 of file Assembly.h.

750 { return _phi_face_neighbor; }
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:1232

◆ phiFaceNeighbor() [4/4]

VectorVariablePhiValue& Assembly::phiFaceNeighbor ( VectorMooseVariable )
inline

Definition at line 778 of file Assembly.h.

779  {
781  }
VectorVariablePhiValue _vector_phi_face_neighbor
Definition: Assembly.h:1252

◆ phiNeighbor() [1/4]

const VariablePhiValue& Assembly::phiNeighbor ( MooseVariable ) const
inline

Definition at line 661 of file Assembly.h.

Referenced by copyNeighborShapes().

661 { return _phi_neighbor; }
VariablePhiValue _phi_neighbor
Definition: Assembly.h:1228

◆ phiNeighbor() [2/4]

const VectorVariablePhiValue& Assembly::phiNeighbor ( VectorMooseVariable ) const
inline

Definition at line 703 of file Assembly.h.

704  {
705  return _vector_phi_neighbor;
706  }
VectorVariablePhiValue _vector_phi_neighbor
Definition: Assembly.h:1247

◆ phiNeighbor() [3/4]

VariablePhiValue& Assembly::phiNeighbor ( MooseVariable )
inline

Definition at line 746 of file Assembly.h.

746 { return _phi_neighbor; }
VariablePhiValue _phi_neighbor
Definition: Assembly.h:1228

◆ phiNeighbor() [4/4]

VectorVariablePhiValue& Assembly::phiNeighbor ( VectorMooseVariable )
inline

Definition at line 764 of file Assembly.h.

764 { return _vector_phi_neighbor; }
VectorVariablePhiValue _vector_phi_neighbor
Definition: Assembly.h:1247

◆ physicalPoints()

const MooseArray<Point>& Assembly::physicalPoints ( )
inline

The current points in physical space where we have reinited through reinitAtPhysical()

Returns
A reference. Make sure to store this as a reference!

Definition at line 222 of file Assembly.h.

222 { return _current_physical_points; }
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:1196

◆ prepare()

void Assembly::prepare ( )

Definition at line 1165 of file Assembly.C.

Referenced by MortarConstraint::reinitSide().

1166 {
1168  prepareResidual();
1169 }
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
Definition: Assembly.C:1133
void prepareResidual()
Sizes and zeroes the residual for the current element.
Definition: Assembly.C:1153

◆ prepareBlock()

void Assembly::prepareBlock ( unsigned int  ivar,
unsigned  jvar,
const std::vector< dof_id_type > &  dof_indices 
)

Definition at line 1290 of file Assembly.C.

1293 {
1294  for (auto tag = beginIndex(_jacobian_block_used); tag < _jacobian_block_used.size(); tag++)
1295  {
1296  jacobianBlock(ivar, jvar, tag).resize(dof_indices.size(), dof_indices.size());
1297  jacobianBlock(ivar, jvar, tag).zero();
1298  _jacobian_block_used[tag][ivar][jvar] = 0;
1299  }
1300 
1301  for (auto tag = beginIndex(_sub_Re); tag < _sub_Re.size(); tag++)
1302  {
1303  _sub_Re[tag][ivar].resize(dof_indices.size());
1304  _sub_Re[tag][ivar].zero();
1305  }
1306 }
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:934
std::vector< std::vector< DenseVector< Number > > > _sub_Re
residual contributions for each variable from the element
Definition: Assembly.h:1199
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:1044

◆ prepareBlockNonlocal()

void Assembly::prepareBlockNonlocal ( unsigned int  ivar,
unsigned  jvar,
const std::vector< dof_id_type > &  idof_indices,
const std::vector< dof_id_type > &  jdof_indices 
)

Definition at line 1309 of file Assembly.C.

1313 {
1314  for (auto tag = beginIndex(_jacobian_block_nonlocal_used);
1315  tag < _jacobian_block_nonlocal_used.size();
1316  tag++)
1317  {
1318  jacobianBlockNonlocal(ivar, jvar, tag).resize(idof_indices.size(), jdof_indices.size());
1319  jacobianBlockNonlocal(ivar, jvar, tag).zero();
1320  _jacobian_block_nonlocal_used[tag][ivar][jvar] = 0;
1321  }
1322 }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:1045
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:941

◆ prepareJacobianBlock()

void Assembly::prepareJacobianBlock ( )

Sizes and zeroes the Jacobian blocks used for the current element.

Definition at line 1133 of file Assembly.