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

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

#include <Assembly.h>

Classes

class  FEShapeData
 
class  GlobalDataKey
 Key structure for APIs manipulating global vectors/matrices. More...
 
class  LocalDataKey
 Key structure for APIs adding/caching local element residuals/Jacobians. More...
 
struct  QRules
 Data structure for tracking/grouping a set of quadrature rules for a particular dimensionality of mesh element. More...
 
class  VectorFEShapeData
 

Public Member Functions

 Assembly (SystemBase &sys, THREAD_ID tid)
 
virtual ~Assembly ()
 
const FEBase *const & getFE (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current volume FE. More...
 
const FEBase *const & getFENeighbor (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current 'neighbor' FE. More...
 
const FEBase *const & getFEFace (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current "face" FE. More...
 
const FEBase *const & getFEFaceNeighbor (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current "neighbor" FE. More...
 
const FEVectorBase *const & getVectorFE (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current volume FEVector. More...
 
const FEVectorBase *const & getVectorFENeighbor (FEType type, unsigned int dim) const
 GetVector a reference to a pointer that will contain the current 'neighbor' FE. More...
 
const FEVectorBase *const & getVectorFEFace (FEType type, unsigned int dim) const
 GetVector a reference to a pointer that will contain the current "face" FE. More...
 
const FEVectorBase *const & getVectorFEFaceNeighbor (FEType type, unsigned int dim) const
 GetVector a reference to a pointer that will contain the current "neighbor" FE. More...
 
const QBase *const & qRule () const
 Returns the reference to the current quadrature being used. More...
 
QBase *const & writeableQRule ()
 Returns the reference to the current quadrature being used. More...
 
const MooseArray< Point > & qPoints () const
 Returns the reference to the quadrature points. More...
 
const std::vector< Point > & qPointsMortar () const
 Returns the reference to the mortar segment element quadrature points. More...
 
const MooseArray< Point > & physicalPoints () const
 The current points in physical space where we have reinited through reinitAtPhysical() More...
 
const MooseArray< Real > & JxW () const
 Returns the reference to the transformed jacobian weights. More...
 
const MooseArray< ADReal > & adJxW () const
 
const MooseArray< ADReal > & adJxWFace () const
 
const MooseArray< ADReal > & adCurvatures () const
 
const MooseArray< Real > & coordTransformation () const
 Returns the reference to the coordinate transformation coefficients. More...
 
const MooseArray< Real > & mortarCoordTransformation () const
 Returns the reference to the coordinate transformation coefficients on the mortar segment mesh. More...
 
const MooseArray< ADReal > & adCoordTransformation () const
 Returns the reference to the AD version of the coordinate transformation coefficients. More...
 
const Moose::CoordinateSystemTypecoordSystem ()
 Get the coordinate system type. More...
 
const QBase *const & qRuleFace () const
 Returns the reference to the current quadrature being used on a current face. More...
 
QBase *const & writeableQRuleFace ()
 Returns the reference to the current quadrature being used on a current face. More...
 
const MooseArray< Point > & qPointsFace () const
 Returns the reference to the current quadrature being used. More...
 
const MooseArray< Real > & JxWFace () const
 Returns the reference to the transformed jacobian weights on a current face. More...
 
const MooseArray< Point > & normals () const
 Returns the array of normals for quadrature points on a current side. More...
 
const std::vector< Eigen::Map< RealDIMValue > > & mappedNormals () const
 
const MooseArray< std::vector< Point > > & tangents () const
 Returns the array of tangents for quadrature points on a current side. More...
 
unsigned int numExtraElemIntegers () const
 Number of extra element integers Assembly tracked. More...
 
const dof_id_typeextraElemID (unsigned int id) const
 Returns an integer ID of the current element given the index associated with the integer. More...
 
const dof_id_typeextraElemIDNeighbor (unsigned int id) const
 Returns an integer ID of the current element given the index associated with the integer. More...
 
const MooseArray< ADPoint > & adNormals () const
 
const MooseArray< ADPoint > & adQPoints () const
 
const MooseArray< ADPoint > & adQPointsFace () const
 
template<bool is_ad>
const MooseArray< MooseADWrapper< Point, is_ad > > & genericQPoints () const
 
const Elem *const & elem () const
 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 BoundaryIDcurrentBoundaryID () const
 Return the current boundary ID. More...
 
void setCurrentBoundaryID (BoundaryID i)
 set the current boundary ID More...
 
const RealelemVolume ()
 Returns the reference to the current element volume. More...
 
const unsigned intside () const
 Returns the current side. More...
 
const unsigned intneighborSide () const
 Returns the current neighboring side. More...
 
const Elem *& sideElem ()
 Returns the side element. More...
 
const RealsideElemVolume ()
 Returns the reference to the volume of current side element. More...
 
const Elem *const & neighbor () const
 Return the neighbor element. More...
 
const Elem *const & lowerDElem () const
 Return the lower dimensional element. More...
 
const Elem *const & neighborLowerDElem () const
 Return the neighboring lower dimensional element. More...
 
const ReallowerDElemVolume () const
 
const RealneighborLowerDElemVolume () const
 
const SubdomainIDcurrentNeighborSubdomainID () const
 Return the current subdomain ID. More...
 
void setCurrentNeighborSubdomainID (SubdomainID i)
 set the current subdomain ID More...
 
const RealneighborVolume ()
 Returns the reference to the current neighbor volume. More...
 
const QBase *const & qRuleNeighbor () const
 Returns the reference to the current quadrature being used on a current neighbor. More...
 
QBase *const & writeableQRuleNeighbor ()
 Returns the reference to the current quadrature being used on a current neighbor. More...
 
const MooseArray< Real > & JxWNeighbor () const
 Returns the reference to the transformed jacobian weights on a current face. More...
 
const MooseArray< Point > & qPointsFaceNeighbor () const
 Returns the reference to the current quadrature points being used on the neighbor face. More...
 
const Node *const & node () const
 Returns the reference to the node. More...
 
const Node *const & nodeNeighbor () const
 Returns the reference to the neighboring node. More...
 
void createQRules (QuadratureType type, Order order, Order volume_order, Order face_order, SubdomainID block, bool allow_negative_qweights=true)
 Creates block-specific volume, face and arbitrary qrules based on the orders and the flag of whether or not to allow negative qweights passed in. More...
 
void bumpVolumeQRuleOrder (Order volume_order, SubdomainID block)
 Increases the element/volume quadrature order for the specified mesh block if and only if the current volume quadrature order is lower. More...
 
void bumpAllQRuleOrder (Order order, SubdomainID block)
 Increases the element/volume and face/area quadrature orders for the specified mesh block if and only if the current volume or face quadrature order is lower. 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 setMortarQRule (Order order)
 Specifies a custom qrule for integration on mortar segment mesh. More...
 
void activateDual ()
 Indicates that dual shape functions are used for mortar constraint. More...
 
bool needDual () const
 Indicates whether dual shape functions are used (computation is now repeated on each element so expense of computing dual shape functions is no longer trivial) More...
 
void clearCachedQRules ()
 Set the cached quadrature rules to nullptr. 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 setVolumeQRule (const Elem *elem)
 Set the volumetric quadrature rule based on the provided element. More...
 
void reinitElemFaceRef (const Elem *elem, unsigned int elem_side, Real tolerance, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
 Reinitialize FE data for the given element on the given side, optionally with a given set of reference points. More...
 
void reinitNeighborFaceRef (const Elem *neighbor_elem, unsigned int neighbor_side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr)
 Reinitialize FE data for the given neighbor_element on the given side with a given set of reference points. More...
 
void reinitDual (const Elem *elem, const std::vector< Point > &pts, const std::vector< Real > &JxW)
 Reintialize dual basis coefficients based on a customized quadrature rule. More...
 
void reinitLowerDElem (const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
 Reinitialize FE data for a lower dimenesional element with a given set of reference points. More...
 
void reinitNeighborLowerDElem (const Elem *elem)
 reinitialize a neighboring lower dimensional element More...
 
void reinitMortarElem (const Elem *elem)
 reinitialize a mortar segment mesh element in order to get a proper JxW More...
 
const std::vector< Real > & jxWMortar () const
 Returns a reference to JxW for mortar segment elements. More...
 
const QBase *const & qRuleMortar () const
 Returns a reference to the quadrature rule for the mortar segments. 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 setFaceQRule (const Elem *const elem, const unsigned int side)
 Set the face quadrature rule based on the provided element and side. More...
 
void reinit (const Elem *elem, unsigned int side)
 Reinitialize the assembly data on an side of an element. More...
 
void reinit (const Elem *elem, unsigned int side, const std::vector< Point > &reference_points)
 Reinitialize the assembly data on the side of a element at the custom reference points. More...
 
void reinitFVFace (const FaceInfo &fi)
 
void reinitElemAndNeighbor (const Elem *elem, unsigned int side, const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > *neighbor_reference_points=nullptr)
 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)
 Reinitializes the neighbor side using reference coordinates. More...
 
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 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 (MooseVariableFieldBase *var)
 Used for preparing the dense residual and jacobian blocks for one particular variable. More...
 
void prepareVariableNonlocal (MooseVariableFieldBase *var)
 
void prepareNeighbor ()
 
void prepareLowerD ()
 Prepare the Jacobians and residuals for a lower dimensional element. More...
 
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 (MooseVariableField< T > &v)
 
void copyShapes (unsigned int var)
 
template<typename T >
void copyFaceShapes (MooseVariableField< T > &v)
 
void copyFaceShapes (unsigned int var)
 
template<typename T >
void copyNeighborShapes (MooseVariableField< T > &v)
 
void copyNeighborShapes (unsigned int var)
 
void addResidual (GlobalDataKey, const std::vector< VectorTag > &vector_tags)
 Add local residuals of all field variables for a set of tags onto the global residual vectors associated with the tags. More...
 
void addResidualNeighbor (GlobalDataKey, const std::vector< VectorTag > &vector_tags)
 Add local neighbor residuals of all field variables for a set of tags onto the global residual vectors associated with the tags. More...
 
void addResidualLower (GlobalDataKey, const std::vector< VectorTag > &vector_tags)
 Add local neighbor residuals of all field variables for a set of tags onto the global residual vectors associated with the tags. More...
 
void addResidualScalar (GlobalDataKey, const std::vector< VectorTag > &vector_tags)
 Add residuals of all scalar variables for a set of tags onto the global residual vectors associated with the tags. More...
 
void cacheResidual (GlobalDataKey, const std::vector< VectorTag > &tags)
 Takes the values that are currently in _sub_Re of all field variables and appends them to the cached values. More...
 
void cacheResidualNeighbor (GlobalDataKey, const std::vector< VectorTag > &tags)
 Takes the values that are currently in _sub_Rn of all field variables and appends them to the cached values. More...
 
void cacheResidualLower (GlobalDataKey, const std::vector< VectorTag > &tags)
 Takes the values that are currently in _sub_Rl and appends them to the cached values. More...
 
void addCachedResiduals (GlobalDataKey, const std::vector< VectorTag > &tags)
 Pushes all cached residuals to the global residual vectors associated with each tag. More...
 
void clearCachedResiduals (GlobalDataKey)
 Clears all of the residuals in _cached_residual_rows and _cached_residual_values. More...
 
void addCachedResidualDirectly (NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
 Adds the values that have been cached by calling cacheResidual(), cacheResidualNeighbor(), and/or cacheResidualLower() to a user-defined residual (that is, not necessarily the vector that vector_tag points to) More...
 
void setResidual (NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
 Sets local residuals of all field variables to the global residual vector for a tag. More...
 
void setResidualNeighbor (NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
 Sets local neighbor residuals of all field variables to the global residual vector for a tag. More...
 
void addJacobian (GlobalDataKey)
 Adds all local Jacobian to the global Jacobian matrices. More...
 
void addJacobianNonlocal (GlobalDataKey)
 Adds non-local Jacobian to the global Jacobian matrices. More...
 
void addJacobianNeighbor (GlobalDataKey)
 Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objects like DGKernels. More...
 
void addJacobianScalar (GlobalDataKey)
 Add Jacobians for pairs of scalar variables into the global Jacobian matrices. More...
 
void addJacobianOffDiagScalar (unsigned int ivar, GlobalDataKey)
 Add Jacobians for a scalar variables with all other field variables into the global Jacobian matrices. More...
 
void addJacobianBlock (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, TagID tag)
 Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. More...
 
void addJacobianBlockTags (SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, const std::set< TagID > &tags)
 Add element matrix for ivar rows and jvar columns to the global Jacobian matrix for given tags. More...
 
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, GlobalDataKey, TagID tag)
 Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix. More...
 
void addJacobianBlockNonlocalTags (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, GlobalDataKey, const std::set< TagID > &tags)
 Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix. More...
 
void addJacobianNeighborLowerD (GlobalDataKey)
 Add all portions of the Jacobian except PrimaryPrimary, e.g. More...
 
void addJacobianLowerD (GlobalDataKey)
 Add portions of the Jacobian of LowerLower, LowerSecondary, and SecondaryLower for boundary conditions. More...
 
void cacheJacobianMortar (GlobalDataKey)
 Cache all portions of the Jacobian, e.g. More...
 
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, GlobalDataKey, TagID tag)
 Adds three neighboring element matrices for ivar rows and jvar columns to the global Jacobian matrix. More...
 
void addJacobianNeighborTags (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, GlobalDataKey, const std::set< TagID > &tags)
 Adds three neighboring element matrices for ivar rows and jvar columns to the global Jacobian matrix. More...
 
void cacheJacobian (GlobalDataKey)
 Takes the values that are currently in _sub_Kee and appends them to the cached values. More...
 
void cacheJacobianNonlocal (GlobalDataKey)
 Takes the values that are currently in _sub_Keg and appends them to the cached values. More...
 
void cacheJacobianNeighbor (GlobalDataKey)
 Takes the values that are currently in the neighbor Dense Matrices and appends them to the cached values. More...
 
void addCachedJacobian (GlobalDataKey)
 Adds the values that have been cached by calling cacheJacobian() and or cacheJacobianNeighbor() to the jacobian matrix. More...
 
void setCachedJacobian (GlobalDataKey)
 Sets previously-cached Jacobian values via SparseMatrix::set() calls. More...
 
void zeroCachedJacobian (GlobalDataKey)
 Zero out previously-cached Jacobian rows. More...
 
DenseVector< Number > & residualBlock (unsigned int var_num, LocalDataKey, TagID tag_id)
 Get local residual block for a variable and a tag. More...
 
DenseVector< Number > & residualBlockNeighbor (unsigned int var_num, LocalDataKey, TagID tag_id)
 Get local neighbor residual block for a variable and a tag. More...
 
DenseVector< Number > & residualBlockLower (unsigned int var_num, LocalDataKey, TagID tag_id)
 Get residual block for lower. More...
 
DenseMatrix< Number > & jacobianBlock (unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
 Get local Jacobian block for a pair of variables and a tag. More...
 
DenseMatrix< Number > & jacobianBlockNonlocal (unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
 Get local Jacobian block from non-local contribution for a pair of variables and a tag. More...
 
DenseMatrix< Number > & jacobianBlockNeighbor (Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
 Get local Jacobian block of a DG Jacobian type for a pair of variables and a tag. More...
 
DenseMatrix< Number > & jacobianBlockMortar (Moose::ConstraintJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
 Returns the jacobian block for the given mortar Jacobian type. More...
 
void cacheResidualNodes (const DenseVector< Number > &res, const std::vector< dof_id_type > &dof_index, LocalDataKey, TagID tag)
 Lets an external class cache residual at a set of nodes. More...
 
void cacheJacobian (numeric_index_type i, numeric_index_type j, Real value, LocalDataKey, TagID tag)
 Caches the Jacobian entry 'value', to eventually be added/set in the (i,j) location of the matrix. More...
 
void cacheJacobian (numeric_index_type i, numeric_index_type j, Real value, LocalDataKey, const std::set< TagID > &tags)
 Caches the Jacobian entry 'value', to eventually be added/set in the (i,j) location of the matrices in corresponding to tags. More...
 
void cacheJacobianBlock (DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, LocalDataKey, TagID tag)
 Cache a local Jacobian block with the provided rows (idof_indices) and columns (jdof_indices) for eventual accumulation into the global matrix specified by tag. More...
 
template<typename Residuals , typename Indices >
void cacheResiduals (const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &vector_tags)
 Process the supplied residual values. More...
 
template<typename Residuals , typename Indices >
void cacheJacobian (const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &matrix_tags)
 Process the derivatives() data of a vector of ADReals. More...
 
template<typename Residuals , typename Indices >
void cacheResidualsWithoutConstraints (const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &vector_tags)
 Process the supplied residual values. More...
 
template<typename Residuals , typename Indices >
void cacheJacobianWithoutConstraints (const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &matrix_tags)
 Process the derivatives() data of a vector of ADReals. More...
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries ()
 
const std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries () const
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & nonlocalCouplingEntries ()
 
const std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > & fieldScalarCouplingEntries () const
 
const std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > & scalarFieldCouplingEntries () const
 
const VariablePhiValuephi () const
 
template<typename T >
const ADTemplateVariablePhiGradient< T > & adGradPhi (const MooseVariableFE< T > &v) const
 
const VariablePhiValuephi (const MooseVariableField< Real > &) const
 
const VariablePhiGradientgradPhi () const
 
const VariablePhiGradientgradPhi (const MooseVariableField< Real > &) const
 
const VariablePhiSecondsecondPhi () const
 
const VariablePhiSecondsecondPhi (const MooseVariableField< Real > &) const
 
const VariablePhiValuephiFace () const
 
const VariablePhiValuephiFace (const MooseVariableField< Real > &) const
 
const VariablePhiGradientgradPhiFace () const
 
const VariablePhiGradientgradPhiFace (const MooseVariableField< Real > &) const
 
const VariablePhiSecondsecondPhiFace (const MooseVariableField< Real > &) const
 
const VariablePhiValuephiNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiGradientgradPhiNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiSecondsecondPhiNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiValuephiFaceNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiGradientgradPhiFaceNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiSecondsecondPhiFaceNeighbor (const MooseVariableField< Real > &) const
 
const VectorVariablePhiValuephi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiGradientgradPhi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiSecondsecondPhi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiCurlcurlPhi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiDivergencedivPhi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiValuephiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiGradientgradPhiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiSecondsecondPhiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiCurlcurlPhiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiDivergencedivPhiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiValuephiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiGradientgradPhiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiSecondsecondPhiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiCurlcurlPhiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiDivergencedivPhiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiValuephiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiGradientgradPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiSecondsecondPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiCurlcurlPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiDivergencedivPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
VariablePhiValuephi (const MooseVariableField< Real > &)
 
VariablePhiGradientgradPhi (const MooseVariableField< Real > &)
 
VariablePhiSecondsecondPhi (const MooseVariableField< Real > &)
 
VariablePhiValuephiFace (const MooseVariableField< Real > &)
 
VariablePhiGradientgradPhiFace (const MooseVariableField< Real > &)
 
VariablePhiSecondsecondPhiFace (const MooseVariableField< Real > &)
 
VariablePhiValuephiNeighbor (const MooseVariableField< Real > &)
 
VariablePhiGradientgradPhiNeighbor (const MooseVariableField< Real > &)
 
VariablePhiSecondsecondPhiNeighbor (const MooseVariableField< Real > &)
 
VariablePhiValuephiFaceNeighbor (const MooseVariableField< Real > &)
 
VariablePhiGradientgradPhiFaceNeighbor (const MooseVariableField< Real > &)
 
VariablePhiSecondsecondPhiFaceNeighbor (const MooseVariableField< Real > &)
 
VectorVariablePhiValuephi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiGradientgradPhi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiSecondsecondPhi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiCurlcurlPhi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiDivergencedivPhi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiValuephiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiGradientgradPhiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiSecondsecondPhiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiCurlcurlPhiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiDivergencedivPhiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiValuephiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiGradientgradPhiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiSecondsecondPhiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiCurlcurlPhiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiDivergencedivPhiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiValuephiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiGradientgradPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiSecondsecondPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiCurlcurlPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiDivergencedivPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VariablePhiValuephi (const MooseVariableField< RealEigenVector > &)
 
VariablePhiGradientgradPhi (const MooseVariableField< RealEigenVector > &)
 
VariablePhiSecondsecondPhi (const MooseVariableField< RealEigenVector > &)
 
VariablePhiValuephiFace (const MooseVariableField< RealEigenVector > &)
 
VariablePhiGradientgradPhiFace (const MooseVariableField< RealEigenVector > &)
 
VariablePhiSecondsecondPhiFace (const MooseVariableField< RealEigenVector > &)
 
VariablePhiValuephiNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiGradientgradPhiNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiSecondsecondPhiNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiValuephiFaceNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiGradientgradPhiFaceNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiSecondsecondPhiFaceNeighbor (const MooseVariableField< RealEigenVector > &)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhi (FEType type) const
 
template<typename OutputType >
const ADTemplateVariablePhiGradient< OutputType > & feADGradPhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecondfeSecondPhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhiLower (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefeDualPhiLower (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhiLower (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradDualPhiLower (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhiFace (FEType type) const
 
template<typename OutputType >
const ADTemplateVariablePhiGradient< OutputType > & feADGradPhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecondfeSecondPhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecondfeSecondPhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValuefePhiFaceNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradientfeGradPhiFaceNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecondfeSecondPhiFaceNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurlfeCurlPhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurlfeCurlPhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurlfeCurlPhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurlfeCurlPhiFaceNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiDivergencefeDivPhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiDivergencefeDivPhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiDivergencefeDivPhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiDivergencefeDivPhiFaceNeighbor (FEType type) const
 
Real elementVolume (const Elem *elem) const
 On-demand computation of volume element accounting for RZ/RSpherical. More...
 
void setXFEM (std::shared_ptr< XFEMInterface > xfem)
 Set the pointer to the XFEM controller object. More...
 
void assignDisplacements (std::vector< std::pair< unsigned int, unsigned short >> &&disp_numbers_and_directions)
 Assign the displacement numbers and directions. More...
 
void saveLocalArrayResidual (DenseVector< Number > &re, unsigned int i, unsigned int ntest, const RealEigenVector &v) const
 Helper function for assembling residual contriubutions on local quadrature points for an array kernel, bc, etc. More...
 
void saveDiagLocalArrayJacobian (DenseMatrix< Number > &ke, unsigned int i, unsigned int ntest, unsigned int j, unsigned int nphi, unsigned int ivar, const RealEigenVector &v) const
 Helper function for assembling diagonal Jacobian contriubutions on local quadrature points for an array kernel, bc, etc. More...
 
void saveFullLocalArrayJacobian (DenseMatrix< Number > &ke, unsigned int i, unsigned int ntest, unsigned int j, unsigned int nphi, unsigned int ivar, unsigned int jvar, const RealEigenMatrix &v) const
 Helper function for assembling full Jacobian contriubutions on local quadrature points for an array kernel, bc, etc. More...
 
DenseVector< RealgetJacobianDiagonal (DenseMatrix< Number > &ke)
 
const QBase * attachQRuleElem (unsigned int dim, FEBase &fe)
 Attaches the current elem/volume quadrature rule to the given fe. More...
 
const QBase * attachQRuleFace (unsigned int dim, FEBase &fe)
 Attaches the current face/area quadrature rule to the given fe. More...
 
void hasScalingVector ()
 signals this object that a vector containing variable scaling factors should be used when doing residual and matrix assembly More...
 
void modifyArbitraryWeights (const std::vector< Real > &weights)
 Modify the weights when using the arbitrary quadrature rule. More...
 
bool computingResidual () const
 
bool computingJacobian () const
 
bool computingResidualAndJacobian () const
 
const Elem *const & msmElem () const
 
void havePRefinement (const std::vector< FEFamily > &disable_p_refinement_for_families)
 Indicate that we have p-refinement. More...
 
void setCurrentLowerDElem (const Elem *const lower_d_elem)
 Set the current lower dimensional element. More...
 
template<>
const ADTemplateVariablePhiGradient< RealVectorValue > & feADGradPhi (FEType type) const
 
template<>
const ADTemplateVariablePhiGradient< RealVectorValue > & feADGradPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefeDualPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradDualPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergencefeDivPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergencefeDivPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergencefeDivPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergencefeDivPhiFaceNeighbor (FEType type) const
 
template<>
const ADTemplateVariablePhiGradient< RealVectorValue > & adGradPhi (const MooseVariableFE< RealVectorValue > &v) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefeDualPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradDualPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValuefePhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradientfeGradPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecondfeSecondPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurlfeCurlPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergencefeDivPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergencefeDivPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergencefeDivPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergencefeDivPhiFaceNeighbor (FEType type) const
 
template<>
const MooseArray< MooseADWrapper< Point, false > > & genericQPoints () const
 
template<>
const MooseArray< MooseADWrapper< Point, true > > & genericQPoints () const
 

Static Public Member Functions

template<typename T >
static const T *const & constify_ref (T *const &inref)
 Workaround for C++ compilers thinking they can't just cast a const-reference-to-pointer to const-reference-to-const-pointer. More...
 

Protected Attributes

const Elem * _current_elem
 The current "element" we are currently on. More...
 
SubdomainID _current_subdomain_id
 The current subdomain ID. More...
 
BoundaryID _current_boundary_id
 The current boundary 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...
 
const Elem * _current_lower_d_elem
 The current lower dimensional element. More...
 
const Elem * _current_neighbor_lower_d_elem
 The current neighboring lower dimensional element. More...
 
bool _need_lower_d_elem_volume
 Whether we need to compute the lower dimensional element volume. More...
 
Real _current_lower_d_elem_volume
 The current lower dimensional element volume. More...
 
bool _need_neighbor_lower_d_elem_volume
 Whether we need to compute the neighboring lower dimensional element volume. More...
 
Real _current_neighbor_lower_d_elem_volume
 The current neighboring lower dimensional element volume. More...
 
bool _need_dual
 Whether dual shape functions need to be computed for mortar constraints. 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
 
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
 
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
 residual contributions for each variable from the lower dimensional element 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
 
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...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
 dlower/dlower More...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
 dlower/dsecondary (or dlower/delement) More...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
 dlower/dprimary (or dlower/dneighbor) More...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
 dsecondary/dlower (or delement/dlower) More...
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
 dprimary/dlower (or dneighbor/dlower) 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
 
VectorVariablePhiDivergence _vector_div_phi
 
VectorVariablePhiValue _vector_phi_face
 
VectorVariablePhiGradient _vector_grad_phi_face
 
VectorVariablePhiSecond _vector_second_phi_face
 
VectorVariablePhiCurl _vector_curl_phi_face
 
VectorVariablePhiDivergence _vector_div_phi_face
 
VectorVariablePhiValue _vector_phi_neighbor
 
VectorVariablePhiGradient _vector_grad_phi_neighbor
 
VectorVariablePhiSecond _vector_second_phi_neighbor
 
VectorVariablePhiCurl _vector_curl_phi_neighbor
 
VectorVariablePhiDivergence _vector_div_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
 
VectorVariablePhiDivergence _vector_div_phi_face_neighbor
 
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
 Shape function values, gradients, second derivatives for each FE type. More...
 
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
 
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
 
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
 
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
 
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
 
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
 Shape function values, gradients, second derivatives for each vector FE type. More...
 
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
 
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
 
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
 
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
 
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
 
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
 
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
 
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
 
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
 
const std::vector< VectorTag > & _residual_vector_tags
 The residual vector tags that Assembly could possibly contribute to. More...
 
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
 
bool _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< bool > _component_block_diagonal
 An flag array Indiced by variable index to show if there is no component-wise coupling for the variable. 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< VectorValue< DualReal > > _ad_dxyzdxi_map
 AD quantities. More...
 
std::vector< VectorValue< DualReal > > _ad_dxyzdeta_map
 
std::vector< VectorValue< DualReal > > _ad_dxyzdzeta_map
 
std::vector< VectorValue< DualReal > > _ad_d2xyzdxi2_map
 
std::vector< VectorValue< DualReal > > _ad_d2xyzdxideta_map
 
std::vector< VectorValue< DualReal > > _ad_d2xyzdeta2_map
 
std::vector< DualReal_ad_jac
 
MooseArray< DualReal_ad_JxW
 
MooseArray< VectorValue< DualReal > > _ad_q_points
 
std::vector< DualReal_ad_dxidx_map
 
std::vector< DualReal_ad_dxidy_map
 
std::vector< DualReal_ad_dxidz_map
 
std::vector< DualReal_ad_detadx_map
 
std::vector< DualReal_ad_detady_map
 
std::vector< DualReal_ad_detadz_map
 
std::vector< DualReal_ad_dzetadx_map
 
std::vector< DualReal_ad_dzetady_map
 
std::vector< DualReal_ad_dzetadz_map
 
MooseArray< DualReal_ad_JxW_face
 
MooseArray< VectorValue< DualReal > > _ad_normals
 
MooseArray< VectorValue< DualReal > > _ad_q_points_face
 
MooseArray< Real_curvatures
 
MooseArray< DualReal_ad_curvatures
 
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
 Container of displacement numbers and directions. More...
 
bool _calculate_xyz
 
bool _calculate_face_xyz
 
bool _calculate_curvatures
 
bool _calculate_ad_coord
 Whether to calculate coord with AD. More...
 
std::map< FEType, bool > _need_second_derivative
 
std::map< FEType, bool > _need_second_derivative_neighbor
 
std::map< FEType, bool > _need_curl
 
std::map< FEType, bool > _need_div
 
const NumericVector< Real > * _scaling_vector = nullptr
 The map from global index to variable scaling factor. More...
 
ElemSideBuilder _current_side_elem_builder
 In place side element builder for _current_side_elem. More...
 
ElemSideBuilder _current_neighbor_side_elem_builder
 In place side element builder for _current_neighbor_side_elem. More...
 
ElemSideBuilder _compute_face_map_side_elem_builder
 In place side element builder for computeFaceMap() More...
 
const Elem * _msm_elem = nullptr
 
DenseVector< Number_element_vector
 A working vector to avoid repeated heap allocations when caching residuals that must have libMesh-level constraints (hanging nodes, periodic bcs) applied to them. More...
 
DenseMatrix< Number_element_matrix
 A working matrix to avoid repeated heap allocations when caching Jacobians that must have libMesh-level constraints (hanging nodes, periodic bcs) applied to them. More...
 
std::vector< dof_id_type_row_indices
 Working vectors to avoid repeated heap allocations when caching residuals/Jacobians that must have libMesh-level constraints (hanging nodes, periodic bcs) applied to them. More...
 
std::vector< dof_id_type_column_indices
 
bool _have_p_refinement
 Whether we have ever conducted p-refinement. More...
 
std::vector< Point > _current_neighbor_ref_points
 The current reference points on the neighbor element. More...
 

Private Member Functions

void setLowerQRule (QBase *qrule, unsigned int dim)
 Set the qrule to be used for lower dimensional integration. More...
 
void computeADFace (const Elem &elem, const unsigned int side)
 compute AD things on an element face More...
 
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 computeFaceMap (const Elem &elem, const unsigned int side, const std::vector< Real > &qw)
 
void reinitFEFaceNeighbor (const Elem *neighbor, const std::vector< Point > &reference_points)
 
void reinitFENeighbor (const Elem *neighbor, const std::vector< Point > &reference_points)
 
template<typename Points , typename Coords >
void setCoordinateTransformation (const QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
 
void computeCurrentElemVolume ()
 
void computeCurrentFaceVolume ()
 
void computeCurrentNeighborVolume ()
 
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...
 
template<typename OutputType >
void computeGradPhiAD (const Elem *elem, unsigned int n_qp, ADTemplateVariablePhiGradient< OutputType > &grad_phi, FEGenericBase< OutputType > *fe)
 compute gradient of phi possibly with derivative information with respect to nonlinear displacement variables More...
 
void resizeADMappingObjects (unsigned int n_qp, unsigned int dim)
 resize any objects that contribute to automatic differentiation-related mapping calculations More...
 
void computeSinglePointMapAD (const Elem *elem, const std::vector< Real > &qw, unsigned p, FEBase *fe)
 compute the finite element reference-physical mapping quantities (such as JxW) with possible dependence on nonlinear displacement variables at a single quadrature point More...
 
void addResidual (const VectorTag &vector_tag)
 Add local residuals of all field variables for a tag onto the tag's residual vector. More...
 
void addResidualNeighbor (const VectorTag &vector_tag)
 Add local neighbor residuals of all field variables for a tag onto the tag's residual vector. More...
 
void addResidualLower (const VectorTag &vector_tag)
 Add local lower-dimensional block residuals of all field variables for a tag onto the tag's residual vector. More...
 
void addResidualScalar (const VectorTag &vector_tag)
 Add residuals of all scalar variables for a tag onto the tag's residual vector. More...
 
void clearCachedResiduals (const VectorTag &vector_tag)
 Clears all of the cached residuals for a specific vector tag. More...
 
void cacheResidual (dof_id_type dof, Real value, TagID tag_id)
 Cache individual residual contributions. More...
 
void cacheResidual (dof_id_type dof, Real value, const std::set< TagID > &tags)
 Cache individual residual contributions. More...
 
void processLocalResidual (DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
 Appling scaling, constraints to the local residual block and populate the full DoF indices for array variable. More...
 
void addResidualBlock (NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
 Add a local residual block to a global residual vector with proper scaling. More...
 
void cacheResidualBlock (std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
 Push a local residual block with proper scaling into cache. More...
 
void setResidualBlock (NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
 Set a local residual block to a global residual vector with proper scaling. More...
 
void addJacobianBlock (SparseMatrix< Number > &jacobian, DenseMatrix< Number > &jac_block, const MooseVariableBase &ivar, const MooseVariableBase &jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices)
 Add a local Jacobian block to a global Jacobian with proper scaling. More...
 
void cacheJacobianBlock (DenseMatrix< Number > &jac_block, const MooseVariableBase &ivar, const MooseVariableBase &jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, TagID tag)
 Push a local Jacobian block with proper scaling into cache for a certain tag. More...
 
void cacheJacobianBlockNonzero (DenseMatrix< Number > &jac_block, const MooseVariableBase &ivar, const MooseVariableBase &jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, TagID tag)
 Push non-zeros of a local Jacobian block with proper scaling into cache for a certain tag. More...
 
void addJacobianCoupledVarPair (const MooseVariableBase &ivar, const MooseVariableBase &jvar)
 Adds element matrices for ivar rows and jvar columns to the global Jacobian matrices. More...
 
void cacheJacobianCoupledVarPair (const MooseVariableBase &ivar, const MooseVariableBase &jvar)
 Caches element matrix for ivar rows and jvar columns. More...
 
void clearCachedJacobian ()
 Clear any currently cached jacobians. More...
 
void buildFE (FEType type) const
 Build FEs with a type. More...
 
void buildFaceFE (FEType type) const
 Build FEs for a face with a type. More...
 
void buildNeighborFE (FEType type) const
 Build FEs for a neighbor with a type. More...
 
void buildFaceNeighborFE (FEType type) const
 Build FEs for a neighbor face with a type. More...
 
void buildLowerDFE (FEType type) const
 Build FEs for a lower dimensional element with a type. More...
 
void buildLowerDDualFE (FEType type) const
 
void buildVectorFE (FEType type) const
 Build Vector FEs with a type. More...
 
void buildVectorFaceFE (FEType type) const
 Build Vector FEs for a face with a type. More...
 
void buildVectorNeighborFE (FEType type) const
 Build Vector FEs for a neighbor with a type. More...
 
void buildVectorFaceNeighborFE (FEType type) const
 Build Vector FEs for a neighbor face with a type. More...
 
void buildVectorLowerDFE (FEType type) const
 Build Vector FEs for a lower dimensional element with a type. More...
 
void buildVectorDualLowerDFE (FEType type) const
 
void jacobianBlockUsed (TagID tag, unsigned int ivar, unsigned int jvar, bool used)
 Sets whether or not Jacobian coupling between ivar and jvar is used to the value used. More...
 
char jacobianBlockUsed (TagID tag, unsigned int ivar, unsigned int jvar) const
 Return a flag to indicate if a particular coupling Jacobian block between ivar and jvar is used. More...
 
void jacobianBlockNeighborUsed (TagID tag, unsigned int ivar, unsigned int jvar, bool used)
 Sets whether or not neighbor Jacobian coupling between ivar and jvar is used to the value used. More...
 
char jacobianBlockNeighborUsed (TagID tag, unsigned int ivar, unsigned int jvar) const
 Return a flag to indicate if a particular coupling neighbor Jacobian block between ivar and jvar is used. More...
 
void jacobianBlockLowerUsed (TagID tag, unsigned int ivar, unsigned int jvar, bool used)
 Sets whether or not lower Jacobian coupling between ivar and jvar is used to the value used. More...
 
char jacobianBlockLowerUsed (TagID tag, unsigned int ivar, unsigned int jvar) const
 Return a flag to indicate if a particular coupling lower Jacobian block between ivar and jvar is used. More...
 
void jacobianBlockNonlocalUsed (TagID tag, unsigned int ivar, unsigned int jvar, bool used)
 Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used. More...
 
char jacobianBlockNonlocalUsed (TagID tag, unsigned int ivar, unsigned int jvar) const
 Return a flag to indicate if a particular coupling nonlocal Jacobian block between ivar and jvar is used. More...
 
void helpersRequestData ()
 request phi, dphi, xyz, JxW, etc. More...
 
QBase * qruleFace (const Elem *elem, unsigned int side)
 This is an abstraction over the internal qrules function. More...
 
ArbitraryQuadratureqruleArbitraryFace (const Elem *elem, unsigned int side)
 
template<typename T >
T * qruleFaceHelper (const Elem *elem, unsigned int side, std::function< T *(QRules &)> rule_fn)
 
QRulesqrules (unsigned int dim)
 
QRulesqrules (unsigned int dim, SubdomainID block)
 This is a helper function for accessing quadrature rules for a particular dimensionality of element. More...
 

Private Attributes

SystemBase_sys
 
SubProblem_subproblem
 
const bool _displaced
 
const CouplingMatrix * _cm
 Coupling matrices. More...
 
const CouplingMatrix & _nonlocal_cm
 
const bool & _computing_residual
 Whether we are currently computing the residual. More...
 
const bool & _computing_jacobian
 Whether we are currently computing the Jacobian. More...
 
const bool & _computing_residual_and_jacobian
 Whether we are currently computing the residual and Jacobian. More...
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
 Entries in the coupling matrix for field variables. More...
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
 Entries in the coupling matrix for field variables vs scalar variables. More...
 
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _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< MooseVariableFieldBase *, MooseVariableFieldBase * > > _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...
 
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
 Flag that indicates if the jacobian block for the lower dimensional element was used. More...
 
const DofMap & _dof_map
 DOF map. More...
 
THREAD_ID _tid
 Thread number (id) More...
 
MooseMesh_mesh
 
unsigned int _mesh_dimension
 
const FEType _helper_type
 The finite element type of the FE helper classes. More...
 
bool _user_added_fe_of_helper_type
 Whether user code requested a FEType the same as our _helper_type. More...
 
bool _user_added_fe_face_of_helper_type
 
bool _user_added_fe_face_neighbor_of_helper_type
 
bool _user_added_fe_neighbor_of_helper_type
 
bool _user_added_fe_lower_of_helper_type
 
std::vector< std::unique_ptr< FEBase > > _unique_fe_helper
 Containers for holding unique FE helper types if we are doing p-refinement. More...
 
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
 
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
 
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
 
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
 
bool _building_helpers
 Whether we are currently building the FE classes for the helpers. More...
 
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...
 
ArbitraryQuadrature_current_qrule_arbitrary_face
 The current arbitrary quadrature rule used on the element face. 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...
 
MooseArray< DualReal_ad_coord
 The AD version of the current coordinate transformation coefficients. More...
 
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
 Holds quadrature rules for each dimension. 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::vector< Eigen::Map< RealDIMValue > > _mapped_normals
 Mapped normals. More...
 
MooseArray< std::vector< Point > > _current_tangents
 The current tangent vectors at the quadrature points. More...
 
std::vector< dof_id_type_extra_elem_ids
 Extra element IDs. More...
 
std::vector< dof_id_type_neighbor_extra_elem_ids
 Extra element IDs of neighbor. 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
 
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
 FE objects for lower dimensional elements. More...
 
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
 Vector FE objects for lower dimensional elements. More...
 
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
 helper object for transforming coordinates for lower dimensional element quadrature points More...
 
QBase * _current_qrule_neighbor
 quadrature rule used on neighbors More...
 
MooseArray< Point > _current_q_points_face_neighbor
 The current quadrature points on the neighbor face. More...
 
bool _need_JxW_neighbor
 Flag to indicate that JxW_neighbor is needed. 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...
 
MooseArray< Real_coord_msm
 The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment mesh. More...
 
const std::vector< Real > * _JxW_msm
 A JxW for working on mortar segement elements. More...
 
std::unique_ptr< FEBase_fe_msm
 A FE object for working on mortar segement elements. More...
 
QBase * _qrule_msm
 A qrule object for working on mortar segement elements. More...
 
bool _custom_mortar_qrule
 Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh. More...
 
QBase * _current_qrule_lower
 quadrature rule used on lower dimensional elements. More...
 

Detailed Description

Keeps track of stuff related to assembling.

Definition at line 93 of file Assembly.h.

Constructor & Destructor Documentation

◆ Assembly()

Assembly::Assembly ( SystemBase sys,
THREAD_ID  tid 
)

Definition at line 77 of file Assembly.C.

78  : _sys(sys),
80  _displaced(dynamic_cast<DisplacedSystem *>(&sys) ? true : false),
85  _dof_map(_sys.dofMap()),
86  _tid(tid),
87  _mesh(sys.mesh()),
95  _building_helpers(false),
96  _current_qrule(nullptr),
97  _current_qrule_volume(nullptr),
98  _current_qrule_arbitrary(nullptr),
100  _current_qrule_face(nullptr),
101  _current_qface_arbitrary(nullptr),
102  _current_qrule_neighbor(nullptr),
103  _need_JxW_neighbor(false),
104  _qrule_msm(nullptr),
105  _custom_mortar_qrule(false),
106  _current_qrule_lower(nullptr),
107 
108  _current_elem(nullptr),
110  _current_side(0),
111  _current_side_elem(nullptr),
113  _current_neighbor_elem(nullptr),
118  _current_node(nullptr),
119  _current_neighbor_node(nullptr),
122 
123  _current_lower_d_elem(nullptr),
127  _need_dual(false),
128 
130  _cached_residual_values(2), // The 2 is for TIME and NONTIME
131  _cached_residual_rows(2), // The 2 is for TIME and NONTIME
134 
135  _block_diagonal_matrix(false),
136  _calculate_xyz(false),
137  _calculate_face_xyz(false),
138  _calculate_curvatures(false),
139  _calculate_ad_coord(false),
140  _have_p_refinement(false)
141 {
142  const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
143  _building_helpers = true;
144  // Build fe's for the helpers
145  buildFE(FEType(helper_order, LAGRANGE));
146  buildFaceFE(FEType(helper_order, LAGRANGE));
147  buildNeighborFE(FEType(helper_order, LAGRANGE));
148  buildFaceNeighborFE(FEType(helper_order, LAGRANGE));
149  buildLowerDFE(FEType(helper_order, LAGRANGE));
150  _building_helpers = false;
151 
152  // Build an FE helper object for this type for each dimension up to the dimension of the current
153  // mesh
154  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
155  {
156  _holder_fe_helper[dim] = _fe[dim][FEType(helper_order, LAGRANGE)];
157  _holder_fe_face_helper[dim] = _fe_face[dim][FEType(helper_order, LAGRANGE)];
158  _holder_fe_face_neighbor_helper[dim] = _fe_face_neighbor[dim][FEType(helper_order, LAGRANGE)];
159  _holder_fe_neighbor_helper[dim] = _fe_neighbor[dim][FEType(helper_order, LAGRANGE)];
160  }
161 
162  for (unsigned int dim = 0; dim < _mesh_dimension; dim++)
163  _holder_fe_lower_helper[dim] = _fe_lower[dim][FEType(helper_order, LAGRANGE)];
164 
165  // request phi, dphi, xyz, JxW, etc. data
167 
168  // For 3D mortar, mortar segments are always TRI3 elements so we want FIRST LAGRANGE regardless
169  // of discretization
170  _fe_msm = (_mesh_dimension == 2)
171  ? FEGenericBase<Real>::build(_mesh_dimension - 1, FEType(helper_order, LAGRANGE))
172  : FEGenericBase<Real>::build(_mesh_dimension - 1, FEType(FIRST, LAGRANGE));
173  // This FE object should not take part in p-refinement
174  _fe_msm->add_p_level_in_reinit(false);
175  _JxW_msm = &_fe_msm->get_JxW();
176  // Prerequest xyz so that it is computed for _fe_msm so that it can be used for calculating
177  // _coord_msm
178  _fe_msm->get_xyz();
179 
180  _extra_elem_ids.resize(_mesh.getMesh().n_elem_integers() + 1);
181  _neighbor_extra_elem_ids.resize(_mesh.getMesh().n_elem_integers() + 1);
182 }
LAGRANGE
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:2571
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2367
SystemBase & _sys
Definition: Assembly.h:2265
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:2754
unsigned int _max_cached_residuals
Definition: Assembly.h:2756
QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2545
bool _user_added_fe_lower_of_helper_type
Definition: Assembly.h:2318
Order
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:312
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:264
const bool & _computing_residual
Whether we are currently computing the residual.
Definition: Assembly.h:2275
QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2539
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2505
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2534
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2579
bool _user_added_fe_face_neighbor_of_helper_type
Definition: Assembly.h:2316
bool _have_p_refinement
Whether we have ever conducted p-refinement.
Definition: Assembly.h:2851
FIRST
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:2573
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
MooseMesh & _mesh
Definition: Assembly.h:2305
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2506
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:2555
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2311
const bool & _computing_residual_and_jacobian
Whether we are currently computing the residual and Jacobian.
Definition: Assembly.h:2281
const bool & currentlyComputingResidualAndJacobian() const
Returns true if the problem is in the process of computing the residual and the Jacobian.
Definition: SubProblem.h:1388
SECOND
unsigned int _mesh_dimension
Definition: Assembly.h:2307
const bool & currentlyComputingResidual() const
Returns true if the problem is in the process of computing the residual.
Definition: SubProblem.h:675
QBase * _current_qrule_volume
The current volumetric quadrature for the element.
Definition: Assembly.h:2365
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:2301
unsigned int _max_cached_jacobians
Definition: Assembly.h:2765
const CouplingMatrix & _nonlocal_cm
Definition: Assembly.h:2272
const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
Definition: Assembly.h:2586
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:2567
bool _user_added_fe_neighbor_of_helper_type
Definition: Assembly.h:2317
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:334
virtual DofMap & dofMap()
Gets writeable reference to the dof map.
Definition: SystemBase.C:1131
QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2516
const std::vector< Real > * _JxW_msm
A JxW for working on mortar segement elements.
Definition: Assembly.h:2532
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2678
SubProblem & _subproblem
Definition: Assembly.h:2266
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:290
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2499
bool _calculate_xyz
Definition: Assembly.h:2810
bool _calculate_curvatures
Definition: Assembly.h:2812
const std::vector< VectorTag > & _residual_vector_tags
The residual vector tags that Assembly could possibly contribute to.
Definition: Assembly.h:2748
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition: Assembly.h:2492
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:149
virtual SubProblem & subproblem()
Definition: SystemBase.h:98
ArbitraryQuadrature * _current_qface_arbitrary
The current arbitrary quadrature rule used on element faces.
Definition: Assembly.h:2477
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2816
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition: Assembly.h:2584
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2509
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:3457
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2355
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:2561
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
const bool _displaced
Definition: Assembly.h:2268
const Node * _current_node
The current node we are working with.
Definition: Assembly.h:2575
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2329
bool _calculate_face_xyz
Definition: Assembly.h:2811
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition: Assembly.h:2588
bool _user_added_fe_face_of_helper_type
Definition: Assembly.h:2315
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2471
const bool & _computing_jacobian
Whether we are currently computing the Jacobian.
Definition: Assembly.h:2278
virtual MooseMesh & mesh()
Definition: SystemBase.h:96
void helpersRequestData()
request phi, dphi, xyz, JxW, etc.
Definition: Assembly.C:4801
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition: Assembly.C:356
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2557
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2359
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:2569
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2490
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2581
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2500
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh...
Definition: Assembly.h:2541
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:639
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition: Assembly.h:2592
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
Definition: Assembly.h:2314
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:2375
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2513
const CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const
Definition: SubProblem.h:634
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2559
bool _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:2768
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
Definition: Assembly.h:2520
bool _need_dual
Whether dual shape functions need to be computed for mortar constraints.
Definition: Assembly.h:2596
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition: Assembly.h:2577

◆ ~Assembly()

Assembly::~Assembly ( )
virtual

Definition at line 184 of file Assembly.C.

185 {
186  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
187  for (auto & it : _fe[dim])
188  delete it.second;
189 
190  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
191  for (auto & it : _fe_face[dim])
192  delete it.second;
193 
194  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
195  for (auto & it : _fe_neighbor[dim])
196  delete it.second;
197 
198  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
199  for (auto & it : _fe_face_neighbor[dim])
200  delete it.second;
201 
202  for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
203  for (auto & it : _fe_lower[dim])
204  delete it.second;
205 
206  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
207  for (auto & it : _vector_fe[dim])
208  delete it.second;
209 
210  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
211  for (auto & it : _vector_fe_face[dim])
212  delete it.second;
213 
214  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
215  for (auto & it : _vector_fe_neighbor[dim])
216  delete it.second;
217 
218  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
219  for (auto & it : _vector_fe_face_neighbor[dim])
220  delete it.second;
221 
222  for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
223  for (auto & it : _vector_fe_lower[dim])
224  delete it.second;
225 
226  for (auto & it : _ad_grad_phi_data)
227  it.second.release();
228 
229  for (auto & it : _ad_vector_grad_phi_data)
230  it.second.release();
231 
232  for (auto & it : _ad_grad_phi_data_face)
233  it.second.release();
234 
235  for (auto & it : _ad_vector_grad_phi_data_face)
236  it.second.release();
237 
239 
240  _coord.release();
243 
244  _ad_JxW.release();
251  _ad_coord.release();
252 
253  delete _qrule_msm;
254 }
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:2787
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
MooseArray< Real > _curvatures
Definition: Assembly.h:2802
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition: Assembly.h:2735
MooseArray< VectorValue< DualReal > > _ad_q_points_face
Definition: Assembly.h:2801
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2599
MooseArray< VectorValue< DualReal > > _ad_normals
Definition: Assembly.h:2800
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2357
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition: Assembly.h:2524
QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2539
MooseArray< DualReal > _ad_JxW_face
Definition: Assembly.h:2799
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:2377
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:2788
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2502
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2733
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2499
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2734
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2469
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2509
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2355
MooseArray< DualReal > _ad_curvatures
Definition: Assembly.h:2803
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2511
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:66
MooseArray< Real > _coord_msm
The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment m...
Definition: Assembly.h:2527
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2501
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition: Assembly.h:2737
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2500
MooseArray< DualReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2379

Member Function Documentation

◆ activateDual()

void Assembly::activateDual ( )
inline

Indicates that dual shape functions are used for mortar constraint.

Definition at line 567 of file Assembly.h.

Referenced by MortarConstraintBase::MortarConstraintBase().

567 { _need_dual = true; }
bool _need_dual
Whether dual shape functions need to be computed for mortar constraints.
Definition: Assembly.h:2596

◆ adCoordTransformation()

const MooseArray<ADReal>& Assembly::adCoordTransformation ( ) const
inline

Returns the reference to the AD version of the coordinate transformation coefficients.

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

Definition at line 264 of file Assembly.h.

265  {
266  // Coord values for non-cartesian coordinate systems are functions of the locations of the
267  // quadrature points in physical space. We also have no way of knowing whether this was called
268  // from a volumetric or face object so we should set both volumetric and face xyz to true
269  _calculate_xyz = true;
270  _calculate_face_xyz = true;
271 
272  _calculate_ad_coord = true;
273  return _ad_coord;
274  }
bool _calculate_xyz
Definition: Assembly.h:2810
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2816
bool _calculate_face_xyz
Definition: Assembly.h:2811
MooseArray< DualReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2379

◆ adCurvatures()

const MooseArray< ADReal > & Assembly::adCurvatures ( ) const

Definition at line 4788 of file Assembly.C.

4789 {
4790  _calculate_curvatures = true;
4791  const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
4792  const FEType helper_type(helper_order, LAGRANGE);
4793  // Must prerequest the second derivatives. Sadly because there is only one
4794  // _need_second_derivative map for both volumetric and face FE objects we must request both here
4795  feSecondPhi<Real>(helper_type);
4796  feSecondPhiFace<Real>(helper_type);
4797  return _ad_curvatures;
4798 }
Order
FIRST
MooseMesh & _mesh
Definition: Assembly.h:2305
SECOND
bool _calculate_curvatures
Definition: Assembly.h:2812
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:3457
MooseArray< DualReal > _ad_curvatures
Definition: Assembly.h:2803

◆ addCachedJacobian()

void Assembly::addCachedJacobian ( GlobalDataKey  )

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 3811 of file Assembly.C.

Referenced by SubProblem::addCachedJacobian(), NonlinearSystemBase::computeJacobianInternal(), and ComputeMortarFunctor::operator()().

3812 {
3814  {
3815  mooseAssert(_cached_jacobian_rows.size() == _cached_jacobian_cols.size(),
3816  "Error: Cached data sizes MUST be the same!");
3817  for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3818  mooseAssert(_cached_jacobian_rows[i].size() == _cached_jacobian_cols[i].size(),
3819  "Error: Cached data sizes MUST be the same for a given tag!");
3820  }
3821 
3822  for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3823  if (_sys.hasMatrix(i))
3824  for (MooseIndex(_cached_jacobian_rows[i]) j = 0; j < _cached_jacobian_rows[i].size(); j++)
3826  _cached_jacobian_cols[i][j],
3827  _cached_jacobian_values[i][j]);
3828 
3829  for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3830  {
3831  if (!_sys.hasMatrix(i))
3832  continue;
3833 
3836 
3837  // Try to be more efficient from now on
3838  // The 2 is just a fudge factor to keep us from having to grow the vector during assembly
3839  _cached_jacobian_values[i].clear();
3841 
3842  _cached_jacobian_rows[i].clear();
3844 
3845  _cached_jacobian_cols[i].clear();
3847  }
3848 }
SystemBase & _sys
Definition: Assembly.h:2265
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2759
unsigned int _max_cached_jacobians
Definition: Assembly.h:2765
virtual void add(const numeric_index_type i, const numeric_index_type j, const Number value)=0
SubProblem & _subproblem
Definition: Assembly.h:2266
virtual bool checkNonlocalCouplingRequirement()
Definition: SubProblem.h:88
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2763

◆ addCachedResidualDirectly()

void Assembly::addCachedResidualDirectly ( NumericVector< Number > &  residual,
GlobalDataKey  ,
const VectorTag vector_tag 
)

Adds the values that have been cached by calling cacheResidual(), cacheResidualNeighbor(), and/or cacheResidualLower() to a user-defined residual (that is, not necessarily the vector that vector_tag points to)

Note that this will also clear the cache.

Definition at line 3526 of file Assembly.C.

Referenced by addCachedResiduals().

3529 {
3530  const auto & values = _cached_residual_values[vector_tag._type_id];
3531  const auto & rows = _cached_residual_rows[vector_tag._type_id];
3532 
3533  mooseAssert(values.size() == rows.size(),
3534  "Number of cached residuals and number of rows must match!");
3535 
3536  if (!values.empty())
3537  {
3538  residual.add_vector(values, rows);
3539  clearCachedResiduals(vector_tag);
3540  }
3541 }
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:2754
virtual void add_vector(const Number *v, const std::vector< numeric_index_type > &dof_indices)
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
void clearCachedResiduals(GlobalDataKey)
Clears all of the residuals in _cached_residual_rows and _cached_residual_values. ...
Definition: Assembly.C:3496

◆ addCachedResiduals()

void Assembly::addCachedResiduals ( GlobalDataKey  ,
const std::vector< VectorTag > &  tags 
)

Pushes all cached residuals to the global residual vectors associated with each tag.

Note that this will also clear the cache.

Definition at line 3481 of file Assembly.C.

Referenced by SubProblem::addCachedResidual(), and ComputeMortarFunctor::operator()().

3482 {
3483  for (const auto & vector_tag : tags)
3484  {
3485  if (!_sys.hasVector(vector_tag._id))
3486  {
3487  _cached_residual_values[vector_tag._type_id].clear();
3488  _cached_residual_rows[vector_tag._type_id].clear();
3489  continue;
3490  }
3491  addCachedResidualDirectly(_sys.getVector(vector_tag._id), GlobalDataKey{}, vector_tag);
3492  }
3493 }
SystemBase & _sys
Definition: Assembly.h:2265
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:2754
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
void addCachedResidualDirectly(NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
Adds the values that have been cached by calling cacheResidual(), cacheResidualNeighbor(), and/or cacheResidualLower() to a user-defined residual (that is, not necessarily the vector that vector_tag points to)
Definition: Assembly.C:3526
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

◆ addJacobian()

void Assembly::addJacobian ( GlobalDataKey  )

Adds all local Jacobian to the global Jacobian matrices.

Definition at line 3866 of file Assembly.C.

3867 {
3868  for (const auto & it : _cm_ff_entry)
3869  addJacobianCoupledVarPair(*it.first, *it.second);
3870 
3871  for (const auto & it : _cm_sf_entry)
3872  addJacobianCoupledVarPair(*it.first, *it.second);
3873 
3874  for (const auto & it : _cm_fs_entry)
3875  addJacobianCoupledVarPair(*it.first, *it.second);
3876 }
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:2288
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
void addJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Adds element matrices for ivar rows and jvar columns to the global Jacobian matrices.
Definition: Assembly.C:3851
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:2286

◆ 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,
GlobalDataKey  ,
TagID  tag 
)

Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix.

Definition at line 4237 of file Assembly.C.

Referenced by addJacobianBlockTags(), addJacobianCoupledVarPair(), addJacobianLowerD(), addJacobianNeighbor(), addJacobianNeighborLowerD(), and addJacobianNonlocal().

4244 {
4245  if (dof_indices.size() == 0)
4246  return;
4247  if (!(*_cm)(ivar, jvar))
4248  return;
4249 
4250  auto & iv = _sys.getVariable(_tid, ivar);
4251  auto & jv = _sys.getVariable(_tid, jvar);
4252  auto & scaling_factor = iv.arrayScalingFactor();
4253 
4254  const unsigned int ivn = iv.number();
4255  const unsigned int jvn = jv.number();
4256  auto & ke = jacobianBlock(ivn, jvn, LocalDataKey{}, tag);
4257 
4258  // It is guaranteed by design iv.number <= ivar since iv is obtained
4259  // through SystemBase::getVariable with ivar.
4260  // Most of times ivar will just be equal to iv.number except for array variables,
4261  // where ivar could be a number for a component of an array variable but calling
4262  // getVariable will return the array variable that has the number of the 0th component.
4263  // It is the same for jvar.
4264  const unsigned int i = ivar - ivn;
4265  const unsigned int j = jvar - jvn;
4266 
4267  // DoF indices are independently given
4268  auto di = dof_indices;
4269  auto dj = dof_indices;
4270 
4271  auto indof = di.size();
4272  auto jndof = dj.size();
4273 
4274  unsigned int jj = j;
4275  if (ivar == jvar && _component_block_diagonal[ivn])
4276  jj = 0;
4277 
4278  auto sub = ke.sub_matrix(i * indof, indof, jj * jndof, jndof);
4279  // If we're computing the jacobian for automatically scaling variables we do not want to
4280  // constrain the element matrix because it introduces 1s on the diagonal for the constrained
4281  // dofs
4283  dof_map.constrain_element_matrix(sub, di, dj, false);
4284 
4285  if (scaling_factor[i] != 1.0)
4286  sub *= scaling_factor[i];
4287 
4288  jacobian.add_matrix(sub, di, dj);
4289 }
SystemBase & _sys
Definition: Assembly.h:2265
const std::vector< Real > & arrayScalingFactor() const
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
Definition: SystemBase.C:1481
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1092
const CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2271
virtual void add_matrix(const DenseMatrix< Number > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const

◆ addJacobianBlock() [2/2]

void Assembly::addJacobianBlock ( SparseMatrix< Number > &  jacobian,
DenseMatrix< Number > &  jac_block,
const MooseVariableBase ivar,
const MooseVariableBase jvar,
const std::vector< dof_id_type > &  idof_indices,
const std::vector< dof_id_type > &  jdof_indices 
)
private

Add a local Jacobian block to a global Jacobian with proper scaling.

Definition at line 3573 of file Assembly.C.

3579 {
3580  if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3581  return;
3582  if (jac_block.n() == 0 || jac_block.m() == 0)
3583  return;
3584 
3585  auto & scaling_factor = ivar.arrayScalingFactor();
3586 
3587  for (unsigned int i = 0; i < ivar.count(); ++i)
3588  {
3589  unsigned int iv = ivar.number();
3590  for (const auto & jt : ConstCouplingRow(iv + i, *_cm))
3591  {
3592  unsigned int jv = jvar.number();
3593  if (jt < jv || jt >= jv + jvar.count())
3594  continue;
3595  unsigned int j = jt - jv;
3596 
3597  auto di = ivar.componentDofIndices(idof_indices, i);
3598  auto dj = jvar.componentDofIndices(jdof_indices, j);
3599  auto indof = di.size();
3600  auto jndof = dj.size();
3601 
3602  unsigned int jj = j;
3603  if (iv == jv && _component_block_diagonal[iv])
3604  // here i must be equal to j
3605  jj = 0;
3606 
3607  auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3608  if (scaling_factor[i] != 1.0)
3609  sub *= scaling_factor[i];
3610 
3611  // If we're computing the jacobian for automatically scaling variables we do not want
3612  // to constrain the element matrix because it introduces 1s on the diagonal for the
3613  // constrained dofs
3615  _dof_map.constrain_element_matrix(sub, di, dj, false);
3616 
3617  jacobian.add_matrix(sub, di, dj);
3618  }
3619  }
3620 }
SystemBase & _sys
Definition: Assembly.h:2265
std::vector< dof_id_type > componentDofIndices(const std::vector< dof_id_type > &dof_indices, unsigned int component) const
Obtain DoF indices of a component with the indices of the 0th component.
const std::vector< Real > & arrayScalingFactor() const
unsigned int number() const
Get variable number coming from libMesh.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
Definition: SystemBase.C:1481
unsigned int m() const
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
const CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2271
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:2301
virtual void add_matrix(const DenseMatrix< Number > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
unsigned int n() const
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const

◆ 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,
GlobalDataKey  ,
TagID  tag 
)

Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix.

Definition at line 4292 of file Assembly.C.

Referenced by addJacobianBlockNonlocalTags().

4300 {
4301  if (idof_indices.size() == 0 || jdof_indices.size() == 0)
4302  return;
4303  if (jacobian.n() == 0 || jacobian.m() == 0)
4304  return;
4305  if (!(*_cm)(ivar, jvar))
4306  return;
4307 
4308  auto & iv = _sys.getVariable(_tid, ivar);
4309  auto & jv = _sys.getVariable(_tid, jvar);
4310  auto & scaling_factor = iv.arrayScalingFactor();
4311 
4312  const unsigned int ivn = iv.number();
4313  const unsigned int jvn = jv.number();
4314  auto & keg = jacobianBlockNonlocal(ivn, jvn, LocalDataKey{}, tag);
4315 
4316  // It is guaranteed by design iv.number <= ivar since iv is obtained
4317  // through SystemBase::getVariable with ivar.
4318  // Most of times ivar will just be equal to iv.number except for array variables,
4319  // where ivar could be a number for a component of an array variable but calling
4320  // getVariable will return the array variable that has the number of the 0th component.
4321  // It is the same for jvar.
4322  const unsigned int i = ivar - ivn;
4323  const unsigned int j = jvar - jvn;
4324 
4325  // DoF indices are independently given
4326  auto di = idof_indices;
4327  auto dj = jdof_indices;
4328 
4329  auto indof = di.size();
4330  auto jndof = dj.size();
4331 
4332  unsigned int jj = j;
4333  if (ivar == jvar && _component_block_diagonal[ivn])
4334  jj = 0;
4335 
4336  auto sub = keg.sub_matrix(i * indof, indof, jj * jndof, jndof);
4337  // If we're computing the jacobian for automatically scaling variables we do not want to
4338  // constrain the element matrix because it introduces 1s on the diagonal for the constrained
4339  // dofs
4341  dof_map.constrain_element_matrix(sub, di, dj, false);
4342 
4343  if (scaling_factor[i] != 1.0)
4344  sub *= scaling_factor[i];
4345 
4346  jacobian.add_matrix(sub, di, dj);
4347 }
SystemBase & _sys
Definition: Assembly.h:2265
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block from non-local contribution for a pair of variables and a tag...
Definition: Assembly.h:1103
const std::vector< Real > & arrayScalingFactor() const
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
Definition: SystemBase.C:1481
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
const CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2271
virtual void add_matrix(const DenseMatrix< Number > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
virtual numeric_index_type m() const =0
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const
virtual numeric_index_type n() const =0

◆ addJacobianBlockNonlocalTags()

void Assembly::addJacobianBlockNonlocalTags ( 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,
GlobalDataKey  ,
const std::set< TagID > &  tags 
)

Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix.

Definition at line 4350 of file Assembly.C.

4358 {
4359  for (auto tag : tags)
4361  jacobian, ivar, jvar, dof_map, idof_indices, jdof_indices, GlobalDataKey{}, tag);
4362 }
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, GlobalDataKey, TagID tag)
Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix...
Definition: Assembly.C:4292

◆ addJacobianBlockTags()

void Assembly::addJacobianBlockTags ( SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const DofMap &  dof_map,
std::vector< dof_id_type > &  dof_indices,
GlobalDataKey  ,
const std::set< TagID > &  tags 
)

Add element matrix for ivar rows and jvar columns to the global Jacobian matrix for given tags.

Definition at line 4224 of file Assembly.C.

4231 {
4232  for (auto tag : tags)
4233  addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices, GlobalDataKey{}, tag);
4234 }
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, TagID tag)
Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. ...
Definition: Assembly.C:4237

◆ addJacobianCoupledVarPair()

void Assembly::addJacobianCoupledVarPair ( const MooseVariableBase ivar,
const MooseVariableBase jvar 
)
inlineprivate

Adds element matrices for ivar rows and jvar columns to the global Jacobian matrices.

Definition at line 3851 of file Assembly.C.

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

3852 {
3853  auto i = ivar.number();
3854  auto j = jvar.number();
3855  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
3856  if (jacobianBlockUsed(tag, i, j) && _sys.hasMatrix(tag))
3858  jacobianBlock(i, j, LocalDataKey{}, tag),
3859  ivar,
3860  jvar,
3861  ivar.dofIndices(),
3862  jvar.dofIndices());
3863 }
SystemBase & _sys
Definition: Assembly.h:2265
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1092
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, TagID tag)
Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. ...
Definition: Assembly.C:4237

◆ addJacobianLowerD()

void Assembly::addJacobianLowerD ( GlobalDataKey  )

Add portions of the Jacobian of LowerLower, LowerSecondary, and SecondaryLower for boundary conditions.

Secondary indicates the boundary element. Lower denotes the lower-dimensional element living on the boundary side.

Definition at line 4017 of file Assembly.C.

4018 {
4019  for (const auto & it : _cm_ff_entry)
4020  {
4021  auto ivar = it.first;
4022  auto jvar = it.second;
4023  auto i = ivar->number();
4024  auto j = jvar->number();
4025  for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
4026  tag++)
4027  if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
4028  {
4030  jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
4031  *ivar,
4032  *jvar,
4033  ivar->dofIndicesLower(),
4034  jvar->dofIndicesLower());
4035 
4037  jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
4038  *ivar,
4039  *jvar,
4040  ivar->dofIndicesLower(),
4041  jvar->dofIndices());
4042 
4044  jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
4045  *ivar,
4046  *jvar,
4047  ivar->dofIndices(),
4048  jvar->dofIndicesLower());
4049  }
4050  }
4051 }
SystemBase & _sys
Definition: Assembly.h:2265
void jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not lower Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2228
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
DenseMatrix< Number > & jacobianBlockMortar(Moose::ConstraintJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Returns the jacobian block for the given mortar Jacobian type.
Definition: Assembly.C:3149
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
Flag that indicates if the jacobian block for the lower dimensional element was used.
Definition: Assembly.h:2299
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, TagID tag)
Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. ...
Definition: Assembly.C:4237

◆ addJacobianNeighbor() [1/2]

void Assembly::addJacobianNeighbor ( GlobalDataKey  )

Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objects like DGKernels.

Definition at line 3901 of file Assembly.C.

Referenced by addJacobianNeighborTags().

3902 {
3903  for (const auto & it : _cm_ff_entry)
3904  {
3905  auto ivar = it.first;
3906  auto jvar = it.second;
3907  auto i = ivar->number();
3908  auto j = jvar->number();
3909  for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
3910  tag < _jacobian_block_neighbor_used.size();
3911  tag++)
3912  if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
3913  {
3915  jacobianBlockNeighbor(Moose::ElementNeighbor, i, j, LocalDataKey{}, tag),
3916  *ivar,
3917  *jvar,
3918  ivar->dofIndices(),
3919  jvar->dofIndicesNeighbor());
3920 
3922  jacobianBlockNeighbor(Moose::NeighborElement, i, j, LocalDataKey{}, tag),
3923  *ivar,
3924  *jvar,
3925  ivar->dofIndicesNeighbor(),
3926  jvar->dofIndices());
3927 
3929  jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
3930  *ivar,
3931  *jvar,
3932  ivar->dofIndicesNeighbor(),
3933  jvar->dofIndicesNeighbor());
3934  }
3935  }
3936 }
SystemBase & _sys
Definition: Assembly.h:2265
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block of a DG Jacobian type for a pair of variables and a tag. ...
Definition: Assembly.C:3108
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
void jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not neighbor Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2210
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, TagID tag)
Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. ...
Definition: Assembly.C:4237
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:2297

◆ 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,
GlobalDataKey  ,
TagID  tag 
)

Adds three neighboring element matrices for ivar rows and jvar columns to the global Jacobian matrix.

Definition at line 4365 of file Assembly.C.

4373 {
4374  if (dof_indices.size() == 0 && neighbor_dof_indices.size() == 0)
4375  return;
4376  if (!(*_cm)(ivar, jvar))
4377  return;
4378 
4379  auto & iv = _sys.getVariable(_tid, ivar);
4380  auto & jv = _sys.getVariable(_tid, jvar);
4381  auto & scaling_factor = iv.arrayScalingFactor();
4382 
4383  const unsigned int ivn = iv.number();
4384  const unsigned int jvn = jv.number();
4385  auto & ken = jacobianBlockNeighbor(Moose::ElementNeighbor, ivn, jvn, LocalDataKey{}, tag);
4386  auto & kne = jacobianBlockNeighbor(Moose::NeighborElement, ivn, jvn, LocalDataKey{}, tag);
4387  auto & knn = jacobianBlockNeighbor(Moose::NeighborNeighbor, ivn, jvn, LocalDataKey{}, tag);
4388 
4389  // It is guaranteed by design iv.number <= ivar since iv is obtained
4390  // through SystemBase::getVariable with ivar.
4391  // Most of times ivar will just be equal to iv.number except for array variables,
4392  // where ivar could be a number for a component of an array variable but calling
4393  // getVariable will return the array variable that has the number of the 0th component.
4394  // It is the same for jvar.
4395  const unsigned int i = ivar - ivn;
4396  const unsigned int j = jvar - jvn;
4397  // DoF indices are independently given
4398  auto dc = dof_indices;
4399  auto dn = neighbor_dof_indices;
4400  auto cndof = dc.size();
4401  auto nndof = dn.size();
4402 
4403  unsigned int jj = j;
4404  if (ivar == jvar && _component_block_diagonal[ivn])
4405  jj = 0;
4406 
4407  auto suben = ken.sub_matrix(i * cndof, cndof, jj * nndof, nndof);
4408  auto subne = kne.sub_matrix(i * nndof, nndof, jj * cndof, cndof);
4409  auto subnn = knn.sub_matrix(i * nndof, nndof, jj * nndof, nndof);
4410 
4411  // If we're computing the jacobian for automatically scaling variables we do not want to
4412  // constrain the element matrix because it introduces 1s on the diagonal for the constrained
4413  // dofs
4415  {
4416  dof_map.constrain_element_matrix(suben, dc, dn, false);
4417  dof_map.constrain_element_matrix(subne, dn, dc, false);
4418  dof_map.constrain_element_matrix(subnn, dn, dn, false);
4419  }
4420 
4421  if (scaling_factor[i] != 1.0)
4422  {
4423  suben *= scaling_factor[i];
4424  subne *= scaling_factor[i];
4425  subnn *= scaling_factor[i];
4426  }
4427 
4428  jacobian.add_matrix(suben, dc, dn);
4429  jacobian.add_matrix(subne, dn, dc);
4430  jacobian.add_matrix(subnn, dn, dn);
4431 }
SystemBase & _sys
Definition: Assembly.h:2265
const std::vector< Real > & arrayScalingFactor() const
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block of a DG Jacobian type for a pair of variables and a tag. ...
Definition: Assembly.C:3108
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
Definition: SystemBase.C:1481
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
const CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2271
virtual void add_matrix(const DenseMatrix< Number > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const

◆ addJacobianNeighborLowerD()

void Assembly::addJacobianNeighborLowerD ( GlobalDataKey  )

Add all portions of the Jacobian except PrimaryPrimary, e.g.

LowerLower, LowerSecondary, LowerPrimary, SecondaryLower, SecondarySecondary, SecondaryPrimary, PrimaryLower, PrimarySecondary, for mortar-like objects. Primary indicates the interior parent element on the primary side of the mortar interface. Secondary indicates the neighbor of the interior parent element. Lower denotes the lower-dimensional element living on the primary side of the mortar interface.

Definition at line 3939 of file Assembly.C.

3940 {
3941  for (const auto & it : _cm_ff_entry)
3942  {
3943  auto ivar = it.first;
3944  auto jvar = it.second;
3945  auto i = ivar->number();
3946  auto j = jvar->number();
3947  for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
3948  tag++)
3949  if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
3950  {
3952  jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
3953  *ivar,
3954  *jvar,
3955  ivar->dofIndicesLower(),
3956  jvar->dofIndicesLower());
3957 
3959  jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
3960  *ivar,
3961  *jvar,
3962  ivar->dofIndicesLower(),
3963  jvar->dofIndicesNeighbor());
3964 
3966  jacobianBlockMortar(Moose::LowerPrimary, i, j, LocalDataKey{}, tag),
3967  *ivar,
3968  *jvar,
3969  ivar->dofIndicesLower(),
3970  jvar->dofIndices());
3971 
3973  jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
3974  *ivar,
3975  *jvar,
3976  ivar->dofIndicesNeighbor(),
3977  jvar->dofIndicesLower());
3978 
3980  jacobianBlockMortar(Moose::PrimaryLower, i, j, LocalDataKey{}, tag),
3981  *ivar,
3982  *jvar,
3983  ivar->dofIndices(),
3984  jvar->dofIndicesLower());
3985  }
3986 
3987  for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
3988  tag < _jacobian_block_neighbor_used.size();
3989  tag++)
3990  if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
3991  {
3993  jacobianBlockNeighbor(Moose::ElementNeighbor, i, j, LocalDataKey{}, tag),
3994  *ivar,
3995  *jvar,
3996  ivar->dofIndices(),
3997  jvar->dofIndicesNeighbor());
3998 
4000  jacobianBlockNeighbor(Moose::NeighborElement, i, j, LocalDataKey{}, tag),
4001  *ivar,
4002  *jvar,
4003  ivar->dofIndicesNeighbor(),
4004  jvar->dofIndices());
4005 
4007  jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
4008  *ivar,
4009  *jvar,
4010  ivar->dofIndicesNeighbor(),
4011  jvar->dofIndicesNeighbor());
4012  }
4013  }
4014 }
SystemBase & _sys
Definition: Assembly.h:2265
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block of a DG Jacobian type for a pair of variables and a tag. ...
Definition: Assembly.C:3108
void jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not lower Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2228
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
DenseMatrix< Number > & jacobianBlockMortar(Moose::ConstraintJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Returns the jacobian block for the given mortar Jacobian type.
Definition: Assembly.C:3149
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
void jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not neighbor Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2210
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
Flag that indicates if the jacobian block for the lower dimensional element was used.
Definition: Assembly.h:2299
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, TagID tag)
Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. ...
Definition: Assembly.C:4237
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:2297

◆ addJacobianNeighborTags()

void Assembly::addJacobianNeighborTags ( 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,
GlobalDataKey  ,
const std::set< TagID > &  tags 
)

Adds three neighboring element matrices for ivar rows and jvar columns to the global Jacobian matrix.

Definition at line 4434 of file Assembly.C.

4442 {
4443  for (const auto tag : tags)
4445  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, GlobalDataKey{}, tag);
4446 }
void addJacobianNeighbor(GlobalDataKey)
Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objec...
Definition: Assembly.C:3901

◆ addJacobianNonlocal()

void Assembly::addJacobianNonlocal ( GlobalDataKey  )

Adds non-local Jacobian to the global Jacobian matrices.

Definition at line 3879 of file Assembly.C.

3880 {
3881  for (const auto & it : _cm_nonlocal_entry)
3882  {
3883  auto ivar = it.first;
3884  auto jvar = it.second;
3885  auto i = ivar->number();
3886  auto j = jvar->number();
3887  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
3888  tag < _jacobian_block_nonlocal_used.size();
3889  tag++)
3890  if (jacobianBlockNonlocalUsed(tag, i, j) && _sys.hasMatrix(tag))
3892  jacobianBlockNonlocal(i, j, LocalDataKey{}, tag),
3893  *ivar,
3894  *jvar,
3895  ivar->dofIndices(),
3896  jvar->allDofIndices());
3897  }
3898 }
SystemBase & _sys
Definition: Assembly.h:2265
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block from non-local contribution for a pair of variables and a tag...
Definition: Assembly.h:1103
void jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2246
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2295
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2292
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, TagID tag)
Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. ...
Definition: Assembly.C:4237

◆ addJacobianOffDiagScalar()

void Assembly::addJacobianOffDiagScalar ( unsigned int  ivar,
GlobalDataKey   
)

Add Jacobians for a scalar variables with all other field variables into the global Jacobian matrices.

Definition at line 4456 of file Assembly.C.

4457 {
4458  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
4460  for (const auto & var_j : vars)
4461  addJacobianCoupledVarPair(var_i, *var_j);
4462 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
void addJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Adds element matrices for ivar rows and jvar columns to the global Jacobian matrices.
Definition: Assembly.C:3851
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a scalar variable with specified number.
Definition: SystemBase.C:134
Class for scalar variables (they are different).

◆ addJacobianScalar()

void Assembly::addJacobianScalar ( GlobalDataKey  )

Add Jacobians for pairs of scalar variables into the global Jacobian matrices.

Definition at line 4449 of file Assembly.C.

4450 {
4451  for (const auto & it : _cm_ss_entry)
4452  addJacobianCoupledVarPair(*it.first, *it.second);
4453 }
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition: Assembly.h:2290
void addJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Adds element matrices for ivar rows and jvar columns to the global Jacobian matrices.
Definition: Assembly.C:3851

◆ addResidual() [1/2]

void Assembly::addResidual ( GlobalDataKey  ,
const std::vector< VectorTag > &  vector_tags 
)

Add local residuals of all field variables for a set of tags onto the global residual vectors associated with the tags.

Definition at line 3318 of file Assembly.C.

3319 {
3320  for (const auto & vector_tag : vector_tags)
3321  if (_sys.hasVector(vector_tag._id))
3322  addResidual(vector_tag);
3323 }
SystemBase & _sys
Definition: Assembly.h:2265
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
void addResidual(GlobalDataKey, const std::vector< VectorTag > &vector_tags)
Add local residuals of all field variables for a set of tags onto the global residual vectors associa...
Definition: Assembly.C:3318

◆ addResidual() [2/2]

void Assembly::addResidual ( const VectorTag vector_tag)
private

Add local residuals of all field variables for a tag onto the tag's residual vector.

Definition at line 3301 of file Assembly.C.

3302 {
3303  mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3304  "Non-residual tag in Assembly::addResidual");
3305 
3306  auto & tag_Re = _sub_Re[vector_tag._type_id];
3307  NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3308  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3309  for (const auto & var : vars)
3310  addResidualBlock(residual,
3311  tag_Re[var->number()],
3312  var->dofIndices(),
3313  var->arrayScalingFactor(),
3314  var->isNodal());
3315 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
TagID _id
The id associated with the vector tag.
Definition: VectorTag.h:28
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Add a local residual block to a global residual vector with proper scaling.
Definition: Assembly.C:3245
Moose::VectorTagType _type
The type of the vector tag.
Definition: VectorTag.h:51
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

◆ addResidualBlock()

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

Add a local residual block to a global residual vector with proper scaling.

Definition at line 3245 of file Assembly.C.

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

3250 {
3251  if (dof_indices.size() > 0 && res_block.size())
3252  {
3253  _temp_dof_indices = dof_indices;
3254  _tmp_Re = res_block;
3255  processLocalResidual(_tmp_Re, _temp_dof_indices, scaling_factor, is_nodal);
3257  }
3258 }
virtual void add_vector(const Number *v, const std::vector< numeric_index_type > &dof_indices)
void processLocalResidual(DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Appling scaling, constraints to the local residual block and populate the full DoF indices for array ...
Definition: Assembly.C:3209
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:2619
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:2774
virtual unsigned int size() const override final

◆ addResidualLower() [1/2]

void Assembly::addResidualLower ( GlobalDataKey  ,
const std::vector< VectorTag > &  vector_tags 
)

Add local neighbor residuals of all field variables for a set of tags onto the global residual vectors associated with the tags.

Definition at line 3368 of file Assembly.C.

3369 {
3370  for (const auto & vector_tag : vector_tags)
3371  if (_sys.hasVector(vector_tag._id))
3372  addResidualLower(vector_tag);
3373 }
SystemBase & _sys
Definition: Assembly.h:2265
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
void addResidualLower(GlobalDataKey, const std::vector< VectorTag > &vector_tags)
Add local neighbor residuals of all field variables for a set of tags onto the global residual vector...
Definition: Assembly.C:3368

◆ addResidualLower() [2/2]

void Assembly::addResidualLower ( const VectorTag vector_tag)
private

Add local lower-dimensional block residuals of all field variables for a tag onto the tag's residual vector.

Definition at line 3351 of file Assembly.C.

3352 {
3353  mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3354  "Non-residual tag in Assembly::addResidualLower");
3355 
3356  auto & tag_Rl = _sub_Rl[vector_tag._type_id];
3357  NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3358  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3359  for (const auto & var : vars)
3360  addResidualBlock(residual,
3361  tag_Rl[var->number()],
3362  var->dofIndicesLower(),
3363  var->arrayScalingFactor(),
3364  var->isNodal());
3365 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
TagID _id
The id associated with the vector tag.
Definition: VectorTag.h:28
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2616
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Add a local residual block to a global residual vector with proper scaling.
Definition: Assembly.C:3245
Moose::VectorTagType _type
The type of the vector tag.
Definition: VectorTag.h:51
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

◆ addResidualNeighbor() [1/2]

void Assembly::addResidualNeighbor ( GlobalDataKey  ,
const std::vector< VectorTag > &  vector_tags 
)

Add local neighbor residuals of all field variables for a set of tags onto the global residual vectors associated with the tags.

Definition at line 3343 of file Assembly.C.

3344 {
3345  for (const auto & vector_tag : vector_tags)
3346  if (_sys.hasVector(vector_tag._id))
3347  addResidualNeighbor(vector_tag);
3348 }
SystemBase & _sys
Definition: Assembly.h:2265
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
void addResidualNeighbor(GlobalDataKey, const std::vector< VectorTag > &vector_tags)
Add local neighbor residuals of all field variables for a set of tags onto the global residual vector...
Definition: Assembly.C:3343

◆ addResidualNeighbor() [2/2]

void Assembly::addResidualNeighbor ( const VectorTag vector_tag)
private

Add local neighbor residuals of all field variables for a tag onto the tag's residual vector.

Definition at line 3326 of file Assembly.C.

3327 {
3328  mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3329  "Non-residual tag in Assembly::addResidualNeighbor");
3330 
3331  auto & tag_Rn = _sub_Rn[vector_tag._type_id];
3332  NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3333  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3334  for (const auto & var : vars)
3335  addResidualBlock(residual,
3336  tag_Rn[var->number()],
3337  var->dofIndicesNeighbor(),
3338  var->arrayScalingFactor(),
3339  var->isNodal());
3340 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
TagID _id
The id associated with the vector tag.
Definition: VectorTag.h:28
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2614
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Add a local residual block to a global residual vector with proper scaling.
Definition: Assembly.C:3245
Moose::VectorTagType _type
The type of the vector tag.
Definition: VectorTag.h:51
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

◆ addResidualScalar() [1/2]

void Assembly::addResidualScalar ( GlobalDataKey  ,
const std::vector< VectorTag > &  vector_tags 
)

Add residuals of all scalar variables for a set of tags onto the global residual vectors associated with the tags.

Definition at line 3392 of file Assembly.C.

3393 {
3394  for (const auto & vector_tag : vector_tags)
3395  if (_sys.hasVector(vector_tag._id))
3396  addResidualScalar(vector_tag);
3397 }
SystemBase & _sys
Definition: Assembly.h:2265
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
void addResidualScalar(GlobalDataKey, const std::vector< VectorTag > &vector_tags)
Add residuals of all scalar variables for a set of tags onto the global residual vectors associated w...
Definition: Assembly.C:3392

◆ addResidualScalar() [2/2]

void Assembly::addResidualScalar ( const VectorTag vector_tag)
private

Add residuals of all scalar variables for a tag onto the tag's residual vector.

Definition at line 3377 of file Assembly.C.

3378 {
3379  mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3380  "Non-residual tag in Assembly::addResidualScalar");
3381 
3382  // add the scalar variables residuals
3383  auto & tag_Re = _sub_Re[vector_tag._type_id];
3384  NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3385  const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
3386  for (const auto & var : vars)
3388  residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor(), false);
3389 }
SystemBase & _sys
Definition: Assembly.h:2265
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:737
TagID _id
The id associated with the vector tag.
Definition: VectorTag.h:28
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Add a local residual block to a global residual vector with proper scaling.
Definition: Assembly.C:3245
Moose::VectorTagType _type
The type of the vector tag.
Definition: VectorTag.h:51
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

◆ adGradPhi() [1/2]

template<typename T >
const ADTemplateVariablePhiGradient<T>& Assembly::adGradPhi ( const MooseVariableFE< T > &  v) const
inline

Definition at line 1271 of file Assembly.h.

1272  {
1273  return _ad_grad_phi_data.at(v.feType());
1274  }
const FEType & feType() const
Get the type of finite element object.
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2733

◆ adGradPhi() [2/2]

template<>
const ADTemplateVariablePhiGradient<RealVectorValue>& Assembly::adGradPhi ( const MooseVariableFE< RealVectorValue > &  v) const
inline

Definition at line 3001 of file Assembly.h.

3002 {
3003  return _ad_vector_grad_phi_data.at(v.feType());
3004 }
const FEType & feType() const
Get the type of finite element object.
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2734

◆ adJxW()

const MooseArray<ADReal>& Assembly::adJxW ( ) const
inline

Definition at line 242 of file Assembly.h.

242 { return _ad_JxW; }
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:2787

◆ adJxWFace()

const MooseArray<ADReal>& Assembly::adJxWFace ( ) const
inline

Definition at line 244 of file Assembly.h.

244 { return _ad_JxW_face; }
MooseArray< DualReal > _ad_JxW_face
Definition: Assembly.h:2799

◆ adNormals()

const MooseArray<ADPoint>& Assembly::adNormals ( ) const
inline

Definition at line 346 of file Assembly.h.

346 { return _ad_normals; }
MooseArray< VectorValue< DualReal > > _ad_normals
Definition: Assembly.h:2800

◆ adQPoints()

const MooseArray<ADPoint>& Assembly::adQPoints ( ) const
inline

Definition at line 348 of file Assembly.h.

349  {
350  _calculate_xyz = true;
351  return _ad_q_points;
352  }
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:2788
bool _calculate_xyz
Definition: Assembly.h:2810

◆ adQPointsFace()

const MooseArray<ADPoint>& Assembly::adQPointsFace ( ) const
inline

Definition at line 354 of file Assembly.h.

355  {
356  _calculate_face_xyz = true;
357  return _ad_q_points_face;
358  }
MooseArray< VectorValue< DualReal > > _ad_q_points_face
Definition: Assembly.h:2801
bool _calculate_face_xyz
Definition: Assembly.h:2811

◆ assignDisplacements()

void Assembly::assignDisplacements ( std::vector< std::pair< unsigned int, unsigned short >> &&  disp_numbers_and_directions)
inline

Assign the displacement numbers and directions.

Definition at line 3169 of file Assembly.h.

3171 {
3172  _disp_numbers_and_directions = std::move(disp_numbers_and_directions);
3173 }
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
Container of displacement numbers and directions.
Definition: Assembly.h:2808

◆ attachQRuleElem()

const QBase* Assembly::attachQRuleElem ( unsigned int  dim,
FEBase fe 
)
inline

Attaches the current elem/volume quadrature rule to the given fe.

The current subdomain (as set via setCurrentSubdomainID is used to determine the correct rule. The attached quadrature rule is also returned.

Definition at line 1856 of file Assembly.h.

1857  {
1858  auto qrule = qrules(dim).vol.get();
1859  fe.attach_quadrature_rule(qrule);
1860  return qrule;
1861  }
std::unique_ptr< QBase > vol
volume/elem (meshdim) quadrature rule
Definition: Assembly.h:2395
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443

◆ attachQRuleFace()

const QBase* Assembly::attachQRuleFace ( unsigned int  dim,
FEBase fe 
)
inline

Attaches the current face/area quadrature rule to the given fe.

The current subdomain (as set via setCurrentSubdomainID is used to determine the correct rule. The attached quadrature rule is also returned.

Definition at line 1868 of file Assembly.h.

1869  {
1870  auto qrule = qrules(dim).face.get();
1871  fe.attach_quadrature_rule(qrule);
1872  return qrule;
1873  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443
std::unique_ptr< QBase > face
area/face (meshdim-1) quadrature rule
Definition: Assembly.h:2397

◆ buildFaceFE()

void Assembly::buildFaceFE ( FEType  type) const
private

Build FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 290 of file Assembly.C.

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

291 {
292  if (!_building_helpers && type == _helper_type)
294 
295  if (!_fe_shape_data_face[type])
296  _fe_shape_data_face[type] = std::make_unique<FEShapeData>();
297 
298  // Build an FE object for this type for each dimension up to the dimension of the current mesh
299  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
300  {
301  if (!_fe_face[dim][type])
302  _fe_face[dim][type] = FEGenericBase<Real>::build(dim, type).release();
303 
304  _fe_face[dim][type]->get_phi();
305  _fe_face[dim][type]->get_dphi();
306  if (_need_second_derivative.find(type) != _need_second_derivative.end())
307  _fe_face[dim][type]->get_d2phi();
308  }
309 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2311
unsigned int _mesh_dimension
Definition: Assembly.h:2307
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2329
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719
bool _user_added_fe_face_of_helper_type
Definition: Assembly.h:2315

◆ buildFaceNeighborFE()

void Assembly::buildFaceNeighborFE ( FEType  type) const
private

Build FEs for a neighbor face with a type.

Parameters
typeThe type of FE

Definition at line 334 of file Assembly.C.

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

335 {
336  if (!_building_helpers && type == _helper_type)
338 
339  if (!_fe_shape_data_face_neighbor[type])
340  _fe_shape_data_face_neighbor[type] = std::make_unique<FEShapeData>();
341 
342  // Build an FE object for this type for each dimension up to the dimension of the current mesh
343  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
344  {
345  if (!_fe_face_neighbor[dim][type])
346  _fe_face_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
347 
348  _fe_face_neighbor[dim][type]->get_phi();
349  _fe_face_neighbor[dim][type]->get_dphi();
351  _fe_face_neighbor[dim][type]->get_d2phi();
352  }
353 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2721
bool _user_added_fe_face_neighbor_of_helper_type
Definition: Assembly.h:2316
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2311
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
unsigned int _mesh_dimension
Definition: Assembly.h:2307
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2329
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2500

◆ buildFE()

void Assembly::buildFE ( FEType  type) const
private

Build FEs with a type.

Parameters
typeThe type of FE

Definition at line 264 of file Assembly.C.

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

265 {
266  if (!_building_helpers && type == _helper_type)
268 
269  if (!_fe_shape_data[type])
270  _fe_shape_data[type] = std::make_unique<FEShapeData>();
271 
272  // Build an FE object for this type for each dimension up to the dimension of the current mesh
273  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
274  {
275  if (!_fe[dim][type])
276  _fe[dim][type] = FEGenericBase<Real>::build(dim, type).release();
277 
278  _fe[dim][type]->get_phi();
279  _fe[dim][type]->get_dphi();
280  // Pre-request xyz. We have always computed xyz, but due to
281  // recent optimizations in libmesh, we now need to explicity
282  // request it, since apps (Yak) may rely on it being computed.
283  _fe[dim][type]->get_xyz();
284  if (_need_second_derivative.find(type) != _need_second_derivative.end())
285  _fe[dim][type]->get_d2phi();
286  }
287 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2718
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2311
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2355
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2329
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
Definition: Assembly.h:2314

◆ buildLowerDDualFE()

void Assembly::buildLowerDDualFE ( FEType  type) const
private

Definition at line 380 of file Assembly.C.

Referenced by feDualPhiLower(), and feGradDualPhiLower().

381 {
382  if (!_fe_shape_data_dual_lower[type])
383  _fe_shape_data_dual_lower[type] = std::make_unique<FEShapeData>();
384 
385  // Build an FE object for this type for each dimension up to the dimension of
386  // the current mesh minus one (because this is for lower-dimensional
387  // elements!)
388  for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
389  {
390  if (!_fe_lower[dim][type])
391  _fe_lower[dim][type] = FEGenericBase<Real>::build(dim, type).release();
392 
393  _fe_lower[dim][type]->get_dual_phi();
394  _fe_lower[dim][type]->get_dual_dphi();
395  if (_need_second_derivative.find(type) != _need_second_derivative.end())
396  _fe_lower[dim][type]->get_dual_d2phi();
397  }
398 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2509
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition: Assembly.h:2723

◆ buildLowerDFE()

void Assembly::buildLowerDFE ( FEType  type) const
private

Build FEs for a lower dimensional element with a type.

Parameters
typeThe type of FE

Definition at line 356 of file Assembly.C.

Referenced by Assembly(), feGradPhiLower(), and fePhiLower().

357 {
358  if (!_building_helpers && type == _helper_type)
360 
361  if (!_fe_shape_data_lower[type])
362  _fe_shape_data_lower[type] = std::make_unique<FEShapeData>();
363 
364  // Build an FE object for this type for each dimension up to the dimension of
365  // the current mesh minus one (because this is for lower-dimensional
366  // elements!)
367  for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
368  {
369  if (!_fe_lower[dim][type])
370  _fe_lower[dim][type] = FEGenericBase<Real>::build(dim, type).release();
371 
372  _fe_lower[dim][type]->get_phi();
373  _fe_lower[dim][type]->get_dphi();
374  if (_need_second_derivative.find(type) != _need_second_derivative.end())
375  _fe_lower[dim][type]->get_d2phi();
376  }
377 }
bool _user_added_fe_lower_of_helper_type
Definition: Assembly.h:2318
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2311
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition: Assembly.h:2722
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2509
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2329

◆ buildNeighborFE()

void Assembly::buildNeighborFE ( FEType  type) const
private

Build FEs for a neighbor with a type.

Parameters
typeThe type of FE

Definition at line 312 of file Assembly.C.

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

313 {
314  if (!_building_helpers && type == _helper_type)
316 
317  if (!_fe_shape_data_neighbor[type])
318  _fe_shape_data_neighbor[type] = std::make_unique<FEShapeData>();
319 
320  // Build an FE object for this type for each dimension up to the dimension of the current mesh
321  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
322  {
323  if (!_fe_neighbor[dim][type])
324  _fe_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
325 
326  _fe_neighbor[dim][type]->get_phi();
327  _fe_neighbor[dim][type]->get_dphi();
329  _fe_neighbor[dim][type]->get_d2phi();
330  }
331 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2720
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2311
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
unsigned int _mesh_dimension
Definition: Assembly.h:2307
bool _user_added_fe_neighbor_of_helper_type
Definition: Assembly.h:2317
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2499
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2329

◆ buildVectorDualLowerDFE()

void Assembly::buildVectorDualLowerDFE ( FEType  type) const
private

Definition at line 426 of file Assembly.C.

427 {
429  _vector_fe_shape_data_dual_lower[type] = std::make_unique<VectorFEShapeData>();
430 
431  // Build an FE object for this type for each dimension up to the dimension of
432  // the current mesh minus one (because this is for lower-dimensional
433  // elements!)
434  unsigned int dim = ((type.family == LAGRANGE_VEC) || (type.family == MONOMIAL_VEC)) ? 0 : 2;
435  const auto ending_dim = cast_int<unsigned int>(_mesh_dimension - 1);
436  if (ending_dim < dim)
437  return;
438  for (; dim <= ending_dim; dim++)
439  {
440  if (!_vector_fe_lower[dim][type])
441  _vector_fe_lower[dim][type] = FEVectorBase::build(dim, type).release();
442 
443  _vector_fe_lower[dim][type]->get_dual_phi();
444  _vector_fe_lower[dim][type]->get_dual_dphi();
445  if (_need_second_derivative.find(type) != _need_second_derivative.end())
446  _vector_fe_lower[dim][type]->get_dual_d2phi();
447  }
448 }
LAGRANGE_VEC
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
Definition: Assembly.h:2731
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2511

◆ buildVectorFaceFE()

void Assembly::buildVectorFaceFE ( FEType  type) const
private

Build Vector FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 484 of file Assembly.C.

Referenced by getVectorFEFace().

485 {
486  if (!_vector_fe_shape_data_face[type])
487  _vector_fe_shape_data_face[type] = std::make_unique<VectorFEShapeData>();
488 
489  // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
490  unsigned int min_dim;
491  if (type.family == LAGRANGE_VEC || type.family == MONOMIAL_VEC)
492  min_dim = 0;
493  else
494  min_dim = 2;
495 
496  // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
497  // current mesh
498  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
499  {
500  if (!_vector_fe_face[dim][type])
501  _vector_fe_face[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
502 
503  _vector_fe_face[dim][type]->get_phi();
504  _vector_fe_face[dim][type]->get_dphi();
505  if (type.family == NEDELEC_ONE)
506  _vector_fe_face[dim][type]->get_curl_phi();
507  if (type.family == RAVIART_THOMAS)
508  _vector_fe_face[dim][type]->get_div_phi();
509  }
510 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2469

◆ buildVectorFaceNeighborFE()

void Assembly::buildVectorFaceNeighborFE ( FEType  type) const
private

Build Vector FEs for a neighbor face with a type.

Parameters
typeThe type of FE

Definition at line 542 of file Assembly.C.

Referenced by getVectorFEFaceNeighbor().

543 {
545  _vector_fe_shape_data_face_neighbor[type] = std::make_unique<VectorFEShapeData>();
546 
547  // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
548  unsigned int min_dim;
549  if (type.family == LAGRANGE_VEC || type.family == MONOMIAL_VEC)
550  min_dim = 0;
551  else
552  min_dim = 2;
553 
554  // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
555  // current mesh
556  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
557  {
558  if (!_vector_fe_face_neighbor[dim][type])
560  FEGenericBase<VectorValue<Real>>::build(dim, type).release();
561 
562  _vector_fe_face_neighbor[dim][type]->get_phi();
563  _vector_fe_face_neighbor[dim][type]->get_dphi();
564  if (type.family == NEDELEC_ONE)
565  _vector_fe_face_neighbor[dim][type]->get_curl_phi();
566  if (type.family == RAVIART_THOMAS)
567  _vector_fe_face_neighbor[dim][type]->get_div_phi();
568  }
569 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2502
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2729

◆ buildVectorFE()

void Assembly::buildVectorFE ( FEType  type) const
private

Build Vector FEs with a type.

Parameters
typeThe type of FE

Definition at line 451 of file Assembly.C.

Referenced by getVectorFE().

452 {
453  if (!_vector_fe_shape_data[type])
454  _vector_fe_shape_data[type] = std::make_unique<VectorFEShapeData>();
455 
456  // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
457  unsigned int min_dim;
458  if (type.family == LAGRANGE_VEC || type.family == MONOMIAL_VEC)
459  min_dim = 0;
460  else
461  min_dim = 2;
462 
463  // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
464  // current mesh
465  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
466  {
467  if (!_vector_fe[dim][type])
468  _vector_fe[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
469 
470  _vector_fe[dim][type]->get_phi();
471  _vector_fe[dim][type]->get_dphi();
472  if (type.family == NEDELEC_ONE)
473  _vector_fe[dim][type]->get_curl_phi();
474  if (type.family == RAVIART_THOMAS)
475  _vector_fe[dim][type]->get_div_phi();
476  // Pre-request xyz. We have always computed xyz, but due to
477  // recent optimizations in libmesh, we now need to explicity
478  // request it, since apps (Yak) may rely on it being computed.
479  _vector_fe[dim][type]->get_xyz();
480  }
481 }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2357
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:2726

◆ buildVectorLowerDFE()

void Assembly::buildVectorLowerDFE ( FEType  type) const
private

Build Vector FEs for a lower dimensional element with a type.

Parameters
typeThe type of FE

Definition at line 401 of file Assembly.C.

402 {
403  if (!_vector_fe_shape_data_lower[type])
404  _vector_fe_shape_data_lower[type] = std::make_unique<VectorFEShapeData>();
405 
406  // Build an FE object for this type for each dimension up to the dimension of
407  // the current mesh minus one (because this is for lower-dimensional
408  // elements!)
409  unsigned int dim = ((type.family == LAGRANGE_VEC) || (type.family == MONOMIAL_VEC)) ? 0 : 2;
410  const auto ending_dim = cast_int<unsigned int>(_mesh_dimension - 1);
411  if (ending_dim < dim)
412  return;
413  for (; dim <= ending_dim; dim++)
414  {
415  if (!_vector_fe_lower[dim][type])
416  _vector_fe_lower[dim][type] = FEVectorBase::build(dim, type).release();
417 
418  _vector_fe_lower[dim][type]->get_phi();
419  _vector_fe_lower[dim][type]->get_dphi();
420  if (_need_second_derivative.find(type) != _need_second_derivative.end())
421  _vector_fe_lower[dim][type]->get_d2phi();
422  }
423 }
LAGRANGE_VEC
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
Definition: Assembly.h:2730
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2511

◆ buildVectorNeighborFE()

void Assembly::buildVectorNeighborFE ( FEType  type) const
private

Build Vector FEs for a neighbor with a type.

Parameters
typeThe type of FE

Definition at line 513 of file Assembly.C.

Referenced by getVectorFENeighbor().

514 {
516  _vector_fe_shape_data_neighbor[type] = std::make_unique<VectorFEShapeData>();
517 
518  // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
519  unsigned int min_dim;
520  if (type.family == LAGRANGE_VEC || type.family == MONOMIAL_VEC)
521  min_dim = 0;
522  else
523  min_dim = 2;
524 
525  // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
526  // current mesh
527  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
528  {
529  if (!_vector_fe_neighbor[dim][type])
530  _vector_fe_neighbor[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
531 
532  _vector_fe_neighbor[dim][type]->get_phi();
533  _vector_fe_neighbor[dim][type]->get_dphi();
534  if (type.family == NEDELEC_ONE)
535  _vector_fe_neighbor[dim][type]->get_curl_phi();
536  if (type.family == RAVIART_THOMAS)
537  _vector_fe_neighbor[dim][type]->get_div_phi();
538  }
539 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2501
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2728

◆ bumpAllQRuleOrder()

void Assembly::bumpAllQRuleOrder ( Order  order,
SubdomainID  block 
)

Increases the element/volume and face/area quadrature orders for the specified mesh block if and only if the current volume or face quadrature order is lower.

This can only cause the quadrature level to increase. If order is lower than or equal to the current volume+face quadrature rule order, then nothing is done (i.e. this function is idempotent).

Definition at line 595 of file Assembly.C.

596 {
597  auto & qdefault = _qrules[Moose::ANY_BLOCK_ID];
598  mooseAssert(qdefault.size() > 0, "default quadrature must be initialized before order bumps");
599 
600  unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
601  auto & qvec = _qrules[block];
602  if (qvec.size() != ndims || !qvec[0].vol)
603  createQRules(qdefault[0].vol->type(), order, order, order, block);
604  else if (qvec[0].vol->get_order() < order || qvec[0].face->get_order() < order)
605  createQRules(qvec[0].vol->type(),
606  std::max(order, qvec[0].arbitrary_vol->get_order()),
607  std::max(order, qvec[0].vol->get_order()),
608  std::max(order, qvec[0].face->get_order()),
609  block);
610  // otherwise do nothing - quadrature order is already as high as requested
611 }
void createQRules(QuadratureType type, Order order, Order volume_order, Order face_order, SubdomainID block, bool allow_negative_qweights=true)
Creates block-specific volume, face and arbitrary qrules based on the orders and the flag of whether ...
Definition: Assembly.C:614
unsigned int _mesh_dimension
Definition: Assembly.h:2307
auto max(const L &left, const R &right)
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
Definition: Assembly.h:2412
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19

◆ bumpVolumeQRuleOrder()

void Assembly::bumpVolumeQRuleOrder ( Order  volume_order,
SubdomainID  block 
)

Increases the element/volume quadrature order for the specified mesh block if and only if the current volume quadrature order is lower.

This works exactly like the bumpAllQRuleOrder function, except it only affects the volume quadrature rule (not face quadrature).

Definition at line 572 of file Assembly.C.

573 {
574  auto & qdefault = _qrules[Moose::ANY_BLOCK_ID];
575  mooseAssert(qdefault.size() > 0, "default quadrature must be initialized before order bumps");
576 
577  unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
578  auto & qvec = _qrules[block];
579  if (qvec.size() != ndims || !qvec[0].vol)
580  createQRules(qdefault[0].vol->type(),
581  qdefault[0].arbitrary_vol->get_order(),
582  volume_order,
583  qdefault[0].face->get_order(),
584  block);
585  else if (qvec[0].vol->get_order() < volume_order)
586  createQRules(qvec[0].vol->type(),
587  qvec[0].arbitrary_vol->get_order(),
588  volume_order,
589  qvec[0].face->get_order(),
590  block);
591  // otherwise do nothing - quadrature order is already as high as requested
592 }
void createQRules(QuadratureType type, Order order, Order volume_order, Order face_order, SubdomainID block, bool allow_negative_qweights=true)
Creates block-specific volume, face and arbitrary qrules based on the orders and the flag of whether ...
Definition: Assembly.C:614
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
Definition: Assembly.h:2412
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19

◆ cacheJacobian() [1/4]

void Assembly::cacheJacobian ( GlobalDataKey  )

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

Definition at line 4054 of file Assembly.C.

Referenced by TaggingInterface::addJacobian(), TaggingInterface::addJacobianElement(), SubProblem::cacheJacobian(), cacheJacobian(), and cacheJacobianWithoutConstraints().

4055 {
4056  for (const auto & it : _cm_ff_entry)
4057  cacheJacobianCoupledVarPair(*it.first, *it.second);
4058 
4059  for (const auto & it : _cm_fs_entry)
4060  cacheJacobianCoupledVarPair(*it.first, *it.second);
4061 
4062  for (const auto & it : _cm_sf_entry)
4063  cacheJacobianCoupledVarPair(*it.first, *it.second);
4064 }
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:2288
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:2286
void cacheJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Caches element matrix for ivar rows and jvar columns.
Definition: Assembly.C:4068

◆ cacheJacobian() [2/4]

void Assembly::cacheJacobian ( numeric_index_type  i,
numeric_index_type  j,
Real  value,
LocalDataKey  ,
TagID  tag 
)

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.

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 4465 of file Assembly.C.

4467 {
4468  _cached_jacobian_rows[tag].push_back(i);
4469  _cached_jacobian_cols[tag].push_back(j);
4470  _cached_jacobian_values[tag].push_back(value);
4471 }
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2759
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2763

◆ cacheJacobian() [3/4]

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

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

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.

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 4474 of file Assembly.C.

4479 {
4480  for (auto tag : tags)
4481  if (_sys.hasMatrix(tag))
4482  cacheJacobian(i, j, value, LocalDataKey{}, tag);
4483 }
SystemBase & _sys
Definition: Assembly.h:2265
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4054

◆ cacheJacobian() [4/4]

template<typename Residuals , typename Indices >
void Assembly::cacheJacobian ( const Residuals &  residuals,
const Indices &  row_indices,
Real  scaling_factor,
LocalDataKey  ,
const std::set< TagID > &  matrix_tags 
)

Process the derivatives() data of a vector of ADReals.

This method simply caches the derivative values for the corresponding column indices for the provided matrix_tags. Note that this overload will call DofMap::constrain_element_matrix. Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3066 of file Assembly.h.

3071 {
3072  if (!computingJacobian() || matrix_tags.empty())
3073  return;
3074 
3075  if (residuals.size() == 1)
3076  {
3077  // No constraining is required. (This is likely a finite volume computation if we only have a
3078  // single dof)
3080  residuals, input_row_indices, scaling_factor, LocalDataKey{}, matrix_tags);
3081  return;
3082  }
3083 
3084  const auto & compare_dofs = residuals[0].derivatives().nude_indices();
3085 #ifndef NDEBUG
3086  auto compare_dofs_set = std::set<dof_id_type>(compare_dofs.begin(), compare_dofs.end());
3087 
3088  for (auto resid_it = residuals.begin() + 1; resid_it != residuals.end(); ++resid_it)
3089  {
3090  auto current_dofs_set = std::set<dof_id_type>(resid_it->derivatives().nude_indices().begin(),
3091  resid_it->derivatives().nude_indices().end());
3092  mooseAssert(compare_dofs_set == current_dofs_set,
3093  "We're going to see whether the dof sets are the same. IIRC the degree of freedom "
3094  "dependence (as indicated by the dof index set held by the ADReal) has to be the "
3095  "same for every residual passed to this method otherwise constrain_element_matrix "
3096  "will not work.");
3097  }
3098 #endif
3099  _column_indices.assign(compare_dofs.begin(), compare_dofs.end());
3100 
3101  // If there's no derivatives then there is nothing to do. Moreover, if we pass zero size column
3102  // indices to constrain_element_matrix then we will potentially get errors out of BLAS
3103  if (!_column_indices.size())
3104  return;
3105 
3106  // Need to make a copy because we might modify this in constrain_element_matrix
3107  _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3108 
3110  for (const auto i : index_range(_row_indices))
3111  {
3112  const auto & sparse_derivatives = residuals[i].derivatives();
3113 
3114  for (const auto j : index_range(_column_indices))
3115  _element_matrix(i, j) = sparse_derivatives[_column_indices[j]] * scaling_factor;
3116  }
3117 
3118  _dof_map.constrain_element_matrix(_element_matrix, _row_indices, _column_indices);
3119 
3120  for (const auto i : index_range(_row_indices))
3121  for (const auto j : index_range(_column_indices))
3122  cacheJacobian(_row_indices[i], _column_indices[j], _element_matrix(i, j), {}, matrix_tags);
3123 }
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4054
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:2301
void cacheJacobianWithoutConstraints(const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &matrix_tags)
Process the derivatives() data of a vector of ADReals.
Definition: Assembly.h:3127
void resize(const unsigned int new_m, const unsigned int new_n)
std::vector< dof_id_type > _row_indices
Working vectors to avoid repeated heap allocations when caching residuals/Jacobians that must have li...
Definition: Assembly.h:2848
DenseMatrix< Number > _element_matrix
A working matrix to avoid repeated heap allocations when caching Jacobians that must have libMesh-lev...
Definition: Assembly.h:2843
std::vector< dof_id_type > _column_indices
Definition: Assembly.h:2848
bool computingJacobian() const
Definition: Assembly.h:1899
auto index_range(const T &sizable)

◆ cacheJacobianBlock() [1/2]

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

Cache a local Jacobian block with the provided rows (idof_indices) and columns (jdof_indices) for eventual accumulation into the global matrix specified by tag.

The scaling_factor will be applied before caching. Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3743 of file Assembly.C.

Referenced by TaggingInterface::addJacobian(), cacheJacobianCoupledVarPair(), cacheJacobianMortar(), and cacheJacobianNeighbor().

3749 {
3750  // Only cache data when the matrix exists
3751  if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m() &&
3752  _sys.hasMatrix(tag))
3753  {
3754  std::vector<dof_id_type> di(idof_indices);
3755  std::vector<dof_id_type> dj(jdof_indices);
3756 
3757  // If we're computing the jacobian for automatically scaling variables we do not want to
3758  // constrain the element matrix because it introduces 1s on the diagonal for the constrained
3759  // dofs
3761  _dof_map.constrain_element_matrix(jac_block, di, dj, false);
3762 
3763  if (scaling_factor != 1.0)
3764  jac_block *= scaling_factor;
3765 
3766  for (MooseIndex(di) i = 0; i < di.size(); i++)
3767  for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3768  {
3769  _cached_jacobian_values[tag].push_back(jac_block(i, j));
3770  _cached_jacobian_rows[tag].push_back(di[i]);
3771  _cached_jacobian_cols[tag].push_back(dj[j]);
3772  }
3773  }
3774  jac_block.zero();
3775 }
SystemBase & _sys
Definition: Assembly.h:2265
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
virtual void zero() override final
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
Definition: SystemBase.C:1481
unsigned int m() const
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2759
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:2301
unsigned int n() const
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2763

◆ cacheJacobianBlock() [2/2]

void Assembly::cacheJacobianBlock ( DenseMatrix< Number > &  jac_block,
const MooseVariableBase ivar,
const MooseVariableBase jvar,
const std::vector< dof_id_type > &  idof_indices,
const std::vector< dof_id_type > &  jdof_indices,
TagID  tag 
)
private

Push a local Jacobian block with proper scaling into cache for a certain tag.

Definition at line 3624 of file Assembly.C.

3630 {
3631  if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3632  return;
3633  if (jac_block.n() == 0 || jac_block.m() == 0)
3634  return;
3635  if (!_sys.hasMatrix(tag))
3636  return;
3637 
3638  auto & scaling_factor = ivar.arrayScalingFactor();
3639 
3640  for (unsigned int i = 0; i < ivar.count(); ++i)
3641  {
3642  unsigned int iv = ivar.number();
3643  for (const auto & jt : ConstCouplingRow(iv + i, *_cm))
3644  {
3645  unsigned int jv = jvar.number();
3646  if (jt < jv || jt >= jv + jvar.count())
3647  continue;
3648  unsigned int j = jt - jv;
3649 
3650  auto di = ivar.componentDofIndices(idof_indices, i);
3651  auto dj = jvar.componentDofIndices(jdof_indices, j);
3652  auto indof = di.size();
3653  auto jndof = dj.size();
3654 
3655  unsigned int jj = j;
3656  if (iv == jv && _component_block_diagonal[iv])
3657  // here i must be equal to j
3658  jj = 0;
3659 
3660  auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3661  if (scaling_factor[i] != 1.0)
3662  sub *= scaling_factor[i];
3663 
3664  // If we're computing the jacobian for automatically scaling variables we do not want
3665  // to constrain the element matrix because it introduces 1s on the diagonal for the
3666  // constrained dofs
3668  _dof_map.constrain_element_matrix(sub, di, dj, false);
3669 
3670  for (MooseIndex(di) i = 0; i < di.size(); i++)
3671  for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3672  {
3673  _cached_jacobian_values[tag].push_back(sub(i, j));
3674  _cached_jacobian_rows[tag].push_back(di[i]);
3675  _cached_jacobian_cols[tag].push_back(dj[j]);
3676  }
3677  }
3678  }
3679 
3680  jac_block.zero();
3681 }
SystemBase & _sys
Definition: Assembly.h:2265
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
std::vector< dof_id_type > componentDofIndices(const std::vector< dof_id_type > &dof_indices, unsigned int component) const
Obtain DoF indices of a component with the indices of the 0th component.
virtual void zero() override final
const std::vector< Real > & arrayScalingFactor() const
unsigned int number() const
Get variable number coming from libMesh.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
Definition: SystemBase.C:1481
unsigned int m() const
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2759
const CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2271
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:2301
unsigned int n() const
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2763
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const

◆ cacheJacobianBlockNonzero()

void Assembly::cacheJacobianBlockNonzero ( DenseMatrix< Number > &  jac_block,
const MooseVariableBase ivar,
const MooseVariableBase jvar,
const std::vector< dof_id_type > &  idof_indices,
const std::vector< dof_id_type > &  jdof_indices,
TagID  tag 
)
private

Push non-zeros of a local Jacobian block with proper scaling into cache for a certain tag.

Definition at line 3685 of file Assembly.C.

Referenced by cacheJacobianNonlocal().

3691 {
3692  if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3693  return;
3694  if (jac_block.n() == 0 || jac_block.m() == 0)
3695  return;
3696  if (!_sys.hasMatrix(tag))
3697  return;
3698 
3699  auto & scaling_factor = ivar.arrayScalingFactor();
3700 
3701  for (unsigned int i = 0; i < ivar.count(); ++i)
3702  {
3703  unsigned int iv = ivar.number();
3704  for (const auto & jt : ConstCouplingRow(iv + i, *_cm))
3705  {
3706  unsigned int jv = jvar.number();
3707  if (jt < jv || jt >= jv + jvar.count())
3708  continue;
3709  unsigned int j = jt - jv;
3710 
3711  auto di = ivar.componentDofIndices(idof_indices, i);
3712  auto dj = jvar.componentDofIndices(jdof_indices, j);
3713  auto indof = di.size();
3714  auto jndof = dj.size();
3715 
3716  unsigned int jj = j;
3717  if (iv == jv && _component_block_diagonal[iv])
3718  // here i must be equal to j
3719  jj = 0;
3720 
3721  auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3722  if (scaling_factor[i] != 1.0)
3723  sub *= scaling_factor[i];
3724 
3725  _dof_map.constrain_element_matrix(sub, di, dj, false);
3726 
3727  for (MooseIndex(di) i = 0; i < di.size(); i++)
3728  for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3729  if (sub(i, j) != 0.0) // no storage allocated for unimplemented jacobian terms,
3730  // maintaining maximum sparsity possible
3731  {
3732  _cached_jacobian_values[tag].push_back(sub(i, j));
3733  _cached_jacobian_rows[tag].push_back(di[i]);
3734  _cached_jacobian_cols[tag].push_back(dj[j]);
3735  }
3736  }
3737  }
3738 
3739  jac_block.zero();
3740 }
SystemBase & _sys
Definition: Assembly.h:2265
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
std::vector< dof_id_type > componentDofIndices(const std::vector< dof_id_type > &dof_indices, unsigned int component) const
Obtain DoF indices of a component with the indices of the 0th component.
virtual void zero() override final
const std::vector< Real > & arrayScalingFactor() const
unsigned int number() const
Get variable number coming from libMesh.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
unsigned int m() const
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2759
const CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2271
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:2301
unsigned int n() const
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2763
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const

◆ cacheJacobianCoupledVarPair()

void Assembly::cacheJacobianCoupledVarPair ( const MooseVariableBase ivar,
const MooseVariableBase jvar 
)
private

Caches element matrix for ivar rows and jvar columns.

Definition at line 4068 of file Assembly.C.

Referenced by cacheJacobian().

4070 {
4071  auto i = ivar.number();
4072  auto j = jvar.number();
4073  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
4074  if (jacobianBlockUsed(tag, i, j) && _sys.hasMatrix(tag))
4075  cacheJacobianBlock(jacobianBlock(i, j, LocalDataKey{}, tag),
4076  ivar,
4077  jvar,
4078  ivar.dofIndices(),
4079  jvar.dofIndices(),
4080  tag);
4081 }
SystemBase & _sys
Definition: Assembly.h:2265
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1092
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
void cacheJacobianBlock(DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, LocalDataKey, TagID tag)
Cache a local Jacobian block with the provided rows (idof_indices) and columns (jdof_indices) for eve...
Definition: Assembly.C:3743

◆ cacheJacobianMortar()

void Assembly::cacheJacobianMortar ( GlobalDataKey  )

Cache all portions of the Jacobian, e.g.

LowerLower, LowerSecondary, LowerPrimary, SecondaryLower, SecondarySecondary, SecondaryPrimary, PrimaryLower, PrimarySecondary, PrimaryPrimary for mortar-like objects. Primary indicates the interior parent element on the primary side of the mortar interface. Secondary indicates the interior parent element on the secondary side of the interface. Lower denotes the lower-dimensional element living on the secondary side of the mortar interface; it's the boundary face of the Secondary element.

Definition at line 4144 of file Assembly.C.

Referenced by ComputeMortarFunctor::operator()().

4145 {
4146  for (const auto & it : _cm_ff_entry)
4147  {
4148  auto ivar = it.first;
4149  auto jvar = it.second;
4150  auto i = ivar->number();
4151  auto j = jvar->number();
4152  for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
4153  tag++)
4154  if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
4155  {
4156  cacheJacobianBlock(jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
4157  *ivar,
4158  *jvar,
4159  ivar->dofIndicesLower(),
4160  jvar->dofIndicesLower(),
4161  tag);
4162 
4163  cacheJacobianBlock(jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
4164  *ivar,
4165  *jvar,
4166  ivar->dofIndicesLower(),
4167  jvar->dofIndices(),
4168  tag);
4169 
4170  cacheJacobianBlock(jacobianBlockMortar(Moose::LowerPrimary, i, j, LocalDataKey{}, tag),
4171  *ivar,
4172  *jvar,
4173  ivar->dofIndicesLower(),
4174  jvar->dofIndicesNeighbor(),
4175  tag);
4176 
4177  cacheJacobianBlock(jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
4178  *ivar,
4179  *jvar,
4180  ivar->dofIndices(),
4181  jvar->dofIndicesLower(),
4182  tag);
4183 
4185  jacobianBlockMortar(Moose::SecondarySecondary, i, j, LocalDataKey{}, tag),
4186  *ivar,
4187  *jvar,
4188  ivar->dofIndices(),
4189  jvar->dofIndices(),
4190  tag);
4191 
4193  *ivar,
4194  *jvar,
4195  ivar->dofIndices(),
4196  jvar->dofIndicesNeighbor(),
4197  tag);
4198 
4199  cacheJacobianBlock(jacobianBlockMortar(Moose::PrimaryLower, i, j, LocalDataKey{}, tag),
4200  *ivar,
4201  *jvar,
4202  ivar->dofIndicesNeighbor(),
4203  jvar->dofIndicesLower(),
4204  tag);
4205 
4207  *ivar,
4208  *jvar,
4209  ivar->dofIndicesNeighbor(),
4210  jvar->dofIndices(),
4211  tag);
4212 
4213  cacheJacobianBlock(jacobianBlockMortar(Moose::PrimaryPrimary, i, j, LocalDataKey{}, tag),
4214  *ivar,
4215  *jvar,
4216  ivar->dofIndicesNeighbor(),
4217  jvar->dofIndicesNeighbor(),
4218  tag);
4219  }
4220  }
4221 }
SystemBase & _sys
Definition: Assembly.h:2265
void jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not lower Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2228
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
DenseMatrix< Number > & jacobianBlockMortar(Moose::ConstraintJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Returns the jacobian block for the given mortar Jacobian type.
Definition: Assembly.C:3149
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
Flag that indicates if the jacobian block for the lower dimensional element was used.
Definition: Assembly.h:2299
void cacheJacobianBlock(DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, LocalDataKey, TagID tag)
Cache a local Jacobian block with the provided rows (idof_indices) and columns (jdof_indices) for eve...
Definition: Assembly.C:3743

◆ cacheJacobianNeighbor()

void Assembly::cacheJacobianNeighbor ( GlobalDataKey  )

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

Definition at line 4106 of file Assembly.C.

Referenced by SubProblem::cacheJacobianNeighbor().

4107 {
4108  for (const auto & it : _cm_ff_entry)
4109  {
4110  auto ivar = it.first;
4111  auto jvar = it.second;
4112  auto i = ivar->number();
4113  auto j = jvar->number();
4114 
4115  for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
4116  tag < _jacobian_block_neighbor_used.size();
4117  tag++)
4118  if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
4119  {
4121  *ivar,
4122  *jvar,
4123  ivar->dofIndices(),
4124  jvar->dofIndicesNeighbor(),
4125  tag);
4127  *ivar,
4128  *jvar,
4129  ivar->dofIndicesNeighbor(),
4130  jvar->dofIndices(),
4131  tag);
4133  jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
4134  *ivar,
4135  *jvar,
4136  ivar->dofIndicesNeighbor(),
4137  jvar->dofIndicesNeighbor(),
4138  tag);
4139  }
4140  }
4141 }
SystemBase & _sys
Definition: Assembly.h:2265
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block of a DG Jacobian type for a pair of variables and a tag. ...
Definition: Assembly.C:3108
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
void jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not neighbor Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2210
void cacheJacobianBlock(DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, LocalDataKey, TagID tag)
Cache a local Jacobian block with the provided rows (idof_indices) and columns (jdof_indices) for eve...
Definition: Assembly.C:3743
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:2297

◆ cacheJacobianNonlocal()

void Assembly::cacheJacobianNonlocal ( GlobalDataKey  )

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

Definition at line 4084 of file Assembly.C.

Referenced by SubProblem::cacheJacobian().

4085 {
4086  for (const auto & it : _cm_nonlocal_entry)
4087  {
4088  auto ivar = it.first;
4089  auto jvar = it.second;
4090  auto i = ivar->number();
4091  auto j = jvar->number();
4092  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
4093  tag < _jacobian_block_nonlocal_used.size();
4094  tag++)
4095  if (jacobianBlockNonlocalUsed(tag, i, j) && _sys.hasMatrix(tag))
4096  cacheJacobianBlockNonzero(jacobianBlockNonlocal(i, j, LocalDataKey{}, tag),
4097  *ivar,
4098  *jvar,
4099  ivar->dofIndices(),
4100  jvar->allDofIndices(),
4101  tag);
4102  }
4103 }
SystemBase & _sys
Definition: Assembly.h:2265
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block from non-local contribution for a pair of variables and a tag...
Definition: Assembly.h:1103
void jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2246
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2295
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2292
void cacheJacobianBlockNonzero(DenseMatrix< Number > &jac_block, const MooseVariableBase &ivar, const MooseVariableBase &jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, TagID tag)
Push non-zeros of a local Jacobian block with proper scaling into cache for a certain tag...
Definition: Assembly.C:3685

◆ cacheJacobianWithoutConstraints()

template<typename Residuals , typename Indices >
void Assembly::cacheJacobianWithoutConstraints ( const Residuals &  residuals,
const Indices &  row_indices,
Real  scaling_factor,
LocalDataKey  ,
const std::set< TagID > &  matrix_tags 
)

Process the derivatives() data of a vector of ADReals.

This method simply caches the derivative values for the corresponding column indices for the provided matrix_tags. Note that this overload will not call DofMap::constrain_element_matrix. Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3127 of file Assembly.h.

Referenced by TaggingInterface::addJacobianWithoutConstraints(), and cacheJacobian().

3132 {
3133  mooseAssert(residuals.size() == row_indices.size(),
3134  "The number of residuals should match the number of dof indices");
3135  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3136 
3137  if (!computingJacobian() || matrix_tags.empty())
3138  return;
3139 
3140  for (const auto i : index_range(row_indices))
3141  {
3142  const auto row_index = row_indices[i];
3143 
3144  const auto & sparse_derivatives = residuals[i].derivatives();
3145  const auto & column_indices = sparse_derivatives.nude_indices();
3146  const auto & raw_derivatives = sparse_derivatives.nude_data();
3147 
3148  for (std::size_t j = 0; j < column_indices.size(); ++j)
3149  cacheJacobian(
3150  row_index, column_indices[j], raw_derivatives[j] * scaling_factor, {}, matrix_tags);
3151  }
3152 }
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4054
bool computingJacobian() const
Definition: Assembly.h:1899
auto index_range(const T &sizable)

◆ cacheResidual() [1/3]

void Assembly::cacheResidual ( GlobalDataKey  ,
const std::vector< VectorTag > &  tags 
)

Takes the values that are currently in _sub_Re of all field variables and appends them to the cached values.

Definition at line 3400 of file Assembly.C.

Referenced by SubProblem::cacheResidual(), cacheResidual(), cacheResiduals(), cacheResidualsWithoutConstraints(), and ComputeMortarFunctor::operator()().

3401 {
3402  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3403  for (const auto & var : vars)
3404  for (const auto & vector_tag : tags)
3405  if (_sys.hasVector(vector_tag._id))
3406  cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3407  _cached_residual_rows[vector_tag._type_id],
3408  _sub_Re[vector_tag._type_id][var->number()],
3409  var->dofIndices(),
3410  var->arrayScalingFactor(),
3411  var->isNodal());
3412 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
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:2754
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
void cacheResidualBlock(std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Push a local residual block with proper scaling into cache.
Definition: Assembly.C:3261

◆ cacheResidual() [2/3]

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

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 this tagged residual

Definition at line 3416 of file Assembly.C.

3417 {
3418  const VectorTag & tag = _subproblem.getVectorTag(tag_id);
3419 
3420  _cached_residual_values[tag._type_id].push_back(value);
3421  _cached_residual_rows[tag._type_id].push_back(dof);
3422 }
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:2754
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
SubProblem & _subproblem
Definition: Assembly.h:2266
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
Storage for all of the information pretaining to a vector tag.
Definition: VectorTag.h:15
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:138

◆ cacheResidual() [3/3]

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

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 these tags

Definition at line 3426 of file Assembly.C.

3427 {
3428  for (auto & tag : tags)
3429  cacheResidual(dof, value, tag);
3430 }
void cacheResidual(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Re of all field variables and appends them to the cached ...
Definition: Assembly.C:3400

◆ cacheResidualBlock()

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

Push a local residual block with proper scaling into cache.

Definition at line 3261 of file Assembly.C.

Referenced by cacheResidual(), cacheResidualLower(), and cacheResidualNeighbor().

3267 {
3268  if (dof_indices.size() > 0 && res_block.size())
3269  {
3270  _temp_dof_indices = dof_indices;
3271  _tmp_Re = res_block;
3272  processLocalResidual(_tmp_Re, _temp_dof_indices, scaling_factor, is_nodal);
3273 
3274  for (MooseIndex(_tmp_Re) i = 0; i < _tmp_Re.size(); i++)
3275  {
3276  cached_residual_values.push_back(_tmp_Re(i));
3277  cached_residual_rows.push_back(_temp_dof_indices[i]);
3278  }
3279  }
3280 
3281  res_block.zero();
3282 }
virtual void zero() override final
void processLocalResidual(DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Appling scaling, constraints to the local residual block and populate the full DoF indices for array ...
Definition: Assembly.C:3209
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:2619
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:2774
virtual unsigned int size() const override final

◆ cacheResidualLower()

void Assembly::cacheResidualLower ( GlobalDataKey  ,
const std::vector< VectorTag > &  tags 
)

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

Definition at line 3466 of file Assembly.C.

Referenced by ComputeMortarFunctor::operator()().

3467 {
3468  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3469  for (const auto & var : vars)
3470  for (const auto & vector_tag : tags)
3471  if (_sys.hasVector(vector_tag._id))
3472  cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3473  _cached_residual_rows[vector_tag._type_id],
3474  _sub_Rl[vector_tag._type_id][var->number()],
3475  var->dofIndicesLower(),
3476  var->arrayScalingFactor(),
3477  var->isNodal());
3478 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
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:2754
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2616
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
void cacheResidualBlock(std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Push a local residual block with proper scaling into cache.
Definition: Assembly.C:3261

◆ cacheResidualNeighbor()

void Assembly::cacheResidualNeighbor ( GlobalDataKey  ,
const std::vector< VectorTag > &  tags 
)

Takes the values that are currently in _sub_Rn of all field variables and appends them to the cached values.

Definition at line 3451 of file Assembly.C.

Referenced by SubProblem::cacheResidualNeighbor(), and ComputeMortarFunctor::operator()().

3452 {
3453  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3454  for (const auto & var : vars)
3455  for (const auto & vector_tag : tags)
3456  if (_sys.hasVector(vector_tag._id))
3457  cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3458  _cached_residual_rows[vector_tag._type_id],
3459  _sub_Rn[vector_tag._type_id][var->number()],
3460  var->dofIndicesNeighbor(),
3461  var->arrayScalingFactor(),
3462  var->isNodal());
3463 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
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:2754
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:873
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2614
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
void cacheResidualBlock(std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Push a local residual block with proper scaling into cache.
Definition: Assembly.C:3261

◆ cacheResidualNodes()

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

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

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3433 of file Assembly.C.

3437 {
3438  // Add the residual value and dof_index to cached_residual_values and cached_residual_rows
3439  // respectively.
3440  // This is used by NodalConstraint.C to cache the residual calculated for primary and secondary
3441  // node.
3442  const VectorTag & vector_tag = _subproblem.getVectorTag(tag);
3443  for (MooseIndex(dof_index) i = 0; i < dof_index.size(); ++i)
3444  {
3445  _cached_residual_values[vector_tag._type_id].push_back(res(i));
3446  _cached_residual_rows[vector_tag._type_id].push_back(dof_index[i]);
3447  }
3448 }
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:2754
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
SubProblem & _subproblem
Definition: Assembly.h:2266
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
Storage for all of the information pretaining to a vector tag.
Definition: VectorTag.h:15
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:138

◆ cacheResiduals()

template<typename Residuals , typename Indices >
void Assembly::cacheResiduals ( const Residuals &  residuals,
const Indices &  row_indices,
Real  scaling_factor,
LocalDataKey  ,
const std::set< TagID > &  vector_tags 
)

Process the supplied residual values.

This is a mirror of of the non-templated version of addResiduals except that it's meant for only processing residuals (and not their derivatives/Jacobian). We supply this API such that residual objects that leverage the AD version of this method when computing the Jacobian (or residual + Jacobian) can mirror the same behavior when doing pure residual evaluations, such as when evaluating linear residuals during (P)JFNK. This method will call constrain_element_vector on the supplied residuals. Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3008 of file Assembly.h.

Referenced by TaggingInterface::addResiduals().

3013 {
3014  mooseAssert(residuals.size() == input_row_indices.size(),
3015  "The number of residuals should match the number of dof indices");
3016  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3017 
3018  if (!computingResidual() || vector_tags.empty())
3019  return;
3020 
3021  if (residuals.size() == 1)
3022  {
3023  // No constraining is required. (This is likely a finite volume computation if we only have a
3024  // single dof)
3026  residuals, input_row_indices, scaling_factor, LocalDataKey{}, vector_tags);
3027  return;
3028  }
3029 
3030  // Need to make a copy because we might modify this in constrain_element_vector
3031  _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3032 
3034  for (const auto i : index_range(_row_indices))
3035  _element_vector(i) = MetaPhysicL::raw_value(residuals[i]) * scaling_factor;
3036 
3037  // At time of writing, this method doesn't do anything with the asymmetric_constraint_rows
3038  // argument, but we set it to false to be consistent with processLocalResidual
3039  _dof_map.constrain_element_vector(
3040  _element_vector, _row_indices, /*asymmetric_constraint_rows=*/false);
3041 
3042  for (const auto i : index_range(_row_indices))
3043  cacheResidual(_row_indices[i], _element_vector(i), vector_tags);
3044 }
void resize(const unsigned int n)
auto raw_value(const Eigen::Map< T > &in)
Definition: ADReal.h:73
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:2301
void cacheResidual(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Re of all field variables and appends them to the cached ...
Definition: Assembly.C:3400
bool computingResidual() const
Definition: Assembly.h:1894
std::vector< dof_id_type > _row_indices
Working vectors to avoid repeated heap allocations when caching residuals/Jacobians that must have li...
Definition: Assembly.h:2848
auto index_range(const T &sizable)
DenseVector< Number > _element_vector
A working vector to avoid repeated heap allocations when caching residuals that must have libMesh-lev...
Definition: Assembly.h:2838
void cacheResidualsWithoutConstraints(const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &vector_tags)
Process the supplied residual values.
Definition: Assembly.h:3048

◆ cacheResidualsWithoutConstraints()

template<typename Residuals , typename Indices >
void Assembly::cacheResidualsWithoutConstraints ( const Residuals &  residuals,
const Indices &  row_indices,
Real  scaling_factor,
LocalDataKey  ,
const std::set< TagID > &  vector_tags 
)

Process the supplied residual values.

This is a mirror of of the non-templated version of addResiduals except that it's meant for only processing residuals (and not their derivatives/Jacobian). We supply this API such that residual objects that leverage the AD version of this method when computing the Jacobian (or residual + Jacobian) can mirror the same behavior when doing pure residual evaluations, such as when evaluating linear residuals during (P)JFNK. This method will not call constrain_element_vector on the supplied residuals. Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3048 of file Assembly.h.

Referenced by TaggingInterface::addResidualsWithoutConstraints(), and cacheResiduals().

3053 {
3054  mooseAssert(residuals.size() == row_indices.size(),
3055  "The number of residuals should match the number of dof indices");
3056  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3057 
3058  if (computingResidual() && !vector_tags.empty())
3059  for (const auto i : index_range(row_indices))
3060  cacheResidual(
3061  row_indices[i], MetaPhysicL::raw_value(residuals[i]) * scaling_factor, vector_tags);
3062 }
auto raw_value(const Eigen::Map< T > &in)
Definition: ADReal.h:73
void cacheResidual(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Re of all field variables and appends them to the cached ...
Definition: Assembly.C:3400
bool computingResidual() const
Definition: Assembly.h:1894
auto index_range(const T &sizable)

◆ clearCachedJacobian()

void Assembly::clearCachedJacobian ( )
private

Clear any currently cached jacobians.

This is automatically called by setCachedJacobian

Definition at line 4516 of file Assembly.C.

Referenced by setCachedJacobian(), and zeroCachedJacobian().

4517 {
4518  for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4519  {
4520  _cached_jacobian_rows[tag].clear();
4521  _cached_jacobian_cols[tag].clear();
4522  _cached_jacobian_values[tag].clear();
4523  }
4524 }
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2759
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2763

◆ clearCachedQRules()

void Assembly::clearCachedQRules ( )

Set the cached quadrature rules to nullptr.

Definition at line 723 of file Assembly.C.

724 {
725  _current_qrule = nullptr;
726  _current_qrule_face = nullptr;
727  _current_qrule_lower = nullptr;
728  _current_qrule_neighbor = nullptr;
729 }
QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2545
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2516
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ clearCachedResiduals() [1/2]

void Assembly::clearCachedResiduals ( GlobalDataKey  )

Clears all of the residuals in _cached_residual_rows and _cached_residual_values.

This method is designed specifically for use after calling FEProblemBase::addCachedResidualDirectly() and DisplacedProblem::addCachedResidualDirectly() to ensure that we don't have any extra residuals hanging around that we didn't have the vectors for

Definition at line 3496 of file Assembly.C.

Referenced by addCachedResidualDirectly().

3497 {
3498  for (const auto & vector_tag : _residual_vector_tags)
3499  clearCachedResiduals(vector_tag);
3500 }
const std::vector< VectorTag > & _residual_vector_tags
The residual vector tags that Assembly could possibly contribute to.
Definition: Assembly.h:2748
void clearCachedResiduals(GlobalDataKey)
Clears all of the residuals in _cached_residual_rows and _cached_residual_values. ...
Definition: Assembly.C:3496

◆ clearCachedResiduals() [2/2]

void Assembly::clearCachedResiduals ( const VectorTag vector_tag)
private

Clears all of the cached residuals for a specific vector tag.

Definition at line 3504 of file Assembly.C.

3505 {
3506  auto & values = _cached_residual_values[vector_tag._type_id];
3507  auto & rows = _cached_residual_rows[vector_tag._type_id];
3508 
3509  mooseAssert(values.size() == rows.size(),
3510  "Number of cached residuals and number of rows must match!");
3511 
3512  // Keep track of the largest size so we can use it to reserve and avoid
3513  // as much dynamic allocation as possible
3514  if (_max_cached_residuals < values.size())
3515  _max_cached_residuals = values.size();
3516 
3517  // Clear both vectors (keeps the capacity the same)
3518  values.clear();
3519  rows.clear();
3520  // And then reserve: use 2 as a fudge factor to *really* avoid dynamic allocation!
3521  values.reserve(_max_cached_residuals * 2);
3522  rows.reserve(_max_cached_residuals * 2);
3523 }
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:2754
unsigned int _max_cached_residuals
Definition: Assembly.h:2756
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751

◆ computeADFace()

void Assembly::computeADFace ( const Elem &  elem,
const unsigned int  side 
)
private

compute AD things on an element face

Definition at line 2107 of file Assembly.C.

Referenced by reinitElemFaceRef(), and reinitFEFace().

2108 {
2109  const auto dim = elem.dim();
2110 
2111  if (_subproblem.haveADObjects())
2112  {
2113  auto n_qp = _current_qrule_face->n_points();
2114  resizeADMappingObjects(n_qp, dim);
2115  _ad_normals.resize(n_qp);
2116  _ad_JxW_face.resize(n_qp);
2117  if (_calculate_face_xyz)
2118  _ad_q_points_face.resize(n_qp);
2120  _ad_curvatures.resize(n_qp);
2121 
2122  if (_displaced)
2123  {
2124  const auto & qw = _current_qrule_face->get_weights();
2125  computeFaceMap(elem, side, qw);
2126  const std::vector<Real> dummy_qw(n_qp, 1.);
2127 
2128  for (unsigned int qp = 0; qp != n_qp; qp++)
2130  }
2131  else
2132  for (unsigned qp = 0; qp < n_qp; ++qp)
2133  {
2134  _ad_JxW_face[qp] = _current_JxW_face[qp];
2135  if (_calculate_face_xyz)
2137  _ad_normals[qp] = _current_normals[qp];
2139  _ad_curvatures[qp] = _curvatures[qp];
2140  }
2141 
2142  for (const auto & it : _fe_face[dim])
2143  {
2144  FEBase & fe = *it.second;
2145  auto fe_type = it.first;
2146  auto num_shapes = fe.n_shape_functions();
2147  auto & grad_phi = _ad_grad_phi_data_face[fe_type];
2148 
2149  grad_phi.resize(num_shapes);
2150  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2151  grad_phi[i].resize(n_qp);
2152 
2153  const auto & regular_grad_phi = _fe_shape_data_face[fe_type]->_grad_phi;
2154 
2155  if (_displaced)
2156  computeGradPhiAD(&elem, n_qp, grad_phi, &fe);
2157  else
2158  for (unsigned qp = 0; qp < n_qp; ++qp)
2159  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2160  grad_phi[i][qp] = regular_grad_phi[i][qp];
2161  }
2162  for (const auto & it : _vector_fe_face[dim])
2163  {
2164  FEVectorBase & fe = *it.second;
2165  auto fe_type = it.first;
2166  auto num_shapes = fe.n_shape_functions();
2167  auto & grad_phi = _ad_vector_grad_phi_data_face[fe_type];
2168 
2169  grad_phi.resize(num_shapes);
2170  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2171  grad_phi[i].resize(n_qp);
2172 
2173  const auto & regular_grad_phi = _vector_fe_shape_data_face[fe_type]->_grad_phi;
2174 
2175  if (_displaced)
2176  computeGradPhiAD(&elem, n_qp, grad_phi, &fe);
2177  else
2178  for (unsigned qp = 0; qp < n_qp; ++qp)
2179  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2180  grad_phi[i][qp] = regular_grad_phi[i][qp];
2181  }
2182  }
2183 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
MooseArray< Real > _curvatures
Definition: Assembly.h:2802
void computeGradPhiAD(const Elem *elem, unsigned int n_qp, ADTemplateVariablePhiGradient< OutputType > &grad_phi, FEGenericBase< OutputType > *fe)
compute gradient of phi possibly with derivative information with respect to nonlinear displacement v...
Definition: Assembly.C:887
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition: Assembly.h:2735
MooseArray< VectorValue< DualReal > > _ad_q_points_face
Definition: Assembly.h:2801
MooseArray< VectorValue< DualReal > > _ad_normals
Definition: Assembly.h:2800
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
Definition: SubProblem.h:722
MooseArray< DualReal > _ad_JxW_face
Definition: Assembly.h:2799
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2481
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
void resizeADMappingObjects(unsigned int n_qp, unsigned int dim)
resize any objects that contribute to automatic differentiation-related mapping calculations ...
Definition: Assembly.C:967
FEGenericBase< RealGradient > FEVectorBase
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
SubProblem & _subproblem
Definition: Assembly.h:2266
bool _calculate_curvatures
Definition: Assembly.h:2812
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2469
FEGenericBase< Real > FEBase
const bool _displaced
Definition: Assembly.h:2268
MooseArray< DualReal > _ad_curvatures
Definition: Assembly.h:2803
bool _calculate_face_xyz
Definition: Assembly.h:2811
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:2483
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2471
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:213
void computeSinglePointMapAD(const Elem *elem, const std::vector< Real > &qw, unsigned p, FEBase *fe)
compute the finite element reference-physical mapping quantities (such as JxW) with possible dependen...
Definition: Assembly.C:997
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition: Assembly.h:2737
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2479
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475
void computeFaceMap(const Elem &elem, const unsigned int side, const std::vector< Real > &qw)
Definition: Assembly.C:1341

◆ computeCurrentElemVolume()

void Assembly::computeCurrentElemVolume ( )
private

Definition at line 1742 of file Assembly.C.

Referenced by reinit().

1743 {
1745  return;
1746 
1749  if (_calculate_ad_coord)
1751  _current_qrule, _ad_q_points, _ad_coord, _current_elem->subdomain_id());
1752 
1753  _current_elem_volume = 0.;
1754  for (unsigned int qp = 0; qp < _current_qrule->n_points(); qp++)
1756 
1758 }
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:2377
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:2788
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2579
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:2555
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2373
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2816
void setCoordinateTransformation(const QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1719
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:2371
MooseArray< DualReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2379

◆ computeCurrentFaceVolume()

void Assembly::computeCurrentFaceVolume ( )
private

Definition at line 1761 of file Assembly.C.

Referenced by reinit().

1762 {
1764  return;
1765 
1768  if (_calculate_ad_coord)
1771 
1772  _current_side_volume = 0.;
1773  for (unsigned int qp = 0; qp < _current_qrule_face->n_points(); qp++)
1775 
1777 }
MooseArray< VectorValue< DualReal > > _ad_q_points_face
Definition: Assembly.h:2801
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:2377
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2481
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2816
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:2561
void setCoordinateTransformation(const QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1719
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2581
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2479
MooseArray< DualReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2379
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ computeCurrentNeighborVolume()

void Assembly::computeCurrentNeighborVolume ( )
private

◆ computeFaceMap()

void Assembly::computeFaceMap ( const Elem &  elem,
const unsigned int  side,
const std::vector< Real > &  qw 
)
private

Definition at line 1341 of file Assembly.C.

Referenced by computeADFace().

1342 {
1343  // Important quantities calculated by this method:
1344  // - _ad_JxW_face
1345  // - _ad_q_points_face
1346  // - _ad_normals
1347  // - _ad_curvatures
1348 
1349  const Elem & side_elem = _compute_face_map_side_elem_builder(elem, side);
1350  const auto dim = elem.dim();
1351  const auto n_qp = qw.size();
1352  const auto & dpsidxi_map = _holder_fe_face_helper[dim]->get_fe_map().get_dpsidxi();
1353  const auto & dpsideta_map = _holder_fe_face_helper[dim]->get_fe_map().get_dpsideta();
1354  const auto & psi_map = _holder_fe_face_helper[dim]->get_fe_map().get_psi();
1355  std::vector<std::vector<Real>> const * d2psidxi2_map = nullptr;
1356  std::vector<std::vector<Real>> const * d2psidxideta_map = nullptr;
1357  std::vector<std::vector<Real>> const * d2psideta2_map = nullptr;
1358  const auto sys_num = _sys.number();
1359  const bool do_derivatives = ADReal::do_derivatives && sys_num == _subproblem.currentNlSysNum();
1360 
1362  {
1363  d2psidxi2_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psidxi2();
1364  d2psidxideta_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psidxideta();
1365  d2psideta2_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psideta2();
1366  }
1367 
1368  switch (dim)
1369  {
1370  case 1:
1371  {
1372  if (!n_qp)
1373  break;
1374 
1375  if (side_elem.node_id(0) == elem.node_id(0))
1376  _ad_normals[0] = Point(-1.);
1377  else
1378  _ad_normals[0] = Point(1.);
1379 
1380  VectorValue<DualReal> side_point;
1381  if (_calculate_face_xyz)
1382  {
1383  const Node & node = side_elem.node_ref(0);
1384  side_point = node;
1385 
1386  if (do_derivatives)
1387  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1389  side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1390  }
1391 
1392  for (unsigned int p = 0; p < n_qp; p++)
1393  {
1394  if (_calculate_face_xyz)
1395  {
1396  _ad_q_points_face[p].zero();
1397  _ad_q_points_face[p].add_scaled(side_point, psi_map[0][p]);
1398  }
1399 
1400  _ad_normals[p] = _ad_normals[0];
1401  _ad_JxW_face[p] = 1.0 * qw[p];
1402  }
1403 
1404  break;
1405  }
1406 
1407  case 2:
1408  {
1409  _ad_dxyzdxi_map.resize(n_qp);
1411  _ad_d2xyzdxi2_map.resize(n_qp);
1412 
1413  for (unsigned int p = 0; p < n_qp; p++)
1414  {
1415  _ad_dxyzdxi_map[p].zero();
1416  if (_calculate_face_xyz)
1417  _ad_q_points_face[p].zero();
1419  _ad_d2xyzdxi2_map[p].zero();
1420  }
1421 
1422  const auto n_mapping_shape_functions =
1423  FE<2, LAGRANGE>::n_shape_functions(side_elem.type(), side_elem.default_order());
1424 
1425  for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1426  {
1427  const Node & node = side_elem.node_ref(i);
1428  VectorValue<DualReal> side_point = node;
1429 
1430  if (do_derivatives)
1431  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1433  side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1434 
1435  for (unsigned int p = 0; p < n_qp; p++)
1436  {
1437  _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1438  if (_calculate_face_xyz)
1439  _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1441  _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1442  }
1443  }
1444 
1445  for (unsigned int p = 0; p < n_qp; p++)
1446  {
1447  _ad_normals[p] =
1448  (VectorValue<DualReal>(_ad_dxyzdxi_map[p](1), -_ad_dxyzdxi_map[p](0), 0.)).unit();
1449  const auto the_jac = _ad_dxyzdxi_map[p].norm();
1450  _ad_JxW_face[p] = the_jac * qw[p];
1452  {
1453  const auto numerator = _ad_d2xyzdxi2_map[p] * _ad_normals[p];
1454  const auto denominator = _ad_dxyzdxi_map[p].norm_sq();
1455  libmesh_assert_not_equal_to(denominator, 0);
1456  _ad_curvatures[p] = numerator / denominator;
1457  }
1458  }
1459 
1460  break;
1461  }
1462 
1463  case 3:
1464  {
1465  _ad_dxyzdxi_map.resize(n_qp);
1466  _ad_dxyzdeta_map.resize(n_qp);
1468  {
1469  _ad_d2xyzdxi2_map.resize(n_qp);
1470  _ad_d2xyzdxideta_map.resize(n_qp);
1471  _ad_d2xyzdeta2_map.resize(n_qp);
1472  }
1473 
1474  for (unsigned int p = 0; p < n_qp; p++)
1475  {
1476  _ad_dxyzdxi_map[p].zero();
1477  _ad_dxyzdeta_map[p].zero();
1478  if (_calculate_face_xyz)
1479  _ad_q_points_face[p].zero();
1481  {
1482  _ad_d2xyzdxi2_map[p].zero();
1483  _ad_d2xyzdxideta_map[p].zero();
1484  _ad_d2xyzdeta2_map[p].zero();
1485  }
1486  }
1487 
1488  const unsigned int n_mapping_shape_functions =
1489  FE<3, LAGRANGE>::n_shape_functions(side_elem.type(), side_elem.default_order());
1490 
1491  for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1492  {
1493  const Node & node = side_elem.node_ref(i);
1494  VectorValue<DualReal> side_point = node;
1495 
1496  if (do_derivatives)
1497  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1499  side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1500 
1501  for (unsigned int p = 0; p < n_qp; p++)
1502  {
1503  _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1504  _ad_dxyzdeta_map[p].add_scaled(side_point, dpsideta_map[i][p]);
1505  if (_calculate_face_xyz)
1506  _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1508  {
1509  _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1510  _ad_d2xyzdxideta_map[p].add_scaled(side_point, (*d2psidxideta_map)[i][p]);
1511  _ad_d2xyzdeta2_map[p].add_scaled(side_point, (*d2psideta2_map)[i][p]);
1512  }
1513  }
1514  }
1515 
1516  for (unsigned int p = 0; p < n_qp; p++)
1517  {
1518  _ad_normals[p] = _ad_dxyzdxi_map[p].cross(_ad_dxyzdeta_map[p]).unit();
1519 
1520  const auto &dxdxi = _ad_dxyzdxi_map[p](0), dxdeta = _ad_dxyzdeta_map[p](0),
1521  dydxi = _ad_dxyzdxi_map[p](1), dydeta = _ad_dxyzdeta_map[p](1),
1522  dzdxi = _ad_dxyzdxi_map[p](2), dzdeta = _ad_dxyzdeta_map[p](2);
1523 
1524  const auto g11 = (dxdxi * dxdxi + dydxi * dydxi + dzdxi * dzdxi);
1525 
1526  const auto g12 = (dxdxi * dxdeta + dydxi * dydeta + dzdxi * dzdeta);
1527 
1528  const auto g21 = g12;
1529 
1530  const auto g22 = (dxdeta * dxdeta + dydeta * dydeta + dzdeta * dzdeta);
1531 
1532  const auto the_jac = std::sqrt(g11 * g22 - g12 * g21);
1533 
1534  _ad_JxW_face[p] = the_jac * qw[p];
1535 
1537  {
1538  const auto L = -_ad_d2xyzdxi2_map[p] * _ad_normals[p];
1539  const auto M = -_ad_d2xyzdxideta_map[p] * _ad_normals[p];
1540  const auto N = -_ad_d2xyzdeta2_map[p] * _ad_normals[p];
1541  const auto E = _ad_dxyzdxi_map[p].norm_sq();
1542  const auto F = _ad_dxyzdxi_map[p] * _ad_dxyzdeta_map[p];
1543  const auto G = _ad_dxyzdeta_map[p].norm_sq();
1544 
1545  const auto numerator = E * N - 2. * F * M + G * L;
1546  const auto denominator = E * G - F * F;
1547  libmesh_assert_not_equal_to(denominator, 0.);
1548  _ad_curvatures[p] = 0.5 * numerator / denominator;
1549  }
1550  }
1551 
1552  break;
1553  }
1554 
1555  default:
1556  mooseError("Invalid dimension dim = ", dim);
1557  }
1558 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
SystemBase & _sys
Definition: Assembly.h:2265
MooseArray< VectorValue< DualReal > > _ad_q_points_face
Definition: Assembly.h:2801
MooseArray< VectorValue< DualReal > > _ad_normals
Definition: Assembly.h:2800
std::vector< VectorValue< DualReal > > _ad_d2xyzdxi2_map
Definition: Assembly.h:2783
MooseArray< DualReal > _ad_JxW_face
Definition: Assembly.h:2799
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
virtual unsigned int currentNlSysNum() const =0
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
ElemSideBuilder _compute_face_map_side_elem_builder
In place side element builder for computeFaceMap()
Definition: Assembly.h:2831
SubProblem & _subproblem
Definition: Assembly.h:2266
bool _calculate_curvatures
Definition: Assembly.h:2812
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
Container of displacement numbers and directions.
Definition: Assembly.h:2808
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125
std::vector< VectorValue< DualReal > > _ad_dxyzdeta_map
Definition: Assembly.h:2781
MooseArray< DualReal > _ad_curvatures
Definition: Assembly.h:2803
std::vector< VectorValue< DualReal > > _ad_d2xyzdxideta_map
Definition: Assembly.h:2784
bool _calculate_face_xyz
Definition: Assembly.h:2811
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2471
void derivInsert(NumberArray< N, Real > &derivs, dof_id_type index, Real value)
std::vector< VectorValue< DualReal > > _ad_d2xyzdeta2_map
Definition: Assembly.h:2785
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399
const Node *const & node() const
Returns the reference to the node.
Definition: Assembly.h:495
std::vector< VectorValue< DualReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:2780

◆ computeGradPhiAD()

template<typename OutputType >
void Assembly::computeGradPhiAD ( const Elem *  elem,
unsigned int  n_qp,
ADTemplateVariablePhiGradient< OutputType > &  grad_phi,
FEGenericBase< OutputType > *  fe 
)
private

compute gradient of phi possibly with derivative information with respect to nonlinear displacement variables

Definition at line 887 of file Assembly.C.

Referenced by computeADFace(), and reinitFE().

891 {
892  // This function relies on the fact that FE::reinit has already been called. FE::reinit will
893  // importantly have already called FEMap::init_shape_functions which will have computed
894  // these quantities at the integration/quadrature points: dphidxi,
895  // dphideta, and dphidzeta (e.g. \nabla phi w.r.t. reference coordinates). These *phi* quantities
896  // are independent of mesh displacements when using a quadrature rule.
897  //
898  // Note that a user could have specified custom integration points (e.g. independent of a
899  // quadrature rule) which could very well depend on displacements. In that case even the *phi*
900  // quantities from the above paragraph would be a function of the displacements and we would be
901  // missing that derivative information in the calculations below
902 
903  auto dim = elem->dim();
904  const auto & dphidxi = fe->get_dphidxi();
905  const auto & dphideta = fe->get_dphideta();
906  const auto & dphidzeta = fe->get_dphidzeta();
907  auto num_shapes = grad_phi.size();
908 
909  switch (dim)
910  {
911  case 0:
912  {
913  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
914  for (unsigned qp = 0; qp < n_qp; ++qp)
915  grad_phi[i][qp] = 0;
916  break;
917  }
918 
919  case 1:
920  {
921  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
922  for (unsigned qp = 0; qp < n_qp; ++qp)
923  {
924  grad_phi[i][qp].slice(0) = dphidxi[i][qp] * _ad_dxidx_map[qp];
925  grad_phi[i][qp].slice(1) = dphidxi[i][qp] * _ad_dxidy_map[qp];
926  grad_phi[i][qp].slice(2) = dphidxi[i][qp] * _ad_dxidz_map[qp];
927  }
928  break;
929  }
930 
931  case 2:
932  {
933  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
934  for (unsigned qp = 0; qp < n_qp; ++qp)
935  {
936  grad_phi[i][qp].slice(0) =
937  dphidxi[i][qp] * _ad_dxidx_map[qp] + dphideta[i][qp] * _ad_detadx_map[qp];
938  grad_phi[i][qp].slice(1) =
939  dphidxi[i][qp] * _ad_dxidy_map[qp] + dphideta[i][qp] * _ad_detady_map[qp];
940  grad_phi[i][qp].slice(2) =
941  dphidxi[i][qp] * _ad_dxidz_map[qp] + dphideta[i][qp] * _ad_detadz_map[qp];
942  }
943  break;
944  }
945 
946  case 3:
947  {
948  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
949  for (unsigned qp = 0; qp < n_qp; ++qp)
950  {
951  grad_phi[i][qp].slice(0) = dphidxi[i][qp] * _ad_dxidx_map[qp] +
952  dphideta[i][qp] * _ad_detadx_map[qp] +
953  dphidzeta[i][qp] * _ad_dzetadx_map[qp];
954  grad_phi[i][qp].slice(1) = dphidxi[i][qp] * _ad_dxidy_map[qp] +
955  dphideta[i][qp] * _ad_detady_map[qp] +
956  dphidzeta[i][qp] * _ad_dzetady_map[qp];
957  grad_phi[i][qp].slice(2) = dphidxi[i][qp] * _ad_dxidz_map[qp] +
958  dphideta[i][qp] * _ad_detadz_map[qp] +
959  dphidzeta[i][qp] * _ad_dzetadz_map[qp];
960  }
961  break;
962  }
963  }
964 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
std::vector< DualReal > _ad_detadz_map
Definition: Assembly.h:2794
std::vector< DualReal > _ad_dxidy_map
Definition: Assembly.h:2790
std::vector< DualReal > _ad_dzetady_map
Definition: Assembly.h:2796
std::vector< DualReal > _ad_dzetadz_map
Definition: Assembly.h:2797
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::vector< DualReal > _ad_dzetadx_map
Definition: Assembly.h:2795
std::vector< DualReal > _ad_dxidx_map
Definition: Assembly.h:2789
std::vector< DualReal > _ad_dxidz_map
Definition: Assembly.h:2791
std::vector< DualReal > _ad_detadx_map
Definition: Assembly.h:2792
std::vector< DualReal > _ad_detady_map
Definition: Assembly.h:2793

◆ computeSinglePointMapAD()

void Assembly::computeSinglePointMapAD ( const Elem *  elem,
const std::vector< Real > &  qw,
unsigned  p,
FEBase fe 
)
private

compute the finite element reference-physical mapping quantities (such as JxW) with possible dependence on nonlinear displacement variables at a single quadrature point

Definition at line 997 of file Assembly.C.

Referenced by computeADFace(), and reinitFE().

1001 {
1002  // This function relies on the fact that FE::reinit has already been called. FE::reinit will
1003  // importantly have already called FEMap::init_reference_to_physical_map which will have computed
1004  // these quantities at the integration/quadrature points: phi_map, dphidxi_map,
1005  // dphideta_map, and dphidzeta_map (e.g. phi and \nabla phi w.r.t reference coordinates). *_map is
1006  // used to denote that quantities are in reference to a mapping Lagrange FE object. The FE<Dim,
1007  // LAGRANGE> objects used for mapping will in general have an order matching the order of the
1008  // mesh. These *phi*_map quantities are independent of mesh displacements when using a quadrature
1009  // rule.
1010  //
1011  // Note that a user could have specified custom integration points (e.g. independent of a
1012  // quadrature rule) which could very well depend on displacements. In that case even the *phi*_map
1013  // quantities from the above paragraph would be a function of the displacements and we would be
1014  // missing that derivative information in the calculations below
1015  //
1016  // Important quantities calculated by this method:
1017  // - _ad_JxW;
1018  // - _ad_q_points;
1019  // And the following quantities are important because they are used in the computeGradPhiAD method
1020  // to calculate the shape function gradients with respect to the physical coordinates
1021  // dphi/dphys = dphi/dref * dref/dphys:
1022  // - _ad_dxidx_map;
1023  // - _ad_dxidy_map;
1024  // - _ad_dxidz_map;
1025  // - _ad_detadx_map;
1026  // - _ad_detady_map;
1027  // - _ad_detadz_map;
1028  // - _ad_dzetadx_map;
1029  // - _ad_dzetady_map;
1030  // - _ad_dzetadz_map;
1031  //
1032  // Some final notes. This method will be called both when we are reinit'ing in the volume and on
1033  // faces. When reinit'ing on faces, computation of _ad_JxW will be garbage because we will be
1034  // using dummy quadrature weights. _ad_q_points computation is also currently extraneous during
1035  // face reinit because we compute _ad_q_points_face in the computeFaceMap method. However,
1036  // computation of dref/dphys is absolutely necessary (and the reason we call this method for the
1037  // face case) for both volume and face reinit
1038 
1039  auto dim = elem->dim();
1040  const auto & elem_nodes = elem->get_nodes();
1041  auto num_shapes = fe->n_shape_functions();
1042  const auto & phi_map = fe->get_fe_map().get_phi_map();
1043  const auto & dphidxi_map = fe->get_fe_map().get_dphidxi_map();
1044  const auto & dphideta_map = fe->get_fe_map().get_dphideta_map();
1045  const auto & dphidzeta_map = fe->get_fe_map().get_dphidzeta_map();
1046  const auto sys_num = _sys.number();
1047  const bool do_derivatives =
1048  ADReal::do_derivatives && _sys.number() == _subproblem.currentNlSysNum();
1049 
1050  switch (dim)
1051  {
1052  case 0:
1053  {
1054  _ad_jac[p] = 1.0;
1055  _ad_JxW[p] = qw[p];
1056  if (_calculate_xyz)
1057  _ad_q_points[p] = *elem_nodes[0];
1058  break;
1059  }
1060 
1061  case 1:
1062  {
1063  if (_calculate_xyz)
1064  _ad_q_points[p].zero();
1065 
1066  _ad_dxyzdxi_map[p].zero();
1067 
1068  for (std::size_t i = 0; i < num_shapes; i++)
1069  {
1070  libmesh_assert(elem_nodes[i]);
1071  const Node & node = *elem_nodes[i];
1072  libMesh::VectorValue<DualReal> elem_point = node;
1073  if (do_derivatives)
1074  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1075  if (node.n_dofs(sys_num, disp_num))
1077  elem_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1078 
1079  _ad_dxyzdxi_map[p].add_scaled(elem_point, dphidxi_map[i][p]);
1080 
1081  if (_calculate_xyz)
1082  _ad_q_points[p].add_scaled(elem_point, phi_map[i][p]);
1083  }
1084 
1085  _ad_jac[p] = _ad_dxyzdxi_map[p].norm();
1086 
1087  if (_ad_jac[p].value() <= -TOLERANCE * TOLERANCE)
1088  {
1089  static bool failing = false;
1090  if (!failing)
1091  {
1092  failing = true;
1093  elem->print_info(libMesh::err);
1094  libmesh_error_msg("ERROR: negative Jacobian " << _ad_jac[p].value() << " at point index "
1095  << p << " in element " << elem->id());
1096  }
1097  else
1098  return;
1099  }
1100 
1101  const auto jacm2 = 1. / _ad_jac[p] / _ad_jac[p];
1102  _ad_dxidx_map[p] = jacm2 * _ad_dxyzdxi_map[p](0);
1103  _ad_dxidy_map[p] = jacm2 * _ad_dxyzdxi_map[p](1);
1104  _ad_dxidz_map[p] = jacm2 * _ad_dxyzdxi_map[p](2);
1105 
1106  _ad_JxW[p] = _ad_jac[p] * qw[p];
1107 
1108  break;
1109  }
1110 
1111  case 2:
1112  {
1113  if (_calculate_xyz)
1114  _ad_q_points[p].zero();
1115  _ad_dxyzdxi_map[p].zero();
1116  _ad_dxyzdeta_map[p].zero();
1117 
1118  for (std::size_t i = 0; i < num_shapes; i++)
1119  {
1120  libmesh_assert(elem_nodes[i]);
1121  const Node & node = *elem_nodes[i];
1122  libMesh::VectorValue<DualReal> elem_point = node;
1123  if (do_derivatives)
1124  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1126  elem_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1127 
1128  _ad_dxyzdxi_map[p].add_scaled(elem_point, dphidxi_map[i][p]);
1129  _ad_dxyzdeta_map[p].add_scaled(elem_point, dphideta_map[i][p]);
1130 
1131  if (_calculate_xyz)
1132  _ad_q_points[p].add_scaled(elem_point, phi_map[i][p]);
1133  }
1134 
1135  const auto &dx_dxi = _ad_dxyzdxi_map[p](0), dx_deta = _ad_dxyzdeta_map[p](0),
1136  dy_dxi = _ad_dxyzdxi_map[p](1), dy_deta = _ad_dxyzdeta_map[p](1),
1137  dz_dxi = _ad_dxyzdxi_map[p](2), dz_deta = _ad_dxyzdeta_map[p](2);
1138 
1139  const auto g11 = (dx_dxi * dx_dxi + dy_dxi * dy_dxi + dz_dxi * dz_dxi);
1140 
1141  const auto g12 = (dx_dxi * dx_deta + dy_dxi * dy_deta + dz_dxi * dz_deta);
1142 
1143  const auto g21 = g12;
1144 
1145  const auto g22 = (dx_deta * dx_deta + dy_deta * dy_deta + dz_deta * dz_deta);
1146 
1147  auto det = (g11 * g22 - g12 * g21);
1148 
1149  if (det.value() <= -TOLERANCE * TOLERANCE)
1150  {
1151  static bool failing = false;
1152  if (!failing)
1153  {
1154  failing = true;
1155  elem->print_info(libMesh::err);
1156  libmesh_error_msg("ERROR: negative Jacobian " << det << " at point index " << p
1157  << " in element " << elem->id());
1158  }
1159  else
1160  return;
1161  }
1162  else if (det.value() <= 0.)
1163  det.value() = TOLERANCE * TOLERANCE;
1164 
1165  const auto inv_det = 1. / det;
1166  _ad_jac[p] = std::sqrt(det);
1167 
1168  _ad_JxW[p] = _ad_jac[p] * qw[p];
1169 
1170  const auto g11inv = g22 * inv_det;
1171  const auto g12inv = -g12 * inv_det;
1172  const auto g21inv = -g21 * inv_det;
1173  const auto g22inv = g11 * inv_det;
1174 
1175  _ad_dxidx_map[p] = g11inv * dx_dxi + g12inv * dx_deta;
1176  _ad_dxidy_map[p] = g11inv * dy_dxi + g12inv * dy_deta;
1177  _ad_dxidz_map[p] = g11inv * dz_dxi + g12inv * dz_deta;
1178 
1179  _ad_detadx_map[p] = g21inv * dx_dxi + g22inv * dx_deta;
1180  _ad_detady_map[p] = g21inv * dy_dxi + g22inv * dy_deta;
1181  _ad_detadz_map[p] = g21inv * dz_dxi + g22inv * dz_deta;
1182 
1183  break;
1184  }
1185 
1186  case 3:
1187  {
1188  if (_calculate_xyz)
1189  _ad_q_points[p].zero();
1190  _ad_dxyzdxi_map[p].zero();
1191  _ad_dxyzdeta_map[p].zero();
1192  _ad_dxyzdzeta_map[p].zero();
1193 
1194  for (std::size_t i = 0; i < num_shapes; i++)
1195  {
1196  libmesh_assert(elem_nodes[i]);
1197  const Node & node = *elem_nodes[i];
1198  libMesh::VectorValue<DualReal> elem_point = node;
1199  if (do_derivatives)
1200  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1202  elem_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1203 
1204  _ad_dxyzdxi_map[p].add_scaled(elem_point, dphidxi_map[i][p]);
1205  _ad_dxyzdeta_map[p].add_scaled(elem_point, dphideta_map[i][p]);
1206  _ad_dxyzdzeta_map[p].add_scaled(elem_point, dphidzeta_map[i][p]);
1207 
1208  if (_calculate_xyz)
1209  _ad_q_points[p].add_scaled(elem_point, phi_map[i][p]);
1210  }
1211 
1212  const auto dx_dxi = _ad_dxyzdxi_map[p](0), dy_dxi = _ad_dxyzdxi_map[p](1),
1213  dz_dxi = _ad_dxyzdxi_map[p](2), dx_deta = _ad_dxyzdeta_map[p](0),
1214  dy_deta = _ad_dxyzdeta_map[p](1), dz_deta = _ad_dxyzdeta_map[p](2),
1215  dx_dzeta = _ad_dxyzdzeta_map[p](0), dy_dzeta = _ad_dxyzdzeta_map[p](1),
1216  dz_dzeta = _ad_dxyzdzeta_map[p](2);
1217 
1218  _ad_jac[p] = (dx_dxi * (dy_deta * dz_dzeta - dz_deta * dy_dzeta) +
1219  dy_dxi * (dz_deta * dx_dzeta - dx_deta * dz_dzeta) +
1220  dz_dxi * (dx_deta * dy_dzeta - dy_deta * dx_dzeta));
1221 
1222  if (_ad_jac[p].value() <= -TOLERANCE * TOLERANCE)
1223  {
1224  static bool failing = false;
1225  if (!failing)
1226  {
1227  failing = true;
1228  elem->print_info(libMesh::err);
1229  libmesh_error_msg("ERROR: negative Jacobian " << _ad_jac[p].value() << " at point index "
1230  << p << " in element " << elem->id());
1231  }
1232  else
1233  return;
1234  }
1235 
1236  _ad_JxW[p] = _ad_jac[p] * qw[p];
1237 
1238  const auto inv_jac = 1. / _ad_jac[p];
1239 
1240  _ad_dxidx_map[p] = (dy_deta * dz_dzeta - dz_deta * dy_dzeta) * inv_jac;
1241  _ad_dxidy_map[p] = (dz_deta * dx_dzeta - dx_deta * dz_dzeta) * inv_jac;
1242  _ad_dxidz_map[p] = (dx_deta * dy_dzeta - dy_deta * dx_dzeta) * inv_jac;
1243 
1244  _ad_detadx_map[p] = (dz_dxi * dy_dzeta - dy_dxi * dz_dzeta) * inv_jac;
1245  _ad_detady_map[p] = (dx_dxi * dz_dzeta - dz_dxi * dx_dzeta) * inv_jac;
1246  _ad_detadz_map[p] = (dy_dxi * dx_dzeta - dx_dxi * dy_dzeta) * inv_jac;
1247 
1248  _ad_dzetadx_map[p] = (dy_dxi * dz_deta - dz_dxi * dy_deta) * inv_jac;
1249  _ad_dzetady_map[p] = (dz_dxi * dx_deta - dx_dxi * dz_deta) * inv_jac;
1250  _ad_dzetadz_map[p] = (dx_dxi * dy_deta - dy_dxi * dx_deta) * inv_jac;
1251 
1252  break;
1253  }
1254 
1255  default:
1256  libmesh_error_msg("Invalid dim = " << dim);
1257  }
1258 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:2787
SystemBase & _sys
Definition: Assembly.h:2265
std::vector< DualReal > _ad_detadz_map
Definition: Assembly.h:2794
std::vector< DualReal > _ad_dxidy_map
Definition: Assembly.h:2790
std::vector< DualReal > _ad_dzetady_map
Definition: Assembly.h:2796
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:2788
virtual unsigned int currentNlSysNum() const =0
std::vector< DualReal > _ad_dzetadz_map
Definition: Assembly.h:2797
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::vector< DualReal > _ad_dzetadx_map
Definition: Assembly.h:2795
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
std::vector< DualReal > _ad_dxidx_map
Definition: Assembly.h:2789
std::vector< DualReal > _ad_dxidz_map
Definition: Assembly.h:2791
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::vector< DualReal > _ad_jac
Definition: Assembly.h:2786
SubProblem & _subproblem
Definition: Assembly.h:2266
libmesh_assert(ctx)
bool _calculate_xyz
Definition: Assembly.h:2810
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
Container of displacement numbers and directions.
Definition: Assembly.h:2808
OStreamProxy err(std::cerr)
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125
std::vector< VectorValue< DualReal > > _ad_dxyzdeta_map
Definition: Assembly.h:2781
std::vector< VectorValue< DualReal > > _ad_dxyzdzeta_map
Definition: Assembly.h:2782
std::vector< DualReal > _ad_detadx_map
Definition: Assembly.h:2792
void derivInsert(NumberArray< N, Real > &derivs, dof_id_type index, Real value)
const Node *const & node() const
Returns the reference to the node.
Definition: Assembly.h:495
std::vector< DualReal > _ad_detady_map
Definition: Assembly.h:2793
std::vector< VectorValue< DualReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:2780

◆ computingJacobian()

bool Assembly::computingJacobian ( ) const
inline
Returns
whether we are computing a Jacobian

Definition at line 1899 of file Assembly.h.

Referenced by cacheJacobian(), cacheJacobianWithoutConstraints(), ComputeMortarFunctor::operator()(), and MortarConstraintBase::zeroInactiveLMDofs().

1899 { return _computing_jacobian; }
const bool & _computing_jacobian
Whether we are currently computing the Jacobian.
Definition: Assembly.h:2278

◆ computingResidual()

bool Assembly::computingResidual ( ) const
inline
Returns
whether we are computing a residual

Definition at line 1894 of file Assembly.h.

Referenced by cacheResiduals(), cacheResidualsWithoutConstraints(), ComputeMortarFunctor::operator()(), and MortarConstraintBase::zeroInactiveLMDofs().

1894 { return _computing_residual; }
const bool & _computing_residual
Whether we are currently computing the residual.
Definition: Assembly.h:2275

◆ computingResidualAndJacobian()

bool Assembly::computingResidualAndJacobian ( ) const
inline
Returns
whether we are computing a residual and a Jacobian simultaneously

Definition at line 1904 of file Assembly.h.

const bool & _computing_residual_and_jacobian
Whether we are currently computing the residual and Jacobian.
Definition: Assembly.h:2281

◆ constify_ref()

template<typename T >
static const T* const& Assembly::constify_ref ( T *const &  inref)
inlinestatic

Workaround for C++ compilers thinking they can't just cast a const-reference-to-pointer to const-reference-to-const-pointer.

Definition at line 104 of file Assembly.h.

Referenced by getFE(), getFEFace(), getFEFaceNeighbor(), getFENeighbor(), getVectorFE(), getVectorFEFace(), getVectorFEFaceNeighbor(), getVectorFENeighbor(), qRule(), qRuleFace(), qRuleMortar(), and qRuleNeighbor().

105  {
106  const T * const * ptr = &inref;
107  return *ptr;
108  }

◆ coordSystem()

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

Get the coordinate system type.

Returns
A reference to the coordinate system type

Definition at line 280 of file Assembly.h.

280 { return _coord_type; }
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:2375

◆ coordTransformation()

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

Returns the reference to the coordinate transformation coefficients.

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

Definition at line 252 of file Assembly.h.

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

◆ copyFaceShapes() [1/2]

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

Definition at line 3028 of file Assembly.C.

Referenced by copyFaceShapes().

3029 {
3030  phiFace(v).shallowCopy(v.phiFace());
3031  gradPhiFace(v).shallowCopy(v.gradPhiFace());
3032  if (v.computingSecond())
3033  secondPhiFace(v).shallowCopy(v.secondPhiFace());
3034 }
virtual const FieldVariablePhiSecond & secondPhiFace() const =0
Return the rank-2 tensor of second derivatives of the variable&#39;s shape functions on an element face...
const VariablePhiSecond & secondPhiFace(const MooseVariableField< Real > &) const
Definition: Assembly.h:1291
virtual bool computingSecond() const =0
Whether or not this variable is computing any second derivatives.
const VariablePhiValue & phiFace() const
Definition: Assembly.h:1284
virtual const FieldVariablePhiValue & phiFace() const =0
Return the variable&#39;s shape functions on an element face.
virtual const FieldVariablePhiGradient & gradPhiFace() const =0
Return the gradients of the variable&#39;s shape functions on an element face.
const VariablePhiGradient & gradPhiFace() const
Definition: Assembly.h:1286

◆ copyFaceShapes() [2/2]

void Assembly::copyFaceShapes ( unsigned int  var)

Definition at line 3037 of file Assembly.C.

3038 {
3039  auto & v = _sys.getVariable(_tid, var);
3040  if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3041  {
3042  auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3043  copyFaceShapes(v);
3044  }
3045  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3046  {
3047  auto & v = _sys.getActualFieldVariable<RealEigenVector>(_tid, var);
3048  copyFaceShapes(v);
3049  }
3050  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3051  {
3052  auto & v = _sys.getActualFieldVariable<RealVectorValue>(_tid, var);
3053  copyFaceShapes(v);
3054  if (v.computingCurl())
3055  _vector_curl_phi_face.shallowCopy(v.curlPhi());
3056  if (v.computingDiv())
3057  _vector_div_phi_face.shallowCopy(v.divPhi());
3058  }
3059  else
3060  mooseError("Unsupported variable field type!");
3061 }
SystemBase & _sys
Definition: Assembly.h:2265
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
VectorVariablePhiDivergence _vector_div_phi_face
Definition: Assembly.h:2683
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void copyFaceShapes(MooseVariableField< T > &v)
Definition: Assembly.C:3028
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:138
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:2682
MooseVariableField< T > & getActualFieldVariable(THREAD_ID tid, const std::string &var_name)
Returns a field variable pointer - this includes finite volume variables.
Definition: SystemBase.C:107

◆ copyNeighborShapes() [1/2]

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

Definition at line 3065 of file Assembly.C.

Referenced by copyNeighborShapes().

3066 {
3067  if (v.usesPhiNeighbor())
3068  {
3069  phiFaceNeighbor(v).shallowCopy(v.phiFaceNeighbor());
3070  phiNeighbor(v).shallowCopy(v.phiNeighbor());
3071  }
3072  if (v.usesGradPhiNeighbor())
3073  {
3074  gradPhiFaceNeighbor(v).shallowCopy(v.gradPhiFaceNeighbor());
3075  gradPhiNeighbor(v).shallowCopy(v.gradPhiNeighbor());
3076  }
3077  if (v.usesSecondPhiNeighbor())
3078  {
3079  secondPhiFaceNeighbor(v).shallowCopy(v.secondPhiFaceNeighbor());
3080  secondPhiNeighbor(v).shallowCopy(v.secondPhiNeighbor());
3081  }
3082 }
const VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1313
virtual const FieldVariablePhiGradient & gradPhiNeighbor() const =0
Return the gradients of the variable&#39;s shape functions on a neighboring element.
const VariablePhiSecond & secondPhiNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1304
const VariablePhiValue & phiFaceNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1309
const VariablePhiValue & phiNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1296
virtual const FieldVariablePhiValue & phiNeighbor() const =0
Return the variable&#39;s shape functions on a neighboring element.
virtual const FieldVariablePhiValue & phiFaceNeighbor() const =0
Return the variable&#39;s shape functions on a neighboring element face.
virtual const FieldVariablePhiSecond & secondPhiFaceNeighbor() const =0
Return the rank-2 tensor of second derivatives of the variable&#39;s shape functions on a neighboring ele...
bool usesPhiNeighbor() const
Whether or not this variable is actually using the shape function value.
virtual bool usesSecondPhiNeighbor() const =0
Whether or not this variable is actually using the shape function second derivatives.
virtual const FieldVariablePhiSecond & secondPhiNeighbor() const =0
Return the rank-2 tensor of second derivatives of the variable&#39;s shape functions on a neighboring ele...
virtual const FieldVariablePhiGradient & gradPhiFaceNeighbor() const =0
Return the gradients of the variable&#39;s shape functions on a neighboring element face.
const VariablePhiGradient & gradPhiNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1300
bool usesGradPhiNeighbor() const
Whether or not this variable is actually using the shape function gradient.
const VariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1317

◆ copyNeighborShapes() [2/2]

void Assembly::copyNeighborShapes ( unsigned int  var)

Definition at line 3085 of file Assembly.C.

3086 {
3087  auto & v = _sys.getVariable(_tid, var);
3088  if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3089  {
3090  auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3091  copyNeighborShapes(v);
3092  }
3093  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3094  {
3095  auto & v = _sys.getActualFieldVariable<RealEigenVector>(_tid, var);
3096  copyNeighborShapes(v);
3097  }
3098  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3099  {
3100  auto & v = _sys.getActualFieldVariable<RealVectorValue>(_tid, var);
3101  copyNeighborShapes(v);
3102  }
3103  else
3104  mooseError("Unsupported variable field type!");
3105 }
SystemBase & _sys
Definition: Assembly.h:2265
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:138
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79
void copyNeighborShapes(MooseVariableField< T > &v)
Definition: Assembly.C:3065
MooseVariableField< T > & getActualFieldVariable(THREAD_ID tid, const std::string &var_name)
Returns a field variable pointer - this includes finite volume variables.
Definition: SystemBase.C:107

◆ copyShapes() [1/2]

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

Definition at line 2991 of file Assembly.C.

Referenced by copyShapes().

2992 {
2993  phi(v).shallowCopy(v.phi());
2994  gradPhi(v).shallowCopy(v.gradPhi());
2995  if (v.computingSecond())
2996  secondPhi(v).shallowCopy(v.secondPhi());
2997 }
virtual const FieldVariablePhiValue & phi() const =0
Return the variable&#39;s elemental shape functions.
const VariablePhiSecond & secondPhi() const
Definition: Assembly.h:1278
const VariablePhiValue & phi() const
Definition: Assembly.h:1269
const VariablePhiGradient & gradPhi() const
Definition: Assembly.h:1276
virtual const FieldVariablePhiSecond & secondPhi() const =0
Return the rank-2 tensor of second derivatives of the variable&#39;s elemental shape functions.
virtual bool computingSecond() const =0
Whether or not this variable is computing any second derivatives.
virtual const FieldVariablePhiGradient & gradPhi() const =0
Return the gradients of the variable&#39;s elemental shape functions.

◆ copyShapes() [2/2]

void Assembly::copyShapes ( unsigned int  var)

Definition at line 3000 of file Assembly.C.

3001 {
3002  auto & v = _sys.getVariable(_tid, var);
3003  if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3004  {
3005  auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3006  copyShapes(v);
3007  }
3008  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3009  {
3010  auto & v = _sys.getActualFieldVariable<RealEigenVector>(_tid, var);
3011  copyShapes(v);
3012  }
3013  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3014  {
3015  auto & v = _sys.getActualFieldVariable<RealVectorValue>(_tid, var);
3016  copyShapes(v);
3017  if (v.computingCurl())
3018  curlPhi(v).shallowCopy(v.curlPhi());
3019  if (v.computingDiv())
3020  divPhi(v).shallowCopy(v.divPhi());
3021  }
3022  else
3023  mooseError("Unsupported variable field type!");
3024 }
void copyShapes(MooseVariableField< T > &v)
Definition: Assembly.C:2991
SystemBase & _sys
Definition: Assembly.h:2265
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
const VectorVariablePhiDivergence & divPhi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1338
const VectorVariablePhiCurl & curlPhi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1334
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:138
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79
MooseVariableField< T > & getActualFieldVariable(THREAD_ID tid, const std::string &var_name)
Returns a field variable pointer - this includes finite volume variables.
Definition: SystemBase.C:107

◆ couplingEntries() [1/2]

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

Definition at line 1243 of file Assembly.h.

Referenced by MortarConstraint::computeJacobian().

1244  {
1245  return _cm_ff_entry;
1246  }
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284

◆ couplingEntries() [2/2]

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

Definition at line 1248 of file Assembly.h.

1249  {
1250  return _cm_ff_entry;
1251  }
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284

◆ createQRules()

void Assembly::createQRules ( QuadratureType  type,
Order  order,
Order  volume_order,
Order  face_order,
SubdomainID  block,
bool  allow_negative_qweights = true 
)

Creates block-specific volume, face and arbitrary qrules based on the orders and the flag of whether or not to allow negative qweights passed in.

Any quadrature rules specified using this function override those created via in the non-block-specific/global createQRules function. order is used for arbitrary volume quadrature rules, while volume_order and face_order are for elem and face quadrature respectively.

Definition at line 614 of file Assembly.C.

Referenced by bumpAllQRuleOrder(), and bumpVolumeQRuleOrder().

620 {
621  auto & qvec = _qrules[block];
622  unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
623  if (qvec.size() != ndims)
624  qvec.resize(ndims);
625 
626  for (unsigned int i = 0; i < qvec.size(); i++)
627  {
628  int dim = i;
629  auto & q = qvec[dim];
630  q.vol = QBase::build(type, dim, volume_order);
631  q.vol->allow_rules_with_negative_weights = allow_negative_qweights;
632  q.face = QBase::build(type, dim - 1, face_order);
633  q.face->allow_rules_with_negative_weights = allow_negative_qweights;
634  q.fv_face = QBase::build(QMONOMIAL, dim - 1, CONSTANT);
635  q.fv_face->allow_rules_with_negative_weights = allow_negative_qweights;
636  q.neighbor = std::make_unique<ArbitraryQuadrature>(dim - 1, face_order);
637  q.neighbor->allow_rules_with_negative_weights = allow_negative_qweights;
638  q.arbitrary_vol = std::make_unique<ArbitraryQuadrature>(dim, order);
639  q.arbitrary_vol->allow_rules_with_negative_weights = allow_negative_qweights;
640  q.arbitrary_face = std::make_unique<ArbitraryQuadrature>(dim - 1, face_order);
641  q.arbitrary_face->allow_rules_with_negative_weights = allow_negative_qweights;
642  }
643 
644  delete _qrule_msm;
645  _custom_mortar_qrule = false;
646  _qrule_msm = QBase::build(type, _mesh_dimension - 1, face_order).release();
647  _qrule_msm->allow_rules_with_negative_weights = allow_negative_qweights;
648  _fe_msm->attach_quadrature_rule(_qrule_msm);
649 }
QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2539
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2534
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
Definition: Assembly.h:2412
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh...
Definition: Assembly.h:2541

◆ curlPhi() [1/2]

const VectorVariablePhiCurl& Assembly::curlPhi ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1334 of file Assembly.h.

Referenced by copyShapes().

1335  {
1336  return _vector_curl_phi;
1337  }
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:2676

◆ curlPhi() [2/2]

VectorVariablePhiCurl& Assembly::curlPhi ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1455 of file Assembly.h.

1456  {
1457  return _vector_curl_phi;
1458  }
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:2676

◆ curlPhiFace() [1/2]

const VectorVariablePhiCurl& Assembly::curlPhiFace ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1355 of file Assembly.h.

1356  {
1357  return _vector_curl_phi_face;
1358  }
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:2682

◆ curlPhiFace() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiFace ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1476 of file Assembly.h.

1477  {
1478  return _vector_curl_phi_face;
1479  }
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:2682

◆ curlPhiFaceNeighbor() [1/2]

const VectorVariablePhiCurl& Assembly::curlPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1403 of file Assembly.h.

1404  {
1406  }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:2694

◆ curlPhiFaceNeighbor() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1517 of file Assembly.h.

1518  {
1520  }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:2694

◆ curlPhiNeighbor() [1/2]

const VectorVariablePhiCurl& Assembly::curlPhiNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1378 of file Assembly.h.

1379  {
1381  }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:2688

◆ curlPhiNeighbor() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1497 of file Assembly.h.

1498  {
1500  }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:2688

◆ currentBoundaryID()

const BoundaryID& Assembly::currentBoundaryID ( ) const
inline

Return the current boundary ID.

Definition at line 382 of file Assembly.h.

382 { return _current_boundary_id; }
BoundaryID _current_boundary_id
The current boundary ID.
Definition: Assembly.h:2553

◆ currentNeighborSubdomainID()

const SubdomainID& Assembly::currentNeighborSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 450 of file Assembly.h.

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

◆ currentSubdomainID()

const SubdomainID& Assembly::currentSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 372 of file Assembly.h.

372 { return _current_subdomain_id; }
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551

◆ divPhi() [1/2]

const VectorVariablePhiDivergence& Assembly::divPhi ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1338 of file Assembly.h.

Referenced by copyShapes().

1339  {
1340  return _vector_div_phi;
1341  }
VectorVariablePhiDivergence _vector_div_phi
Definition: Assembly.h:2677

◆ divPhi() [2/2]

VectorVariablePhiDivergence& Assembly::divPhi ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1459 of file Assembly.h.

1460  {
1461  return _vector_div_phi;
1462  }
VectorVariablePhiDivergence _vector_div_phi
Definition: Assembly.h:2677

◆ divPhiFace() [1/2]

const VectorVariablePhiDivergence& Assembly::divPhiFace ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1359 of file Assembly.h.

1360  {
1361  return _vector_div_phi_face;
1362  }
VectorVariablePhiDivergence _vector_div_phi_face
Definition: Assembly.h:2683

◆ divPhiFace() [2/2]

VectorVariablePhiDivergence& Assembly::divPhiFace ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1480 of file Assembly.h.

1481  {
1482  return _vector_div_phi_face;
1483  }
VectorVariablePhiDivergence _vector_div_phi_face
Definition: Assembly.h:2683

◆ divPhiFaceNeighbor() [1/2]

const VectorVariablePhiDivergence& Assembly::divPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1408 of file Assembly.h.

1409  {
1411  }
VectorVariablePhiDivergence _vector_div_phi_face_neighbor
Definition: Assembly.h:2695

◆ divPhiFaceNeighbor() [2/2]

VectorVariablePhiDivergence& Assembly::divPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1521 of file Assembly.h.

1522  {
1524  }
VectorVariablePhiDivergence _vector_div_phi_face_neighbor
Definition: Assembly.h:2695

◆ divPhiNeighbor() [1/2]

const VectorVariablePhiDivergence& Assembly::divPhiNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1383 of file Assembly.h.

1384  {
1385  return _vector_div_phi_neighbor;
1386  }
VectorVariablePhiDivergence _vector_div_phi_neighbor
Definition: Assembly.h:2689

◆ divPhiNeighbor() [2/2]

VectorVariablePhiDivergence& Assembly::divPhiNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1501 of file Assembly.h.

1502  {
1503  return _vector_div_phi_neighbor;
1504  }
VectorVariablePhiDivergence _vector_div_phi_neighbor
Definition: Assembly.h:2689

◆ elem()

const Elem* const& Assembly::elem ( ) const
inline

◆ elementVolume()

Real Assembly::elementVolume ( const Elem *  elem) const

On-demand computation of volume element accounting for RZ/RSpherical.

Definition at line 3778 of file Assembly.C.

Referenced by reinitLowerDElem(), and reinitNeighborLowerDElem().

3779 {
3780  FEType fe_type(elem->default_order(), LAGRANGE);
3781  std::unique_ptr<FEBase> fe(FEBase::build(elem->dim(), fe_type));
3782 
3783  // references to the quadrature points and weights
3784  const std::vector<Real> & JxW = fe->get_JxW();
3785  const std::vector<Point> & q_points = fe->get_xyz();
3786 
3787  // The default quadrature rule should integrate the mass matrix,
3788  // thus it should be plenty to compute the volume
3789  QGauss qrule(elem->dim(), fe_type.default_quadrature_order());
3790  fe->attach_quadrature_rule(&qrule);
3791  fe->reinit(elem);
3792 
3793  // perform a sanity check to ensure that size of quad rule and size of q_points is
3794  // identical
3795  mooseAssert(qrule.n_points() == q_points.size(),
3796  "The number of points in the quadrature rule doesn't match the number of passed-in "
3797  "points in Assembly::setCoordinateTransformation");
3798 
3799  // compute the coordinate transformation
3800  Real vol = 0;
3801  for (unsigned int qp = 0; qp < qrule.n_points(); ++qp)
3802  {
3803  Real coord;
3804  coordTransformFactor(_subproblem, elem->subdomain_id(), q_points[qp], coord);
3805  vol += JxW[qp] * coord;
3806  }
3807  return vol;
3808 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
LAGRANGE
void coordTransformFactor(const SubProblem &s, const SubdomainID sub_id, const P &point, C &factor, const SubdomainID neighbor_sub_id)
Computes a conversion multiplier for use when computing integraals for the current coordinate system ...
Definition: Assembly.C:39
SubProblem & _subproblem
Definition: Assembly.h:2266
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:240
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ 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 393 of file Assembly.h.

Referenced by FVElementalKernel::computeJacobian(), FVScalarLagrangeMultiplierConstraint::computeOffDiagJacobian(), FVScalarLagrangeMultiplierConstraint::computeResidual(), FVElementalKernel::computeResidual(), FVScalarLagrangeMultiplierConstraint::computeResidualAndJacobian(), and FVElementalKernel::computeResidualAndJacobian().

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

◆ extraElemID()

const dof_id_type& Assembly::extraElemID ( unsigned int  id) const
inline

Returns an integer ID of the current element given the index associated with the integer.

Definition at line 331 of file Assembly.h.

332  {
333  mooseAssert(id < _extra_elem_ids.size(), "An invalid extra element integer id");
334  return _extra_elem_ids[id];
335  }
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2490

◆ extraElemIDNeighbor()

const dof_id_type& Assembly::extraElemIDNeighbor ( unsigned int  id) const
inline

Returns an integer ID of the current element given the index associated with the integer.

Definition at line 340 of file Assembly.h.

341  {
342  mooseAssert(id < _neighbor_extra_elem_ids.size(), "An invalid extra element integer id");
343  return _neighbor_extra_elem_ids[id];
344  }
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition: Assembly.h:2492

◆ feADGradPhi() [1/2]

template<typename OutputType >
const ADTemplateVariablePhiGradient<OutputType>& Assembly::feADGradPhi ( FEType  type) const
inline

Definition at line 1582 of file Assembly.h.

1583  {
1584  return _ad_grad_phi_data[type];
1585  }
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2733

◆ feADGradPhi() [2/2]

template<>
const ADTemplateVariablePhiGradient<RealVectorValue>& Assembly::feADGradPhi ( FEType  type) const
inline

Definition at line 2891 of file Assembly.h.

2892 {
2893  return _ad_vector_grad_phi_data[type];
2894 }
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2734

◆ feADGradPhiFace() [1/2]

template<typename OutputType >
const ADTemplateVariablePhiGradient<OutputType>& Assembly::feADGradPhiFace ( FEType  type) const
inline

Definition at line 1623 of file Assembly.h.

1624  {
1625  return _ad_grad_phi_data_face[type];
1626  }
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition: Assembly.h:2735

◆ feADGradPhiFace() [2/2]

template<>
const ADTemplateVariablePhiGradient<RealVectorValue>& Assembly::feADGradPhiFace ( FEType  type) const
inline

Definition at line 2898 of file Assembly.h.

2899 {
2900  return _ad_vector_grad_phi_data_face[type];
2901 }
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition: Assembly.h:2737

◆ feCurlPhi() [1/3]

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

Definition at line 1683 of file Assembly.h.

1684  {
1685  _need_curl[type] = true;
1686  buildFE(type);
1687  return _fe_shape_data[type]->_curl_phi;
1688  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:264
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2718
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ feCurlPhi() [2/3]

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

◆ feCurlPhi() [3/3]

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

Definition at line 4717 of file Assembly.C.

4718 {
4719  _need_curl[type] = true;
4720  buildVectorFE(type);
4721  return _vector_fe_shape_data[type]->_curl_phi;
4722 }
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:451
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:2726
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ feCurlPhiFace() [1/3]

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

Definition at line 1691 of file Assembly.h.

1692  {
1693  _need_curl[type] = true;
1694  buildFaceFE(type);
1695  return _fe_shape_data_face[type]->_curl_phi;
1696  }
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:290
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ feCurlPhiFace() [2/3]

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

◆ feCurlPhiFace() [3/3]

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

Definition at line 4726 of file Assembly.C.

4727 {
4728  _need_curl[type] = true;
4729  buildVectorFaceFE(type);
4730  return _vector_fe_shape_data_face[type]->_curl_phi;
4731 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:484
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ feCurlPhiFaceNeighbor() [1/3]

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

Definition at line 1707 of file Assembly.h.

1708  {
1709  _need_curl[type] = true;
1710  buildFaceNeighborFE(type);
1711  return _fe_shape_data_face_neighbor[type]->_curl_phi;
1712  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2721
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:334
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ feCurlPhiFaceNeighbor() [2/3]

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

◆ feCurlPhiFaceNeighbor() [3/3]

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

Definition at line 4744 of file Assembly.C.

4745 {
4746  _need_curl[type] = true;
4748  return _vector_fe_shape_data_face_neighbor[type]->_curl_phi;
4749 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2729
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:542
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ feCurlPhiNeighbor() [1/3]

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

Definition at line 1699 of file Assembly.h.

1700  {
1701  _need_curl[type] = true;
1702  buildNeighborFE(type);
1703  return _fe_shape_data_neighbor[type]->_curl_phi;
1704  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:312
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2720
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ feCurlPhiNeighbor() [2/3]

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

◆ feCurlPhiNeighbor() [3/3]

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

Definition at line 4735 of file Assembly.C.

4736 {
4737  _need_curl[type] = true;
4738  buildVectorNeighborFE(type);
4739  return _vector_fe_shape_data_neighbor[type]->_curl_phi;
4740 }
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:513
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2728
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ feDivPhi() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiDivergence& Assembly::feDivPhi ( FEType  type) const
inline

Definition at line 1715 of file Assembly.h.

1716  {
1717  _need_div[type] = true;
1718  buildFE(type);
1719  return _fe_shape_data[type]->_div_phi;
1720  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:264
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2718
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821

◆ feDivPhi() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiDivergence& Assembly::feDivPhi ( FEType  type) const

◆ feDivPhi() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiDivergence& Assembly::feDivPhi ( FEType  type) const

Definition at line 4753 of file Assembly.C.

4754 {
4755  _need_div[type] = true;
4756  buildVectorFE(type);
4757  return _vector_fe_shape_data[type]->_div_phi;
4758 }
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:451
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:2726

◆ feDivPhiFace() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiDivergence& Assembly::feDivPhiFace ( FEType  type) const
inline

Definition at line 1723 of file Assembly.h.

1724  {
1725  _need_div[type] = true;
1726  buildFaceFE(type);
1727  return _fe_shape_data_face[type]->_div_phi;
1728  }
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:290
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719

◆ feDivPhiFace() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiDivergence& Assembly::feDivPhiFace ( FEType  type) const

◆ feDivPhiFace() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiDivergence& Assembly::feDivPhiFace ( FEType  type) const

Definition at line 4762 of file Assembly.C.

4763 {
4764  _need_div[type] = true;
4765  buildVectorFaceFE(type);
4766  return _vector_fe_shape_data_face[type]->_div_phi;
4767 }
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:484

◆ feDivPhiFaceNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiDivergence& Assembly::feDivPhiFaceNeighbor ( FEType  type) const
inline

Definition at line 1741 of file Assembly.h.

1742  {
1743  _need_div[type] = true;
1744  buildFaceNeighborFE(type);
1745  return _fe_shape_data_face_neighbor[type]->_div_phi;
1746  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2721
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:334

◆ feDivPhiFaceNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiDivergence& Assembly::feDivPhiFaceNeighbor ( FEType  type) const

◆ feDivPhiFaceNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiDivergence& Assembly::feDivPhiFaceNeighbor ( FEType  type) const

Definition at line 4780 of file Assembly.C.

4781 {
4782  _need_div[type] = true;
4784  return _vector_fe_shape_data_face_neighbor[type]->_div_phi;
4785 }
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2729
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:542

◆ feDivPhiNeighbor() [1/3]

template<typename OutputType >
const OutputTools<OutputType>::VariablePhiDivergence& Assembly::feDivPhiNeighbor ( FEType  type) const
inline

Definition at line 1732 of file Assembly.h.

1733  {
1734  _need_div[type] = true;
1735  buildNeighborFE(type);
1736  return _fe_shape_data_neighbor[type]->_div_phi;
1737  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:312
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2720

◆ feDivPhiNeighbor() [2/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiDivergence& Assembly::feDivPhiNeighbor ( FEType  type) const

◆ feDivPhiNeighbor() [3/3]

template<>
const OutputTools<VectorValue<Real> >::VariablePhiDivergence& Assembly::feDivPhiNeighbor ( FEType  type) const

Definition at line 4771 of file Assembly.C.

4772 {
4773  _need_div[type] = true;
4774  buildVectorNeighborFE(type);
4775  return _vector_fe_shape_data_neighbor[type]->_div_phi;
4776 }
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:513
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2728

◆ feDualPhiLower() [1/3]

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

Definition at line 2867 of file Assembly.h.

2868 {
2869  buildLowerDDualFE(type);
2870  return _fe_shape_data_dual_lower[type]->_phi;
2871 }
void buildLowerDDualFE(FEType type) const
Definition: Assembly.C:380
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition: Assembly.h:2723

◆ feDualPhiLower() [2/3]

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

◆ feDualPhiLower() [3/3]

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

Definition at line 4618 of file Assembly.C.

4619 {
4621  return _vector_fe_shape_data_dual_lower[type]->_phi;
4622 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
Definition: Assembly.h:2731
void buildVectorDualLowerDFE(FEType type) const
Definition: Assembly.C:426

◆ feGradDualPhiLower() [1/3]

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

Definition at line 2883 of file Assembly.h.

2884 {
2885  buildLowerDDualFE(type);
2886  return _fe_shape_data_dual_lower[type]->_grad_phi;
2887 }
void buildLowerDDualFE(FEType type) const
Definition: Assembly.C:380
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition: Assembly.h:2723

◆ feGradDualPhiLower() [2/3]

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

◆ feGradDualPhiLower() [3/3]

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

Definition at line 4634 of file Assembly.C.

4635 {
4637  return _vector_fe_shape_data_dual_lower[type]->_grad_phi;
4638 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
Definition: Assembly.h:2731
void buildVectorDualLowerDFE(FEType type) const
Definition: Assembly.C:426

◆ feGradPhi() [1/3]

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

Definition at line 1575 of file Assembly.h.

1576  {
1577  buildFE(type);
1578  return _fe_shape_data[type]->_grad_phi;
1579  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:264
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2718

◆ feGradPhi() [2/3]

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

◆ feGradPhi() [3/3]

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

Definition at line 4593 of file Assembly.C.

4594 {
4595  buildVectorFE(type);
4596  return _vector_fe_shape_data[type]->_grad_phi;
4597 }
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:451
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:2726

◆ feGradPhiFace() [1/3]

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

Definition at line 1616 of file Assembly.h.

1617  {
1618  buildFaceFE(type);
1619  return _fe_shape_data_face[type]->_grad_phi;
1620  }
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:290
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719

◆ feGradPhiFace() [2/3]

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

◆ feGradPhiFace() [3/3]

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

Definition at line 4650 of file Assembly.C.

4651 {
4652  buildVectorFaceFE(type);
4653  return _vector_fe_shape_data_face[type]->_grad_phi;
4654 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:484

◆ feGradPhiFaceNeighbor() [1/3]

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

Definition at line 1667 of file Assembly.h.

1668  {
1669  buildFaceNeighborFE(type);
1670  return _fe_shape_data_face_neighbor[type]->_grad_phi;
1671  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2721
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:334

◆ feGradPhiFaceNeighbor() [2/3]

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

◆ feGradPhiFaceNeighbor() [3/3]

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

Definition at line 4700 of file Assembly.C.

4701 {
4703  return _vector_fe_shape_data_face_neighbor[type]->_grad_phi;
4704 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2729
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:542

◆ feGradPhiLower() [1/3]

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

Definition at line 2875 of file Assembly.h.

2876 {
2877  buildLowerDFE(type);
2878  return _fe_shape_data_lower[type]->_grad_phi;
2879 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition: Assembly.h:2722
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition: Assembly.C:356

◆ feGradPhiLower() [2/3]

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

◆ feGradPhiLower() [3/3]

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

Definition at line 4626 of file Assembly.C.

4627 {
4628  buildVectorLowerDFE(type);
4629  return _vector_fe_shape_data_lower[type]->_grad_phi;
4630 }
void buildVectorLowerDFE(FEType type) const
Build Vector FEs for a lower dimensional element with a type.
Definition: Assembly.C:401
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
Definition: Assembly.h:2730

◆ feGradPhiNeighbor() [1/3]

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

Definition at line 1644 of file Assembly.h.

1645  {
1646  buildNeighborFE(type);
1647  return _fe_shape_data_neighbor[type]->_grad_phi;
1648  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:312
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2720

◆ feGradPhiNeighbor() [2/3]

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

◆ feGradPhiNeighbor() [3/3]

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

Definition at line 4675 of file Assembly.C.

4676 {
4677  buildVectorNeighborFE(type);
4678  return _vector_fe_shape_data_neighbor[type]->_grad_phi;
4679 }
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:513
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2728

◆ fePhi() [1/3]

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

Definition at line 1568 of file Assembly.h.

1569  {
1570  buildFE(type);
1571  return _fe_shape_data[type]->_phi;
1572  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:264
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2718

◆ fePhi() [2/3]

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

◆ fePhi() [3/3]

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

Definition at line 4585 of file Assembly.C.

4586 {
4587  buildVectorFE(type);
4588  return _vector_fe_shape_data[type]->_phi;
4589 }
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:451
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:2726

◆ fePhiFace() [1/3]

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

Definition at line 1609 of file Assembly.h.

1610  {
1611  buildFaceFE(type);
1612  return _fe_shape_data_face[type]->_phi;
1613  }
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:290
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719

◆ fePhiFace() [2/3]

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

◆ fePhiFace() [3/3]

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

Definition at line 4642 of file Assembly.C.

4643 {
4644  buildVectorFaceFE(type);
4645  return _vector_fe_shape_data_face[type]->_phi;
4646 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:484

◆ fePhiFaceNeighbor() [1/3]

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

Definition at line 1659 of file Assembly.h.

1660  {
1661  buildFaceNeighborFE(type);
1662  return _fe_shape_data_face_neighbor[type]->_phi;
1663  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2721
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:334

◆ fePhiFaceNeighbor() [2/3]

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

◆ fePhiFaceNeighbor() [3/3]

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

Definition at line 4692 of file Assembly.C.

4693 {
4695  return _vector_fe_shape_data_face_neighbor[type]->_phi;
4696 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2729
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:542

◆ fePhiLower() [1/3]

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

Definition at line 2859 of file Assembly.h.

2860 {
2861  buildLowerDFE(type);
2862  return _fe_shape_data_lower[type]->_phi;
2863 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition: Assembly.h:2722
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition: Assembly.C:356

◆ fePhiLower() [2/3]

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

◆ fePhiLower() [3/3]

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

Definition at line 4610 of file Assembly.C.

4611 {
4612  buildVectorLowerDFE(type);
4613  return _vector_fe_shape_data_lower[type]->_phi;
4614 }
void buildVectorLowerDFE(FEType type) const
Build Vector FEs for a lower dimensional element with a type.
Definition: Assembly.C:401
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
Definition: Assembly.h:2730

◆ fePhiNeighbor() [1/3]

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

Definition at line 1637 of file Assembly.h.

1638  {
1639  buildNeighborFE(type);
1640  return _fe_shape_data_neighbor[type]->_phi;
1641  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:312
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2720

◆ fePhiNeighbor() [2/3]

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

◆ fePhiNeighbor() [3/3]

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

Definition at line 4667 of file Assembly.C.

4668 {
4669  buildVectorNeighborFE(type);
4670  return _vector_fe_shape_data_neighbor[type]->_phi;
4671 }
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:513
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2728

◆ feSecondPhi() [1/3]

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

Definition at line 1588 of file Assembly.h.

1589  {
1590  _need_second_derivative[type] = true;
1591  buildFE(type);
1592  return _fe_shape_data[type]->_second_phi;
1593  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:264
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2718
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818

◆ feSecondPhi() [2/3]

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

◆ feSecondPhi() [3/3]

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

Definition at line 4601 of file Assembly.C.

4602 {
4603  _need_second_derivative[type] = true;
4604  buildVectorFE(type);
4605  return _vector_fe_shape_data[type]->_second_phi;
4606 }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:451
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:2726

◆ feSecondPhiFace() [1/3]

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

Definition at line 1629 of file Assembly.h.

1630  {
1631  _need_second_derivative[type] = true;
1632  buildFaceFE(type);
1633  return _fe_shape_data_face[type]->_second_phi;
1634  }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:290
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719

◆ feSecondPhiFace() [2/3]

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

◆ feSecondPhiFace() [3/3]

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

Definition at line 4658 of file Assembly.C.

4659 {
4660  _need_second_derivative[type] = true;
4661  buildVectorFaceFE(type);
4662  return _vector_fe_shape_data_face[type]->_second_phi;
4663 }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:484

◆ feSecondPhiFaceNeighbor() [1/3]

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

Definition at line 1675 of file Assembly.h.

1676  {
1677  _need_second_derivative_neighbor[type] = true;
1678  buildFaceNeighborFE(type);
1679  return _fe_shape_data_face_neighbor[type]->_second_phi;
1680  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2721
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:334

◆ feSecondPhiFaceNeighbor() [2/3]

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

◆ feSecondPhiFaceNeighbor() [3/3]

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

Definition at line 4708 of file Assembly.C.

4709 {
4710  _need_second_derivative_neighbor[type] = true;
4712  return _vector_fe_shape_data_face_neighbor[type]->_second_phi;
4713 }
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2729
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:542

◆ feSecondPhiNeighbor() [1/3]

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

Definition at line 1651 of file Assembly.h.

1652  {
1653  _need_second_derivative_neighbor[type] = true;
1654  buildNeighborFE(type);
1655  return _fe_shape_data_neighbor[type]->_second_phi;
1656  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:312
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2720
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819

◆ feSecondPhiNeighbor() [2/3]

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

◆ feSecondPhiNeighbor() [3/3]

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

Definition at line 4683 of file Assembly.C.

4684 {
4685  _need_second_derivative_neighbor[type] = true;
4686  buildVectorNeighborFE(type);
4687  return _vector_fe_shape_data_neighbor[type]->_second_phi;
4688 }
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:513
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2728

◆ fieldScalarCouplingEntries()

const std::vector<std::pair<MooseVariableFieldBase *, MooseVariableScalar *> >& Assembly::fieldScalarCouplingEntries ( ) const
inline

Definition at line 1258 of file Assembly.h.

1259  {
1260  return _cm_fs_entry;
1261  }
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:2286

◆ genericQPoints() [1/3]

template<bool is_ad>
const MooseArray<MooseADWrapper<Point, is_ad> >& Assembly::genericQPoints ( ) const

◆ genericQPoints() [2/3]

template<>
const MooseArray<MooseADWrapper<Point, false> >& Assembly::genericQPoints ( ) const

Definition at line 4950 of file Assembly.C.

4951 {
4952  return qPoints();
4953 }
const MooseArray< Point > & qPoints() const
Returns the reference to the quadrature points.
Definition: Assembly.h:222

◆ genericQPoints() [3/3]

template<>
const MooseArray<MooseADWrapper<Point, true> >& Assembly::genericQPoints ( ) const

Definition at line 4957 of file Assembly.C.

4958 {
4959  return adQPoints();
4960 }
const MooseArray< ADPoint > & adQPoints() const
Definition: Assembly.h:348

◆ getFE()

const FEBase* const& Assembly::getFE ( FEType  type,
unsigned int  dim 
) const
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 PointVariableSamplerBase::initialize(), and MooseVariableData< OutputType >::MooseVariableData().

117  {
118  buildFE(type);
119  return constify_ref(_fe[dim][type]);
120  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:264
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2355

◆ getFEFace()

const FEBase* const& Assembly::getFEFace ( FEType  type,
unsigned int  dim 
) const
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 constify_ref(_fe_face[dim][type]);
144  }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:290

◆ getFEFaceNeighbor()

const FEBase* const& Assembly::getFEFaceNeighbor ( FEType  type,
unsigned int  dim 
) const
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  {
154  buildFaceNeighborFE(type);
155  return constify_ref(_fe_face_neighbor[dim][type]);
156  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:334
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2500

◆ getFENeighbor()

const FEBase* const& Assembly::getFENeighbor ( FEType  type,
unsigned int  dim 
) const
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  {
130  buildNeighborFE(type);
131  return constify_ref(_fe_neighbor[dim][type]);
132  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:312
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2499

◆ getJacobianDiagonal()

DenseVector<Real> Assembly::getJacobianDiagonal ( DenseMatrix< Number > &  ke)
inline

Definition at line 1840 of file Assembly.h.

Referenced by ArrayDGKernel::computeElemNeighJacobian(), Kernel::computeJacobian(), ArrayKernel::computeJacobian(), EigenKernel::computeJacobian(), ArrayIntegratedBC::computeJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), ArrayKernel::computeOffDiagJacobian(), and ArrayIntegratedBC::computeOffDiagJacobian().

1841  {
1842  unsigned int rows = ke.m();
1843  unsigned int cols = ke.n();
1844  DenseVector<Real> diag(rows);
1845  for (unsigned int i = 0; i < rows; i++)
1846  // % operation is needed to account for cases of no component coupling of array variables
1847  diag(i) = ke(i, i % cols);
1848  return diag;
1849  }
unsigned int m() const
unsigned int n() const

◆ getVectorFE()

const FEVectorBase* const& Assembly::getVectorFE ( FEType  type,
unsigned int  dim 
) const
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 MooseVariableData< OutputType >::MooseVariableData().

165  {
166  buildVectorFE(type);
167  return constify_ref(_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:2357
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:451

◆ getVectorFEFace()

const FEVectorBase* const& Assembly::getVectorFEFace ( FEType  type,
unsigned int  dim 
) const
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  {
190  buildVectorFaceFE(type);
191  return constify_ref(_vector_fe_face[dim][type]);
192  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2469
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:484

◆ getVectorFEFaceNeighbor()

const FEVectorBase* const& Assembly::getVectorFEFaceNeighbor ( FEType  type,
unsigned int  dim 
) const
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  {
204  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2502
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:542

◆ getVectorFENeighbor()

const FEVectorBase* const& Assembly::getVectorFENeighbor ( FEType  type,
unsigned int  dim 
) const
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  {
178  buildVectorNeighborFE(type);
179  return constify_ref(_vector_fe_neighbor[dim][type]);
180  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:513
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2501

◆ gradPhi() [1/6]

const VariablePhiGradient& Assembly::gradPhi ( ) const
inline

Definition at line 1276 of file Assembly.h.

Referenced by copyShapes().

1276 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:2657

◆ gradPhi() [2/6]

const VariablePhiGradient& Assembly::gradPhi ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1277 of file Assembly.h.

1277 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:2657

◆ gradPhi() [3/6]

const VectorVariablePhiGradient& Assembly::gradPhi ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1326 of file Assembly.h.

1327  {
1328  return _vector_grad_phi;
1329  }
VectorVariablePhiGradient _vector_grad_phi
Definition: Assembly.h:2674

◆ gradPhi() [4/6]

VariablePhiGradient& Assembly::gradPhi ( const MooseVariableField< Real > &  )
inline

Definition at line 1415 of file Assembly.h.

1415 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:2657

◆ gradPhi() [5/6]

VectorVariablePhiGradient& Assembly::gradPhi ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1447 of file Assembly.h.

1448  {
1449  return _vector_grad_phi;
1450  }
VectorVariablePhiGradient _vector_grad_phi
Definition: Assembly.h:2674

◆ gradPhi() [6/6]

VariablePhiGradient& Assembly::gradPhi ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1528 of file Assembly.h.

1528 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:2657

◆ gradPhiFace() [1/6]

const VariablePhiGradient& Assembly::gradPhiFace ( ) const
inline

Definition at line 1286 of file Assembly.h.

Referenced by copyFaceShapes().

1286 { return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2661

◆ gradPhiFace() [2/6]

const VariablePhiGradient& Assembly::gradPhiFace ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1287 of file Assembly.h.

1288  {
1289  return _grad_phi_face;
1290  }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2661

◆ gradPhiFace() [3/6]

const VectorVariablePhiGradient& Assembly::gradPhiFace ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1347 of file Assembly.h.

1348  {
1349  return _vector_grad_phi_face;
1350  }
VectorVariablePhiGradient _vector_grad_phi_face
Definition: Assembly.h:2680

◆ gradPhiFace() [4/6]

VariablePhiGradient& Assembly::gradPhiFace ( const MooseVariableField< Real > &  )
inline

Definition at line 1419 of file Assembly.h.

1419 { return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2661

◆ gradPhiFace() [5/6]

VectorVariablePhiGradient& Assembly::gradPhiFace ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1468 of file Assembly.h.

1469  {
1470  return _vector_grad_phi_face;
1471  }
VectorVariablePhiGradient _vector_grad_phi_face
Definition: Assembly.h:2680

◆ gradPhiFace() [6/6]

VariablePhiGradient& Assembly::gradPhiFace ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1532 of file Assembly.h.

1533  {
1534  return _grad_phi_face;
1535  }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2661

◆ gradPhiFaceNeighbor() [1/5]

const VariablePhiGradient& Assembly::gradPhiFaceNeighbor ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1313 of file Assembly.h.

Referenced by copyNeighborShapes().

1314  {
1315  return _grad_phi_face_neighbor;
1316  }
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:2669

◆ gradPhiFaceNeighbor() [2/5]

const VectorVariablePhiGradient& Assembly::gradPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1393 of file Assembly.h.

1394  {
1396  }
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition: Assembly.h:2692

◆ gradPhiFaceNeighbor() [3/5]

VariablePhiGradient& Assembly::gradPhiFaceNeighbor ( const MooseVariableField< Real > &  )
inline

Definition at line 1436 of file Assembly.h.

1437  {
1438  return _grad_phi_face_neighbor;
1439  }
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:2669

◆ gradPhiFaceNeighbor() [4/5]

VectorVariablePhiGradient& Assembly::gradPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1509 of file Assembly.h.

1510  {
1512  }
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition: Assembly.h:2692

◆ gradPhiFaceNeighbor() [5/5]

VariablePhiGradient& Assembly::gradPhiFaceNeighbor ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1558 of file Assembly.h.

1559  {
1560  return _grad_phi_face_neighbor;
1561  }
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:2669

◆ gradPhiNeighbor() [1/5]

const VariablePhiGradient& Assembly::gradPhiNeighbor ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1300 of file Assembly.h.

Referenced by copyNeighborShapes().

1301  {
1302  return _grad_phi_neighbor;
1303  }
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:2665

◆ gradPhiNeighbor() [2/5]

const VectorVariablePhiGradient& Assembly::gradPhiNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1369 of file Assembly.h.

1370  {
1372  }
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition: Assembly.h:2686

◆ gradPhiNeighbor() [3/5]

VariablePhiGradient& Assembly::gradPhiNeighbor ( const MooseVariableField< Real > &  )
inline

Definition at line 1423 of file Assembly.h.

1424  {
1425  return _grad_phi_neighbor;
1426  }
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:2665

◆ gradPhiNeighbor() [4/5]

VectorVariablePhiGradient& Assembly::gradPhiNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1489 of file Assembly.h.

1490  {
1492  }
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition: Assembly.h:2686

◆ gradPhiNeighbor() [5/5]

VariablePhiGradient& Assembly::gradPhiNeighbor ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1545 of file Assembly.h.

1546  {
1547  return _grad_phi_neighbor;
1548  }
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:2665

◆ hasScalingVector()

void Assembly::hasScalingVector ( )

signals this object that a vector containing variable scaling factors should be used when doing residual and matrix assembly

Definition at line 4568 of file Assembly.C.

Referenced by SubProblem::hasScalingVector().

4569 {
4570  _scaling_vector = &_sys.getVector("scaling_factors");
4571 }
SystemBase & _sys
Definition: Assembly.h:2265
const NumericVector< Real > * _scaling_vector
The map from global index to variable scaling factor.
Definition: Assembly.h:2824
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:882

◆ havePRefinement()

void Assembly::havePRefinement ( const std::vector< FEFamily > &  disable_p_refinement_for_families)

Indicate that we have p-refinement.

This method will perform the following tasks:

  • Disable p-refinement as requested by the user with disable_p_refinement_for_families -.Disable p-refinement of Lagrange helper types that we use for getting things like the physical locations of quadrature points and JxW. (Don't worry, we still use the element p-level when initializing the quadrature rule attached to the Lagrange helper so the number of quadrature points reflects the element p-level)
    Parameters
    disable_p_refinement_for_familiesFamilies that we should disable p-refinement for

Definition at line 4834 of file Assembly.C.

Referenced by SubProblem::doingPRefinement().

4835 {
4836  if (_have_p_refinement)
4837  // Already performed tasks for p-refinement
4838  return;
4839 
4840  const std::unordered_set<FEFamily> disable_families(disable_p_refinement_for_families.begin(),
4841  disable_p_refinement_for_families.end());
4842 
4843  const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
4844  const FEType helper_type(helper_order, LAGRANGE);
4845  auto process_fe =
4846  [&disable_families](const unsigned int num_dimensionalities, auto & fe_container)
4847  {
4848  if (!disable_families.empty())
4849  for (const auto dim : make_range(num_dimensionalities))
4850  {
4851  auto fe_container_it = fe_container.find(dim);
4852  if (fe_container_it != fe_container.end())
4853  for (auto & [fe_type, fe_ptr] : fe_container_it->second)
4854  if (disable_families.count(fe_type.family))
4855  fe_ptr->add_p_level_in_reinit(false);
4856  }
4857  };
4858  auto process_fe_and_helpers = [process_fe, &helper_type](auto & unique_helper_container,
4859  auto & helper_container,
4860  const unsigned int num_dimensionalities,
4861  const bool user_added_helper_type,
4862  auto & fe_container)
4863  {
4864  unique_helper_container.resize(num_dimensionalities);
4865  for (const auto dim : make_range(num_dimensionalities))
4866  {
4867  auto & unique_helper = unique_helper_container[dim];
4868  unique_helper = FEGenericBase<Real>::build(dim, helper_type);
4869  // don't participate in p-refinement
4870  unique_helper->add_p_level_in_reinit(false);
4871  helper_container[dim] = unique_helper.get();
4872 
4873  // If the user did not request the helper type then we should erase it from our FE container
4874  // so that they're not penalized (in the "we should be able to do p-refinement sense") for
4875  // our perhaps silly helpers
4876  if (!user_added_helper_type)
4877  {
4878  auto & fe_container_dim = libmesh_map_find(fe_container, dim);
4879  auto fe_it = fe_container_dim.find(helper_type);
4880  mooseAssert(fe_it != fe_container_dim.end(), "We should have the helper type");
4881  delete fe_it->second;
4882  fe_container_dim.erase(fe_it);
4883  }
4884  }
4885 
4886  process_fe(num_dimensionalities, fe_container);
4887  };
4888 
4889  // Handle scalar field families
4890  process_fe_and_helpers(_unique_fe_helper,
4892  _mesh_dimension + 1,
4894  _fe);
4895  process_fe_and_helpers(_unique_fe_face_helper,
4897  _mesh_dimension + 1,
4899  _fe_face);
4900  process_fe_and_helpers(_unique_fe_face_neighbor_helper,
4902  _mesh_dimension + 1,
4905  process_fe_and_helpers(_unique_fe_neighbor_helper,
4907  _mesh_dimension + 1,
4909  _fe_neighbor);
4910  process_fe_and_helpers(_unique_fe_lower_helper,
4914  _fe_lower);
4915  // Handle vector field families
4916  process_fe(_mesh_dimension + 1, _vector_fe);
4917  process_fe(_mesh_dimension + 1, _vector_fe_face);
4918  process_fe(_mesh_dimension + 1, _vector_fe_neighbor);
4919  process_fe(_mesh_dimension + 1, _vector_fe_face_neighbor);
4920  process_fe(_mesh_dimension, _vector_fe_lower);
4921 
4923 
4924  _have_p_refinement = true;
4925 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
bool _user_added_fe_lower_of_helper_type
Definition: Assembly.h:2318
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition: Assembly.h:2326
Order
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2357
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2505
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
Definition: Assembly.h:2325
bool _user_added_fe_face_neighbor_of_helper_type
Definition: Assembly.h:2316
bool _have_p_refinement
Whether we have ever conducted p-refinement.
Definition: Assembly.h:2851
FIRST
MooseMesh & _mesh
Definition: Assembly.h:2305
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2506
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2323
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2502
std::vector< std::unique_ptr< FEBase > > _unique_fe_helper
Containers for holding unique FE helper types if we are doing p-refinement.
Definition: Assembly.h:2322
SECOND
unsigned int _mesh_dimension
Definition: Assembly.h:2307
bool _user_added_fe_neighbor_of_helper_type
Definition: Assembly.h:2317
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2499
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2469
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2509
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:3457
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2355
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2511
bool _user_added_fe_face_of_helper_type
Definition: Assembly.h:2315
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2471
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2501
IntRange< T > make_range(T beg, T end)
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2324
void helpersRequestData()
request phi, dphi, xyz, JxW, etc.
Definition: Assembly.C:4801
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2359
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2500
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
Definition: Assembly.h:2314
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2513

◆ helpersRequestData()

void Assembly::helpersRequestData ( )
private

request phi, dphi, xyz, JxW, etc.

data through the FE helper functions

Definition at line 4801 of file Assembly.C.

Referenced by Assembly(), and havePRefinement().

4802 {
4803  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
4804  {
4805  _holder_fe_helper[dim]->get_phi();
4806  _holder_fe_helper[dim]->get_dphi();
4807  _holder_fe_helper[dim]->get_xyz();
4808  _holder_fe_helper[dim]->get_JxW();
4809 
4810  _holder_fe_face_helper[dim]->get_phi();
4811  _holder_fe_face_helper[dim]->get_dphi();
4812  _holder_fe_face_helper[dim]->get_xyz();
4813  _holder_fe_face_helper[dim]->get_JxW();
4814  _holder_fe_face_helper[dim]->get_normals();
4815 
4818  _holder_fe_face_neighbor_helper[dim]->get_normals();
4819 
4820  _holder_fe_neighbor_helper[dim]->get_xyz();
4821  _holder_fe_neighbor_helper[dim]->get_JxW();
4822  }
4823 
4824  for (unsigned int dim = 0; dim < _mesh_dimension; dim++)
4825  {
4826  // We need these computations in order to compute correct lower-d element volumes in
4827  // curvilinear coordinates
4828  _holder_fe_lower_helper[dim]->get_xyz();
4829  _holder_fe_lower_helper[dim]->get_JxW();
4830  }
4831 }
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2505
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2506
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2471
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2359
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2513

◆ init()

void Assembly::init ( const CouplingMatrix *  cm)

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

Definition at line 2461 of file Assembly.C.

2462 {
2463  _cm = cm;
2464 
2465  unsigned int n_vars = _sys.nVariables();
2466 
2467  _cm_ss_entry.clear();
2468  _cm_sf_entry.clear();
2469  _cm_fs_entry.clear();
2470  _cm_ff_entry.clear();
2471 
2472  auto & vars = _sys.getVariables(_tid);
2473 
2474  _block_diagonal_matrix = true;
2475  for (auto & ivar : vars)
2476  {
2477  auto i = ivar->number();
2478  if (i >= _component_block_diagonal.size())
2479  _component_block_diagonal.resize(i + 1, true);
2480 
2481  auto ivar_start = _cm_ff_entry.size();
2482  for (unsigned int k = 0; k < ivar->count(); ++k)
2483  {
2484  unsigned int iv = i + k;
2485  for (const auto & j : ConstCouplingRow(iv, *_cm))
2486  {
2487  if (_sys.isScalarVariable(j))
2488  {
2489  auto & jvar = _sys.getScalarVariable(_tid, j);
2490  _cm_fs_entry.push_back(std::make_pair(ivar, &jvar));
2491  _block_diagonal_matrix = false;
2492  }
2493  else
2494  {
2495  auto & jvar = _sys.getVariable(_tid, j);
2496  auto pair = std::make_pair(ivar, &jvar);
2497  auto c = ivar_start;
2498  // check if the pair has been pushed or not
2499  bool has_pair = false;
2500  for (; c < _cm_ff_entry.size(); ++c)
2501  if (_cm_ff_entry[c] == pair)
2502  {
2503  has_pair = true;
2504  break;
2505  }
2506  if (!has_pair)
2507  _cm_ff_entry.push_back(pair);
2508  // only set having diagonal matrix to false when ivar and jvar numbers are different
2509  // Note: for array variables, since we save the entire local Jacobian of all components,
2510  // even there are couplings among components of the same array variable, we still
2511  // do not set the flag to false.
2512  if (i != jvar.number())
2513  _block_diagonal_matrix = false;
2514  else if (iv != j)
2515  _component_block_diagonal[i] = false;
2516  }
2517  }
2518  }
2519  }
2520 
2521  auto & scalar_vars = _sys.getScalarVariables(_tid);
2522 
2523  for (auto & ivar : scalar_vars)
2524  {
2525  auto i = ivar->number();
2526  if (i >= _component_block_diagonal.size())
2527  _component_block_diagonal.resize(i + 1, true);
2528 
2529  for (const auto & j : ConstCouplingRow(i, *_cm))
2530  if (_sys.isScalarVariable(j))
2531  {
2532  auto & jvar = _sys.getScalarVariable(_tid, j);
2533  _cm_ss_entry.push_back(std::make_pair(ivar, &jvar));
2534  }
2535  else
2536  {
2537  auto & jvar = _sys.getVariable(_tid, j);
2538  _cm_sf_entry.push_back(std::make_pair(ivar, &jvar));
2539  }
2540  }
2541 
2542  if (_block_diagonal_matrix && scalar_vars.size() != 0)
2543  _block_diagonal_matrix = false;
2544 
2545  auto num_vector_tags = _residual_vector_tags.size();
2546 
2547  _sub_Re.resize(num_vector_tags);
2548  _sub_Rn.resize(num_vector_tags);
2549  _sub_Rl.resize(num_vector_tags);
2550  for (MooseIndex(_sub_Re) i = 0; i < _sub_Re.size(); i++)
2551  {
2552  _sub_Re[i].resize(n_vars);
2553  _sub_Rn[i].resize(n_vars);
2554  _sub_Rl[i].resize(n_vars);
2555  }
2556 
2557  _cached_residual_values.resize(num_vector_tags);
2558  _cached_residual_rows.resize(num_vector_tags);
2559 
2560  auto num_matrix_tags = _subproblem.numMatrixTags();
2561 
2562  _cached_jacobian_values.resize(num_matrix_tags);
2563  _cached_jacobian_rows.resize(num_matrix_tags);
2564  _cached_jacobian_cols.resize(num_matrix_tags);
2565 
2566  // Element matrices
2567  _sub_Kee.resize(num_matrix_tags);
2568  _sub_Keg.resize(num_matrix_tags);
2569  _sub_Ken.resize(num_matrix_tags);
2570  _sub_Kne.resize(num_matrix_tags);
2571  _sub_Knn.resize(num_matrix_tags);
2572  _sub_Kll.resize(num_matrix_tags);
2573  _sub_Kle.resize(num_matrix_tags);
2574  _sub_Kln.resize(num_matrix_tags);
2575  _sub_Kel.resize(num_matrix_tags);
2576  _sub_Knl.resize(num_matrix_tags);
2577 
2578  _jacobian_block_used.resize(num_matrix_tags);
2579  _jacobian_block_neighbor_used.resize(num_matrix_tags);
2580  _jacobian_block_lower_used.resize(num_matrix_tags);
2581  _jacobian_block_nonlocal_used.resize(num_matrix_tags);
2582 
2583  for (MooseIndex(num_matrix_tags) tag = 0; tag < num_matrix_tags; tag++)
2584  {
2585  _sub_Keg[tag].resize(n_vars);
2586  _sub_Ken[tag].resize(n_vars);
2587  _sub_Kne[tag].resize(n_vars);
2588  _sub_Knn[tag].resize(n_vars);
2589  _sub_Kee[tag].resize(n_vars);
2590  _sub_Kll[tag].resize(n_vars);
2591  _sub_Kle[tag].resize(n_vars);
2592  _sub_Kln[tag].resize(n_vars);
2593  _sub_Kel[tag].resize(n_vars);
2594  _sub_Knl[tag].resize(n_vars);
2595 
2596  _jacobian_block_used[tag].resize(n_vars);
2597  _jacobian_block_neighbor_used[tag].resize(n_vars);
2598  _jacobian_block_lower_used[tag].resize(n_vars);
2599  _jacobian_block_nonlocal_used[tag].resize(n_vars);
2600  for (MooseIndex(n_vars) i = 0; i < n_vars; ++i)
2601  {
2603  {
2604  _sub_Kee[tag][i].resize(n_vars);
2605  _sub_Keg[tag][i].resize(n_vars);
2606  _sub_Ken[tag][i].resize(n_vars);
2607  _sub_Kne[tag][i].resize(n_vars);
2608  _sub_Knn[tag][i].resize(n_vars);
2609  _sub_Kll[tag][i].resize(n_vars);
2610  _sub_Kle[tag][i].resize(n_vars);
2611  _sub_Kln[tag][i].resize(n_vars);
2612  _sub_Kel[tag][i].resize(n_vars);
2613  _sub_Knl[tag][i].resize(n_vars);
2614 
2615  _jacobian_block_used[tag][i].resize(n_vars);
2616  _jacobian_block_neighbor_used[tag][i].resize(n_vars);
2617  _jacobian_block_lower_used[tag][i].resize(n_vars);
2618  _jacobian_block_nonlocal_used[tag][i].resize(n_vars);
2619  }
2620  else
2621  {
2622  _sub_Kee[tag][i].resize(1);
2623  _sub_Keg[tag][i].resize(1);
2624  _sub_Ken[tag][i].resize(1);
2625  _sub_Kne[tag][i].resize(1);
2626  _sub_Knn[tag][i].resize(1);
2627  _sub_Kll[tag][i].resize(1);
2628  _sub_Kle[tag][i].resize(1);
2629  _sub_Kln[tag][i].resize(1);
2630  _sub_Kel[tag][i].resize(1);
2631  _sub_Knl[tag][i].resize(1);
2632 
2633  _jacobian_block_used[tag][i].resize(1);
2634  _jacobian_block_neighbor_used[tag][i].resize(1);
2635  _jacobian_block_lower_used[tag][i].resize(1);
2636  _jacobian_block_nonlocal_used[tag][i].resize(1);
2637  }
2638  }
2639  }
2640 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
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:2754
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:737
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
dlower/dsecondary (or dlower/delement)
Definition: Assembly.h:2644
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
dsecondary/dlower (or delement/dlower)
Definition: Assembly.h:2648
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
dlower/dlower
Definition: Assembly.h:2642
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
dlower/dprimary (or dlower/dneighbor)
Definition: Assembly.h:2646
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2614
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2295
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:2288
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2640
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2759
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
const CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2271
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2636
virtual unsigned int nVariables() const
Get the number of variables in this system.
Definition: SystemBase.C:840
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition: Assembly.h:2290
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition: Assembly.h:2638
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2616
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:2286
unsigned int n_vars
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294
SubProblem & _subproblem
Definition: Assembly.h:2266
const std::vector< VectorTag > & _residual_vector_tags
The residual vector tags that Assembly could possibly contribute to.
Definition: Assembly.h:2748
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition: Assembly.h:2632
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2751
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition: SubProblem.h:210
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a scalar variable with specified number.
Definition: SystemBase.C:134
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
Definition: Assembly.h:2633
virtual bool isScalarVariable(unsigned int var_name) const
Definition: SystemBase.C:834
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
Flag that indicates if the jacobian block for the lower dimensional element was used.
Definition: Assembly.h:2299
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79
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:2297
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2763
bool _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:2768
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
dprimary/dlower (or dneighbor/dlower)
Definition: Assembly.h:2650

◆ initNonlocalCoupling()

void Assembly::initNonlocalCoupling ( )

Create pair of variables requiring nonlocal jacobian contributions.

Definition at line 2643 of file Assembly.C.

Referenced by FEProblemBase::initialSetup().

2644 {
2645  _cm_nonlocal_entry.clear();
2646 
2647  auto & vars = _sys.getVariables(_tid);
2648 
2649  for (auto & ivar : vars)
2650  {
2651  auto i = ivar->number();
2652  auto ivar_start = _cm_nonlocal_entry.size();
2653  for (unsigned int k = 0; k < ivar->count(); ++k)
2654  {
2655  unsigned int iv = i + k;
2656  for (const auto & j : ConstCouplingRow(iv, _nonlocal_cm))
2657  if (!_sys.isScalarVariable(j))
2658  {
2659  auto & jvar = _sys.getVariable(_tid, j);
2660  auto pair = std::make_pair(ivar, &jvar);
2661  auto c = ivar_start;
2662  // check if the pair has been pushed or not
2663  bool has_pair = false;
2664  for (; c < _cm_nonlocal_entry.size(); ++c)
2665  if (_cm_nonlocal_entry[c] == pair)
2666  {
2667  has_pair = true;
2668  break;
2669  }
2670  if (!has_pair)
2671  _cm_nonlocal_entry.push_back(pair);
2672  }
2673  }
2674  }
2675 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
const CouplingMatrix & _nonlocal_cm
Definition: Assembly.h:2272
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2292
virtual bool isScalarVariable(unsigned int var_name) const
Definition: SystemBase.C:834
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79

◆ jacobianBlock()

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

Get local Jacobian block for a pair of variables and a tag.

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 1092 of file Assembly.h.

Referenced by TaggingInterface::accumulateTaggedLocalMatrix(), addJacobianBlock(), addJacobianCoupledVarPair(), cacheJacobianCoupledVarPair(), prepareBlock(), prepareJacobianBlock(), TaggingInterface::prepareMatrixTag(), prepareOffDiagScalar(), prepareScalar(), and prepareVariable().

1093  {
1094  jacobianBlockUsed(tag, ivar, jvar, true);
1095  return _sub_Kee[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
1096  }
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition: Assembly.h:2632
bool _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:2768

◆ jacobianBlockLowerUsed() [1/2]

void Assembly::jacobianBlockLowerUsed ( TagID  tag,
unsigned int  ivar,
unsigned int  jvar,
bool  used 
)
inlineprivate

Sets whether or not lower Jacobian coupling between ivar and jvar is used to the value used.

Definition at line 2228 of file Assembly.h.

Referenced by addJacobianLowerD(), addJacobianNeighborLowerD(), cacheJacobianMortar(), jacobianBlockMortar(), and prepareLowerD().

2229  {
2230  _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2231  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
Flag that indicates if the jacobian block for the lower dimensional element was used.
Definition: Assembly.h:2299
bool _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:2768

◆ jacobianBlockLowerUsed() [2/2]

char Assembly::jacobianBlockLowerUsed ( TagID  tag,
unsigned int  ivar,
unsigned int  jvar 
) const
inlineprivate

Return a flag to indicate if a particular coupling lower Jacobian block between ivar and jvar is used.

Definition at line 2237 of file Assembly.h.

2238  {
2239  return _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2240  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
Flag that indicates if the jacobian block for the lower dimensional element was used.
Definition: Assembly.h:2299
bool _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:2768

◆ jacobianBlockMortar()

DenseMatrix< Number > & Assembly::jacobianBlockMortar ( Moose::ConstraintJacobianType  type,
unsigned int  ivar,
unsigned int  jvar,
LocalDataKey  ,
TagID  tag 
)

Returns the jacobian block for the given mortar Jacobian type.

This jacobian block can involve degrees of freedom from the secondary side interior parent, the primary side interior parent, or the lower-dimensional element (located on the secondary side). Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3149 of file Assembly.C.

Referenced by addJacobianLowerD(), addJacobianNeighborLowerD(), cacheJacobianMortar(), prepareLowerD(), and TaggingInterface::prepareMatrixTagLower().

3154 {
3155  jacobianBlockLowerUsed(tag, ivar, jvar, true);
3157  {
3158  switch (type)
3159  {
3160  default:
3161  case Moose::LowerLower:
3162  return _sub_Kll[tag][ivar][0];
3163  case Moose::LowerSecondary:
3164  return _sub_Kle[tag][ivar][0];
3165  case Moose::LowerPrimary:
3166  return _sub_Kln[tag][ivar][0];
3167  case Moose::SecondaryLower:
3168  return _sub_Kel[tag][ivar][0];
3170  return _sub_Kee[tag][ivar][0];
3172  return _sub_Ken[tag][ivar][0];
3173  case Moose::PrimaryLower:
3174  return _sub_Knl[tag][ivar][0];
3176  return _sub_Kne[tag][ivar][0];
3177  case Moose::PrimaryPrimary:
3178  return _sub_Knn[tag][ivar][0];
3179  }
3180  }
3181  else
3182  {
3183  switch (type)
3184  {
3185  default:
3186  case Moose::LowerLower:
3187  return _sub_Kll[tag][ivar][jvar];
3188  case Moose::LowerSecondary:
3189  return _sub_Kle[tag][ivar][jvar];
3190  case Moose::LowerPrimary:
3191  return _sub_Kln[tag][ivar][jvar];
3192  case Moose::SecondaryLower:
3193  return _sub_Kel[tag][ivar][jvar];
3195  return _sub_Kee[tag][ivar][jvar];
3197  return _sub_Ken[tag][ivar][jvar];
3198  case Moose::PrimaryLower:
3199  return _sub_Knl[tag][ivar][jvar];
3201  return _sub_Kne[tag][ivar][jvar];
3202  case Moose::PrimaryPrimary:
3203  return _sub_Knn[tag][ivar][jvar];
3204  }
3205  }
3206 }
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
dlower/dsecondary (or dlower/delement)
Definition: Assembly.h:2644
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
dsecondary/dlower (or delement/dlower)
Definition: Assembly.h:2648
void jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not lower Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2228
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
dlower/dlower
Definition: Assembly.h:2642
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
dlower/dprimary (or dlower/dneighbor)
Definition: Assembly.h:2646
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2640
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2636
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition: Assembly.h:2638
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition: Assembly.h:2632
bool _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:2768
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
dprimary/dlower (or dneighbor/dlower)
Definition: Assembly.h:2650

◆ jacobianBlockNeighbor()

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

Get local Jacobian block of a DG Jacobian type for a pair of variables and a tag.

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3108 of file Assembly.C.

Referenced by TaggingInterface::accumulateTaggedLocalMatrix(), addJacobianNeighbor(), addJacobianNeighborLowerD(), cacheJacobianNeighbor(), TaggingInterface::prepareMatrixTagNeighbor(), and prepareNeighbor().

3110 {
3111  if (type == Moose::ElementElement)
3112  jacobianBlockUsed(tag, ivar, jvar, true);
3113  else
3114  jacobianBlockNeighborUsed(tag, ivar, jvar, true);
3115 
3117  {
3118  switch (type)
3119  {
3120  default:
3121  case Moose::ElementElement:
3122  return _sub_Kee[tag][ivar][0];
3124  return _sub_Ken[tag][ivar][0];
3126  return _sub_Kne[tag][ivar][0];
3128  return _sub_Knn[tag][ivar][0];
3129  }
3130  }
3131  else
3132  {
3133  switch (type)
3134  {
3135  default:
3136  case Moose::ElementElement:
3137  return _sub_Kee[tag][ivar][jvar];
3139  return _sub_Ken[tag][ivar][jvar];
3141  return _sub_Kne[tag][ivar][jvar];
3143  return _sub_Knn[tag][ivar][jvar];
3144  }
3145  }
3146 }
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2640
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2636
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition: Assembly.h:2638
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition: Assembly.h:2632
void jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not neighbor Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2210
bool _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:2768

◆ jacobianBlockNeighborUsed() [1/2]

void Assembly::jacobianBlockNeighborUsed ( TagID  tag,
unsigned int  ivar,
unsigned int  jvar,
bool  used 
)
inlineprivate

Sets whether or not neighbor Jacobian coupling between ivar and jvar is used to the value used.

Definition at line 2210 of file Assembly.h.

Referenced by addJacobianNeighbor(), addJacobianNeighborLowerD(), cacheJacobianNeighbor(), jacobianBlockNeighbor(), and prepareNeighbor().

2211  {
2212  _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2213  }
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:2297
bool _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:2768

◆ jacobianBlockNeighborUsed() [2/2]

char Assembly::jacobianBlockNeighborUsed ( TagID  tag,
unsigned int  ivar,
unsigned int  jvar 
) const
inlineprivate

Return a flag to indicate if a particular coupling neighbor Jacobian block between ivar and jvar is used.

Definition at line 2219 of file Assembly.h.

2220  {
2221  return _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2222  }
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:2297
bool _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:2768

◆ jacobianBlockNonlocal()

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

Get local Jacobian block from non-local contribution for a pair of variables and a tag.

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 1103 of file Assembly.h.

Referenced by addJacobianBlockNonlocal(), addJacobianNonlocal(), cacheJacobianNonlocal(), prepareBlockNonlocal(), TaggingInterface::prepareMatrixTagNonlocal(), prepareNonlocal(), and prepareVariableNonlocal().

1104  {
1105  jacobianBlockNonlocalUsed(tag, ivar, jvar, true);
1106  return _sub_Keg[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
1107  }
void jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2246
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
Definition: Assembly.h:2633
bool _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:2768

◆ jacobianBlockNonlocalUsed() [1/2]

void Assembly::jacobianBlockNonlocalUsed ( TagID  tag,
unsigned int  ivar,
unsigned int  jvar,
bool  used 
)
inlineprivate

Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used.

Definition at line 2246 of file Assembly.h.

Referenced by addJacobianNonlocal(), cacheJacobianNonlocal(), jacobianBlockNonlocal(), prepareBlockNonlocal(), prepareNonlocal(), and prepareVariableNonlocal().

2247  {
2248  _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2249  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2295
bool _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:2768

◆ jacobianBlockNonlocalUsed() [2/2]

char Assembly::jacobianBlockNonlocalUsed ( TagID  tag,
unsigned int  ivar,
unsigned int  jvar 
) const
inlineprivate

Return a flag to indicate if a particular coupling nonlocal Jacobian block between ivar and jvar is used.

Definition at line 2255 of file Assembly.h.

2256  {
2257  return _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2258  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2295
bool _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:2768

◆ jacobianBlockUsed() [1/2]

void Assembly::jacobianBlockUsed ( TagID  tag,
unsigned int  ivar,
unsigned int  jvar,
bool  used 
)
inlineprivate

Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.

Definition at line 2192 of file Assembly.h.

Referenced by addJacobianCoupledVarPair(), cacheJacobianCoupledVarPair(), jacobianBlock(), jacobianBlockNeighbor(), prepareBlock(), prepareJacobianBlock(), prepareOffDiagScalar(), prepareScalar(), and prepareVariable().

2193  {
2194  _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2195  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294
bool _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:2768

◆ jacobianBlockUsed() [2/2]

char Assembly::jacobianBlockUsed ( TagID  tag,
unsigned int  ivar,
unsigned int  jvar 
) const
inlineprivate

Return a flag to indicate if a particular coupling Jacobian block between ivar and jvar is used.

Definition at line 2201 of file Assembly.h.

2202  {
2203  return _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2204  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294
bool _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:2768

◆ JxW()

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

Returns the reference to the transformed jacobian weights.

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

Definition at line 240 of file Assembly.h.

Referenced by elementVolume(), reinitDual(), reinitLowerDElem(), and reinitNeighbor().

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

◆ JxWFace()

const MooseArray<Real>& Assembly::JxWFace ( ) const
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 304 of file Assembly.h.

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

◆ jxWMortar()

const std::vector<Real>& Assembly::jxWMortar ( ) const
inline

Returns a reference to JxW for mortar segment elements.

Definition at line 657 of file Assembly.h.

Referenced by Moose::Mortar::loopOverMortarSegments().

657 { return *_JxW_msm; }
const std::vector< Real > * _JxW_msm
A JxW for working on mortar segement elements.
Definition: Assembly.h:2532

◆ JxWNeighbor()

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

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 257 of file Assembly.C.

258 {
259  _need_JxW_neighbor = true;
260  return _current_JxW_neighbor;
261 }
MooseArray< Real > _current_JxW_neighbor
The current transformed jacobian weights on a neighbor&#39;s face.
Definition: Assembly.h:2522
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
Definition: Assembly.h:2520

◆ lowerDElem()

const Elem* const& Assembly::lowerDElem ( ) const
inline

Return the lower dimensional element.

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

Definition at line 429 of file Assembly.h.

Referenced by Moose::globalDofIndexToDerivative(), and MooseVariableFE< Real >::MooseVariableFE().

429 { return _current_lower_d_elem; }
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition: Assembly.h:2584

◆ lowerDElemVolume()

const Real & Assembly::lowerDElemVolume ( ) const
inline

Definition at line 3155 of file Assembly.h.

3156 {
3159 }
Real _current_lower_d_elem_volume
The current lower dimensional element volume.
Definition: Assembly.h:2590
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition: Assembly.h:2588

◆ mappedNormals()

const std::vector<Eigen::Map<RealDIMValue> >& Assembly::mappedNormals ( ) const
inline

Definition at line 315 of file Assembly.h.

315 { return _mapped_normals; }
std::vector< Eigen::Map< RealDIMValue > > _mapped_normals
Mapped normals.
Definition: Assembly.h:2485

◆ modifyArbitraryWeights()

void Assembly::modifyArbitraryWeights ( const std::vector< Real > &  weights)

Modify the weights when using the arbitrary quadrature rule.

The intention is to use this when you wish to supply your own quadrature after calling reinit at physical points.

You should only use this if the arbitrary quadrature is the current quadrature rule!

Parameters
weightsThe weights to fill into _current_JxW

Definition at line 4574 of file Assembly.C.

4575 {
4576  mooseAssert(_current_qrule == _current_qrule_arbitrary, "Rule should be arbitrary");
4577  mooseAssert(weights.size() == _current_physical_points.size(), "Size mismatch");
4578 
4579  for (MooseIndex(weights.size()) i = 0; i < weights.size(); ++i)
4580  _current_JxW[i] = weights[i];
4581 }
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2367
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2599
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:256
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2373

◆ modifyFaceWeightsDueToXFEM()

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

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 4547 of file Assembly.C.

Referenced by reinitFEFace().

4548 {
4549  mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
4550 
4552  return;
4553 
4554  MooseArray<Real> xfem_face_weight_multipliers;
4555  if (_xfem->getXFEMFaceWeights(
4556  xfem_face_weight_multipliers, elem, _current_qrule_face, _current_q_points_face, side))
4557  {
4558  mooseAssert(xfem_face_weight_multipliers.size() == _current_JxW_face.size(),
4559  "Size of weight multipliers in xfem doesn't match number of quadrature points");
4560  for (unsigned i = 0; i < xfem_face_weight_multipliers.size(); i++)
4561  _current_JxW_face[i] = _current_JxW_face[i] * xfem_face_weight_multipliers[i];
4562 
4563  xfem_face_weight_multipliers.release();
4564  }
4565 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2367
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2332
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2481
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:256
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:66
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2479
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ modifyWeightsDueToXFEM()

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

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 4527 of file Assembly.C.

Referenced by reinitFE().

4528 {
4529  mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
4530 
4532  return;
4533 
4534  MooseArray<Real> xfem_weight_multipliers;
4535  if (_xfem->getXFEMWeights(xfem_weight_multipliers, elem, _current_qrule, _current_q_points))
4536  {
4537  mooseAssert(xfem_weight_multipliers.size() == _current_JxW.size(),
4538  "Size of weight multipliers in xfem doesn't match number of quadrature points");
4539  for (unsigned i = 0; i < xfem_weight_multipliers.size(); i++)
4540  _current_JxW[i] = _current_JxW[i] * xfem_weight_multipliers[i];
4541 
4542  xfem_weight_multipliers.release();
4543  }
4544 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2367
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2332
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:256
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2373
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:66
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:2371

◆ mortarCoordTransformation()

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

Returns the reference to the coordinate transformation coefficients on the mortar segment mesh.

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

Definition at line 258 of file Assembly.h.

258 { return _coord_msm; }
MooseArray< Real > _coord_msm
The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment m...
Definition: Assembly.h:2527

◆ msmElem()

const Elem* const& Assembly::msmElem ( ) const
inline
Returns
The current mortar segment element

Definition at line 1909 of file Assembly.h.

1909 { return _msm_elem; }
const Elem * _msm_elem
Definition: Assembly.h:2833

◆ needDual()

bool Assembly::needDual ( ) const
inline

Indicates whether dual shape functions are used (computation is now repeated on each element so expense of computing dual shape functions is no longer trivial)

Definition at line 573 of file Assembly.h.

Referenced by Moose::Mortar::loopOverMortarSegments().

573 { return _need_dual; }
bool _need_dual
Whether dual shape functions need to be computed for mortar constraints.
Definition: Assembly.h:2596

◆ neighbor()

const Elem* const& Assembly::neighbor ( ) const
inline

Return the neighbor element.

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

Definition at line 423 of file Assembly.h.

Referenced by Moose::globalDofIndexToDerivative(), MooseVariableFE< Real >::MooseVariableFE(), MooseVariableFV< Real >::MooseVariableFV(), qruleFaceHelper(), reinitElemAndNeighbor(), reinitFEFaceNeighbor(), reinitFENeighbor(), reinitFVFace(), reinitNeighbor(), reinitNeighborAtPhysical(), and reinitNeighborFaceRef().

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

◆ neighborLowerDElem()

const Elem* const& Assembly::neighborLowerDElem ( ) const
inline

Return the neighboring lower dimensional element.

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

Definition at line 435 of file Assembly.h.

const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
Definition: Assembly.h:2586

◆ neighborLowerDElemVolume()

const Real & Assembly::neighborLowerDElemVolume ( ) const
inline

Definition at line 3162 of file Assembly.h.

3163 {
3166 }
Real _current_neighbor_lower_d_elem_volume
The current neighboring lower dimensional element volume.
Definition: Assembly.h:2594
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition: Assembly.h:2592

◆ neighborSide()

const unsigned int& Assembly::neighborSide ( ) const
inline

Returns the current neighboring side.

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

Definition at line 405 of file Assembly.h.

405 { 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:2567

◆ neighborVolume()

const Real& Assembly::neighborVolume ( )
inline

Returns the reference to the current neighbor volume.

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

Definition at line 461 of file Assembly.h.

Referenced by InterfaceKernelBase::getNeighborElemVolume(), InternalSideUserObject::getNeighborElemVolume(), and DGKernelBase::getNeighborElemVolume().

462  {
465  }
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:2571
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:2573

◆ node()

const Node* const& Assembly::node ( ) const
inline

Returns the reference to the node.

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

Definition at line 495 of file Assembly.h.

Referenced by computeFaceMap(), computeSinglePointMapAD(), MooseVariableFE< Real >::MooseVariableFE(), and reinit().

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

◆ nodeNeighbor()

const Node* const& Assembly::nodeNeighbor ( ) const
inline

Returns the reference to the neighboring node.

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

Definition at line 501 of file Assembly.h.

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

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

◆ nonlocalCouplingEntries()

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

Definition at line 1253 of file Assembly.h.

1254  {
1255  return _cm_nonlocal_entry;
1256  }
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2292

◆ normals()

const MooseArray<Point>& Assembly::normals ( ) const
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 310 of file Assembly.h.

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

◆ numExtraElemIntegers()

unsigned int Assembly::numExtraElemIntegers ( ) const
inline

Number of extra element integers Assembly tracked.

Definition at line 326 of file Assembly.h.

Referenced by reinitFE(), reinitFEFace(), and reinitNeighbor().

326 { return _extra_elem_ids.size() - 1; }
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2490

◆ phi() [1/6]

const VariablePhiValue& Assembly::phi ( ) const
inline

Definition at line 1269 of file Assembly.h.

Referenced by copyShapes().

1269 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:2656

◆ phi() [2/6]

const VariablePhiValue& Assembly::phi ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1275 of file Assembly.h.

1275 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:2656

◆ phi() [3/6]

const VectorVariablePhiValue& Assembly::phi ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1322 of file Assembly.h.

1323  {
1324  return _vector_phi;
1325  }
VectorVariablePhiValue _vector_phi
Definition: Assembly.h:2673

◆ phi() [4/6]

VariablePhiValue& Assembly::phi ( const MooseVariableField< Real > &  )
inline

Definition at line 1414 of file Assembly.h.

1414 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:2656

◆ phi() [5/6]

VectorVariablePhiValue& Assembly::phi ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1446 of file Assembly.h.

1446 { return _vector_phi; }
VectorVariablePhiValue _vector_phi
Definition: Assembly.h:2673

◆ phi() [6/6]

VariablePhiValue& Assembly::phi ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1527 of file Assembly.h.

1527 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:2656

◆ phiFace() [1/6]

const VariablePhiValue& Assembly::phiFace ( ) const
inline

Definition at line 1284 of file Assembly.h.

Referenced by copyFaceShapes().

1284 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:2660

◆ phiFace() [2/6]

const VariablePhiValue& Assembly::phiFace ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1285 of file Assembly.h.

1285 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:2660

◆ phiFace() [3/6]

const VectorVariablePhiValue& Assembly::phiFace ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1343 of file Assembly.h.

1344  {
1345  return _vector_phi_face;
1346  }
VectorVariablePhiValue _vector_phi_face
Definition: Assembly.h:2679

◆ phiFace() [4/6]

VariablePhiValue& Assembly::phiFace ( const MooseVariableField< Real > &  )
inline

Definition at line 1418 of file Assembly.h.

1418 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:2660

◆ phiFace() [5/6]

VectorVariablePhiValue& Assembly::phiFace ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1464 of file Assembly.h.

1465  {
1466  return _vector_phi_face;
1467  }
VectorVariablePhiValue _vector_phi_face
Definition: Assembly.h:2679

◆ phiFace() [6/6]

VariablePhiValue& Assembly::phiFace ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1531 of file Assembly.h.

1531 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:2660

◆ phiFaceNeighbor() [1/5]

const VariablePhiValue& Assembly::phiFaceNeighbor ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1309 of file Assembly.h.

Referenced by copyNeighborShapes().

1310  {
1311  return _phi_face_neighbor;
1312  }
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:2668

◆ phiFaceNeighbor() [2/5]

const VectorVariablePhiValue& Assembly::phiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1388 of file Assembly.h.

1389  {
1391  }
VectorVariablePhiValue _vector_phi_face_neighbor
Definition: Assembly.h:2691

◆ phiFaceNeighbor() [3/5]

VariablePhiValue& Assembly::phiFaceNeighbor ( const MooseVariableField< Real > &  )
inline

Definition at line 1432 of file Assembly.h.

1433  {
1434  return _phi_face_neighbor;
1435  }
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:2668

◆ phiFaceNeighbor() [4/5]

VectorVariablePhiValue& Assembly::phiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1505 of file Assembly.h.

1506  {
1508  }
VectorVariablePhiValue _vector_phi_face_neighbor
Definition: Assembly.h:2691

◆ phiFaceNeighbor() [5/5]

VariablePhiValue& Assembly::phiFaceNeighbor ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1554 of file Assembly.h.

1555  {
1556  return _phi_face_neighbor;
1557  }
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:2668

◆ phiNeighbor() [1/5]

const VariablePhiValue& Assembly::phiNeighbor ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1296 of file Assembly.h.

Referenced by copyNeighborShapes().

1297  {
1298  return _phi_neighbor;
1299  }
VariablePhiValue _phi_neighbor
Definition: Assembly.h:2664

◆ phiNeighbor() [2/5]

const VectorVariablePhiValue& Assembly::phiNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1364 of file Assembly.h.

1365  {
1366  return _vector_phi_neighbor;
1367  }
VectorVariablePhiValue _vector_phi_neighbor
Definition: Assembly.h:2685

◆ phiNeighbor() [3/5]

VariablePhiValue& Assembly::phiNeighbor ( const MooseVariableField< Real > &  )
inline

Definition at line 1422 of file Assembly.h.

1422 { return _phi_neighbor; }
VariablePhiValue _phi_neighbor
Definition: Assembly.h:2664

◆ phiNeighbor() [4/5]

VectorVariablePhiValue& Assembly::phiNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1485 of file Assembly.h.

1486  {
1487  return _vector_phi_neighbor;
1488  }
VectorVariablePhiValue _vector_phi_neighbor
Definition: Assembly.h:2685

◆ phiNeighbor() [5/5]

VariablePhiValue& Assembly::phiNeighbor ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1541 of file Assembly.h.

1542  {
1543  return _phi_neighbor;
1544  }
VariablePhiValue _phi_neighbor
Definition: Assembly.h:2664

◆ physicalPoints()

const MooseArray<Point>& Assembly::physicalPoints ( ) const
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 234 of file Assembly.h.

234 { 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:2599

◆ prepare()

void Assembly::prepare ( )

Definition at line 2709 of file Assembly.C.

2710 {
2712  prepareResidual();
2713 }
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
Definition: Assembly.C:2678
void prepareResidual()
Sizes and zeroes the residual for the current element.
Definition: Assembly.C:2700

◆ prepareBlock()

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

Definition at line 2890 of file Assembly.C.

2893 {
2894  const auto & iv = _sys.getVariable(_tid, ivar);
2895  const auto & jv = _sys.getVariable(_tid, jvar);
2896  const unsigned int ivn = iv.number();
2897  const unsigned int jvn = jv.number();
2898  const unsigned int icount = iv.count();
2899  unsigned int jcount = jv.count();
2900  if (ivn == jvn && _component_block_diagonal[ivn])
2901  jcount = 1;
2902 
2903  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2904  {
2905  jacobianBlock(ivn, jvn, LocalDataKey{}, tag)
2906  .resize(dof_indices.size() * icount, dof_indices.size() * jcount);
2907  jacobianBlockUsed(tag, ivn, jvn, false);
2908  }
2909 
2910  for (auto & tag_Re : _sub_Re)
2911  tag_Re[ivn].resize(dof_indices.size() * icount);
2912 }
SystemBase & _sys
Definition: Assembly.h:2265
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1092
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79

◆ 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 2915 of file Assembly.C.

2919 {
2920  const auto & iv = _sys.getVariable(_tid, ivar);
2921  const auto & jv = _sys.getVariable(_tid, jvar);
2922  const unsigned int ivn = iv.number();
2923  const unsigned int jvn = jv.number();
2924  const unsigned int icount = iv.count();
2925  unsigned int jcount = jv.count();
2926  if (ivn == jvn && _component_block_diagonal[ivn])
2927  jcount = 1;
2928 
2929  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2930  tag < _jacobian_block_nonlocal_used.size();
2931  tag++)
2932  {
2933  jacobianBlockNonlocal(ivn, jvn, LocalDataKey{}, tag)
2934  .resize(idof_indices.size() * icount, jdof_indices.size() * jcount);
2935 
2936  jacobianBlockNonlocalUsed(tag, ivn, jvn, false);
2937  }
2938 }
SystemBase & _sys
Definition: Assembly.h:2265
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block from non-local contribution for a pair of variables and a tag...
Definition: Assembly.h:1103
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2246
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2295
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:79

◆ prepareJacobianBlock()

void Assembly::prepareJacobianBlock ( )

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

Definition at line 2678 of file Assembly.C.

Referenced by prepare(), and reinitFVFace().

2679 {
2680  for (const auto & it : _cm_ff_entry)
2681  {
2682  MooseVariableFEBase & ivar = *(it.first);
2683  MooseVariableFEBase & jvar = *(it.second);
2684 
2685  unsigned int vi = ivar.number();
2686  unsigned int vj = jvar.number();
2687 
2688  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2689 
2690  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2691  {
2692  jacobianBlock(vi, vj, LocalDataKey{}, tag)
2693  .resize(ivar.dofIndices().size() * ivar.count(), jvar.dofIndices().size() * jcount);
2694  jacobianBlockUsed(tag, vi, vj, false);
2695  }
2696  }
2697 }
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
This class provides an interface for common operations on field variables of both FE and FV types wit...
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1092
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.

◆ prepareLowerD()

void Assembly::prepareLowerD ( )

Prepare the Jacobians and residuals for a lower dimensional element.

This method may be called when performing mortar finite element simulations

Definition at line 2834 of file Assembly.C.

Referenced by SubProblem::reinitLowerDElem().

2835 {
2836  for (const auto & it : _cm_ff_entry)
2837  {
2838  MooseVariableFEBase & ivar = *(it.first);
2839  MooseVariableFEBase & jvar = *(it.second);
2840 
2841  unsigned int vi = ivar.number();
2842  unsigned int vj = jvar.number();
2843 
2844  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2845 
2846  for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
2847  tag++)
2848  {
2849  // To cover all possible cases we should have 9 combinations below for every 2-permutation
2850  // of Lower,Secondary,Primary. However, 4 cases will in general be covered by calls to
2851  // prepare() and prepareNeighbor(). These calls will cover SecondarySecondary
2852  // (ElementElement), SecondaryPrimary (ElementNeighbor), PrimarySecondary (NeighborElement),
2853  // and PrimaryPrimary (NeighborNeighbor). With these covered we only need to prepare the 5
2854  // remaining below
2855 
2856  // derivatives w.r.t. lower dimensional residuals
2857  jacobianBlockMortar(Moose::LowerLower, vi, vj, LocalDataKey{}, tag)
2858  .resize(ivar.dofIndicesLower().size() * ivar.count(),
2859  jvar.dofIndicesLower().size() * jcount);
2860 
2861  jacobianBlockMortar(Moose::LowerSecondary, vi, vj, LocalDataKey{}, tag)
2862  .resize(ivar.dofIndicesLower().size() * ivar.count(),
2863  jvar.dofIndices().size() * jvar.count());
2864 
2865  jacobianBlockMortar(Moose::LowerPrimary, vi, vj, LocalDataKey{}, tag)
2866  .resize(ivar.dofIndicesLower().size() * ivar.count(),
2867  jvar.dofIndicesNeighbor().size() * jvar.count());
2868 
2869  // derivatives w.r.t. interior secondary residuals
2870  jacobianBlockMortar(Moose::SecondaryLower, vi, vj, LocalDataKey{}, tag)
2871  .resize(ivar.dofIndices().size() * ivar.count(),
2872  jvar.dofIndicesLower().size() * jvar.count());
2873 
2874  // derivatives w.r.t. interior primary residuals
2875  jacobianBlockMortar(Moose::PrimaryLower, vi, vj, LocalDataKey{}, tag)
2876  .resize(ivar.dofIndicesNeighbor().size() * ivar.count(),
2877  jvar.dofIndicesLower().size() * jvar.count());
2878 
2879  jacobianBlockLowerUsed(tag, vi, vj, false);
2880  }
2881  }
2882 
2883  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2884  for (const auto & var : vars)
2885  for (auto & tag_Rl : _sub_Rl)
2886  tag_Rl[var->number()].resize(var->dofIndicesLower().size() * var->count());
2887 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not lower Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2228
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
This class provides an interface for common operations on field variables of both FE and FV types wit...
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
DenseMatrix< Number > & jacobianBlockMortar(Moose::ConstraintJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Returns the jacobian block for the given mortar Jacobian type.
Definition: Assembly.C:3149
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2616
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const =0
Get neighbor DOF indices for currently selected element.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
virtual const std::vector< dof_id_type > & dofIndicesLower() const =0
Get dof indices for the current lower dimensional element (this is meaningful when performing mortar ...
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
Flag that indicates if the jacobian block for the lower dimensional element was used.
Definition: Assembly.h:2299

◆ prepareNeighbor()

void Assembly::prepareNeighbor ( )

Definition at line 2795 of file Assembly.C.

Referenced by reinitFVFace(), and SubProblem::reinitNeighborFaceRef().

2796 {
2797  for (const auto & it : _cm_ff_entry)
2798  {
2799  MooseVariableFEBase & ivar = *(it.first);
2800  MooseVariableFEBase & jvar = *(it.second);
2801 
2802  unsigned int vi = ivar.number();
2803  unsigned int vj = jvar.number();
2804 
2805  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2806 
2807  for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
2808  tag < _jacobian_block_neighbor_used.size();
2809  tag++)
2810  {
2811  jacobianBlockNeighbor(Moose::ElementNeighbor, vi, vj, LocalDataKey{}, tag)
2812  .resize(ivar.dofIndices().size() * ivar.count(),
2813  jvar.dofIndicesNeighbor().size() * jcount);
2814 
2815  jacobianBlockNeighbor(Moose::NeighborElement, vi, vj, LocalDataKey{}, tag)
2816  .resize(ivar.dofIndicesNeighbor().size() * ivar.count(),
2817  jvar.dofIndices().size() * jcount);
2818 
2819  jacobianBlockNeighbor(Moose::NeighborNeighbor, vi, vj, LocalDataKey{}, tag)
2820  .resize(ivar.dofIndicesNeighbor().size() * ivar.count(),
2821  jvar.dofIndicesNeighbor().size() * jcount);
2822 
2823  jacobianBlockNeighborUsed(tag, vi, vj, false);
2824  }
2825  }
2826 
2827  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2828  for (const auto & var : vars)
2829  for (auto & tag_Rn : _sub_Rn)
2830  tag_Rn[var->number()].resize(var->dofIndicesNeighbor().size() * var->count());
2831 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
unsigned int number() const
Get variable number coming from libMesh.
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block of a DG Jacobian type for a pair of variables and a tag. ...
Definition: Assembly.C:3108
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2614
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
This class provides an interface for common operations on field variables of both FE and FV types wit...
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const =0
Get neighbor DOF indices for currently selected element.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
void jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not neighbor Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2210
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:2297

◆ prepareNonlocal()

void Assembly::prepareNonlocal ( )

Definition at line 2716 of file Assembly.C.

2717 {
2718  for (const auto & it : _cm_nonlocal_entry)
2719  {
2720  MooseVariableFEBase & ivar = *(it.first);
2721  MooseVariableFEBase & jvar = *(it.second);
2722 
2723  unsigned int vi = ivar.number();
2724  unsigned int vj = jvar.number();
2725 
2726  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2727 
2728  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2729  tag < _jacobian_block_nonlocal_used.size();
2730  tag++)
2731  {
2732  jacobianBlockNonlocal(vi, vj, LocalDataKey{}, tag)
2733  .resize(ivar.dofIndices().size() * ivar.count(), jvar.allDofIndices().size() * jcount);
2734  jacobianBlockNonlocalUsed(tag, vi, vj, false);
2735  }
2736  }
2737 }
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block from non-local contribution for a pair of variables and a tag...
Definition: Assembly.h:1103
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2246
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2295
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2292

◆ prepareOffDiagScalar()

void Assembly::prepareOffDiagScalar ( )

Definition at line 2965 of file Assembly.C.

Referenced by NodalScalarKernel::reinit().

2966 {
2967  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2968  const std::vector<MooseVariableScalar *> & scalar_vars = _sys.getScalarVariables(_tid);
2969 
2970  for (const auto & ivar : scalar_vars)
2971  {
2972  auto idofs = ivar->dofIndices().size();
2973 
2974  for (const auto & jvar : vars)
2975  {
2976  auto jdofs = jvar->dofIndices().size() * jvar->count();
2977  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2978  {
2979  jacobianBlock(ivar->number(), jvar->number(), LocalDataKey{}, tag).resize(idofs, jdofs);
2980  jacobianBlockUsed(tag, ivar->number(), jvar->number(), false);
2981 
2982  jacobianBlock(jvar->number(), ivar->number(), LocalDataKey{}, tag).resize(jdofs, idofs);
2983  jacobianBlockUsed(tag, jvar->number(), ivar->number(), false);
2984  }
2985  }
2986  }
2987 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:737
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1092
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294

◆ prepareResidual()

void Assembly::prepareResidual ( )

Sizes and zeroes the residual for the current element.

Definition at line 2700 of file Assembly.C.

Referenced by prepare(), and reinitFVFace().

2701 {
2702  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2703  for (const auto & var : vars)
2704  for (auto & tag_Re : _sub_Re)
2705  tag_Re[var->number()].resize(var->dofIndices().size() * var->count());
2706 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613

◆ prepareScalar()

void Assembly::prepareScalar ( )

Definition at line 2941 of file Assembly.C.

Referenced by FEProblemBase::reinitScalars().

2942 {
2943  const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
2944  for (const auto & ivar : vars)
2945  {
2946  auto idofs = ivar->dofIndices().size();
2947 
2948  for (auto & tag_Re : _sub_Re)
2949  tag_Re[ivar->number()].resize(idofs);
2950 
2951  for (const auto & jvar : vars)
2952  {
2953  auto jdofs = jvar->dofIndices().size();
2954 
2955  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2956  {
2957  jacobianBlock(ivar->number(), jvar->number(), LocalDataKey{}, tag).resize(idofs, jdofs);
2958  jacobianBlockUsed(tag, ivar->number(), jvar->number(), false);
2959  }
2960  }
2961  }
2962 }
SystemBase & _sys
Definition: Assembly.h:2265
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:737
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1092
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294

◆ prepareVariable()

void Assembly::prepareVariable ( MooseVariableFieldBase var)

Used for preparing the dense residual and jacobian blocks for one particular variable.

Parameters
varThe variable that needs to have its datastructures prepared

Definition at line 2740 of file Assembly.C.

Referenced by SystemBase::prepareFace().

2741 {
2742  for (const auto & it : _cm_ff_entry)
2743  {
2744  MooseVariableFEBase & ivar = *(it.first);
2745  MooseVariableFEBase & jvar = *(it.second);
2746 
2747  unsigned int vi = ivar.number();
2748  unsigned int vj = jvar.number();
2749 
2750  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2751 
2752  if (vi == var->number() || vj == var->number())
2753  {
2754  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2755  {
2756  jacobianBlock(vi, vj, LocalDataKey{}, tag)
2757  .resize(ivar.dofIndices().size() * ivar.count(), jvar.dofIndices().size() * jcount);
2758  jacobianBlockUsed(tag, vi, vj, false);
2759  }
2760  }
2761  }
2762 
2763  for (auto & tag_Re : _sub_Re)
2764  tag_Re[var->number()].resize(var->dofIndices().size() * var->count());
2765 }
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2192
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
This class provides an interface for common operations on field variables of both FE and FV types wit...
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1092
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2284
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2294
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.

◆ prepareVariableNonlocal()

void Assembly::prepareVariableNonlocal ( MooseVariableFieldBase var)

Definition at line 2768 of file Assembly.C.

Referenced by SystemBase::prepareFace().

2769 {
2770  for (const auto & it : _cm_nonlocal_entry)
2771  {
2772  MooseVariableFEBase & ivar = *(it.first);
2773  MooseVariableFEBase & jvar = *(it.second);
2774 
2775  unsigned int vi = ivar.number();
2776  unsigned int vj = jvar.number();
2777 
2778  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2779 
2780  if (vi == var->number() || vj == var->number())
2781  {
2782  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2783  tag < _jacobian_block_nonlocal_used.size();
2784  tag++)
2785  {
2786  jacobianBlockNonlocal(vi, vj, LocalDataKey{}, tag)
2787  .resize(ivar.dofIndices().size() * ivar.count(), jvar.allDofIndices().size() * jcount);
2788  jacobianBlockNonlocalUsed(tag, vi, vj);
2789  }
2790  }
2791  }
2792 }
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block from non-local contribution for a pair of variables and a tag...
Definition: Assembly.h:1103
unsigned int number() const
Get variable number coming from libMesh.
void jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2246
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2295
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2292

◆ processLocalResidual()

void Assembly::processLocalResidual ( DenseVector< Number > &  res_block,
std::vector< dof_id_type > &  dof_indices,
const std::vector< Real > &  scaling_factor,
bool  is_nodal 
)
private

Appling scaling, constraints to the local residual block and populate the full DoF indices for array variable.

Definition at line 3209 of file Assembly.C.

Referenced by addResidualBlock(), cacheResidualBlock(), and setResidualBlock().

3213 {
3214  // For an array variable, ndof is the number of dofs of the zero-th component and
3215  // ntdof is the number of dofs of all components.
3216  // For standard or vector variables, ndof will be the same as ntdof.
3217  auto ndof = dof_indices.size();
3218  auto ntdof = res_block.size();
3219  auto count = ntdof / ndof;
3220  mooseAssert(count == scaling_factor.size(), "Inconsistent of number of components");
3221  mooseAssert(count * ndof == ntdof, "Inconsistent of number of components");
3222  if (count > 1)
3223  {
3224  // expanding dof indices
3225  dof_indices.resize(ntdof);
3226  unsigned int p = 0;
3227  for (MooseIndex(count) j = 0; j < count; ++j)
3228  for (MooseIndex(ndof) i = 0; i < ndof; ++i)
3229  {
3230  dof_indices[p] = dof_indices[i] + (is_nodal ? j : j * ndof);
3231  res_block(p) *= scaling_factor[j];
3232  ++p;
3233  }
3234  }
3235  else
3236  {
3237  if (scaling_factor[0] != 1.0)
3238  res_block *= scaling_factor[0];
3239  }
3240 
3241  _dof_map.constrain_element_vector(res_block, dof_indices, false);
3242 }
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:2301
virtual unsigned int size() const override final

◆ qPoints()

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

Returns the reference to the quadrature points.

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

Definition at line 222 of file Assembly.h.

222 { return _current_q_points; }
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:2371

◆ qPointsFace()

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

Returns the reference to the current quadrature being used.

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

Definition at line 298 of file Assembly.h.

Referenced by GeometricSearchData::generateQuadratureNodes(), and GeometricSearchData::updateQuadratureNodes().

298 { return _current_q_points_face; }
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2479

◆ qPointsFaceNeighbor()

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

Returns the reference to the current quadrature points being used on the neighbor face.

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

Definition at line 489 of file Assembly.h.

MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
Definition: Assembly.h:2518

◆ qPointsMortar()

const std::vector<Point>& Assembly::qPointsMortar ( ) const
inline

Returns the reference to the mortar segment element quadrature points.

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

Definition at line 228 of file Assembly.h.

228 { return _fe_msm->get_xyz(); }
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2534

◆ qRule()

const QBase* const& Assembly::qRule ( ) const
inline

Returns the reference to the current quadrature being used.

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

Definition at line 210 of file Assembly.h.

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

210 { return constify_ref(_current_qrule); }
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104

◆ qruleArbitraryFace()

ArbitraryQuadrature * Assembly::qruleArbitraryFace ( const Elem *  elem,
unsigned int  side 
)
private

Definition at line 1916 of file Assembly.C.

Referenced by reinit(), and reinitElemFaceRef().

1917 {
1918  return qruleFaceHelper<ArbitraryQuadrature>(
1919  elem, side, [](QRules & q) { return q.arbitrary_face.get(); });
1920 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399

◆ qRuleFace()

const QBase* const& Assembly::qRuleFace ( ) const
inline

Returns the reference to the current quadrature being used on a current face.

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

Definition at line 286 of file Assembly.h.

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

static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ qruleFace()

QBase * Assembly::qruleFace ( const Elem *  elem,
unsigned int  side 
)
private

This is an abstraction over the internal qrules function.

This is necessary for faces because (nodes of) faces can exists in more than one subdomain. When this is the case, we need to use the quadrature rule from the subdomain that has the highest specified quadrature order. So when you need to access a face quadrature rule, you should retrieve it via this function.

Definition at line 1910 of file Assembly.C.

Referenced by reinitElemFaceRef(), and setFaceQRule().

1911 {
1912  return qruleFaceHelper<QBase>(elem, side, [](QRules & q) { return q.face.get(); });
1913 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399

◆ qruleFaceHelper()

template<typename T >
T* Assembly::qruleFaceHelper ( const Elem *  elem,
unsigned int  side,
std::function< T *(QRules &)>  rule_fn 
)
inlineprivate

Definition at line 2424 of file Assembly.h.

2425  {
2426  auto dim = elem->dim();
2427  auto neighbor = elem->neighbor_ptr(side);
2428  auto q = rule_fn(qrules(dim, elem->subdomain_id()));
2429  if (!neighbor)
2430  return q;
2431 
2432  // find the maximum face quadrature order for all blocks the face is in
2433  auto neighbor_block = neighbor->subdomain_id();
2434  if (neighbor_block == elem->subdomain_id())
2435  return q;
2436 
2437  auto q_neighbor = rule_fn(qrules(dim, neighbor_block));
2438  if (q->get_order() > q_neighbor->get_order())
2439  return q;
2440  return q_neighbor;
2441  }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399

◆ qRuleMortar()

const QBase* const& Assembly::qRuleMortar ( ) const
inline

Returns a reference to the quadrature rule for the mortar segments.

Definition at line 662 of file Assembly.h.

Referenced by Moose::Mortar::loopOverMortarSegments().

662 { return constify_ref(_qrule_msm); }
QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2539
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104

◆ qRuleNeighbor()

const QBase* const& Assembly::qRuleNeighbor ( ) const
inline

Returns the reference to the current quadrature being used on a current neighbor.

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

Definition at line 471 of file Assembly.h.

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

static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:104
QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2516

◆ qrules() [1/2]

QRules& Assembly::qrules ( unsigned int  dim)
inlineprivate

Definition at line 2443 of file Assembly.h.

Referenced by attachQRuleElem(), attachQRuleFace(), qruleFaceHelper(), qrules(), reinit(), reinitFVFace(), reinitLowerDElem(), reinitNeighbor(), reinitNeighborFaceRef(), and setVolumeQRule().

2443 { return qrules(dim, _current_subdomain_id); }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551

◆ qrules() [2/2]

QRules& Assembly::qrules ( unsigned int  dim,
SubdomainID  block 
)
inlineprivate

This is a helper function for accessing quadrature rules for a particular dimensionality of element.

All access to quadrature rules in Assembly should be done via this accessor function.

Definition at line 2448 of file Assembly.h.

2449  {
2450  if (_qrules.find(block) == _qrules.end())
2451  {
2452  mooseAssert(_qrules.find(Moose::ANY_BLOCK_ID) != _qrules.end(),
2453  "missing quadrature rules for specified block");
2454  mooseAssert(_qrules[Moose::ANY_BLOCK_ID].size() > dim,
2455  "quadrature rules not sized property for dimension");
2456  return _qrules[Moose::ANY_BLOCK_ID][dim];
2457  }
2458  mooseAssert(_qrules.find(block) != _qrules.end(),
2459  "missing quadrature rules for specified block");
2460  mooseAssert(_qrules[block].size() > dim, "quadrature rules not sized property for dimension");
2461  return _qrules[block][dim];
2462  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
Definition: Assembly.h:2412
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19

◆ reinit() [1/5]

void Assembly::reinit ( const Elem *  elem)

Reinitialize objects (JxW, q_points, ...) for an elements.

Parameters
elemThe element we want to reinitialize on

Definition at line 1811 of file Assembly.C.

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildPRefinementAndCoarseningMaps(), GeometricSearchData::generateQuadratureNodes(), ComputeBoundaryInitialConditionThread::onNode(), reinitAtPhysical(), reinitElemAndNeighbor(), and GeometricSearchData::updateQuadratureNodes().

1812 {
1813  _current_elem = elem;
1814  _current_neighbor_elem = nullptr;
1815  mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1816  "current subdomain has been set incorrectly");
1818 
1820  reinitFE(elem);
1821 
1823 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
void reinitFE(const Elem *elem)
Just an internal helper function to reinit the volume FE objects.
Definition: Assembly.C:757
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2579
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
void setVolumeQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for volume integration.
Definition: Assembly.C:652
void computeCurrentElemVolume()
Definition: Assembly.C:1742
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551

◆ reinit() [2/5]

void Assembly::reinit ( const Elem *  elem,
const std::vector< Point > &  reference_points 
)

Reinitialize the assembly data at specific points in the reference element.

Definition at line 1826 of file Assembly.C.

1827 {
1828  _current_elem = elem;
1829  _current_neighbor_elem = nullptr;
1830  mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1831  "current subdomain has been set incorrectly");
1833 
1834  unsigned int elem_dimension = _current_elem->dim();
1835 
1836  _current_qrule_arbitrary = qrules(elem_dimension).arbitrary_vol.get();
1837 
1838  // Make sure the qrule is the right one
1840  setVolumeQRule(_current_qrule_arbitrary, elem_dimension);
1841 
1842  _current_qrule_arbitrary->setPoints(reference_points);
1843 
1844  reinitFE(elem);
1845 
1847 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2367
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
void reinitFE(const Elem *elem)
Just an internal helper function to reinit the volume FE objects.
Definition: Assembly.C:757
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2579
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
void setPoints(const std::vector< Point > &points)
Set the quadrature points.
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
void setVolumeQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for volume integration.
Definition: Assembly.C:652
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443
std::unique_ptr< ArbitraryQuadrature > arbitrary_vol
volume/elem (meshdim) custom points quadrature rule
Definition: Assembly.h:2401
void computeCurrentElemVolume()
Definition: Assembly.C:1742
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551

◆ reinit() [3/5]

void Assembly::reinit ( const Elem *  elem,
unsigned int  side 
)

Reinitialize the assembly data on an side of an element.

Definition at line 1933 of file Assembly.C.

1934 {
1935  _current_elem = elem;
1936  _current_neighbor_elem = nullptr;
1937  mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1938  "current subdomain has been set incorrectly");
1939  _current_side = side;
1942 
1944 
1947 
1949 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2579
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
void computeCurrentFaceVolume()
Definition: Assembly.C:1761
void setFaceQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:671
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2557
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2581
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2559
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551
ElemSideBuilder _current_side_elem_builder
In place side element builder for _current_side_elem.
Definition: Assembly.h:2827
void reinitFEFace(const Elem *elem, unsigned int side)
Just an internal helper function to reinit the face FE objects.
Definition: Assembly.C:1261

◆ reinit() [4/5]

void Assembly::reinit ( const Elem *  elem,
unsigned int  side,
const std::vector< Point > &  reference_points 
)

Reinitialize the assembly data on the side of a element at the custom reference points.

Definition at line 1952 of file Assembly.C.

1953 {
1954  _current_elem = elem;
1955  _current_neighbor_elem = nullptr;
1956  mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1957  "current subdomain has been set incorrectly");
1958  _current_side = side;
1961 
1962  unsigned int elem_dimension = _current_elem->dim();
1963 
1965 
1966  // Make sure the qrule is the right one
1969 
1970  _current_qrule_arbitrary->setPoints(reference_points);
1971 
1973 
1975 
1977 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2367
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2579
ArbitraryQuadrature * qruleArbitraryFace(const Elem *elem, unsigned int side)
Definition: Assembly.C:1916
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
void setPoints(const std::vector< Point > &points)
Set the quadrature points.
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
void computeCurrentFaceVolume()
Definition: Assembly.C:1761
ArbitraryQuadrature * _current_qrule_arbitrary_face
The current arbitrary quadrature rule used on the element face.
Definition: Assembly.h:2369
void setFaceQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:671
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2557
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2581
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2559
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551
ElemSideBuilder _current_side_elem_builder
In place side element builder for _current_side_elem.
Definition: Assembly.h:2827
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475
void reinitFEFace(const Elem *elem, unsigned int side)
Just an internal helper function to reinit the face FE objects.
Definition: Assembly.C:1261

◆ reinit() [5/5]

void Assembly::reinit ( const Node *  node)

Reinitialize assembly data for a node.

Definition at line 1980 of file Assembly.C.

1981 {
1982  _current_node = node;
1983  _current_neighbor_node = NULL;
1984 }
const Node * _current_node
The current node we are working with.
Definition: Assembly.h:2575
const Node *const & node() const
Returns the reference to the node.
Definition: Assembly.h:495
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition: Assembly.h:2577

◆ reinitAtPhysical()

void Assembly::reinitAtPhysical ( const Elem *  elem,
const std::vector< Point > &  physical_points 
)

Reinitialize the assembly data at specific physical point in the given element.

Definition at line 1780 of file Assembly.C.

1781 {
1782  _current_elem = elem;
1783  _current_neighbor_elem = nullptr;
1784  mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1785  "current subdomain has been set incorrectly");
1787 
1788  FEInterface::inverse_map(elem->dim(),
1789  _holder_fe_helper[elem->dim()]->get_fe_type(),
1790  elem,
1791  physical_points,
1793 
1795 
1796  // Save off the physical points
1797  _current_physical_points = physical_points;
1798 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2599
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2579
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition: Assembly.C:1811
std::vector< Point > _temp_reference_points
Temporary work data for reinitAtPhysical()
Definition: Assembly.h:2777
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2359
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551

◆ reinitDual()

void Assembly::reinitDual ( const Elem *  elem,
const std::vector< Point > &  pts,
const std::vector< Real > &  JxW 
)

Reintialize dual basis coefficients based on a customized quadrature rule.

Definition at line 2264 of file Assembly.C.

Referenced by Moose::Mortar::loopOverMortarSegments().

2267 {
2268  const unsigned int elem_dim = elem->dim();
2269  mooseAssert(elem_dim == _mesh_dimension - 1,
2270  "Dual shape functions should only be computed on lower dimensional face elements");
2271 
2272  for (const auto & it : _fe_lower[elem_dim])
2273  {
2274  FEBase & fe_lower = *it.second;
2275  // We use customized quadrature rule for integration along the mortar segment elements
2276  fe_lower.set_calculate_default_dual_coeff(false);
2277  fe_lower.reinit_dual_shape_coeffs(elem, pts, JxW);
2278  }
2279 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
unsigned int _mesh_dimension
Definition: Assembly.h:2307
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2509
FEGenericBase< Real > FEBase
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:240

◆ reinitElemAndNeighbor()

void Assembly::reinitElemAndNeighbor ( const Elem *  elem,
unsigned int  side,
const Elem *  neighbor,
unsigned int  neighbor_side,
const std::vector< Point > *  neighbor_reference_points = nullptr 
)

Reinitialize an element and its neighbor along a particular side.

Parameters
elemElement being reinitialized
sideSide of the element
neighborNeighbor facing the element on the side 'side'
neighbor_sideThe side id on the neighboring element.
neighbor_reference_pointsOptional argument specifying the neighbor reference points. If not passed, then neighbor reference points will be determined by doing an inverse map based on the physical location of the elem quadrature points

Definition at line 1987 of file Assembly.C.

1992 {
1993  _current_neighbor_side = neighbor_side;
1994 
1995  reinit(elem, side);
1996 
1997  unsigned int neighbor_dim = neighbor->dim();
1998 
1999  if (neighbor_reference_points)
2000  _current_neighbor_ref_points = *neighbor_reference_points;
2001  else
2002  FEInterface::inverse_map(neighbor_dim,
2003  FEType(),
2004  neighbor,
2007 
2009 
2012 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
std::vector< Point > _current_neighbor_ref_points
The current reference points on the neighbor element.
Definition: Assembly.h:2854
void reinitFEFaceNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition: Assembly.C:1561
ElemSideBuilder _current_neighbor_side_elem_builder
In place side element builder for _current_neighbor_side_elem.
Definition: Assembly.h:2829
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition: Assembly.C:1811
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:2567
void reinitNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Reinitializes the neighbor side using reference coordinates.
Definition: Assembly.C:1675
std::vector< T > stdVector() const
Extremely inefficient way to produce a std::vector from a MooseArray!
Definition: MooseArray.h:341
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:2569
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2479

◆ reinitElemFaceRef()

void Assembly::reinitElemFaceRef ( const Elem *  elem,
unsigned int  elem_side,
Real  tolerance,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)

Reinitialize FE data for the given element on the given side, optionally with a given set of reference points.

Definition at line 2015 of file Assembly.C.

Referenced by SubProblem::reinitElemFaceRef().

2020 {
2021  _current_elem = elem;
2022 
2023  unsigned int elem_dim = elem->dim();
2024 
2025  // Attach the quadrature rules
2026  if (pts)
2027  {
2028  auto face_rule = qruleArbitraryFace(elem, elem_side);
2029  face_rule->setPoints(*pts);
2030  setFaceQRule(face_rule, elem_dim);
2031  }
2032  else
2033  {
2034  auto rule = qruleFace(elem, elem_side);
2035  if (_current_qrule_face != rule)
2036  setFaceQRule(rule, elem_dim);
2037  }
2038 
2039  // reinit face
2040  for (const auto & it : _fe_face[elem_dim])
2041  {
2042  FEBase & fe_face = *it.second;
2043  FEType fe_type = it.first;
2044  FEShapeData & fesd = *_fe_shape_data_face[fe_type];
2045 
2046  fe_face.reinit(elem, elem_side, tolerance, pts, weights);
2047 
2048  _current_fe_face[fe_type] = &fe_face;
2049 
2050  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face.get_phi()));
2051  fesd._grad_phi.shallowCopy(
2052  const_cast<std::vector<std::vector<RealGradient>> &>(fe_face.get_dphi()));
2054  fesd._second_phi.shallowCopy(
2055  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_d2phi()));
2056  }
2057  for (const auto & it : _vector_fe_face[elem_dim])
2058  {
2059  FEVectorBase & fe_face = *it.second;
2060  const FEType & fe_type = it.first;
2061 
2062  _current_vector_fe_face[fe_type] = &fe_face;
2063 
2064  VectorFEShapeData & fesd = *_vector_fe_shape_data_face[fe_type];
2065 
2066  fe_face.reinit(elem, elem_side, tolerance, pts, weights);
2067 
2068  fesd._phi.shallowCopy(
2069  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_phi()));
2070  fesd._grad_phi.shallowCopy(
2071  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_dphi()));
2072  if (_need_second_derivative.find(fe_type) != _need_second_derivative.end())
2073  fesd._second_phi.shallowCopy(
2074  const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_face.get_d2phi()));
2075  if (_need_curl.find(fe_type) != _need_curl.end())
2076  fesd._curl_phi.shallowCopy(
2077  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_curl_phi()));
2078  if (_need_div.find(fe_type) != _need_div.end())
2079  fesd._div_phi.shallowCopy(
2080  const_cast<std::vector<std::vector<Real>> &>(fe_face.get_div_phi()));
2081  }
2082  if (!_unique_fe_face_helper.empty())
2083  {
2084  mooseAssert(elem_dim < _unique_fe_face_helper.size(), "We should be in bounds here");
2085  _unique_fe_face_helper[elem_dim]->reinit(elem, elem_side, tolerance, pts, weights);
2086  }
2087 
2088  // During that last loop the helper objects will have been reinitialized
2090  const_cast<std::vector<Point> &>(_holder_fe_face_helper[elem_dim]->get_xyz()));
2092  const_cast<std::vector<Point> &>(_holder_fe_face_helper[elem_dim]->get_normals()));
2093  _current_tangents.shallowCopy(const_cast<std::vector<std::vector<Point>> &>(
2094  _holder_fe_face_helper[elem_dim]->get_tangents()));
2095  // Note that if the user did pass in points and not weights to this method, JxW will be garbage
2096  // and should not be used
2098  const_cast<std::vector<Real> &>(_holder_fe_face_helper[elem_dim]->get_JxW()));
2101  const_cast<std::vector<Real> &>(_holder_fe_face_helper[elem_dim]->get_curvatures()));
2102 
2103  computeADFace(*elem, elem_side);
2104 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
MooseArray< Real > _curvatures
Definition: Assembly.h:2802
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
ArbitraryQuadrature * qruleArbitraryFace(const Elem *elem, unsigned int side)
Definition: Assembly.C:1916
std::map< FEType, FEBase * > _current_fe_face
The "face" fe object that matches the current elem.
Definition: Assembly.h:2337
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2481
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2323
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
std::map< FEType, FEVectorBase * > _current_vector_fe_face
The "face" vector fe object that matches the current elem.
Definition: Assembly.h:2346
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:293
FEGenericBase< RealGradient > FEVectorBase
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
void setFaceQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:671
MooseArray< std::vector< Point > > _current_tangents
The current tangent vectors at the quadrature points.
Definition: Assembly.h:2487
bool _calculate_curvatures
Definition: Assembly.h:2812
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2469
QBase * qruleFace(const Elem *elem, unsigned int side)
This is an abstraction over the internal qrules function.
Definition: Assembly.C:1910
FEGenericBase< Real > FEBase
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:2483
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2471
void computeADFace(const Elem &elem, const unsigned int side)
compute AD things on an element face
Definition: Assembly.C:2107
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2479
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ reinitFE()

void Assembly::reinitFE ( const Elem *  elem)
private

Just an internal helper function to reinit the volume FE objects.

Parameters
elemThe element we are using to reinit

Definition at line 757 of file Assembly.C.

Referenced by reinit().

758 {
759  unsigned int dim = elem->dim();
760 
761  for (const auto & it : _fe[dim])
762  {
763  FEBase & fe = *it.second;
764  const FEType & fe_type = it.first;
765 
766  _current_fe[fe_type] = &fe;
767 
768  FEShapeData & fesd = *_fe_shape_data[fe_type];
769 
770  fe.reinit(elem);
771 
772  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe.get_phi()));
773  fesd._grad_phi.shallowCopy(
774  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_dphi()));
775  if (_need_second_derivative.find(fe_type) != _need_second_derivative.end())
776  fesd._second_phi.shallowCopy(
777  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe.get_d2phi()));
778  }
779  for (const auto & it : _vector_fe[dim])
780  {
781  FEVectorBase & fe = *it.second;
782  const FEType & fe_type = it.first;
783 
784  _current_vector_fe[fe_type] = &fe;
785 
786  VectorFEShapeData & fesd = *_vector_fe_shape_data[fe_type];
787 
788  fe.reinit(elem);
789 
790  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_phi()));
791  fesd._grad_phi.shallowCopy(
792  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe.get_dphi()));
793  if (_need_second_derivative.find(fe_type) != _need_second_derivative.end())
794  fesd._second_phi.shallowCopy(
795  const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe.get_d2phi()));
796  if (_need_curl.find(fe_type) != _need_curl.end())
797  fesd._curl_phi.shallowCopy(
798  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_curl_phi()));
799  if (_need_div.find(fe_type) != _need_div.end())
800  fesd._div_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe.get_div_phi()));
801  }
802  if (!_unique_fe_helper.empty())
803  {
804  mooseAssert(dim < _unique_fe_helper.size(), "We should be in bounds here");
805  _unique_fe_helper[dim]->reinit(elem);
806  }
807 
808  // During that last loop the helper objects will have been reinitialized as well
809  // We need to dig out the q_points and JxW from it.
811  const_cast<std::vector<Point> &>(_holder_fe_helper[dim]->get_xyz()));
812  _current_JxW.shallowCopy(const_cast<std::vector<Real> &>(_holder_fe_helper[dim]->get_JxW()));
813 
815  {
816  auto n_qp = _current_qrule->n_points();
818  if (_displaced)
819  {
820  const auto & qw = _current_qrule->get_weights();
821  for (unsigned int qp = 0; qp != n_qp; qp++)
823  }
824  else
825  for (unsigned qp = 0; qp < n_qp; ++qp)
826  {
827  _ad_JxW[qp] = _current_JxW[qp];
828  if (_calculate_xyz)
830  }
831 
832  for (const auto & it : _fe[dim])
833  {
834  FEBase & fe = *it.second;
835  auto fe_type = it.first;
836  auto num_shapes = fe.n_shape_functions();
837  auto & grad_phi = _ad_grad_phi_data[fe_type];
838 
839  grad_phi.resize(num_shapes);
840  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
841  grad_phi[i].resize(n_qp);
842 
843  if (_displaced)
844  computeGradPhiAD(elem, n_qp, grad_phi, &fe);
845  else
846  {
847  const auto & regular_grad_phi = _fe_shape_data[fe_type]->_grad_phi;
848  for (unsigned qp = 0; qp < n_qp; ++qp)
849  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
850  grad_phi[i][qp] = regular_grad_phi[i][qp];
851  }
852  }
853  for (const auto & it : _vector_fe[dim])
854  {
855  FEVectorBase & fe = *it.second;
856  auto fe_type = it.first;
857  auto num_shapes = fe.n_shape_functions();
858  auto & grad_phi = _ad_vector_grad_phi_data[fe_type];
859 
860  grad_phi.resize(num_shapes);
861  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
862  grad_phi[i].resize(n_qp);
863 
864  if (_displaced)
865  computeGradPhiAD(elem, n_qp, grad_phi, &fe);
866  else
867  {
868  const auto & regular_grad_phi = _vector_fe_shape_data[fe_type]->_grad_phi;
869  for (unsigned qp = 0; qp < n_qp; ++qp)
870  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
871  grad_phi[i][qp] = regular_grad_phi[i][qp];
872  }
873  }
874  }
875 
876  auto n = numExtraElemIntegers();
877  for (auto i : make_range(n))
878  _extra_elem_ids[i] = _current_elem->get_extra_integer(i);
879  _extra_elem_ids[n] = _current_elem->subdomain_id();
880 
881  if (_xfem != nullptr)
883 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:2787
std::map< FEType, FEBase * > _current_fe
The "volume" fe object that matches the current elem.
Definition: Assembly.h:2335
void computeGradPhiAD(const Elem *elem, unsigned int n_qp, ADTemplateVariablePhiGradient< OutputType > &grad_phi, FEGenericBase< OutputType > *fe)
compute gradient of phi possibly with derivative information with respect to nonlinear displacement v...
Definition: Assembly.C:887
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2357
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
Definition: SubProblem.h:722
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2718
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2332
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:2788
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
void modifyWeightsDueToXFEM(const Elem *elem)
Update the integration weights for XFEM partial elements.
Definition: Assembly.C:4527
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
void resizeADMappingObjects(unsigned int n_qp, unsigned int dim)
resize any objects that contribute to automatic differentiation-related mapping calculations ...
Definition: Assembly.C:967
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:293
std::vector< std::unique_ptr< FEBase > > _unique_fe_helper
Containers for holding unique FE helper types if we are doing p-refinement.
Definition: Assembly.h:2322
FEGenericBase< RealGradient > FEVectorBase
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition: Assembly.h:326
std::map< FEType, FEVectorBase * > _current_vector_fe
The "volume" vector fe object that matches the current elem.
Definition: Assembly.h:2344
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2733
SubProblem & _subproblem
Definition: Assembly.h:2266
bool _calculate_xyz
Definition: Assembly.h:2810
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2373
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2734
FEGenericBase< Real > FEBase
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2355
const bool _displaced
Definition: Assembly.h:2268
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:2726
IntRange< T > make_range(T beg, T end)
void computeSinglePointMapAD(const Elem *elem, const std::vector< Real > &qw, unsigned p, FEBase *fe)
compute the finite element reference-physical mapping quantities (such as JxW) with possible dependen...
Definition: Assembly.C:997
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2359
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2490
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:2371
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ reinitFEFace()

void Assembly::reinitFEFace ( const Elem *  elem,
unsigned int  side 
)
private

Just an internal helper function to reinit the face FE objects.

Parameters
elemThe element we are using to reinit
sideThe side of the element we are reiniting on

Definition at line 1261 of file Assembly.C.

Referenced by reinit().

1262 {
1263  unsigned int dim = elem->dim();
1264 
1265  for (const auto & it : _fe_face[dim])
1266  {
1267  FEBase & fe_face = *it.second;
1268  const FEType & fe_type = it.first;
1269  FEShapeData & fesd = *_fe_shape_data_face[fe_type];
1270  fe_face.reinit(elem, side);
1271  _current_fe_face[fe_type] = &fe_face;
1272 
1273  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face.get_phi()));
1274  fesd._grad_phi.shallowCopy(
1275  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_dphi()));
1276  if (_need_second_derivative.find(fe_type) != _need_second_derivative.end())
1277  fesd._second_phi.shallowCopy(
1278  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_d2phi()));
1279  }
1280  for (const auto & it : _vector_fe_face[dim])
1281  {
1282  FEVectorBase & fe_face = *it.second;
1283  const FEType & fe_type = it.first;
1284 
1285  _current_vector_fe_face[fe_type] = &fe_face;
1286 
1287  VectorFEShapeData & fesd = *_vector_fe_shape_data_face[fe_type];
1288 
1289  fe_face.reinit(elem, side);
1290 
1291  fesd._phi.shallowCopy(
1292  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_phi()));
1293  fesd._grad_phi.shallowCopy(
1294  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_dphi()));
1295  if (_need_second_derivative.find(fe_type) != _need_second_derivative.end())
1296  fesd._second_phi.shallowCopy(
1297  const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_face.get_d2phi()));
1298  if (_need_curl.find(fe_type) != _need_curl.end())
1299  fesd._curl_phi.shallowCopy(
1300  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_curl_phi()));
1301  if (_need_div.find(fe_type) != _need_div.end())
1302  fesd._div_phi.shallowCopy(
1303  const_cast<std::vector<std::vector<Real>> &>(fe_face.get_div_phi()));
1304  }
1305  if (!_unique_fe_face_helper.empty())
1306  {
1307  mooseAssert(dim < _unique_fe_face_helper.size(), "We should be in bounds here");
1308  _unique_fe_face_helper[dim]->reinit(elem, side);
1309  }
1310 
1311  // During that last loop the helper objects will have been reinitialized as well
1312  // We need to dig out the q_points and JxW from it.
1314  const_cast<std::vector<Point> &>(_holder_fe_face_helper[dim]->get_xyz()));
1316  const_cast<std::vector<Real> &>(_holder_fe_face_helper[dim]->get_JxW()));
1318  const_cast<std::vector<Point> &>(_holder_fe_face_helper[dim]->get_normals()));
1319 
1320  _mapped_normals.resize(_current_normals.size(), Eigen::Map<RealDIMValue>(nullptr));
1321  for (unsigned int i = 0; i < _current_normals.size(); i++)
1322  // Note: this does NOT do any allocation. It is "reconstructing" the object in place
1323  new (&_mapped_normals[i]) Eigen::Map<RealDIMValue>(const_cast<Real *>(&_current_normals[i](0)));
1324 
1327  const_cast<std::vector<Real> &>(_holder_fe_face_helper[dim]->get_curvatures()));
1328 
1329  computeADFace(*elem, side);
1330 
1331  if (_xfem != nullptr)
1333 
1334  auto n = numExtraElemIntegers();
1335  for (auto i : make_range(n))
1336  _extra_elem_ids[i] = _current_elem->get_extra_integer(i);
1337  _extra_elem_ids[n] = _current_elem->subdomain_id();
1338 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
MooseArray< Real > _curvatures
Definition: Assembly.h:2802
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2332
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
std::map< FEType, FEBase * > _current_fe_face
The "face" fe object that matches the current elem.
Definition: Assembly.h:2337
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2481
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2323
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
std::map< FEType, FEVectorBase * > _current_vector_fe_face
The "face" vector fe object that matches the current elem.
Definition: Assembly.h:2346
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:293
FEGenericBase< RealGradient > FEVectorBase
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition: Assembly.h:326
void modifyFaceWeightsDueToXFEM(const Elem *elem, unsigned int side=0)
Update the face integration weights for XFEM partial elements.
Definition: Assembly.C:4547
std::vector< Eigen::Map< RealDIMValue > > _mapped_normals
Mapped normals.
Definition: Assembly.h:2485
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2727
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:256
bool _calculate_curvatures
Definition: Assembly.h:2812
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2469
FEGenericBase< Real > FEBase
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:2483
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2719
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2471
IntRange< T > make_range(T beg, T end)
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2490
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399
void computeADFace(const Elem &elem, const unsigned int side)
compute AD things on an element face
Definition: Assembly.C:2107
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2479
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820

◆ reinitFEFaceNeighbor()

void Assembly::reinitFEFaceNeighbor ( const Elem *  neighbor,
const std::vector< Point > &  reference_points 
)
private

Definition at line 1561 of file Assembly.C.

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

1562 {
1563  unsigned int neighbor_dim = neighbor->dim();
1564 
1565  // reinit neighbor face
1566  for (const auto & it : _fe_face_neighbor[neighbor_dim])
1567  {
1568  FEBase & fe_face_neighbor = *it.second;
1569  FEType fe_type = it.first;
1570  FEShapeData & fesd = *_fe_shape_data_face_neighbor[fe_type];
1571 
1572  fe_face_neighbor.reinit(neighbor, &reference_points);
1573 
1574  _current_fe_face_neighbor[fe_type] = &fe_face_neighbor;
1575 
1576  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_phi()));
1577  fesd._grad_phi.shallowCopy(
1578  const_cast<std::vector<std::vector<RealGradient>> &>(fe_face_neighbor.get_dphi()));
1580  fesd._second_phi.shallowCopy(
1581  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_d2phi()));
1582  }
1583  for (const auto & it : _vector_fe_face_neighbor[neighbor_dim])
1584  {
1585  FEVectorBase & fe_face_neighbor = *it.second;
1586  const FEType & fe_type = it.first;
1587 
1588  _current_vector_fe_face_neighbor[fe_type] = &fe_face_neighbor;
1589 
1590  VectorFEShapeData & fesd = *_vector_fe_shape_data_face_neighbor[fe_type];
1591 
1592  fe_face_neighbor.reinit(neighbor, &reference_points);
1593 
1594  fesd._phi.shallowCopy(
1595  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face_neighbor.get_phi()));
1596  fesd._grad_phi.shallowCopy(
1597  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_dphi()));
1598  if (_need_second_derivative.find(fe_type) != _need_second_derivative.end())
1599  fesd._second_phi.shallowCopy(const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(
1600  fe_face_neighbor.get_d2phi()));
1601  if (_need_curl.find(fe_type) != _need_curl.end())
1602  fesd._curl_phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(
1603  fe_face_neighbor.get_curl_phi()));
1604  if (_need_div.find(fe_type) != _need_div.end())
1605  fesd._div_phi.shallowCopy(
1606  const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_div_phi()));
1607  }
1608  if (!_unique_fe_face_neighbor_helper.empty())
1609  {
1610  mooseAssert(neighbor_dim < _unique_fe_face_neighbor_helper.size(),
1611  "We should be in bounds here");
1612  _unique_fe_face_neighbor_helper[neighbor_dim]->reinit(neighbor, &reference_points);
1613  }
1614 
1616  const_cast<std::vector<Point> &>(_holder_fe_face_neighbor_helper[neighbor_dim]->get_xyz()));
1617 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2721
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2506
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2502
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
std::map< FEType, FEBase * > _current_fe_face_neighbor
The "neighbor face" fe object that matches the current elem.
Definition: Assembly.h:2341
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:293
FEGenericBase< RealGradient > FEVectorBase
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
The "neighbor face" vector fe object that matches the current elem.
Definition: Assembly.h:2350
FEGenericBase< Real > FEBase
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2729
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2324
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2500
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820
MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
Definition: Assembly.h:2518

◆ reinitFENeighbor()

void Assembly::reinitFENeighbor ( const Elem *  neighbor,
const std::vector< Point > &  reference_points 
)
private

Definition at line 1620 of file Assembly.C.

Referenced by reinitNeighborAtPhysical().

1621 {
1622  unsigned int neighbor_dim = neighbor->dim();
1623 
1624  // reinit neighbor face
1625  for (const auto & it : _fe_neighbor[neighbor_dim])
1626  {
1627  FEBase & fe_neighbor = *it.second;
1628  FEType fe_type = it.first;
1629  FEShapeData & fesd = *_fe_shape_data_neighbor[fe_type];
1630 
1631  fe_neighbor.reinit(neighbor, &reference_points);
1632 
1633  _current_fe_neighbor[fe_type] = &fe_neighbor;
1634 
1635  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_neighbor.get_phi()));
1636  fesd._grad_phi.shallowCopy(
1637  const_cast<std::vector<std::vector<RealGradient>> &>(fe_neighbor.get_dphi()));
1639  fesd._second_phi.shallowCopy(
1640  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_neighbor.get_d2phi()));
1641  }
1642  for (const auto & it : _vector_fe_neighbor[neighbor_dim])
1643  {
1644  FEVectorBase & fe_neighbor = *it.second;
1645  const FEType & fe_type = it.first;
1646 
1647  _current_vector_fe_neighbor[fe_type] = &fe_neighbor;
1648 
1649  VectorFEShapeData & fesd = *_vector_fe_shape_data_neighbor[fe_type];
1650 
1651  fe_neighbor.reinit(neighbor, &reference_points);
1652 
1653  fesd._phi.shallowCopy(
1654  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_neighbor.get_phi()));
1655  fesd._grad_phi.shallowCopy(
1656  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_neighbor.get_dphi()));
1657  if (_need_second_derivative.find(fe_type) != _need_second_derivative.end())
1658  fesd._second_phi.shallowCopy(
1659  const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_neighbor.get_d2phi()));
1660  if (_need_curl.find(fe_type) != _need_curl.end())
1661  fesd._curl_phi.shallowCopy(
1662  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_neighbor.get_curl_phi()));
1663  if (_need_div.find(fe_type) != _need_div.end())
1664  fesd._div_phi.shallowCopy(
1665  const_cast<std::vector<std::vector<Real>> &>(fe_neighbor.get_div_phi()));
1666  }
1667  if (!_unique_fe_neighbor_helper.empty())
1668  {
1669  mooseAssert(neighbor_dim < _unique_fe_neighbor_helper.size(), "We should be in bounds here");
1670  _unique_fe_neighbor_helper[neighbor_dim]->reinit(neighbor, &reference_points);
1671  }
1672 }
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
Definition: Assembly.h:2325
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2720
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
FEGenericBase< RealGradient > FEVectorBase
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
std::map< FEType, FEBase * > _current_fe_neighbor
The "neighbor" fe object that matches the current elem.
Definition: Assembly.h:2339
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2499
FEGenericBase< Real > FEBase
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2501
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2728
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820
std::map< FEType, FEVectorBase * > _current_vector_fe_neighbor
The "neighbor" vector fe object that matches the current elem.
Definition: Assembly.h:2348

◆ reinitFVFace()

void Assembly::reinitFVFace ( const FaceInfo fi)

Definition at line 1850 of file Assembly.C.

Referenced by SubProblem::reinitFVFace().

1851 {
1852  _current_elem = &fi.elem();
1854  _current_side = fi.elemSideID();
1856  mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1857  "current subdomain has been set incorrectly");
1858 
1861 
1862  prepareResidual();
1863  prepareNeighbor();
1865 
1866  unsigned int dim = _current_elem->dim();
1867  if (_current_qrule_face != qrules(dim).fv_face.get())
1868  {
1869  setFaceQRule(qrules(dim).fv_face.get(), dim);
1870  // The order of the element that is used for initing here doesn't matter since this will just
1871  // be used for constant monomials (which only need a single integration point)
1872  if (dim == 3)
1873  _current_qrule_face->init(QUAD4);
1874  else
1875  _current_qrule_face->init(EDGE2);
1876  }
1877 
1879 
1880  mooseAssert(_current_qrule_face->n_points() == 1,
1881  "Our finite volume quadrature rule should always yield a single point");
1882 
1883  // We've initialized the reference points. Now we need to compute the physical location of the
1884  // quadrature points. We do not do any FE initialization so we cannot simply copy over FE
1885  // results like we do in reinitFEFace. Instead we handle the computation of the physical
1886  // locations manually
1888  const auto & ref_points = _current_qrule_face->get_points();
1889  const auto & ref_point = ref_points[0];
1890  auto physical_point = FEMap::map(_current_side_elem->dim(), _current_side_elem, ref_point);
1891  _current_q_points_face[0] = physical_point;
1892 
1894  {
1895  mooseAssert(_current_neighbor_subdomain_id == _current_neighbor_elem->subdomain_id(),
1896  "current neighbor subdomain has been set incorrectly");
1897  // Now handle the neighbor qrule/qpoints
1898  ArbitraryQuadrature * const neighbor_rule =
1900  // Here we are setting a reference point that is correct for the neighbor *side* element. It
1901  // would be wrong if this reference point is used for a volumetric FE reinit with the neighbor
1902  neighbor_rule->setPoints(ref_points);
1903  setNeighborQRule(neighbor_rule, _current_neighbor_elem->dim());
1905  _current_q_points_face_neighbor[0] = std::move(physical_point);
1906  }
1907 }
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
Definition: Assembly.C:2678
const Elem & elem() const
Definition: FaceInfo.h:80
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2579
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2549
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
void prepareNeighbor()
Definition: Assembly.C:2795
unsigned int elemSideID() const
Definition: FaceInfo.h:106
unsigned int neighborSideID() const
Definition: FaceInfo.h:107
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:2567
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
const Elem * neighborPtr() const
Definition: FaceInfo.h:83
void prepareResidual()
Sizes and zeroes the residual for the current element.
Definition: Assembly.C:2700
SubdomainID _current_neighbor_subdomain_id
The current neighbor subdomain ID.
Definition: Assembly.h:2565
void setFaceQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:671
void setNeighborQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition: Assembly.C:706
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:213
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2557
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2581
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2479
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2559
MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
Definition: Assembly.h:2518
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551
ElemSideBuilder _current_side_elem_builder
In place side element builder for _current_side_elem.
Definition: Assembly.h:2827
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ reinitLowerDElem()

void Assembly::reinitLowerDElem ( const Elem *  elem,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)

Reinitialize FE data for a lower dimenesional element with a given set of reference points.

Definition at line 2282 of file Assembly.C.

Referenced by SubProblem::reinitLowerDElem().

2285 {
2287 
2288  const unsigned int elem_dim = elem->dim();
2289  mooseAssert(elem_dim < _mesh_dimension,
2290  "The lower dimensional element should truly be a lower dimensional element");
2291 
2292  if (pts)
2293  {
2294  // Lower rule matches the face rule for the higher dimensional element
2295  ArbitraryQuadrature * lower_rule = qrules(elem_dim + 1).arbitrary_face.get();
2296 
2297  // This also sets the quadrature weights to unity
2298  lower_rule->setPoints(*pts);
2299 
2300  if (weights)
2301  lower_rule->setWeights(*weights);
2302 
2303  setLowerQRule(lower_rule, elem_dim);
2304  }
2305  else if (_current_qrule_lower != qrules(elem_dim + 1).face.get())
2306  setLowerQRule(qrules(elem_dim + 1).face.get(), elem_dim);
2307 
2308  for (const auto & it : _fe_lower[elem_dim])
2309  {
2310  FEBase & fe_lower = *it.second;
2311  FEType fe_type = it.first;
2312 
2313  fe_lower.reinit(elem);
2314 
2315  if (FEShapeData * fesd = _fe_shape_data_lower[fe_type].get())
2316  {
2317  fesd->_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_lower.get_phi()));
2318  fesd->_grad_phi.shallowCopy(
2319  const_cast<std::vector<std::vector<RealGradient>> &>(fe_lower.get_dphi()));
2321  fesd->_second_phi.shallowCopy(
2322  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_lower.get_d2phi()));
2323  }
2324 
2325  // Dual shape functions need to be computed after primal basis being initialized
2326  if (FEShapeData * fesd = _fe_shape_data_dual_lower[fe_type].get())
2327  {
2328  fesd->_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_lower.get_dual_phi()));
2329  fesd->_grad_phi.shallowCopy(
2330  const_cast<std::vector<std::vector<RealGradient>> &>(fe_lower.get_dual_dphi()));
2332  fesd->_second_phi.shallowCopy(
2333  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_lower.get_dual_d2phi()));
2334  }
2335  }
2336  if (!_unique_fe_lower_helper.empty())
2337  {
2338  mooseAssert(elem_dim < _unique_fe_lower_helper.size(), "We should be in bounds here");
2339  _unique_fe_lower_helper[elem_dim]->reinit(elem);
2340  }
2341 
2343  return;
2344 
2345  if (pts && !weights)
2346  {
2347  // We only have dummy weights so the JxWs computed during our FE reinits are meaningless and
2348  // we cannot use them
2349 
2351  // We are in a Cartesian coordinate system and we can just use the element volume method
2352  // which has fast computation for certain element types
2353  _current_lower_d_elem_volume = elem->volume();
2354  else
2355  // We manually compute the volume taking the curvilinear coordinate transformations into
2356  // account
2358  }
2359  else
2360  {
2361  // During that last loop the helper objects will have been reinitialized as well
2362  FEBase & helper_fe = *_holder_fe_lower_helper[elem_dim];
2363  const auto & physical_q_points = helper_fe.get_xyz();
2364  const auto & JxW = helper_fe.get_JxW();
2365  MooseArray<Real> coord;
2367  _current_qrule_lower, physical_q_points, coord, elem->subdomain_id());
2369  for (const auto qp : make_range(_current_qrule_lower->n_points()))
2370  _current_lower_d_elem_volume += JxW[qp] * coord[qp];
2371  }
2372 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
void setWeights(const std::vector< Real > &weights)
Set the quadrature weights.
QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2545
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition: Assembly.h:2326
void setPoints(const std::vector< Point > &points)
Set the quadrature points.
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
unsigned int _mesh_dimension
Definition: Assembly.h:2307
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
std::unique_ptr< QBase > face
area/face (meshdim-1) quadrature rule
Definition: Assembly.h:2397
Real elementVolume(const Elem *elem) const
On-demand computation of volume element accounting for RZ/RSpherical.
Definition: Assembly.C:3778
SubProblem & _subproblem
Definition: Assembly.h:2266
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition: Assembly.h:2722
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition: Assembly.h:2584
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2509
FEGenericBase< Real > FEBase
Real _current_lower_d_elem_volume
The current lower dimensional element volume.
Definition: Assembly.h:2590
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:240
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition: Assembly.h:2723
void setCoordinateTransformation(const QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1719
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition: Assembly.h:2588
void setLowerQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for lower dimensional integration.
Definition: Assembly.C:687
IntRange< T > make_range(T beg, T end)
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1223
std::unique_ptr< ArbitraryQuadrature > arbitrary_face
area/face (meshdim-1) custom points quadrature rule
Definition: Assembly.h:2403
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2513

◆ reinitMortarElem()

void Assembly::reinitMortarElem ( const Elem *  elem)

reinitialize a mortar segment mesh element in order to get a proper JxW

Definition at line 2396 of file Assembly.C.

Referenced by SubProblem::reinitMortarElem().

2397 {
2398  mooseAssert(elem->dim() == _mesh_dimension - 1,
2399  "You should be calling reinitMortarElem on a lower dimensional element");
2400 
2401  _fe_msm->reinit(elem);
2402  _msm_elem = elem;
2403 
2404  MooseArray<Point> array_q_points;
2405  array_q_points.shallowCopy(const_cast<std::vector<Point> &>(_fe_msm->get_xyz()));
2406  setCoordinateTransformation(_qrule_msm, array_q_points, _coord_msm, elem->subdomain_id());
2407 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2539
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2534
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:293
unsigned int _mesh_dimension
Definition: Assembly.h:2307
const Elem * _msm_elem
Definition: Assembly.h:2833
void setCoordinateTransformation(const QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1719
MooseArray< Real > _coord_msm
The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment m...
Definition: Assembly.h:2527

◆ reinitNeighbor()

void Assembly::reinitNeighbor ( const Elem *  neighbor,
const std::vector< Point > &  reference_points 
)

Reinitializes the neighbor side using reference coordinates.

Definition at line 1675 of file Assembly.C.

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

1676 {
1677  unsigned int neighbor_dim = neighbor->dim();
1678  mooseAssert(_current_neighbor_subdomain_id == neighbor->subdomain_id(),
1679  "Neighbor subdomain ID has not been correctly set");
1680 
1681  ArbitraryQuadrature * neighbor_rule =
1682  qrules(neighbor_dim, _current_neighbor_subdomain_id).neighbor.get();
1683  neighbor_rule->setPoints(reference_points);
1684  setNeighborQRule(neighbor_rule, neighbor_dim);
1685 
1687  mooseAssert(_current_neighbor_subdomain_id == _current_neighbor_elem->subdomain_id(),
1688  "current neighbor subdomain has been set incorrectly");
1689 
1690  // Calculate the volume of the neighbor
1692  {
1693  unsigned int dim = neighbor->dim();
1695  QBase * qrule = qrules(dim).vol.get();
1696 
1697  fe.attach_quadrature_rule(qrule);
1698  fe.reinit(neighbor);
1699 
1700  const std::vector<Real> & JxW = fe.get_JxW();
1701  MooseArray<Point> q_points;
1702  q_points.shallowCopy(const_cast<std::vector<Point> &>(fe.get_xyz()));
1703 
1705 
1707  for (unsigned int qp = 0; qp < qrule->n_points(); qp++)
1709  }
1710 
1711  auto n = numExtraElemIntegers();
1712  for (auto i : make_range(n))
1713  _neighbor_extra_elem_ids[i] = _current_neighbor_elem->get_extra_integer(i);
1714  _neighbor_extra_elem_ids[n] = _current_neighbor_elem->subdomain_id();
1715 }
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:2571
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition: Assembly.h:2524
std::unique_ptr< QBase > vol
volume/elem (meshdim) quadrature rule
Definition: Assembly.h:2395
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2505
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:2573
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:293
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition: Assembly.h:326
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
SubdomainID _current_neighbor_subdomain_id
The current neighbor subdomain ID.
Definition: Assembly.h:2565
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition: Assembly.h:2492
FEGenericBase< Real > FEBase
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:240
void setNeighborQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition: Assembly.C:706
void setCoordinateTransformation(const QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1719
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423
IntRange< T > make_range(T beg, T end)
std::unique_ptr< ArbitraryQuadrature > neighbor
area/face (meshdim-1) custom points quadrature rule for DG
Definition: Assembly.h:2405

◆ reinitNeighborAtPhysical() [1/2]

void Assembly::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.

Definition at line 2410 of file Assembly.C.

2413 {
2414  unsigned int neighbor_dim = neighbor->dim();
2415  FEInterface::inverse_map(
2416  neighbor_dim, FEType(), neighbor, physical_points, _current_neighbor_ref_points);
2417 
2418  if (_need_JxW_neighbor)
2419  {
2420  mooseAssert(
2421  physical_points.size() == 1,
2422  "If reinitializing with more than one point, then I am dubious of your use case. Perhaps "
2423  "you are performing a DG type method and you are reinitializing using points from the "
2424  "element face. In such a case your neighbor JxW must have its index order 'match' the "
2425  "element JxW index order, e.g. imagining a vertical 1D face with two quadrature points, "
2426  "if "
2427  "index 0 for elem JxW corresponds to the 'top' quadrature point, then index 0 for "
2428  "neighbor "
2429  "JxW must also correspond to the 'top' quadrature point. And libMesh/MOOSE has no way to "
2430  "guarantee that with multiple quadrature points.");
2431 
2433 
2434  // With a single point our size-1 JxW should just be the element volume
2437  }
2438 
2441 
2442  // Save off the physical points
2443  _current_physical_points = physical_points;
2444 }
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2599
MooseArray< Real > _current_JxW_neighbor
The current transformed jacobian weights on a neighbor&#39;s face.
Definition: Assembly.h:2522
std::vector< Point > _current_neighbor_ref_points
The current reference points on the neighbor element.
Definition: Assembly.h:2854
void reinitFEFaceNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition: Assembly.C:1561
ElemSideBuilder _current_neighbor_side_elem_builder
In place side element builder for _current_neighbor_side_elem.
Definition: Assembly.h:2829
void reinitNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Reinitializes the neighbor side using reference coordinates.
Definition: Assembly.C:1675
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:213
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:2569
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
Definition: Assembly.h:2520

◆ reinitNeighborAtPhysical() [2/2]

void Assembly::reinitNeighborAtPhysical ( const Elem *  neighbor,
const std::vector< Point > &  physical_points 
)

Reinitializes the neighbor at the physical coordinates within element given.

Definition at line 2447 of file Assembly.C.

2449 {
2450  unsigned int neighbor_dim = neighbor->dim();
2451  FEInterface::inverse_map(
2452  neighbor_dim, FEType(), neighbor, physical_points, _current_neighbor_ref_points);
2453 
2456  // Save off the physical points
2457  _current_physical_points = physical_points;
2458 }
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2599
std::vector< Point > _current_neighbor_ref_points
The current reference points on the neighbor element.
Definition: Assembly.h:2854
void reinitNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Reinitializes the neighbor side using reference coordinates.
Definition: Assembly.C:1675
void reinitFENeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition: Assembly.C:1620
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423

◆ reinitNeighborFaceRef()

void Assembly::reinitNeighborFaceRef ( const Elem *  neighbor_elem,
unsigned int  neighbor_side,
Real  tolerance,
const std::vector< Point > *const  pts,
const std::vector< Real > *const  weights = nullptr 
)

Reinitialize FE data for the given neighbor_element on the given side with a given set of reference points.

Definition at line 2186 of file Assembly.C.

Referenced by SubProblem::reinitNeighborFaceRef().

2191 {
2193 
2194  unsigned int neighbor_dim = neighbor->dim();
2195 
2196  ArbitraryQuadrature * neighbor_rule =
2197  qrules(neighbor_dim, neighbor->subdomain_id()).neighbor.get();
2198  neighbor_rule->setPoints(*pts);
2199 
2200  // Attach this quadrature rule to all the _fe_face_neighbor FE objects. This
2201  // has to have garbage quadrature weights but that's ok because we never
2202  // actually use the JxW coming from these FE reinit'd objects, e.g. we use the
2203  // JxW coming from the element face reinit for DGKernels or we use the JxW
2204  // coming from reinit of the mortar segment element in the case of mortar
2205  setNeighborQRule(neighbor_rule, neighbor_dim);
2206 
2207  // reinit neighbor face
2208  for (const auto & it : _fe_face_neighbor[neighbor_dim])
2209  {
2210  FEBase & fe_face_neighbor = *it.second;
2211  FEType fe_type = it.first;
2212  FEShapeData & fesd = *_fe_shape_data_face_neighbor[fe_type];
2213 
2214  fe_face_neighbor.reinit(neighbor, neighbor_side, tolerance, pts, weights);
2215 
2216  _current_fe_face_neighbor[fe_type] = &fe_face_neighbor;
2217 
2218  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_phi()));
2219  fesd._grad_phi.shallowCopy(
2220  const_cast<std::vector<std::vector<RealGradient>> &>(fe_face_neighbor.get_dphi()));
2222  fesd._second_phi.shallowCopy(
2223  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_d2phi()));
2224  }
2225  for (const auto & it : _vector_fe_face_neighbor[neighbor_dim])
2226  {
2227  FEVectorBase & fe_face_neighbor = *it.second;
2228  const FEType & fe_type = it.first;
2229 
2230  _current_vector_fe_face_neighbor[fe_type] = &fe_face_neighbor;
2231 
2232  VectorFEShapeData & fesd = *_vector_fe_shape_data_face_neighbor[fe_type];
2233 
2234  fe_face_neighbor.reinit(neighbor, neighbor_side, tolerance, pts, weights);
2235 
2236  fesd._phi.shallowCopy(
2237  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face_neighbor.get_phi()));
2238  fesd._grad_phi.shallowCopy(
2239  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_dphi()));
2240  if (_need_second_derivative.find(fe_type) != _need_second_derivative.end())
2241  fesd._second_phi.shallowCopy(const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(
2242  fe_face_neighbor.get_d2phi()));
2243  if (_need_curl.find(fe_type) != _need_curl.end())
2244  fesd._curl_phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(
2245  fe_face_neighbor.get_curl_phi()));
2246  if (_need_div.find(fe_type) != _need_div.end())
2247  fesd._div_phi.shallowCopy(
2248  const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_div_phi()));
2249  }
2250  if (!_unique_fe_face_neighbor_helper.empty())
2251  {
2252  mooseAssert(neighbor_dim < _unique_fe_face_neighbor_helper.size(),
2253  "We should be in bounds here");
2254  _unique_fe_face_neighbor_helper[neighbor_dim]->reinit(
2255  neighbor, neighbor_side, tolerance, pts, weights);
2256  }
2257  // During that last loop the helper objects will have been reinitialized as well
2258  // We need to dig out the q_points from it
2260  const_cast<std::vector<Point> &>(_holder_fe_face_neighbor_helper[neighbor_dim]->get_xyz()));
2261 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2721
std::map< FEType, bool > _need_div
Definition: Assembly.h:2821
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2563
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2506
void setPoints(const std::vector< Point > &points)
Set the quadrature points.
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2502
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:2818
std::map< FEType, FEBase * > _current_fe_face_neighbor
The "neighbor face" fe object that matches the current elem.
Definition: Assembly.h:2341
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:293
FEGenericBase< RealGradient > FEVectorBase
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:2819
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
The "neighbor face" vector fe object that matches the current elem.
Definition: Assembly.h:2350
FEGenericBase< Real > FEBase
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2729
void setNeighborQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition: Assembly.C:706
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:423
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2324
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2500
std::map< FEType, bool > _need_curl
Definition: Assembly.h:2820
MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
Definition: Assembly.h:2518

◆ reinitNeighborLowerDElem()

void Assembly::reinitNeighborLowerDElem ( const Elem *  elem)

reinitialize a neighboring lower dimensional element

Definition at line 2375 of file Assembly.C.

Referenced by SubProblem::reinitNeighborLowerDElem().

2376 {
2377  mooseAssert(elem->dim() < _mesh_dimension,
2378  "You should be calling reinitNeighborLowerDElem on a lower dimensional element");
2379 
2381 
2383  return;
2384 
2386  // We are in a Cartesian coordinate system and we can just use the element volume method which
2387  // has fast computation for certain element types
2389  else
2390  // We manually compute the volume taking the curvilinear coordinate transformations into
2391  // account
2393 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
unsigned int _mesh_dimension
Definition: Assembly.h:2307
const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
Definition: Assembly.h:2586
Real elementVolume(const Elem *elem) const
On-demand computation of volume element accounting for RZ/RSpherical.
Definition: Assembly.C:3778
SubProblem & _subproblem
Definition: Assembly.h:2266
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1223
Real _current_neighbor_lower_d_elem_volume
The current neighboring lower dimensional element volume.
Definition: Assembly.h:2594
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition: Assembly.h:2592

◆ residualBlock()

DenseVector<Number>& Assembly::residualBlock ( unsigned int  var_num,
LocalDataKey  ,
TagID  tag_id 
)
inline

Get local residual block for a variable and a tag.

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 1065 of file Assembly.h.

Referenced by TaggingInterface::prepareVectorTagInternal().

1066  {
1067  return _sub_Re[tag_id][var_num];
1068  }
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613

◆ residualBlockLower()

DenseVector<Number>& Assembly::residualBlockLower ( unsigned int  var_num,
LocalDataKey  ,
TagID  tag_id 
)
inline

Get residual block for lower.

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 1083 of file Assembly.h.

Referenced by TaggingInterface::prepareVectorTagLower().

1084  {
1085  return _sub_Rl[tag_id][var_num];
1086  }
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2616

◆ residualBlockNeighbor()

DenseVector<Number>& Assembly::residualBlockNeighbor ( unsigned int  var_num,
LocalDataKey  ,
TagID  tag_id 
)
inline

Get local neighbor residual block for a variable and a tag.

Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 1074 of file Assembly.h.

Referenced by TaggingInterface::prepareVectorTagNeighbor().

1075  {
1076  return _sub_Rn[tag_id][var_num];
1077  }
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2614

◆ resizeADMappingObjects()

void Assembly::resizeADMappingObjects ( unsigned int  n_qp,
unsigned int  dim 
)
private

resize any objects that contribute to automatic differentiation-related mapping calculations

Definition at line 967 of file Assembly.C.

Referenced by computeADFace(), and reinitFE().

968 {
969  _ad_dxyzdxi_map.resize(n_qp);
970  _ad_dxidx_map.resize(n_qp);
971  _ad_dxidy_map.resize(n_qp); // 1D element may live in 2D ...
972  _ad_dxidz_map.resize(n_qp); // ... or 3D
973 
974  if (dim > 1)
975  {
976  _ad_dxyzdeta_map.resize(n_qp);
977  _ad_detadx_map.resize(n_qp);
978  _ad_detady_map.resize(n_qp);
979  _ad_detadz_map.resize(n_qp);
980 
981  if (dim > 2)
982  {
983  _ad_dxyzdzeta_map.resize(n_qp);
984  _ad_dzetadx_map.resize(n_qp);
985  _ad_dzetady_map.resize(n_qp);
986  _ad_dzetadz_map.resize(n_qp);
987  }
988  }
989 
990  _ad_jac.resize(n_qp);
991  _ad_JxW.resize(n_qp);
992  if (_calculate_xyz)
993  _ad_q_points.resize(n_qp);
994 }
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:2787
std::vector< DualReal > _ad_detadz_map
Definition: Assembly.h:2794
std::vector< DualReal > _ad_dxidy_map
Definition: Assembly.h:2790
std::vector< DualReal > _ad_dzetady_map
Definition: Assembly.h:2796
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:2788
std::vector< DualReal > _ad_dzetadz_map
Definition: Assembly.h:2797
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::vector< DualReal > _ad_dzetadx_map
Definition: Assembly.h:2795
std::vector< DualReal > _ad_dxidx_map
Definition: Assembly.h:2789
std::vector< DualReal > _ad_dxidz_map
Definition: Assembly.h:2791
std::vector< DualReal > _ad_jac
Definition: Assembly.h:2786
bool _calculate_xyz
Definition: Assembly.h:2810
std::vector< VectorValue< DualReal > > _ad_dxyzdeta_map
Definition: Assembly.h:2781
std::vector< VectorValue< DualReal > > _ad_dxyzdzeta_map
Definition: Assembly.h:2782
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:213
std::vector< DualReal > _ad_detadx_map
Definition: Assembly.h:2792
std::vector< DualReal > _ad_detady_map
Definition: Assembly.h:2793
std::vector< VectorValue< DualReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:2780

◆ saveDiagLocalArrayJacobian()

void Assembly::saveDiagLocalArrayJacobian ( DenseMatrix< Number > &  ke,
unsigned int  i,
unsigned int  ntest,
unsigned int  j,
unsigned int  nphi,
unsigned int  ivar,
const RealEigenVector &  v 
) const
inline

Helper function for assembling diagonal Jacobian contriubutions on local quadrature points for an array kernel, bc, etc.

Parameters
keThe local Jacobian
iThe local test function index
ntestThe number of test functions
jThe local shape function index
nphiThe number of shape functions
vThe diagonal Jacobian contribution on the current qp

Definition at line 1789 of file Assembly.h.

Referenced by ArrayDGKernel::computeElemNeighJacobian(), ArrayKernel::computeJacobian(), ArrayIntegratedBC::computeJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), and ArrayDGLowerDKernel::computeLowerDJacobian().

1796  {
1797  unsigned int pace = (_component_block_diagonal[ivar] ? 0 : nphi);
1798  for (unsigned int k = 0; k < v.size(); ++k, i += ntest, j += pace)
1799  ke(i, j) += v(k);
1800  }
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771

◆ saveFullLocalArrayJacobian()

void Assembly::saveFullLocalArrayJacobian ( DenseMatrix< Number > &  ke,
unsigned int  i,
unsigned int  ntest,
unsigned int  j,
unsigned int  nphi,
unsigned int  ivar,
unsigned int  jvar,
const RealEigenMatrix &  v 
) const
inline

Helper function for assembling full Jacobian contriubutions on local quadrature points for an array kernel, bc, etc.

Parameters
keThe local Jacobian
iThe local test function index
ntestThe number of test functions
jThe local shape function index
nphiThe number of shape functions
ivarThe array variable index
jvarThe contributing variable index
vThe full Jacobian contribution from a variable on the current qp

Definition at line 1814 of file Assembly.h.

Referenced by ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), ArrayKernel::computeOffDiagJacobian(), ArrayIntegratedBC::computeOffDiagJacobian(), ArrayKernel::computeOffDiagJacobianScalar(), ArrayIntegratedBC::computeOffDiagJacobianScalar(), and ArrayDGLowerDKernel::computeOffDiagLowerDJacobian().

1822  {
1823  if (ivar == jvar && _component_block_diagonal[ivar])
1824  {
1825  for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1826  ke(i, j) += v(k, k);
1827  }
1828  else
1829  {
1830  const unsigned int saved_j = j;
1831  for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1832  {
1833  j = saved_j;
1834  for (unsigned int l = 0; l < v.cols(); ++l, j += nphi)
1835  ke(i, j) += v(k, l);
1836  }
1837  }
1838  }
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2771

◆ saveLocalArrayResidual()

void Assembly::saveLocalArrayResidual ( DenseVector< Number > &  re,
unsigned int  i,
unsigned int  ntest,
const RealEigenVector &  v 
) const
inline

Helper function for assembling residual contriubutions on local quadrature points for an array kernel, bc, etc.

Parameters
reThe local residual
iThe local test function index
ntestThe number of test functions
vThe residual contribution on the current qp

Definition at line 1770 of file Assembly.h.

Referenced by ArrayDGKernel::computeElemNeighResidual(), ArrayDGLowerDKernel::computeLowerDResidual(), ArrayKernel::computeResidual(), ArrayLowerDIntegratedBC::computeResidual(), and ArrayIntegratedBC::computeResidual().

1774  {
1775  for (unsigned int j = 0; j < v.size(); ++j, i += ntest)
1776  re(i) += v(j);
1777  }

◆ scalarFieldCouplingEntries()

const std::vector<std::pair<MooseVariableScalar *, MooseVariableFieldBase *> >& Assembly::scalarFieldCouplingEntries ( ) const
inline

Definition at line 1263 of file Assembly.h.

Referenced by MortarScalarBase::computeScalarOffDiagJacobian().

1264  {
1265  return _cm_sf_entry;
1266  }
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:2288

◆ secondPhi() [1/6]

const VariablePhiSecond& Assembly::secondPhi ( ) const
inline

Definition at line 1278 of file Assembly.h.

Referenced by copyShapes().

1278 { return _second_phi; }
VariablePhiSecond _second_phi
Definition: Assembly.h:2658

◆ secondPhi() [2/6]

const VariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1279 of file Assembly.h.

1280  {
1281  return _second_phi;
1282  }
VariablePhiSecond _second_phi
Definition: Assembly.h:2658

◆ secondPhi() [3/6]

const VectorVariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1330 of file Assembly.h.

1331  {
1332  return _vector_second_phi;
1333  }
VectorVariablePhiSecond _vector_second_phi
Definition: Assembly.h:2675

◆ secondPhi() [4/6]

VariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< Real > &  )
inline

Definition at line 1416 of file Assembly.h.

1416 { return _second_phi; }
VariablePhiSecond _second_phi
Definition: Assembly.h:2658

◆ secondPhi() [5/6]

VectorVariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1451 of file Assembly.h.

1452  {
1453  return _vector_second_phi;
1454  }
VectorVariablePhiSecond _vector_second_phi
Definition: Assembly.h:2675

◆ secondPhi() [6/6]

VariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1529 of file Assembly.h.

1529 { return _second_phi; }
VariablePhiSecond _second_phi
Definition: Assembly.h:2658

◆ secondPhiFace() [1/5]

const VariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1291 of file Assembly.h.

Referenced by copyFaceShapes().

1292  {
1293  return _second_phi_face;
1294  }
VariablePhiSecond _second_phi_face
Definition: Assembly.h:2662

◆ secondPhiFace() [2/5]

const VectorVariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1351 of file Assembly.h.

1352  {
1353  return _vector_second_phi_face;
1354  }
VectorVariablePhiSecond _vector_second_phi_face
Definition: Assembly.h:2681

◆ secondPhiFace() [3/5]

VariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< Real > &  )
inline

Definition at line 1420 of file Assembly.h.

1420 { return _second_phi_face; }
VariablePhiSecond _second_phi_face
Definition: Assembly.h:2662

◆ secondPhiFace() [4/5]

VectorVariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1472 of file Assembly.h.

1473  {
1474  return _vector_second_phi_face;
1475  }
VectorVariablePhiSecond _vector_second_phi_face
Definition: Assembly.h:2681

◆ secondPhiFace() [5/5]

VariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1536 of file Assembly.h.

1537  {
1538  return _second_phi_face;
1539  }
VariablePhiSecond _second_phi_face
Definition: Assembly.h:2662

◆ secondPhiFaceNeighbor() [1/5]

const VariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1317 of file Assembly.h.

Referenced by copyNeighborShapes().

1318  {
1320  }
VariablePhiSecond _second_phi_face_neighbor
Definition: Assembly.h:2670

◆ secondPhiFaceNeighbor() [2/5]

const VectorVariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1398 of file Assembly.h.

1399  {
1401  }
VectorVariablePhiSecond _vector_second_phi_face_neighbor
Definition: Assembly.h:2693

◆ secondPhiFaceNeighbor() [3/5]

VariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< Real > &  )
inline

Definition at line 1440 of file Assembly.h.

1441  {
1443  }
VariablePhiSecond _second_phi_face_neighbor
Definition: Assembly.h:2670

◆ secondPhiFaceNeighbor() [4/5]

VectorVariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1513 of file Assembly.h.

1514  {
1516  }
VectorVariablePhiSecond _vector_second_phi_face_neighbor
Definition: Assembly.h:2693

◆ secondPhiFaceNeighbor() [5/5]

VariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1562 of file Assembly.h.

1563  {
1565  }
VariablePhiSecond _second_phi_face_neighbor
Definition: Assembly.h:2670

◆ secondPhiNeighbor() [1/5]

const VariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1304 of file Assembly.h.

Referenced by copyNeighborShapes().

1305  {
1306  return _second_phi_neighbor;
1307  }
VariablePhiSecond _second_phi_neighbor
Definition: Assembly.h:2666

◆ secondPhiNeighbor() [2/5]

const VectorVariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1374 of file Assembly.h.

1375  {
1377  }
VectorVariablePhiSecond _vector_second_phi_neighbor
Definition: Assembly.h:2687

◆ secondPhiNeighbor() [3/5]

VariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< Real > &  )
inline

Definition at line 1427 of file Assembly.h.

1428  {
1429  return _second_phi_neighbor;
1430  }
VariablePhiSecond _second_phi_neighbor
Definition: Assembly.h:2666

◆ secondPhiNeighbor() [4/5]

VectorVariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1493 of file Assembly.h.

1494  {
1496  }
VectorVariablePhiSecond _vector_second_phi_neighbor
Definition: Assembly.h:2687

◆ secondPhiNeighbor() [5/5]

VariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1549 of file Assembly.h.

1550  {
1551  return _second_phi_neighbor;
1552  }
VariablePhiSecond _second_phi_neighbor
Definition: Assembly.h:2666

◆ setCachedJacobian()

void Assembly::setCachedJacobian ( GlobalDataKey  )

Sets previously-cached Jacobian values via SparseMatrix::set() calls.

Definition at line 4486 of file Assembly.C.

Referenced by NonlinearSystemBase::computeJacobianInternal(), and NonlinearSystemBase::computeNodalBCsResidualAndJacobian().

4487 {
4488  for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4489  if (_sys.hasMatrix(tag))
4490  {
4491  // First zero the rows (including the diagonals) to prepare for
4492  // setting the cached values.
4494 
4495  // TODO: Use SparseMatrix::set_values() for efficiency
4496  for (MooseIndex(_cached_jacobian_values) i = 0; i < _cached_jacobian_values[tag].size(); ++i)
4497  _sys.getMatrix(tag).set(_cached_jacobian_rows[tag][i],
4498  _cached_jacobian_cols[tag][i],
4499  _cached_jacobian_values[tag][i]);
4500  }
4501 
4503 }
SystemBase & _sys
Definition: Assembly.h:2265
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2759
virtual void set(const numeric_index_type i, const numeric_index_type j, const Number value)=0
virtual void zero_rows(std::vector< numeric_index_type > &rows, Number diag_value=0.0)
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2763
void clearCachedJacobian()
Clear any currently cached jacobians.
Definition: Assembly.C:4516

◆ setCoordinateTransformation()

template<typename Points , typename Coords >
void Assembly::setCoordinateTransformation ( const QBase *  qrule,
const Points &  q_points,
Coords &  coord,
SubdomainID  sub_id 
)
private

Definition at line 1719 of file Assembly.C.

Referenced by computeCurrentElemVolume(), computeCurrentFaceVolume(), reinitLowerDElem(), reinitMortarElem(), and reinitNeighbor().

1723 {
1724 
1725  mooseAssert(qrule, "The quadrature rule is null in Assembly::setCoordinateTransformation");
1726  auto n_points = qrule->n_points();
1727  mooseAssert(n_points == q_points.size(),
1728  "The number of points in the quadrature rule doesn't match the number of passed-in "
1729  "points in Assembly::setCoordinateTransformation");
1730 
1731  // Make sure to honor the name of this method and set the _coord_type member because users may
1732  // make use of the const Moose::CoordinateSystem & coordTransformation() { return _coord_type; }
1733  // API. MaterialBase for example uses it
1735 
1736  coord.resize(n_points);
1737  for (unsigned int qp = 0; qp < n_points; qp++)
1738  coordTransformFactor(_subproblem, sub_id, q_points[qp], coord[qp]);
1739 }
void coordTransformFactor(const SubProblem &s, const SubdomainID sub_id, const P &point, C &factor, const SubdomainID neighbor_sub_id)
Computes a conversion multiplier for use when computing integraals for the current coordinate system ...
Definition: Assembly.C:39
SubProblem & _subproblem
Definition: Assembly.h:2266
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1223
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:2375

◆ setCurrentBoundaryID()

void Assembly::setCurrentBoundaryID ( BoundaryID  i)
inline

set the current boundary ID

Definition at line 387 of file Assembly.h.

Referenced by SubProblem::setCurrentBoundaryID().

387 { _current_boundary_id = i; }
BoundaryID _current_boundary_id
The current boundary ID.
Definition: Assembly.h:2553

◆ setCurrentLowerDElem()

void Assembly::setCurrentLowerDElem ( const Elem *const  lower_d_elem)
inline

Set the current lower dimensional element.

This may be null

Definition at line 3176 of file Assembly.h.

Referenced by SubProblem::setCurrentLowerDElem().

3177 {
3178  _current_lower_d_elem = lower_d_elem;
3179 }
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition: Assembly.h:2584

◆ setCurrentNeighborSubdomainID()

void Assembly::setCurrentNeighborSubdomainID ( SubdomainID  i)
inline

set the current subdomain ID

Definition at line 455 of file Assembly.h.

Referenced by DisplacedProblem::setNeighborSubdomainID().

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

◆ setCurrentSubdomainID()

void Assembly::setCurrentSubdomainID ( SubdomainID  i)
inline

set the current subdomain ID

Definition at line 377 of file Assembly.h.

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildPRefinementAndCoarseningMaps(), MaxQpsThread::operator()(), and DisplacedProblem::setCurrentSubdomainID().

377 { _current_subdomain_id = i; }
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2551

◆ setFaceQRule() [1/2]

void Assembly::setFaceQRule ( QBase *  qrule,
unsigned int  dim 
)

Set the qrule to be used for face integration.

Note: This is normally set internally, only use if you know what you are doing!

Parameters
qruleThe qrule you want to set
dimThe spatial dimension of the qrule

Definition at line 671 of file Assembly.C.

Referenced by reinit(), reinitElemFaceRef(), reinitFVFace(), setFaceQRule(), and setLowerQRule().

672 {
673  _current_qrule_face = qrule;
674 
675  for (auto & it : _fe_face[dim])
676  it.second->attach_quadrature_rule(qrule);
677  for (auto & it : _vector_fe_face[dim])
678  it.second->attach_quadrature_rule(qrule);
679  if (!_unique_fe_face_helper.empty())
680  {
681  mooseAssert(dim < _unique_fe_face_helper.size(), "We should not be indexing out of bounds");
682  _unique_fe_face_helper[dim]->attach_quadrature_rule(qrule);
683  }
684 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2467
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2323
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2469
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ setFaceQRule() [2/2]

void Assembly::setFaceQRule ( const Elem *const  elem,
const unsigned int  side 
)

Set the face quadrature rule based on the provided element and side.

Definition at line 1923 of file Assembly.C.

1924 {
1925  const auto elem_dimension = elem->dim();
1927  auto rule = qruleFace(elem, side);
1928  if (_current_qrule_face != rule)
1929  setFaceQRule(rule, elem_dimension);
1930 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
void setFaceQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:671
QBase * qruleFace(const Elem *elem, unsigned int side)
This is an abstraction over the internal qrules function.
Definition: Assembly.C:1910
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:399
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ setLowerQRule()

void Assembly::setLowerQRule ( QBase *  qrule,
unsigned int  dim 
)
private

Set the qrule to be used for lower dimensional integration.

Parameters
qruleThe qrule you want to set
dimThe spatial dimension of the qrule

Definition at line 687 of file Assembly.C.

Referenced by reinitLowerDElem().

688 {
689  // The lower-dimensional quadrature rule matches the face quadrature rule
690  setFaceQRule(qrule, dim);
691 
692  _current_qrule_lower = qrule;
693 
694  for (auto & it : _fe_lower[dim])
695  it.second->attach_quadrature_rule(qrule);
696  for (auto & it : _vector_fe_lower[dim])
697  it.second->attach_quadrature_rule(qrule);
698  if (!_unique_fe_lower_helper.empty())
699  {
700  mooseAssert(dim < _unique_fe_lower_helper.size(), "We should not be indexing out of bounds");
701  _unique_fe_lower_helper[dim]->attach_quadrature_rule(qrule);
702  }
703 }
QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2545
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition: Assembly.h:2326
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
void setFaceQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:671
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2509
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2511

◆ setMortarQRule()

void Assembly::setMortarQRule ( Order  order)

Specifies a custom qrule for integration on mortar segment mesh.

Used to properly integrate QUAD face elements using quadrature on TRI mortar segment elements. For example, to exactly integrate a FIRST order QUAD element, SECOND order quadrature on TRI mortar segments is needed.

Definition at line 732 of file Assembly.C.

Referenced by MortarConstraintBase::MortarConstraintBase().

733 {
734  if (order != _qrule_msm->get_order())
735  {
736  // If custom mortar qrule has not yet been specified
738  {
739  _custom_mortar_qrule = true;
740  const unsigned int dim = _qrule_msm->get_dim();
741  const QuadratureType type = _qrule_msm->type();
742  delete _qrule_msm;
743 
744  _qrule_msm = QBase::build(type, dim, order).release();
745  _fe_msm->attach_quadrature_rule(_qrule_msm);
746  }
747  else
748  mooseError("Mortar quadrature_order: ",
749  order,
750  " does not match previously specified quadrature_order: ",
751  _qrule_msm->get_order(),
752  ". Quadrature_order (when specified) must match for all mortar constraints.");
753  }
754 }
QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2539
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2534
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
QuadratureType
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh...
Definition: Assembly.h:2541

◆ setNeighborQRule()

void Assembly::setNeighborQRule ( QBase *  qrule,
unsigned int  dim 
)

Set the qrule to be used for neighbor integration.

Note: This is normally set internally, only use if you know what you are doing!

Parameters
qruleThe qrule you want to set
dimThe spatial dimension of the qrule

Definition at line 706 of file Assembly.C.

Referenced by reinitFVFace(), reinitNeighbor(), and reinitNeighborFaceRef().

707 {
708  _current_qrule_neighbor = qrule;
709 
710  for (auto & it : _fe_face_neighbor[dim])
711  it.second->attach_quadrature_rule(qrule);
712  for (auto & it : _vector_fe_face_neighbor[dim])
713  it.second->attach_quadrature_rule(qrule);
714  if (!_unique_fe_face_neighbor_helper.empty())
715  {
716  mooseAssert(dim < _unique_fe_face_neighbor_helper.size(),
717  "We should not be indexing out of bounds");
718  _unique_fe_face_neighbor_helper[dim]->attach_quadrature_rule(qrule);
719  }
720 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2502
QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2516
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2324
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2500

◆ setResidual()

void Assembly::setResidual ( NumericVector< Number > &  residual,
GlobalDataKey  ,
const VectorTag vector_tag 
)

Sets local residuals of all field variables to the global residual vector for a tag.

Definition at line 3544 of file Assembly.C.

3545 {
3546  auto & tag_Re = _sub_Re[vector_tag._type_id];
3547  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3548  for (const auto & var : vars)
3549  setResidualBlock(residual,
3550  tag_Re[var->number()],
3551  var->dofIndices(),
3552  var->arrayScalingFactor(),
3553  var->isNodal());
3554 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
void setResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Set a local residual block to a global residual vector with proper scaling.
Definition: Assembly.C:3285
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2613

◆ setResidualBlock()

void Assembly::setResidualBlock ( NumericVector< Number > &  residual,
DenseVector< Number > &  res_block,
const std::vector< dof_id_type > &  dof_indices,
const std::vector< Real > &  scaling_factor,
bool  is_nodal 
)
private

Set a local residual block to a global residual vector with proper scaling.

Definition at line 3285 of file Assembly.C.

Referenced by setResidual(), and setResidualNeighbor().

3290 {
3291  if (dof_indices.size() > 0)
3292  {
3293  std::vector<dof_id_type> di(dof_indices);
3294  _tmp_Re = res_block;
3295  processLocalResidual(_tmp_Re, di, scaling_factor, is_nodal);
3296  residual.insert(_tmp_Re, di);
3297  }
3298 }
virtual void insert(const Number *v, const std::vector< numeric_index_type > &dof_indices)
void processLocalResidual(DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Appling scaling, constraints to the local residual block and populate the full DoF indices for array ...
Definition: Assembly.C:3209
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:2619

◆ setResidualNeighbor()

void Assembly::setResidualNeighbor ( NumericVector< Number > &  residual,
GlobalDataKey  ,
const VectorTag vector_tag 
)

Sets local neighbor residuals of all field variables to the global residual vector for a tag.

Definition at line 3557 of file Assembly.C.

3560 {
3561  auto & tag_Rn = _sub_Rn[vector_tag._type_id];
3562  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3563  for (const auto & var : vars)
3564  setResidualBlock(residual,
3565  tag_Rn[var->number()],
3566  var->dofIndicesNeighbor(),
3567  var->arrayScalingFactor(),
3568  var->isNodal());
3569 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
SystemBase & _sys
Definition: Assembly.h:2265
void setResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor, bool is_nodal)
Set a local residual block to a global residual vector with proper scaling.
Definition: Assembly.C:3285
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2614
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:45
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2303

◆ setVolumeQRule() [1/2]

void Assembly::setVolumeQRule ( QBase *  qrule,
unsigned int  dim 
)

Set the qrule to be used for volume integration.

Note: This is normally set internally, only use if you know what you are doing!

Parameters
qruleThe qrule you want to set
dimThe spatial dimension of the qrule

Definition at line 652 of file Assembly.C.

Referenced by reinit(), and setVolumeQRule().

653 {
654  _current_qrule = qrule;
655 
656  if (qrule) // Don't set a NULL qrule
657  {
658  for (auto & it : _fe[dim])
659  it.second->attach_quadrature_rule(qrule);
660  for (auto & it : _vector_fe[dim])
661  it.second->attach_quadrature_rule(qrule);
662  if (!_unique_fe_helper.empty())
663  {
664  mooseAssert(dim < _unique_fe_helper.size(), "We should not be indexing out of bounds");
665  _unique_fe_helper[dim]->attach_quadrature_rule(qrule);
666  }
667  }
668 }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2357
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::vector< std::unique_ptr< FEBase > > _unique_fe_helper
Containers for holding unique FE helper types if we are doing p-refinement.
Definition: Assembly.h:2322
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2355

◆ setVolumeQRule() [2/2]

void Assembly::setVolumeQRule ( const Elem *  elem)

Set the volumetric quadrature rule based on the provided element.

Definition at line 1801 of file Assembly.C.

1802 {
1803  unsigned int elem_dimension = elem->dim();
1804  _current_qrule_volume = qrules(elem_dimension).vol.get();
1805  // Make sure the qrule is the right one
1807  setVolumeQRule(_current_qrule_volume, elem_dimension);
1808 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:367
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363
std::unique_ptr< QBase > vol
volume/elem (meshdim) quadrature rule
Definition: Assembly.h:2395
void setVolumeQRule(QBase *qrule, unsigned int dim)
Set the qrule to be used for volume integration.
Definition: Assembly.C:652
QBase * _current_qrule_volume
The current volumetric quadrature for the element.
Definition: Assembly.h:2365
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2443

◆ setXFEM()

void Assembly::setXFEM ( std::shared_ptr< XFEMInterface xfem)
inline

Set the pointer to the XFEM controller object.

Definition at line 1754 of file Assembly.h.

1754 { _xfem = xfem; }
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2332

◆ side()

const unsigned int& Assembly::side ( ) const
inline

Returns the current side.

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

Definition at line 399 of file Assembly.h.

Referenced by computeADFace(), computeFaceMap(), modifyFaceWeightsDueToXFEM(), qruleArbitraryFace(), qruleFace(), qruleFaceHelper(), reinit(), reinitElemAndNeighbor(), reinitFEFace(), and setFaceQRule().

399 { return _current_side; }
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2557

◆ sideElem()

const Elem*& Assembly::sideElem ( )
inline

Returns the side element.

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

Definition at line 411 of file Assembly.h.

411 { return _current_side_elem; }
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2559

◆ sideElemVolume()

const Real& Assembly::sideElemVolume ( )
inline

Returns the reference to the volume of current side element.

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

Definition at line 417 of file Assembly.h.

417 { return _current_side_volume; }
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:2561

◆ tangents()

const MooseArray<std::vector<Point> >& Assembly::tangents ( ) const
inline

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

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

Definition at line 321 of file Assembly.h.

321 { return _current_tangents; }
MooseArray< std::vector< Point > > _current_tangents
The current tangent vectors at the quadrature points.
Definition: Assembly.h:2487

◆ writeableQRule()

QBase* const& Assembly::writeableQRule ( )
inline

Returns the reference to the current quadrature being used.

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

Definition at line 216 of file Assembly.h.

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps(), and MooseMesh::buildPRefinementAndCoarseningMaps().

216 { return _current_qrule; }
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2363

◆ writeableQRuleFace()

QBase* const& Assembly::writeableQRuleFace ( )
inline

Returns the reference to the current quadrature being used on a current face.

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

Definition at line 292 of file Assembly.h.

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps(), and MooseMesh::buildPRefinementAndCoarseningMaps().

292 { return _current_qrule_face; }
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2475

◆ writeableQRuleNeighbor()

QBase* const& Assembly::writeableQRuleNeighbor ( )
inline

Returns the reference to the current quadrature being used on a current neighbor.

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

Definition at line 477 of file Assembly.h.

477 { return _current_qrule_neighbor; }
QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2516

◆ zeroCachedJacobian()

void Assembly::zeroCachedJacobian ( GlobalDataKey  )

Zero out previously-cached Jacobian rows.

Definition at line 4506 of file Assembly.C.

4507 {
4508  for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4509  if (_sys.hasMatrix(tag))
4511 
4513 }
SystemBase & _sys
Definition: Assembly.h:2265
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2761
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:328
virtual void zero_rows(std::vector< numeric_index_type > &rows, Number diag_value=0.0)
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:973
void clearCachedJacobian()
Clear any currently cached jacobians.
Definition: Assembly.C:4516

Member Data Documentation

◆ _ad_coord

MooseArray<DualReal> Assembly::_ad_coord
private

The AD version of the current coordinate transformation coefficients.

Definition at line 2379 of file Assembly.h.

Referenced by adCoordTransformation(), computeCurrentElemVolume(), computeCurrentFaceVolume(), and ~Assembly().

◆ _ad_curvatures

MooseArray<DualReal> Assembly::_ad_curvatures
protected

Definition at line 2803 of file Assembly.h.

Referenced by adCurvatures(), computeADFace(), computeFaceMap(), and ~Assembly().

◆ _ad_d2xyzdeta2_map

std::vector<VectorValue<DualReal> > Assembly::_ad_d2xyzdeta2_map
protected

Definition at line 2785 of file Assembly.h.

Referenced by computeFaceMap().

◆ _ad_d2xyzdxi2_map

std::vector<VectorValue<DualReal> > Assembly::_ad_d2xyzdxi2_map
protected

Definition at line 2783 of file Assembly.h.

Referenced by computeFaceMap().

◆ _ad_d2xyzdxideta_map

std::vector<VectorValue<DualReal> > Assembly::_ad_d2xyzdxideta_map
protected

Definition at line 2784 of file Assembly.h.

Referenced by computeFaceMap().

◆ _ad_detadx_map

std::vector<DualReal> Assembly::_ad_detadx_map
protected

Definition at line 2792 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_detady_map

std::vector<DualReal> Assembly::_ad_detady_map
protected

Definition at line 2793 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_detadz_map

std::vector<DualReal> Assembly::_ad_detadz_map
protected

Definition at line 2794 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxidx_map

std::vector<DualReal> Assembly::_ad_dxidx_map
protected

Definition at line 2789 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxidy_map

std::vector<DualReal> Assembly::_ad_dxidy_map
protected

Definition at line 2790 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxidz_map

std::vector<DualReal> Assembly::_ad_dxidz_map
protected

Definition at line 2791 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxyzdeta_map

std::vector<VectorValue<DualReal> > Assembly::_ad_dxyzdeta_map
protected

Definition at line 2781 of file Assembly.h.

Referenced by computeFaceMap(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxyzdxi_map

std::vector<VectorValue<DualReal> > Assembly::_ad_dxyzdxi_map
protected

AD quantities.

Definition at line 2780 of file Assembly.h.

Referenced by computeFaceMap(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxyzdzeta_map

std::vector<VectorValue<DualReal> > Assembly::_ad_dxyzdzeta_map
protected

Definition at line 2782 of file Assembly.h.

Referenced by computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dzetadx_map

std::vector<DualReal> Assembly::_ad_dzetadx_map
protected

Definition at line 2795 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dzetady_map

std::vector<DualReal> Assembly::_ad_dzetady_map
protected

Definition at line 2796 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dzetadz_map

std::vector<DualReal> Assembly::_ad_dzetadz_map
protected

Definition at line 2797 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_grad_phi_data

std::map<FEType, ADTemplateVariablePhiGradient<Real> > Assembly::_ad_grad_phi_data
mutableprotected

Definition at line 2733 of file Assembly.h.

Referenced by adGradPhi(), feADGradPhi(), reinitFE(), and ~Assembly().

◆ _ad_grad_phi_data_face

std::map<FEType, ADTemplateVariablePhiGradient<Real> > Assembly::_ad_grad_phi_data_face
mutableprotected

Definition at line 2735 of file Assembly.h.

Referenced by computeADFace(), feADGradPhiFace(), and ~Assembly().

◆ _ad_jac

std::vector<DualReal> Assembly::_ad_jac
protected

Definition at line 2786 of file Assembly.h.

Referenced by computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_JxW

MooseArray<DualReal> Assembly::_ad_JxW
protected

◆ _ad_JxW_face

MooseArray<DualReal> Assembly::_ad_JxW_face
protected

Definition at line 2799 of file Assembly.h.

Referenced by adJxWFace(), computeADFace(), computeFaceMap(), and ~Assembly().

◆ _ad_normals

MooseArray<VectorValue<DualReal> > Assembly::_ad_normals
protected

Definition at line 2800 of file Assembly.h.

Referenced by adNormals(), computeADFace(), computeFaceMap(), and ~Assembly().

◆ _ad_q_points

MooseArray<VectorValue<DualReal> > Assembly::_ad_q_points
protected

◆ _ad_q_points_face

MooseArray<VectorValue<DualReal> > Assembly::_ad_q_points_face
protected

◆ _ad_vector_grad_phi_data

std::map<FEType, ADTemplateVariablePhiGradient<RealVectorValue> > Assembly::_ad_vector_grad_phi_data
mutableprotected

Definition at line 2734 of file Assembly.h.

Referenced by reinitFE(), and ~Assembly().

◆ _ad_vector_grad_phi_data_face

std::map<FEType, ADTemplateVariablePhiGradient<RealVectorValue> > Assembly::_ad_vector_grad_phi_data_face
mutableprotected

Definition at line 2737 of file Assembly.h.

Referenced by computeADFace(), and ~Assembly().

◆ _block_diagonal_matrix

bool Assembly::_block_diagonal_matrix
protected

Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take some shortcuts.

Definition at line 2768 of file Assembly.h.

Referenced by init(), jacobianBlock(), jacobianBlockLowerUsed(), jacobianBlockMortar(), jacobianBlockNeighbor(), jacobianBlockNeighborUsed(), jacobianBlockNonlocal(), jacobianBlockNonlocalUsed(), and jacobianBlockUsed().

◆ _building_helpers

bool Assembly::_building_helpers
private

Whether we are currently building the FE classes for the helpers.

Definition at line 2329 of file Assembly.h.

Referenced by Assembly(), buildFaceFE(), buildFaceNeighborFE(), buildFE(), buildLowerDFE(), and buildNeighborFE().

◆ _cached_jacobian_cols

std::vector<std::vector<dof_id_type> > Assembly::_cached_jacobian_cols
protected

Column where the corresponding cached value should go.

Definition at line 2763 of file Assembly.h.

Referenced by addCachedJacobian(), cacheJacobian(), cacheJacobianBlock(), cacheJacobianBlockNonzero(), clearCachedJacobian(), init(), and setCachedJacobian().

◆ _cached_jacobian_rows

std::vector<std::vector<dof_id_type> > Assembly::_cached_jacobian_rows
protected

Row where the corresponding cached value should go.

Definition at line 2761 of file Assembly.h.

Referenced by addCachedJacobian(), cacheJacobian(), cacheJacobianBlock(), cacheJacobianBlockNonzero(), clearCachedJacobian(), init(), setCachedJacobian(), and zeroCachedJacobian().

◆ _cached_jacobian_values

std::vector<std::vector<Real> > Assembly::_cached_jacobian_values
protected

◆ _cached_residual_rows

std::vector<std::vector<dof_id_type> > Assembly::_cached_residual_rows
protected

Where the cached values should go (the first vector is for TIME vs NONTIME)

Definition at line 2754 of file Assembly.h.

Referenced by addCachedResidualDirectly(), addCachedResiduals(), cacheResidual(), cacheResidualLower(), cacheResidualNeighbor(), cacheResidualNodes(), clearCachedResiduals(), and init().

◆ _cached_residual_values

std::vector<std::vector<Real> > Assembly::_cached_residual_values
protected

Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME)

Definition at line 2751 of file Assembly.h.

Referenced by addCachedResidualDirectly(), addCachedResiduals(), cacheResidual(), cacheResidualLower(), cacheResidualNeighbor(), cacheResidualNodes(), clearCachedResiduals(), and init().

◆ _calculate_ad_coord

bool Assembly::_calculate_ad_coord
mutableprotected

Whether to calculate coord with AD.

This will only be set to true if a consumer calls adCoordTransformation()

Definition at line 2816 of file Assembly.h.

Referenced by adCoordTransformation(), computeCurrentElemVolume(), and computeCurrentFaceVolume().

◆ _calculate_curvatures

bool Assembly::_calculate_curvatures
mutableprotected

◆ _calculate_face_xyz

bool Assembly::_calculate_face_xyz
mutableprotected

Definition at line 2811 of file Assembly.h.

Referenced by adCoordTransformation(), adQPointsFace(), computeADFace(), and computeFaceMap().

◆ _calculate_xyz

bool Assembly::_calculate_xyz
mutableprotected

◆ _cm

const CouplingMatrix* Assembly::_cm
private

◆ _cm_ff_entry

std::vector<std::pair<MooseVariableFieldBase *, MooseVariableFieldBase *> > Assembly::_cm_ff_entry
private

◆ _cm_fs_entry

std::vector<std::pair<MooseVariableFieldBase *, MooseVariableScalar *> > Assembly::_cm_fs_entry
private

Entries in the coupling matrix for field variables vs scalar variables.

Definition at line 2286 of file Assembly.h.

Referenced by addJacobian(), cacheJacobian(), fieldScalarCouplingEntries(), and init().

◆ _cm_nonlocal_entry

std::vector<std::pair<MooseVariableFieldBase *, MooseVariableFieldBase *> > Assembly::_cm_nonlocal_entry
private

Entries in the coupling matrix for field variables for nonlocal calculations.

Definition at line 2292 of file Assembly.h.

Referenced by addJacobianNonlocal(), cacheJacobianNonlocal(), initNonlocalCoupling(), nonlocalCouplingEntries(), prepareNonlocal(), and prepareVariableNonlocal().

◆ _cm_sf_entry

std::vector<std::pair<MooseVariableScalar *, MooseVariableFieldBase *> > Assembly::_cm_sf_entry
private

Entries in the coupling matrix for scalar variables vs field variables.

Definition at line 2288 of file Assembly.h.

Referenced by addJacobian(), cacheJacobian(), init(), and scalarFieldCouplingEntries().

◆ _cm_ss_entry

std::vector<std::pair<MooseVariableScalar *, MooseVariableScalar *> > Assembly::_cm_ss_entry
private

Entries in the coupling matrix for scalar variables.

Definition at line 2290 of file Assembly.h.

Referenced by addJacobianScalar(), and init().

◆ _column_indices

std::vector<dof_id_type> Assembly::_column_indices
protected

Definition at line 2848 of file Assembly.h.

Referenced by cacheJacobian().

◆ _component_block_diagonal

std::vector<bool> Assembly::_component_block_diagonal
protected

◆ _compute_face_map_side_elem_builder

ElemSideBuilder Assembly::_compute_face_map_side_elem_builder
protected

In place side element builder for computeFaceMap()

Definition at line 2831 of file Assembly.h.

Referenced by computeFaceMap().

◆ _computing_jacobian

const bool& Assembly::_computing_jacobian
private

Whether we are currently computing the Jacobian.

Definition at line 2278 of file Assembly.h.

Referenced by computingJacobian().

◆ _computing_residual

const bool& Assembly::_computing_residual
private

Whether we are currently computing the residual.

Definition at line 2275 of file Assembly.h.

Referenced by computingResidual().

◆ _computing_residual_and_jacobian

const bool& Assembly::_computing_residual_and_jacobian
private

Whether we are currently computing the residual and Jacobian.

Definition at line 2281 of file Assembly.h.

Referenced by computingResidualAndJacobian().

◆ _coord

MooseArray<Real> Assembly::_coord
private

The current coordinate transformation coefficients.

Definition at line 2377 of file Assembly.h.

Referenced by computeCurrentElemVolume(), computeCurrentFaceVolume(), coordTransformation(), and ~Assembly().

◆ _coord_msm

MooseArray<Real> Assembly::_coord_msm
private

The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment mesh.

Definition at line 2527 of file Assembly.h.

Referenced by mortarCoordTransformation(), reinitMortarElem(), and ~Assembly().

◆ _coord_neighbor

MooseArray<Real> Assembly::_coord_neighbor
private

The current coordinate transformation coefficients.

Definition at line 2524 of file Assembly.h.

Referenced by reinitNeighbor(), and ~Assembly().

◆ _coord_type

Moose::CoordinateSystemType Assembly::_coord_type
private

The coordinate system.

Definition at line 2375 of file Assembly.h.

Referenced by coordSystem(), and setCoordinateTransformation().

◆ _current_boundary_id

BoundaryID Assembly::_current_boundary_id
protected

The current boundary ID.

Definition at line 2553 of file Assembly.h.

Referenced by currentBoundaryID(), and setCurrentBoundaryID().

◆ _current_elem

const Elem* Assembly::_current_elem
protected

The current "element" we are currently on.

Definition at line 2549 of file Assembly.h.

Referenced by computeCurrentElemVolume(), computeCurrentFaceVolume(), elem(), reinit(), reinitAtPhysical(), reinitElemFaceRef(), reinitFE(), reinitFEFace(), and reinitFVFace().

◆ _current_elem_volume

Real Assembly::_current_elem_volume
protected

Volume of the current element.

Definition at line 2555 of file Assembly.h.

Referenced by computeCurrentElemVolume(), and elemVolume().

◆ _current_elem_volume_computed

bool Assembly::_current_elem_volume_computed
protected

Boolean to indicate whether current element volumes has been computed.

Definition at line 2579 of file Assembly.h.

Referenced by computeCurrentElemVolume(), reinit(), reinitAtPhysical(), and reinitFVFace().

◆ _current_fe

std::map<FEType, FEBase *> Assembly::_current_fe
private

The "volume" fe object that matches the current elem.

Definition at line 2335 of file Assembly.h.

Referenced by reinitFE().

◆ _current_fe_face

std::map<FEType, FEBase *> Assembly::_current_fe_face
private

The "face" fe object that matches the current elem.

Definition at line 2337 of file Assembly.h.

Referenced by reinitElemFaceRef(), and reinitFEFace().

◆ _current_fe_face_helper

FEBase* Assembly::_current_fe_face_helper
private

helper object for transforming coordinates

Definition at line 2473 of file Assembly.h.

◆ _current_fe_face_neighbor

std::map<FEType, FEBase *> Assembly::_current_fe_face_neighbor
private

The "neighbor face" fe object that matches the current elem.

Definition at line 2341 of file Assembly.h.

Referenced by reinitFEFaceNeighbor(), and reinitNeighborFaceRef().

◆ _current_fe_helper

FEBase* Assembly::_current_fe_helper
private

The current helper object for transforming coordinates.

Definition at line 2361 of file Assembly.h.

◆ _current_fe_neighbor

std::map<FEType, FEBase *> Assembly::_current_fe_neighbor
private

The "neighbor" fe object that matches the current elem.

Definition at line 2339 of file Assembly.h.

Referenced by reinitFENeighbor().

◆ _current_JxW

MooseArray<Real> Assembly::_current_JxW
private

The current list of transformed jacobian weights.

Definition at line 2373 of file Assembly.h.

Referenced by computeCurrentElemVolume(), JxW(), modifyArbitraryWeights(), modifyWeightsDueToXFEM(), and reinitFE().

◆ _current_JxW_face

MooseArray<Real> Assembly::_current_JxW_face
private

The current transformed jacobian weights on a face.

Definition at line 2481 of file Assembly.h.

Referenced by computeADFace(), computeCurrentFaceVolume(), JxWFace(), modifyFaceWeightsDueToXFEM(), reinitElemFaceRef(), and reinitFEFace().

◆ _current_JxW_neighbor

MooseArray<Real> Assembly::_current_JxW_neighbor
private

The current transformed jacobian weights on a neighbor's face.

Definition at line 2522 of file Assembly.h.

Referenced by JxWNeighbor(), and reinitNeighborAtPhysical().

◆ _current_lower_d_elem

const Elem* Assembly::_current_lower_d_elem
protected

The current lower dimensional element.

Definition at line 2584 of file Assembly.h.

Referenced by lowerDElem(), reinitLowerDElem(), and setCurrentLowerDElem().

◆ _current_lower_d_elem_volume

Real Assembly::_current_lower_d_elem_volume
protected

The current lower dimensional element volume.

Definition at line 2590 of file Assembly.h.

Referenced by lowerDElemVolume(), and reinitLowerDElem().

◆ _current_neighbor_elem

const Elem* Assembly::_current_neighbor_elem
protected

The current neighbor "element".

Definition at line 2563 of file Assembly.h.

Referenced by neighbor(), reinit(), reinitAtPhysical(), reinitFVFace(), reinitNeighbor(), and reinitNeighborFaceRef().

◆ _current_neighbor_lower_d_elem

const Elem* Assembly::_current_neighbor_lower_d_elem
protected

The current neighboring lower dimensional element.

Definition at line 2586 of file Assembly.h.

Referenced by neighborLowerDElem(), and reinitNeighborLowerDElem().

◆ _current_neighbor_lower_d_elem_volume

Real Assembly::_current_neighbor_lower_d_elem_volume
protected

The current neighboring lower dimensional element volume.

Definition at line 2594 of file Assembly.h.

Referenced by neighborLowerDElemVolume(), and reinitNeighborLowerDElem().

◆ _current_neighbor_node

const Node* Assembly::_current_neighbor_node
protected

The current neighboring node we are working with.

Definition at line 2577 of file Assembly.h.

Referenced by nodeNeighbor(), and reinit().

◆ _current_neighbor_ref_points

std::vector<Point> Assembly::_current_neighbor_ref_points
protected

The current reference points on the neighbor element.

Definition at line 2854 of file Assembly.h.

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

◆ _current_neighbor_side

unsigned int Assembly::_current_neighbor_side
protected

The current side of the selected neighboring element (valid only when working with sides)

Definition at line 2567 of file Assembly.h.

Referenced by neighborSide(), reinitElemAndNeighbor(), and reinitFVFace().

◆ _current_neighbor_side_elem

const Elem* Assembly::_current_neighbor_side_elem
protected

The current side element of the ncurrent neighbor element.

Definition at line 2569 of file Assembly.h.

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

◆ _current_neighbor_side_elem_builder

ElemSideBuilder Assembly::_current_neighbor_side_elem_builder
protected

In place side element builder for _current_neighbor_side_elem.

Definition at line 2829 of file Assembly.h.

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

◆ _current_neighbor_subdomain_id

SubdomainID Assembly::_current_neighbor_subdomain_id
protected

The current neighbor subdomain ID.

Definition at line 2565 of file Assembly.h.

Referenced by currentNeighborSubdomainID(), reinitFVFace(), reinitNeighbor(), and setCurrentNeighborSubdomainID().

◆ _current_neighbor_volume

Real Assembly::_current_neighbor_volume
protected

Volume of the current neighbor.

Definition at line 2573 of file Assembly.h.

Referenced by neighborVolume(), and reinitNeighbor().

◆ _current_node

const Node* Assembly::_current_node
protected

The current node we are working with.

Definition at line 2575 of file Assembly.h.

Referenced by node(), and reinit().

◆ _current_normals

MooseArray<Point> Assembly::_current_normals
private

The current Normal vectors at the quadrature points.

Definition at line 2483 of file Assembly.h.

Referenced by computeADFace(), normals(), reinitElemFaceRef(), and reinitFEFace().

◆ _current_physical_points

MooseArray<Point> Assembly::_current_physical_points
protected

This will be filled up with the physical points passed into reinitAtPhysical() if it is called. Invalid at all other times.

Definition at line 2599 of file Assembly.h.

Referenced by modifyArbitraryWeights(), physicalPoints(), reinitAtPhysical(), reinitNeighborAtPhysical(), and ~Assembly().

◆ _current_q_points

MooseArray<Point> Assembly::_current_q_points
private

The current list of quadrature points.

Definition at line 2371 of file Assembly.h.

Referenced by computeCurrentElemVolume(), modifyWeightsDueToXFEM(), qPoints(), and reinitFE().

◆ _current_q_points_face

MooseArray<Point> Assembly::_current_q_points_face
private

◆ _current_q_points_face_neighbor

MooseArray<Point> Assembly::_current_q_points_face_neighbor
private

The current quadrature points on the neighbor face.

Definition at line 2518 of file Assembly.h.

Referenced by qPointsFaceNeighbor(), reinitFEFaceNeighbor(), reinitFVFace(), and reinitNeighborFaceRef().

◆ _current_qface_arbitrary

ArbitraryQuadrature* Assembly::_current_qface_arbitrary
private

The current arbitrary quadrature rule used on element faces.

Definition at line 2477 of file Assembly.h.

◆ _current_qrule

QBase* Assembly::_current_qrule
private

The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac kernels)

Definition at line 2363 of file Assembly.h.

Referenced by clearCachedQRules(), computeCurrentElemVolume(), modifyArbitraryWeights(), modifyWeightsDueToXFEM(), qRule(), reinit(), reinitFE(), setVolumeQRule(), and writeableQRule().

◆ _current_qrule_arbitrary

ArbitraryQuadrature* Assembly::_current_qrule_arbitrary
private

The current arbitrary quadrature rule used within the element interior.

Definition at line 2367 of file Assembly.h.

Referenced by modifyArbitraryWeights(), modifyFaceWeightsDueToXFEM(), modifyWeightsDueToXFEM(), and reinit().

◆ _current_qrule_arbitrary_face

ArbitraryQuadrature* Assembly::_current_qrule_arbitrary_face
private

The current arbitrary quadrature rule used on the element face.

Definition at line 2369 of file Assembly.h.

Referenced by reinit().

◆ _current_qrule_face

QBase* Assembly::_current_qrule_face
private

◆ _current_qrule_lower

QBase* Assembly::_current_qrule_lower
private

quadrature rule used on lower dimensional elements.

This should always be the same as the face qrule

Definition at line 2545 of file Assembly.h.

Referenced by clearCachedQRules(), reinitLowerDElem(), and setLowerQRule().

◆ _current_qrule_neighbor

QBase* Assembly::_current_qrule_neighbor
private

quadrature rule used on neighbors

Definition at line 2516 of file Assembly.h.

Referenced by clearCachedQRules(), qRuleNeighbor(), setNeighborQRule(), and writeableQRuleNeighbor().

◆ _current_qrule_volume

QBase* Assembly::_current_qrule_volume
private

The current volumetric quadrature for the element.

Definition at line 2365 of file Assembly.h.

Referenced by setVolumeQRule().

◆ _current_side

unsigned int Assembly::_current_side
protected

The current side of the selected element (valid only when working with sides)

Definition at line 2557 of file Assembly.h.

Referenced by reinit(), reinitFVFace(), and side().

◆ _current_side_elem

const Elem* Assembly::_current_side_elem
protected

The current "element" making up the side we are currently on.

Definition at line 2559 of file Assembly.h.

Referenced by reinit(), reinitFVFace(), and sideElem().

◆ _current_side_elem_builder

ElemSideBuilder Assembly::_current_side_elem_builder
protected

In place side element builder for _current_side_elem.

Definition at line 2827 of file Assembly.h.

Referenced by reinit(), and reinitFVFace().

◆ _current_side_volume

Real Assembly::_current_side_volume
protected

Volume of the current side element.

Definition at line 2561 of file Assembly.h.

Referenced by computeCurrentFaceVolume(), and sideElemVolume().

◆ _current_side_volume_computed

bool Assembly::_current_side_volume_computed
protected

Boolean to indicate whether current element side volumes has been computed.

Definition at line 2581 of file Assembly.h.

Referenced by computeCurrentFaceVolume(), reinit(), and reinitFVFace().

◆ _current_subdomain_id

SubdomainID Assembly::_current_subdomain_id
protected

The current subdomain ID.

Definition at line 2551 of file Assembly.h.

Referenced by currentSubdomainID(), qrules(), reinit(), reinitAtPhysical(), reinitFVFace(), and setCurrentSubdomainID().

◆ _current_tangents

MooseArray<std::vector<Point> > Assembly::_current_tangents
private

The current tangent vectors at the quadrature points.

Definition at line 2487 of file Assembly.h.

Referenced by reinitElemFaceRef(), and tangents().

◆ _current_vector_fe

std::map<FEType, FEVectorBase *> Assembly::_current_vector_fe
private

The "volume" vector fe object that matches the current elem.

Definition at line 2344 of file Assembly.h.

Referenced by reinitFE().

◆ _current_vector_fe_face

std::map<FEType, FEVectorBase *> Assembly::_current_vector_fe_face
private

The "face" vector fe object that matches the current elem.

Definition at line 2346 of file Assembly.h.

Referenced by reinitElemFaceRef(), and reinitFEFace().

◆ _current_vector_fe_face_neighbor

std::map<FEType, FEVectorBase *> Assembly::_current_vector_fe_face_neighbor
private

The "neighbor face" vector fe object that matches the current elem.

Definition at line 2350 of file Assembly.h.

Referenced by reinitFEFaceNeighbor(), and reinitNeighborFaceRef().

◆ _current_vector_fe_neighbor

std::map<FEType, FEVectorBase *> Assembly::_current_vector_fe_neighbor
private

The "neighbor" vector fe object that matches the current elem.

Definition at line 2348 of file Assembly.h.

Referenced by reinitFENeighbor().

◆ _curvatures

MooseArray<Real> Assembly::_curvatures
protected

Definition at line 2802 of file Assembly.h.

Referenced by computeADFace(), reinitElemFaceRef(), reinitFEFace(), and ~Assembly().

◆ _custom_mortar_qrule

bool Assembly::_custom_mortar_qrule
private

Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh.

Definition at line 2541 of file Assembly.h.

Referenced by createQRules(), and setMortarQRule().

◆ _disp_numbers_and_directions

std::vector<std::pair<unsigned int, unsigned short> > Assembly::_disp_numbers_and_directions
protected

Container of displacement numbers and directions.

Definition at line 2808 of file Assembly.h.

Referenced by assignDisplacements(), computeFaceMap(), and computeSinglePointMapAD().

◆ _displaced

const bool Assembly::_displaced
private

Definition at line 2268 of file Assembly.h.

Referenced by computeADFace(), and reinitFE().

◆ _dof_map

const DofMap& Assembly::_dof_map
private

◆ _element_matrix

DenseMatrix<Number> Assembly::_element_matrix
protected

A working matrix to avoid repeated heap allocations when caching Jacobians that must have libMesh-level constraints (hanging nodes, periodic bcs) applied to them.

This stores local Jacobian values

Definition at line 2843 of file Assembly.h.

Referenced by cacheJacobian().

◆ _element_vector

DenseVector<Number> Assembly::_element_vector
protected

A working vector to avoid repeated heap allocations when caching residuals that must have libMesh-level constraints (hanging nodes, periodic bcs) applied to them.

This stores local residual values

Definition at line 2838 of file Assembly.h.

Referenced by cacheResiduals().

◆ _extra_elem_ids

std::vector<dof_id_type> Assembly::_extra_elem_ids
private

Extra element IDs.

Definition at line 2490 of file Assembly.h.

Referenced by Assembly(), extraElemID(), numExtraElemIntegers(), reinitFE(), and reinitFEFace().

◆ _fe

std::map<unsigned int, std::map<FEType, FEBase *> > Assembly::_fe
mutableprivate

Each dimension's actual fe objects indexed on type.

Definition at line 2355 of file Assembly.h.

Referenced by Assembly(), buildFE(), getFE(), havePRefinement(), reinitFE(), setVolumeQRule(), and ~Assembly().

◆ _fe_face

std::map<unsigned int, std::map<FEType, FEBase *> > Assembly::_fe_face
mutableprivate

types of finite elements

Definition at line 2467 of file Assembly.h.

Referenced by Assembly(), buildFaceFE(), computeADFace(), getFEFace(), havePRefinement(), reinitElemFaceRef(), reinitFEFace(), setFaceQRule(), and ~Assembly().

◆ _fe_face_neighbor

std::map<unsigned int, std::map<FEType, FEBase *> > Assembly::_fe_face_neighbor
mutableprivate

◆ _fe_lower

std::map<unsigned int, std::map<FEType, FEBase *> > Assembly::_fe_lower
mutableprivate

FE objects for lower dimensional elements.

Definition at line 2509 of file Assembly.h.

Referenced by Assembly(), buildLowerDDualFE(), buildLowerDFE(), havePRefinement(), reinitDual(), reinitLowerDElem(), setLowerQRule(), and ~Assembly().

◆ _fe_msm

std::unique_ptr<FEBase> Assembly::_fe_msm
private

A FE object for working on mortar segement elements.

Definition at line 2534 of file Assembly.h.

Referenced by Assembly(), createQRules(), qPointsMortar(), reinitMortarElem(), and setMortarQRule().

◆ _fe_neighbor

std::map<unsigned int, std::map<FEType, FEBase *> > Assembly::_fe_neighbor
mutableprivate

types of finite elements

Definition at line 2499 of file Assembly.h.

Referenced by Assembly(), buildNeighborFE(), getFENeighbor(), havePRefinement(), reinitFENeighbor(), and ~Assembly().

◆ _fe_shape_data

std::map<FEType, std::unique_ptr<FEShapeData> > Assembly::_fe_shape_data
mutableprotected

Shape function values, gradients, second derivatives for each FE type.

Definition at line 2718 of file Assembly.h.

Referenced by buildFE(), feCurlPhi(), feDivPhi(), feGradPhi(), fePhi(), feSecondPhi(), and reinitFE().

◆ _fe_shape_data_dual_lower

std::map<FEType, std::unique_ptr<FEShapeData> > Assembly::_fe_shape_data_dual_lower
mutableprotected

◆ _fe_shape_data_face

std::map<FEType, std::unique_ptr<FEShapeData> > Assembly::_fe_shape_data_face
mutableprotected

◆ _fe_shape_data_face_neighbor

std::map<FEType, std::unique_ptr<FEShapeData> > Assembly::_fe_shape_data_face_neighbor
mutableprotected

◆ _fe_shape_data_lower

std::map<FEType, std::unique_ptr<FEShapeData> > Assembly::_fe_shape_data_lower
mutableprotected

Definition at line 2722 of file Assembly.h.

Referenced by buildLowerDFE(), feGradPhiLower(), fePhiLower(), and reinitLowerDElem().

◆ _fe_shape_data_neighbor

std::map<FEType, std::unique_ptr<FEShapeData> > Assembly::_fe_shape_data_neighbor
mutableprotected

◆ _grad_phi

VariablePhiGradient Assembly::_grad_phi
protected

Definition at line 2657 of file Assembly.h.

Referenced by gradPhi().

◆ _grad_phi_face

VariablePhiGradient Assembly::_grad_phi_face
protected

Definition at line 2661 of file Assembly.h.

Referenced by gradPhiFace().

◆ _grad_phi_face_neighbor

VariablePhiGradient Assembly::_grad_phi_face_neighbor
protected

Definition at line 2669 of file Assembly.h.

Referenced by gradPhiFaceNeighbor().

◆ _grad_phi_neighbor

VariablePhiGradient Assembly::_grad_phi_neighbor
protected

Definition at line 2665 of file Assembly.h.

Referenced by gradPhiNeighbor().

◆ _have_p_refinement

bool Assembly::_have_p_refinement
protected

Whether we have ever conducted p-refinement.

Definition at line 2851 of file Assembly.h.

Referenced by havePRefinement().

◆ _helper_type

const FEType Assembly::_helper_type
private

The finite element type of the FE helper classes.

The helper class gives us data like JxW, the physical quadrature point locations, etc.

Definition at line 2311 of file Assembly.h.

Referenced by buildFaceFE(), buildFaceNeighborFE(), buildFE(), buildLowerDFE(), and buildNeighborFE().

◆ _holder_fe_face_helper

std::map<unsigned int, FEBase *> Assembly::_holder_fe_face_helper
private

Each dimension's helper objects.

Definition at line 2471 of file Assembly.h.

Referenced by Assembly(), computeADFace(), computeFaceMap(), havePRefinement(), helpersRequestData(), reinitElemFaceRef(), and reinitFEFace().

◆ _holder_fe_face_neighbor_helper

std::map<unsigned int, FEBase *> Assembly::_holder_fe_face_neighbor_helper
private

◆ _holder_fe_helper

std::map<unsigned int, FEBase *> Assembly::_holder_fe_helper
private

Each dimension's helper objects.

Definition at line 2359 of file Assembly.h.

Referenced by Assembly(), havePRefinement(), helpersRequestData(), reinitAtPhysical(), and reinitFE().

◆ _holder_fe_lower_helper

std::map<unsigned int, FEBase *> Assembly::_holder_fe_lower_helper
private

helper object for transforming coordinates for lower dimensional element quadrature points

Definition at line 2513 of file Assembly.h.

Referenced by Assembly(), havePRefinement(), helpersRequestData(), and reinitLowerDElem().

◆ _holder_fe_neighbor_helper

std::map<unsigned int, FEBase *> Assembly::_holder_fe_neighbor_helper
private

Each dimension's helper objects.

Definition at line 2505 of file Assembly.h.

Referenced by Assembly(), havePRefinement(), helpersRequestData(), and reinitNeighbor().

◆ _holder_normals

std::map<unsigned int, const std::vector<Point> *> Assembly::_holder_normals
private

Holds pointers to the dimension's normal vectors.

Definition at line 2494 of file Assembly.h.

◆ _jacobian_block_lower_used

std::vector<std::vector<std::vector<unsigned char> > > Assembly::_jacobian_block_lower_used
private

Flag that indicates if the jacobian block for the lower dimensional element was used.

Definition at line 2299 of file Assembly.h.

Referenced by addJacobianLowerD(), addJacobianNeighborLowerD(), cacheJacobianMortar(), init(), jacobianBlockLowerUsed(), and prepareLowerD().

◆ _jacobian_block_neighbor_used

std::vector<std::vector<std::vector<unsigned char> > > Assembly::_jacobian_block_neighbor_used
private

Flag that indicates if the jacobian block for neighbor was used.

Definition at line 2297 of file Assembly.h.

Referenced by addJacobianNeighbor(), addJacobianNeighborLowerD(), cacheJacobianNeighbor(), init(), jacobianBlockNeighborUsed(), and prepareNeighbor().

◆ _jacobian_block_nonlocal_used

std::vector<std::vector<std::vector<unsigned char> > > Assembly::_jacobian_block_nonlocal_used
private

◆ _jacobian_block_used

std::vector<std::vector<std::vector<unsigned char> > > Assembly::_jacobian_block_used
private

◆ _JxW_msm

const std::vector<Real>* Assembly::_JxW_msm
private

A JxW for working on mortar segement elements.

Definition at line 2532 of file Assembly.h.

Referenced by Assembly(), and jxWMortar().

◆ _mapped_normals

std::vector<Eigen::Map<RealDIMValue> > Assembly::_mapped_normals
private

Mapped normals.

Definition at line 2485 of file Assembly.h.

Referenced by mappedNormals(), and reinitFEFace().

◆ _max_cached_jacobians

unsigned int Assembly::_max_cached_jacobians
protected

Definition at line 2765 of file Assembly.h.

Referenced by addCachedJacobian().

◆ _max_cached_residuals

unsigned int Assembly::_max_cached_residuals
protected

Definition at line 2756 of file Assembly.h.

Referenced by clearCachedResiduals().

◆ _mesh

MooseMesh& Assembly::_mesh
private

Definition at line 2305 of file Assembly.h.

Referenced by adCurvatures(), Assembly(), and havePRefinement().

◆ _mesh_dimension

unsigned int Assembly::_mesh_dimension
private

◆ _msm_elem

const Elem* Assembly::_msm_elem = nullptr
protected

Definition at line 2833 of file Assembly.h.

Referenced by msmElem(), and reinitMortarElem().

◆ _need_curl

std::map<FEType, bool> Assembly::_need_curl
mutableprotected

◆ _need_div

std::map<FEType, bool> Assembly::_need_div
mutableprotected

◆ _need_dual

bool Assembly::_need_dual
protected

Whether dual shape functions need to be computed for mortar constraints.

Definition at line 2596 of file Assembly.h.

Referenced by activateDual(), and needDual().

◆ _need_JxW_neighbor

bool Assembly::_need_JxW_neighbor
mutableprivate

Flag to indicate that JxW_neighbor is needed.

Definition at line 2520 of file Assembly.h.

Referenced by JxWNeighbor(), and reinitNeighborAtPhysical().

◆ _need_lower_d_elem_volume

bool Assembly::_need_lower_d_elem_volume
mutableprotected

Whether we need to compute the lower dimensional element volume.

Definition at line 2588 of file Assembly.h.

Referenced by lowerDElemVolume(), and reinitLowerDElem().

◆ _need_neighbor_elem_volume

bool Assembly::_need_neighbor_elem_volume
mutableprotected

true is apps need to compute neighbor element volume

Definition at line 2571 of file Assembly.h.

Referenced by neighborVolume(), and reinitNeighbor().

◆ _need_neighbor_lower_d_elem_volume

bool Assembly::_need_neighbor_lower_d_elem_volume
mutableprotected

Whether we need to compute the neighboring lower dimensional element volume.

Definition at line 2592 of file Assembly.h.

Referenced by neighborLowerDElemVolume(), and reinitNeighborLowerDElem().

◆ _need_second_derivative

std::map<FEType, bool> Assembly::_need_second_derivative
mutableprotected

◆ _need_second_derivative_neighbor

std::map<FEType, bool> Assembly::_need_second_derivative_neighbor
mutableprotected

◆ _neighbor_extra_elem_ids

std::vector<dof_id_type> Assembly::_neighbor_extra_elem_ids
private

Extra element IDs of neighbor.

Definition at line 2492 of file Assembly.h.

Referenced by Assembly(), extraElemIDNeighbor(), and reinitNeighbor().

◆ _nonlocal_cm

const CouplingMatrix& Assembly::_nonlocal_cm
private

Definition at line 2272 of file Assembly.h.

Referenced by initNonlocalCoupling().

◆ _phi

VariablePhiValue Assembly::_phi
protected

Definition at line 2656 of file Assembly.h.

Referenced by phi().

◆ _phi_face

VariablePhiValue Assembly::_phi_face
protected

Definition at line 2660 of file Assembly.h.

Referenced by phiFace().

◆ _phi_face_neighbor

VariablePhiValue Assembly::_phi_face_neighbor
protected

Definition at line 2668 of file Assembly.h.

Referenced by phiFaceNeighbor().

◆ _phi_neighbor

VariablePhiValue Assembly::_phi_neighbor
protected

Definition at line 2664 of file Assembly.h.

Referenced by phiNeighbor().

◆ _qrule_msm

QBase* Assembly::_qrule_msm
private

A qrule object for working on mortar segement elements.

This needs to be a raw pointer because we need to be able to return a reference to it because we will be constructing other objects that need the qrule before the qrule is actually created

Definition at line 2539 of file Assembly.h.

Referenced by createQRules(), qRuleMortar(), reinitMortarElem(), setMortarQRule(), and ~Assembly().

◆ _qrules

std::unordered_map<SubdomainID, std::vector<QRules> > Assembly::_qrules
private

Holds quadrature rules for each dimension.

These are created up front at the start of the simulation and reused/referenced for the remainder of the sim. This data structure should generally be read/accessed via the qrules() function.

Definition at line 2412 of file Assembly.h.

Referenced by bumpAllQRuleOrder(), bumpVolumeQRuleOrder(), createQRules(), and qrules().

◆ _residual_vector_tags

const std::vector<VectorTag>& Assembly::_residual_vector_tags
protected

The residual vector tags that Assembly could possibly contribute to.

The following variables are all indexed with this vector (i.e., index 0 in the following vectors corresponds to the tag with TagID _residual_vector_tags[0]._id): _sub_Re, _sub_Rn, _sub_Rl, _cached_residual_rows, _cached_residual_values,

This index is also available in VectorTag::_type_id

Definition at line 2748 of file Assembly.h.

Referenced by clearCachedResiduals(), and init().

◆ _row_indices

std::vector<dof_id_type> Assembly::_row_indices
protected

Working vectors to avoid repeated heap allocations when caching residuals/Jacobians that must have libMesh-level constraints (hanging nodes, periodic bcs) applied to them.

These are for storing the dof indices

Definition at line 2848 of file Assembly.h.

Referenced by cacheJacobian(), and cacheResiduals().

◆ _scaling_vector

const NumericVector<Real>* Assembly::_scaling_vector = nullptr
protected

The map from global index to variable scaling factor.

Definition at line 2824 of file Assembly.h.

Referenced by hasScalingVector().

◆ _second_phi

VariablePhiSecond Assembly::_second_phi
protected

Definition at line 2658 of file Assembly.h.

Referenced by secondPhi().

◆ _second_phi_face

VariablePhiSecond Assembly::_second_phi_face
protected

Definition at line 2662 of file Assembly.h.

Referenced by secondPhiFace().

◆ _second_phi_face_neighbor

VariablePhiSecond Assembly::_second_phi_face_neighbor
protected

Definition at line 2670 of file Assembly.h.

Referenced by secondPhiFaceNeighbor().

◆ _second_phi_neighbor

VariablePhiSecond Assembly::_second_phi_neighbor
protected

Definition at line 2666 of file Assembly.h.

Referenced by secondPhiNeighbor().

◆ _sub_Kee

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kee
protected

Definition at line 2632 of file Assembly.h.

Referenced by init(), jacobianBlock(), jacobianBlockMortar(), and jacobianBlockNeighbor().

◆ _sub_Keg

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Keg
protected

Definition at line 2633 of file Assembly.h.

Referenced by init(), and jacobianBlockNonlocal().

◆ _sub_Kel

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kel
protected

dsecondary/dlower (or delement/dlower)

Definition at line 2648 of file Assembly.h.

Referenced by init(), and jacobianBlockMortar().

◆ _sub_Ken

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Ken
protected

jacobian contributions from the element and neighbor <Tag, ivar, jvar>

Definition at line 2636 of file Assembly.h.

Referenced by init(), jacobianBlockMortar(), and jacobianBlockNeighbor().

◆ _sub_Kle

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kle
protected

dlower/dsecondary (or dlower/delement)

Definition at line 2644 of file Assembly.h.

Referenced by init(), and jacobianBlockMortar().

◆ _sub_Kll

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kll
protected

dlower/dlower

Definition at line 2642 of file Assembly.h.

Referenced by init(), and jacobianBlockMortar().

◆ _sub_Kln

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kln
protected

dlower/dprimary (or dlower/dneighbor)

Definition at line 2646 of file Assembly.h.

Referenced by init(), and jacobianBlockMortar().

◆ _sub_Kne

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kne
protected

jacobian contributions from the neighbor and element <Tag, ivar, jvar>

Definition at line 2638 of file Assembly.h.

Referenced by init(), jacobianBlockMortar(), and jacobianBlockNeighbor().

◆ _sub_Knl

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Knl
protected

dprimary/dlower (or dneighbor/dlower)

Definition at line 2650 of file Assembly.h.

Referenced by init(), and jacobianBlockMortar().

◆ _sub_Knn

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Knn
protected

jacobian contributions from the neighbor <Tag, ivar, jvar>

Definition at line 2640 of file Assembly.h.

Referenced by init(), jacobianBlockMortar(), and jacobianBlockNeighbor().

◆ _sub_Re

std::vector<std::vector<DenseVector<Number> > > Assembly::_sub_Re
protected

◆ _sub_Rl

std::vector<std::vector<DenseVector<Number> > > Assembly::_sub_Rl
protected

residual contributions for each variable from the lower dimensional element

Definition at line 2616 of file Assembly.h.

Referenced by addResidualLower(), cacheResidualLower(), init(), prepareLowerD(), and residualBlockLower().

◆ _sub_Rn

std::vector<std::vector<DenseVector<Number> > > Assembly::_sub_Rn
protected

◆ _subproblem

SubProblem& Assembly::_subproblem
private

◆ _sys

SystemBase& Assembly::_sys
private

◆ _temp_dof_indices

std::vector<dof_id_type> Assembly::_temp_dof_indices
protected

Temporary work vector to keep from reallocating it.

Definition at line 2774 of file Assembly.h.

Referenced by addResidualBlock(), and cacheResidualBlock().

◆ _temp_reference_points

std::vector<Point> Assembly::_temp_reference_points
protected

Temporary work data for reinitAtPhysical()

Definition at line 2777 of file Assembly.h.

Referenced by reinitAtPhysical().

◆ _tid

THREAD_ID Assembly::_tid
private

◆ _tmp_Ke

DenseMatrix<Number> Assembly::_tmp_Ke
protected

auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction)

Definition at line 2653 of file Assembly.h.

◆ _tmp_Re

DenseVector<Number> Assembly::_tmp_Re
protected

auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction)

Definition at line 2619 of file Assembly.h.

Referenced by addResidualBlock(), cacheResidualBlock(), and setResidualBlock().

◆ _unique_fe_face_helper

std::vector<std::unique_ptr<FEBase> > Assembly::_unique_fe_face_helper
private

Definition at line 2323 of file Assembly.h.

Referenced by havePRefinement(), reinitElemFaceRef(), reinitFEFace(), and setFaceQRule().

◆ _unique_fe_face_neighbor_helper

std::vector<std::unique_ptr<FEBase> > Assembly::_unique_fe_face_neighbor_helper
private

◆ _unique_fe_helper

std::vector<std::unique_ptr<FEBase> > Assembly::_unique_fe_helper
private

Containers for holding unique FE helper types if we are doing p-refinement.

If we are not doing p-refinement then the helper data is owned by the _fe data members

Definition at line 2322 of file Assembly.h.

Referenced by havePRefinement(), reinitFE(), and setVolumeQRule().

◆ _unique_fe_lower_helper

std::vector<std::unique_ptr<FEBase> > Assembly::_unique_fe_lower_helper
private

Definition at line 2326 of file Assembly.h.

Referenced by havePRefinement(), reinitLowerDElem(), and setLowerQRule().

◆ _unique_fe_neighbor_helper

std::vector<std::unique_ptr<FEBase> > Assembly::_unique_fe_neighbor_helper
private

Definition at line 2325 of file Assembly.h.

Referenced by havePRefinement(), and reinitFENeighbor().

◆ _user_added_fe_face_neighbor_of_helper_type

bool Assembly::_user_added_fe_face_neighbor_of_helper_type
mutableprivate

Definition at line 2316 of file Assembly.h.

Referenced by buildFaceNeighborFE(), and havePRefinement().

◆ _user_added_fe_face_of_helper_type

bool Assembly::_user_added_fe_face_of_helper_type
mutableprivate

Definition at line 2315 of file Assembly.h.

Referenced by buildFaceFE(), and havePRefinement().

◆ _user_added_fe_lower_of_helper_type

bool Assembly::_user_added_fe_lower_of_helper_type
mutableprivate

Definition at line 2318 of file Assembly.h.

Referenced by buildLowerDFE(), and havePRefinement().

◆ _user_added_fe_neighbor_of_helper_type

bool Assembly::_user_added_fe_neighbor_of_helper_type
mutableprivate

Definition at line 2317 of file Assembly.h.

Referenced by buildNeighborFE(), and havePRefinement().

◆ _user_added_fe_of_helper_type

bool Assembly::_user_added_fe_of_helper_type
mutableprivate

Whether user code requested a FEType the same as our _helper_type.

Definition at line 2314 of file Assembly.h.

Referenced by buildFE(), and havePRefinement().

◆ _vector_curl_phi

VectorVariablePhiCurl Assembly::_vector_curl_phi
protected

Definition at line 2676 of file Assembly.h.

Referenced by curlPhi().

◆ _vector_curl_phi_face

VectorVariablePhiCurl Assembly::_vector_curl_phi_face
protected

Definition at line 2682 of file Assembly.h.

Referenced by copyFaceShapes(), and curlPhiFace().

◆ _vector_curl_phi_face_neighbor

VectorVariablePhiCurl Assembly::_vector_curl_phi_face_neighbor
protected

Definition at line 2694 of file Assembly.h.

Referenced by curlPhiFaceNeighbor().

◆ _vector_curl_phi_neighbor

VectorVariablePhiCurl Assembly::_vector_curl_phi_neighbor
protected

Definition at line 2688 of file Assembly.h.

Referenced by curlPhiNeighbor().

◆ _vector_div_phi

VectorVariablePhiDivergence Assembly::_vector_div_phi
protected

Definition at line 2677 of file Assembly.h.

Referenced by divPhi().

◆ _vector_div_phi_face

VectorVariablePhiDivergence Assembly::_vector_div_phi_face
protected

Definition at line 2683 of file Assembly.h.

Referenced by copyFaceShapes(), and divPhiFace().

◆ _vector_div_phi_face_neighbor

VectorVariablePhiDivergence Assembly::_vector_div_phi_face_neighbor
protected

Definition at line 2695 of file Assembly.h.

Referenced by divPhiFaceNeighbor().

◆ _vector_div_phi_neighbor

VectorVariablePhiDivergence Assembly::_vector_div_phi_neighbor
protected

Definition at line 2689 of file Assembly.h.

Referenced by divPhiNeighbor().

◆ _vector_fe

std::map<unsigned int, std::map<FEType, FEVectorBase *> > Assembly::_vector_fe
mutableprivate

Each dimension's actual vector fe objects indexed on type.

Definition at line 2357 of file Assembly.h.

Referenced by buildVectorFE(), getVectorFE(), havePRefinement(), reinitFE(), setVolumeQRule(), and ~Assembly().

◆ _vector_fe_face

std::map<unsigned int, std::map<FEType, FEVectorBase *> > Assembly::_vector_fe_face
mutableprivate

types of vector finite elements

Definition at line 2469 of file Assembly.h.

Referenced by buildVectorFaceFE(), computeADFace(), getVectorFEFace(), havePRefinement(), reinitElemFaceRef(), reinitFEFace(), setFaceQRule(), and ~Assembly().

◆ _vector_fe_face_neighbor

std::map<unsigned int, std::map<FEType, FEVectorBase *> > Assembly::_vector_fe_face_neighbor
mutableprivate

◆ _vector_fe_lower

std::map<unsigned int, std::map<FEType, FEVectorBase *> > Assembly::_vector_fe_lower
mutableprivate

Vector FE objects for lower dimensional elements.

Definition at line 2511 of file Assembly.h.

Referenced by buildVectorDualLowerDFE(), buildVectorLowerDFE(), havePRefinement(), setLowerQRule(), and ~Assembly().

◆ _vector_fe_neighbor

std::map<unsigned int, std::map<FEType, FEVectorBase *> > Assembly::_vector_fe_neighbor
mutableprivate

◆ _vector_fe_shape_data

std::map<FEType, std::unique_ptr<VectorFEShapeData> > Assembly::_vector_fe_shape_data
mutableprotected

Shape function values, gradients, second derivatives for each vector FE type.

Definition at line 2726 of file Assembly.h.

Referenced by buildVectorFE(), and reinitFE().

◆ _vector_fe_shape_data_dual_lower

std::map<FEType, std::unique_ptr<VectorFEShapeData> > Assembly::_vector_fe_shape_data_dual_lower
mutableprotected

Definition at line 2731 of file Assembly.h.

Referenced by buildVectorDualLowerDFE().

◆ _vector_fe_shape_data_face

std::map<FEType, std::unique_ptr<VectorFEShapeData> > Assembly::_vector_fe_shape_data_face
mutableprotected

Definition at line 2727 of file Assembly.h.

Referenced by buildVectorFaceFE(), computeADFace(), reinitElemFaceRef(), and reinitFEFace().

◆ _vector_fe_shape_data_face_neighbor

std::map<FEType, std::unique_ptr<VectorFEShapeData> > Assembly::_vector_fe_shape_data_face_neighbor
mutableprotected

◆ _vector_fe_shape_data_lower

std::map<FEType, std::unique_ptr<VectorFEShapeData> > Assembly::_vector_fe_shape_data_lower
mutableprotected

Definition at line 2730 of file Assembly.h.

Referenced by buildVectorLowerDFE().

◆ _vector_fe_shape_data_neighbor

std::map<FEType, std::unique_ptr<VectorFEShapeData> > Assembly::_vector_fe_shape_data_neighbor
mutableprotected

Definition at line 2728 of file Assembly.h.

Referenced by buildVectorNeighborFE(), and reinitFENeighbor().

◆ _vector_grad_phi

VectorVariablePhiGradient Assembly::_vector_grad_phi
protected

Definition at line 2674 of file Assembly.h.

Referenced by gradPhi().

◆ _vector_grad_phi_face

VectorVariablePhiGradient Assembly::_vector_grad_phi_face
protected

Definition at line 2680 of file Assembly.h.

Referenced by gradPhiFace().

◆ _vector_grad_phi_face_neighbor

VectorVariablePhiGradient Assembly::_vector_grad_phi_face_neighbor
protected

Definition at line 2692 of file Assembly.h.

Referenced by gradPhiFaceNeighbor().

◆ _vector_grad_phi_neighbor

VectorVariablePhiGradient Assembly::_vector_grad_phi_neighbor
protected

Definition at line 2686 of file Assembly.h.

Referenced by gradPhiNeighbor().

◆ _vector_phi

VectorVariablePhiValue Assembly::_vector_phi
protected

Definition at line 2673 of file Assembly.h.

Referenced by phi().

◆ _vector_phi_face

VectorVariablePhiValue Assembly::_vector_phi_face
protected

Definition at line 2679 of file Assembly.h.

Referenced by phiFace().

◆ _vector_phi_face_neighbor

VectorVariablePhiValue Assembly::_vector_phi_face_neighbor
protected

Definition at line 2691 of file Assembly.h.

Referenced by phiFaceNeighbor().

◆ _vector_phi_neighbor

VectorVariablePhiValue Assembly::_vector_phi_neighbor
protected

Definition at line 2685 of file Assembly.h.

Referenced by phiNeighbor().

◆ _vector_second_phi

VectorVariablePhiSecond Assembly::_vector_second_phi
protected

Definition at line 2675 of file Assembly.h.

Referenced by secondPhi().

◆ _vector_second_phi_face

VectorVariablePhiSecond Assembly::_vector_second_phi_face
protected

Definition at line 2681 of file Assembly.h.

Referenced by secondPhiFace().

◆ _vector_second_phi_face_neighbor

VectorVariablePhiSecond Assembly::_vector_second_phi_face_neighbor
protected

Definition at line 2693 of file Assembly.h.

Referenced by secondPhiFaceNeighbor().

◆ _vector_second_phi_neighbor

VectorVariablePhiSecond Assembly::_vector_second_phi_neighbor
protected

Definition at line 2687 of file Assembly.h.

Referenced by secondPhiNeighbor().

◆ _xfem

std::shared_ptr<XFEMInterface> Assembly::_xfem
private

The XFEM controller.

Definition at line 2332 of file Assembly.h.

Referenced by modifyFaceWeightsDueToXFEM(), modifyWeightsDueToXFEM(), reinitFE(), reinitFEFace(), and setXFEM().


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