https://mooseframework.inl.gov
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 libMesh::QBase *const & qRule () const
 Returns the reference to the current quadrature being used. More...
 
libMesh::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 () const
 Get the coordinate system type. More...
 
const libMesh::QBase *const & qRuleFace () const
 Returns the reference to the current quadrature being used on a current face. More...
 
libMesh::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< Moose::GenericType< 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 () const
 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 () const
 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 libMesh::QBase *const & qRuleNeighbor () const
 Returns the reference to the current quadrature being used on a current neighbor. More...
 
libMesh::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 (libMesh::QBase *qrule, unsigned int dim)
 Set the qrule to be used for volume integration. More...
 
void setFaceQRule (libMesh::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 addStaticCondensation (libMesh::StaticCondensation &sc)
 Set the static condensation object. More...
 
bool hasStaticCondensation () const
 
void setNeighborQRule (libMesh::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 libMesh::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 libMesh::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 (libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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 (libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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 (libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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 (libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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 (libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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 (libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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 libMesh::QBaseattachQRuleElem (unsigned int dim, FEBase &fe)
 Attaches the current elem/volume quadrature rule to the given fe. More...
 
const libMesh::QBaseattachQRuleFace (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::unordered_set< 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<typename OutputType >
void computeGradPhiAD (const Elem *elem, unsigned int n_qp, ADTemplateVariablePhiGradient< OutputType > &grad_phi, FEGenericBase< OutputType > *fe)
 
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< Moose::GenericType< Point, false > > & genericQPoints () const
 
template<>
const MooseArray< Moose::GenericType< 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< ADReal > > _ad_dxyzdxi_map
 AD quantities. More...
 
std::vector< VectorValue< ADReal > > _ad_dxyzdeta_map
 
std::vector< VectorValue< ADReal > > _ad_dxyzdzeta_map
 
std::vector< VectorValue< ADReal > > _ad_d2xyzdxi2_map
 
std::vector< VectorValue< ADReal > > _ad_d2xyzdxideta_map
 
std::vector< VectorValue< ADReal > > _ad_d2xyzdeta2_map
 
std::vector< ADReal_ad_jac
 
MooseArray< ADReal_ad_JxW
 
MooseArray< VectorValue< ADReal > > _ad_q_points
 
std::vector< ADReal_ad_dxidx_map
 
std::vector< ADReal_ad_dxidy_map
 
std::vector< ADReal_ad_dxidz_map
 
std::vector< ADReal_ad_detadx_map
 
std::vector< ADReal_ad_detady_map
 
std::vector< ADReal_ad_detadz_map
 
std::vector< ADReal_ad_dzetadx_map
 
std::vector< ADReal_ad_dzetady_map
 
std::vector< ADReal_ad_dzetadz_map
 
MooseArray< ADReal_ad_JxW_face
 
MooseArray< VectorValue< ADReal > > _ad_normals
 
MooseArray< VectorValue< ADReal > > _ad_q_points_face
 
MooseArray< Real_curvatures
 
MooseArray< ADReal_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::set< FEType_need_second_derivative
 
std::set< FEType_need_second_derivative_neighbor
 
std::set< FEType_need_curl
 
std::set< FEType_need_div
 
std::set< FEType_need_face_div
 
std::set< FEType_need_neighbor_div
 
std::set< FEType_need_face_neighbor_div
 
const NumericVector< Real > * _scaling_vector = nullptr
 The map from global index to variable scaling factor. More...
 
libMesh::ElemSideBuilder _current_side_elem_builder
 In place side element builder for _current_side_elem. More...
 
libMesh::ElemSideBuilder _current_neighbor_side_elem_builder
 In place side element builder for _current_neighbor_side_elem. More...
 
libMesh::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...
 
libMesh::StaticCondensation_sc
 A pointer to the static condensation class. Null if not present. More...
 

Private Member Functions

void setLowerQRule (libMesh::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 libMesh::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, libMesh::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 (libMesh::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...
 
libMesh::QBaseqruleFace (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 libMesh::CouplingMatrix_cm
 Coupling matrices. More...
 
const libMesh::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 libMesh::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...
 
libMesh::QBase_current_qrule
 The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac kernels) More...
 
libMesh::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< ADReal_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...
 
libMesh::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...
 
libMesh::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...
 
libMesh::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...
 
libMesh::QBase_current_qrule_lower
 quadrature rule used on lower dimensional elements. More...
 

Detailed Description

Keeps track of stuff related to assembling.

Definition at line 101 of file Assembly.h.

Constructor & Destructor Documentation

◆ Assembly()

Assembly::Assembly ( SystemBase sys,
THREAD_ID  tid 
)

Definition at line 80 of file Assembly.C.

81  : _sys(sys),
83  _displaced(dynamic_cast<DisplacedSystem *>(&sys) ? true : false),
88  _dof_map(_sys.dofMap()),
89  _tid(tid),
90  _mesh(sys.mesh()),
98  _building_helpers(false),
99  _current_qrule(nullptr),
100  _current_qrule_volume(nullptr),
101  _current_qrule_arbitrary(nullptr),
103  _current_qrule_face(nullptr),
104  _current_qface_arbitrary(nullptr),
105  _current_qrule_neighbor(nullptr),
106  _need_JxW_neighbor(false),
107  _qrule_msm(nullptr),
108  _custom_mortar_qrule(false),
109  _current_qrule_lower(nullptr),
110 
111  _current_elem(nullptr),
113  _current_side(0),
114  _current_side_elem(nullptr),
116  _current_neighbor_elem(nullptr),
121  _current_node(nullptr),
122  _current_neighbor_node(nullptr),
125 
126  _current_lower_d_elem(nullptr),
130  _need_dual(false),
131 
133  _cached_residual_values(2), // The 2 is for TIME and NONTIME
134  _cached_residual_rows(2), // The 2 is for TIME and NONTIME
137 
138  _block_diagonal_matrix(false),
139  _calculate_xyz(false),
140  _calculate_face_xyz(false),
141  _calculate_curvatures(false),
142  _calculate_ad_coord(false),
143  _have_p_refinement(false),
144  _sc(nullptr)
145 {
146  const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
147  _building_helpers = true;
148  // Build fe's for the helpers
149  buildFE(FEType(helper_order, LAGRANGE));
150  buildFaceFE(FEType(helper_order, LAGRANGE));
151  buildNeighborFE(FEType(helper_order, LAGRANGE));
152  buildFaceNeighborFE(FEType(helper_order, LAGRANGE));
153  buildLowerDFE(FEType(helper_order, LAGRANGE));
154  _building_helpers = false;
155 
156  // Build an FE helper object for this type for each dimension up to the dimension of the current
157  // mesh
158  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
159  {
160  _holder_fe_helper[dim] = _fe[dim][FEType(helper_order, LAGRANGE)];
161  _holder_fe_face_helper[dim] = _fe_face[dim][FEType(helper_order, LAGRANGE)];
162  _holder_fe_face_neighbor_helper[dim] = _fe_face_neighbor[dim][FEType(helper_order, LAGRANGE)];
163  _holder_fe_neighbor_helper[dim] = _fe_neighbor[dim][FEType(helper_order, LAGRANGE)];
164  }
165 
166  for (unsigned int dim = 0; dim < _mesh_dimension; dim++)
167  _holder_fe_lower_helper[dim] = _fe_lower[dim][FEType(helper_order, LAGRANGE)];
168 
169  // request phi, dphi, xyz, JxW, etc. data
171 
172  // For 3D mortar, mortar segments are always TRI3 elements so we want FIRST LAGRANGE regardless
173  // of discretization
174  _fe_msm = (_mesh_dimension == 2)
175  ? FEGenericBase<Real>::build(_mesh_dimension - 1, FEType(helper_order, LAGRANGE))
176  : FEGenericBase<Real>::build(_mesh_dimension - 1, FEType(FIRST, LAGRANGE));
177  // This FE object should not take part in p-refinement
178  _fe_msm->add_p_level_in_reinit(false);
179  _JxW_msm = &_fe_msm->get_JxW();
180  // Prerequest xyz so that it is computed for _fe_msm so that it can be used for calculating
181  // _coord_msm
182  _fe_msm->get_xyz();
183 
186 }
LAGRANGE
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:2588
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2384
MooseMesh & mesh()
Definition: SystemBase.h:99
SystemBase & _sys
Definition: Assembly.h:2282
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:2771
unsigned int _max_cached_residuals
Definition: Assembly.h:2773
bool _user_added_fe_lower_of_helper_type
Definition: Assembly.h:2335
Order
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:316
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:268
const bool & _computing_residual
Whether we are currently computing the residual.
Definition: Assembly.h:2292
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2533
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2522
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2551
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2596
bool _user_added_fe_face_neighbor_of_helper_type
Definition: Assembly.h:2333
bool _have_p_refinement
Whether we have ever conducted p-refinement.
Definition: Assembly.h:2871
FIRST
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:2590
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2580
MooseMesh & _mesh
Definition: Assembly.h:2322
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2523
unsigned int n_elem_integers() const
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2566
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
libMesh::StaticCondensation * _sc
A pointer to the static condensation class. Null if not present.
Definition: Assembly.h:2877
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:2572
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2328
const bool & _computing_residual_and_jacobian
Whether we are currently computing the residual and Jacobian.
Definition: Assembly.h:2298
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
const bool & currentlyComputingResidualAndJacobian() const
Returns true if the problem is in the process of computing the residual and the Jacobian.
Definition: SubProblem.h:1487
SECOND
unsigned int _mesh_dimension
Definition: Assembly.h:2324
virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const =0
const bool & currentlyComputingResidual() const
Returns true if the problem is in the process of computing the residual.
Definition: SubProblem.h:720
unsigned int _max_cached_jacobians
Definition: Assembly.h:2782
const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
Definition: Assembly.h:2603
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:2584
bool _user_added_fe_neighbor_of_helper_type
Definition: Assembly.h:2334
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:338
virtual libMesh::DofMap & dofMap()
Gets writeable reference to the dof map.
Definition: SystemBase.C:1165
const std::vector< Real > * _JxW_msm
A JxW for working on mortar segement elements.
Definition: Assembly.h:2549
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3443
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2923
SubProblem & subproblem()
Definition: SystemBase.h:101
libMesh::QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2562
SubProblem & _subproblem
Definition: Assembly.h:2283
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:294
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2516
bool _calculate_xyz
Definition: Assembly.h:2827
bool _calculate_curvatures
Definition: Assembly.h:2829
const std::vector< VectorTag > & _residual_vector_tags
The residual vector tags that Assembly could possibly contribute to.
Definition: Assembly.h:2765
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition: Assembly.h:2509
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
Definition: SubProblem.C:172
ArbitraryQuadrature * _current_qface_arbitrary
The current arbitrary quadrature rule used on element faces.
Definition: Assembly.h:2494
libMesh::QBase * _current_qrule_volume
The current volumetric quadrature for the element.
Definition: Assembly.h:2382
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2833
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition: Assembly.h:2601
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2526
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:3706
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2556
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2372
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:2578
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2768
const bool _displaced
Definition: Assembly.h:2285
const Node * _current_node
The current node we are working with.
Definition: Assembly.h:2592
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2346
bool _calculate_face_xyz
Definition: Assembly.h:2828
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition: Assembly.h:2605
bool _user_added_fe_face_of_helper_type
Definition: Assembly.h:2332
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2488
const bool & _computing_jacobian
Whether we are currently computing the Jacobian.
Definition: Assembly.h:2295
void helpersRequestData()
request phi, dphi, xyz, JxW, etc.
Definition: Assembly.C:4831
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition: Assembly.C:360
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2574
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2376
const libMesh::CouplingMatrix & _nonlocal_cm
Definition: Assembly.h:2289
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:2586
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2507
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2598
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2517
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh...
Definition: Assembly.h:2558
const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing the Jacobian.
Definition: SubProblem.h:684
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition: Assembly.h:2609
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
Definition: Assembly.h:2331
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:2392
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2530
const libMesh::DofMap & _dof_map
DOF map.
Definition: Assembly.h:2318
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2576
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:2785
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
Definition: Assembly.h:2537
bool _need_dual
Whether dual shape functions need to be computed for mortar constraints.
Definition: Assembly.h:2613
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition: Assembly.h:2594

◆ ~Assembly()

Assembly::~Assembly ( )
virtual

Definition at line 188 of file Assembly.C.

189 {
190  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
191  for (auto & it : _fe[dim])
192  delete it.second;
193 
194  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
195  for (auto & it : _fe_face[dim])
196  delete it.second;
197 
198  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
199  for (auto & it : _fe_neighbor[dim])
200  delete it.second;
201 
202  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
203  for (auto & it : _fe_face_neighbor[dim])
204  delete it.second;
205 
206  for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
207  for (auto & it : _fe_lower[dim])
208  delete it.second;
209 
210  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
211  for (auto & it : _vector_fe[dim])
212  delete it.second;
213 
214  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
215  for (auto & it : _vector_fe_face[dim])
216  delete it.second;
217 
218  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
219  for (auto & it : _vector_fe_neighbor[dim])
220  delete it.second;
221 
222  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
223  for (auto & it : _vector_fe_face_neighbor[dim])
224  delete it.second;
225 
226  for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
227  for (auto & it : _vector_fe_lower[dim])
228  delete it.second;
229 
230  for (auto & it : _ad_grad_phi_data)
231  it.second.release();
232 
233  for (auto & it : _ad_vector_grad_phi_data)
234  it.second.release();
235 
236  for (auto & it : _ad_grad_phi_data_face)
237  it.second.release();
238 
239  for (auto & it : _ad_vector_grad_phi_data_face)
240  it.second.release();
241 
243 
244  _coord.release();
247 
248  _ad_JxW.release();
255  _ad_coord.release();
256 
257  delete _qrule_msm;
258 }
MooseArray< VectorValue< ADReal > > _ad_normals
Definition: Assembly.h:2817
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
MooseArray< Real > _curvatures
Definition: Assembly.h:2819
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition: Assembly.h:2752
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2616
MooseArray< ADReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2396
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2374
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition: Assembly.h:2541
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:2394
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2519
unsigned int _mesh_dimension
Definition: Assembly.h:2324
MooseArray< ADReal > _ad_curvatures
Definition: Assembly.h:2820
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2750
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2516
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2751
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2486
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2526
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2556
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2372
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2528
MooseArray< VectorValue< ADReal > > _ad_q_points
Definition: Assembly.h:2805
MooseArray< VectorValue< ADReal > > _ad_q_points_face
Definition: Assembly.h:2818
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:2544
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2518
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition: Assembly.h:2754
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2517
MooseArray< ADReal > _ad_JxW
Definition: Assembly.h:2804
MooseArray< ADReal > _ad_JxW_face
Definition: Assembly.h:2816

Member Function Documentation

◆ activateDual()

void Assembly::activateDual ( )
inline

Indicates that dual shape functions are used for mortar constraint.

Definition at line 578 of file Assembly.h.

Referenced by MortarConstraintBase::MortarConstraintBase().

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

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

273  {
274  // Coord values for non-cartesian coordinate systems are functions of the locations of the
275  // quadrature points in physical space. We also have no way of knowing whether this was called
276  // from a volumetric or face object so we should set both volumetric and face xyz to true
277  _calculate_xyz = true;
278  _calculate_face_xyz = true;
279 
280  _calculate_ad_coord = true;
281  return _ad_coord;
282  }
MooseArray< ADReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2396
bool _calculate_xyz
Definition: Assembly.h:2827
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2833
bool _calculate_face_xyz
Definition: Assembly.h:2828

◆ adCurvatures()

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

Definition at line 4818 of file Assembly.C.

4819 {
4820  _calculate_curvatures = true;
4821  const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
4822  const FEType helper_type(helper_order, LAGRANGE);
4823  // Must prerequest the second derivatives. Sadly because there is only one
4824  // _need_second_derivative map for both volumetric and face FE objects we must request both here
4825  feSecondPhi<Real>(helper_type);
4826  feSecondPhiFace<Real>(helper_type);
4827  return _ad_curvatures;
4828 }
Order
FIRST
MooseMesh & _mesh
Definition: Assembly.h:2322
SECOND
MooseArray< ADReal > _ad_curvatures
Definition: Assembly.h:2820
bool _calculate_curvatures
Definition: Assembly.h:2829
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:3706

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

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

3821 {
3822 #ifndef NDEBUG
3824  {
3825  mooseAssert(_cached_jacobian_rows.size() == _cached_jacobian_cols.size(),
3826  "Error: Cached data sizes MUST be the same!");
3827  for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3828  mooseAssert(_cached_jacobian_rows[i].size() == _cached_jacobian_cols[i].size(),
3829  "Error: Cached data sizes MUST be the same for a given tag!");
3830  }
3831 #endif
3832 
3833  for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3834  if (_sys.hasMatrix(i))
3835  for (MooseIndex(_cached_jacobian_rows[i]) j = 0; j < _cached_jacobian_rows[i].size(); j++)
3837  _cached_jacobian_cols[i][j],
3838  _cached_jacobian_values[i][j]);
3839 
3840  for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3841  {
3842  if (!_sys.hasMatrix(i))
3843  continue;
3844 
3847 
3848  // Try to be more efficient from now on
3849  // The 2 is just a fudge factor to keep us from having to grow the vector during assembly
3850  _cached_jacobian_values[i].clear();
3852 
3853  _cached_jacobian_rows[i].clear();
3855 
3856  _cached_jacobian_cols[i].clear();
3858  }
3859 }
SystemBase & _sys
Definition: Assembly.h:2282
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2778
virtual bool checkNonlocalCouplingRequirement() const =0
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2776
unsigned int _max_cached_jacobians
Definition: Assembly.h:2782
virtual void add(const numeric_index_type i, const numeric_index_type j, const T value)=0
SubProblem & _subproblem
Definition: Assembly.h:2283
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2780

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

Referenced by addCachedResiduals().

3538 {
3539  const auto & values = _cached_residual_values[vector_tag._type_id];
3540  const auto & rows = _cached_residual_rows[vector_tag._type_id];
3541 
3542  mooseAssert(values.size() == rows.size(),
3543  "Number of cached residuals and number of rows must match!");
3544 
3545  if (!values.empty())
3546  {
3547  residual.add_vector(values, rows);
3548  clearCachedResiduals(vector_tag);
3549  }
3550 }
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:2771
virtual void add_vector(const T *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:47
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2768
void clearCachedResiduals(GlobalDataKey)
Clears all of the residuals in _cached_residual_rows and _cached_residual_values. ...
Definition: Assembly.C:3505

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

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

3491 {
3492  for (const auto & vector_tag : tags)
3493  {
3494  if (!_sys.hasVector(vector_tag._id))
3495  {
3496  _cached_residual_values[vector_tag._type_id].clear();
3497  _cached_residual_rows[vector_tag._type_id].clear();
3498  continue;
3499  }
3500  addCachedResidualDirectly(_sys.getVector(vector_tag._id), GlobalDataKey{}, vector_tag);
3501  }
3502 }
SystemBase & _sys
Definition: Assembly.h:2282
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:2771
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
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:3535
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2768
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ addJacobian()

void Assembly::addJacobian ( GlobalDataKey  )

Adds all local Jacobian to the global Jacobian matrices.

Definition at line 3877 of file Assembly.C.

3878 {
3879  for (const auto & it : _cm_ff_entry)
3880  addJacobianCoupledVarPair(*it.first, *it.second);
3881 
3882  for (const auto & it : _cm_sf_entry)
3883  addJacobianCoupledVarPair(*it.first, *it.second);
3884 
3885  for (const auto & it : _cm_fs_entry)
3886  addJacobianCoupledVarPair(*it.first, *it.second);
3887 }
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:2305
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
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:3862
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:2303

◆ addJacobianBlock() [1/2]

void Assembly::addJacobianBlock ( libMesh::SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const libMesh::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.

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

◆ addJacobianBlock() [2/2]

void Assembly::addJacobianBlock ( libMesh::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 3582 of file Assembly.C.

3588 {
3589  if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3590  return;
3591  if (jac_block.n() == 0 || jac_block.m() == 0)
3592  return;
3593 
3594  auto & scaling_factor = ivar.arrayScalingFactor();
3595 
3596  for (unsigned int i = 0; i < ivar.count(); ++i)
3597  {
3598  unsigned int iv = ivar.number();
3599  for (const auto & jt : ConstCouplingRow(iv + i, *_cm))
3600  {
3601  unsigned int jv = jvar.number();
3602  if (jt < jv || jt >= jv + jvar.count())
3603  continue;
3604  unsigned int j = jt - jv;
3605 
3606  auto di = ivar.componentDofIndices(idof_indices, i);
3607  auto dj = jvar.componentDofIndices(jdof_indices, j);
3608  auto indof = di.size();
3609  auto jndof = dj.size();
3610 
3611  unsigned int jj = j;
3612  if (iv == jv && _component_block_diagonal[iv])
3613  // here i must be equal to j
3614  jj = 0;
3615 
3616  auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3617  if (scaling_factor[i] != 1.0)
3618  sub *= scaling_factor[i];
3619 
3620  // If we're computing the jacobian for automatically scaling variables we do not want
3621  // to constrain the element matrix because it introduces 1s on the diagonal for the
3622  // constrained dofs
3624  _dof_map.constrain_element_matrix(sub, di, dj, false);
3625 
3626  jacobian.add_matrix(sub, di, dj);
3627  }
3628  }
3629 }
SystemBase & _sys
Definition: Assembly.h:2282
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:1519
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:2788
virtual void add_matrix(const DenseMatrix< T > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
const libMesh::CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2288
unsigned int n() const
const libMesh::DofMap & _dof_map
DOF map.
Definition: Assembly.h:2318
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const
void constrain_element_matrix(DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const

◆ addJacobianBlockNonlocal()

void Assembly::addJacobianBlockNonlocal ( libMesh::SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const libMesh::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 4303 of file Assembly.C.

Referenced by addJacobianBlockNonlocalTags().

4311 {
4312  if (idof_indices.size() == 0 || jdof_indices.size() == 0)
4313  return;
4314  if (jacobian.n() == 0 || jacobian.m() == 0)
4315  return;
4316  if (!(*_cm)(ivar, jvar))
4317  return;
4318 
4319  auto & iv = _sys.getVariable(_tid, ivar);
4320  auto & jv = _sys.getVariable(_tid, jvar);
4321  auto & scaling_factor = iv.arrayScalingFactor();
4322 
4323  const unsigned int ivn = iv.number();
4324  const unsigned int jvn = jv.number();
4325  auto & keg = jacobianBlockNonlocal(ivn, jvn, LocalDataKey{}, tag);
4326 
4327  // It is guaranteed by design iv.number <= ivar since iv is obtained
4328  // through SystemBase::getVariable with ivar.
4329  // Most of times ivar will just be equal to iv.number except for array variables,
4330  // where ivar could be a number for a component of an array variable but calling
4331  // getVariable will return the array variable that has the number of the 0th component.
4332  // It is the same for jvar.
4333  const unsigned int i = ivar - ivn;
4334  const unsigned int j = jvar - jvn;
4335 
4336  // DoF indices are independently given
4337  auto di = idof_indices;
4338  auto dj = jdof_indices;
4339 
4340  auto indof = di.size();
4341  auto jndof = dj.size();
4342 
4343  unsigned int jj = j;
4344  if (ivar == jvar && _component_block_diagonal[ivn])
4345  jj = 0;
4346 
4347  auto sub = keg.sub_matrix(i * indof, indof, jj * jndof, jndof);
4348  // If we're computing the jacobian for automatically scaling variables we do not want to
4349  // constrain the element matrix because it introduces 1s on the diagonal for the constrained
4350  // dofs
4352  dof_map.constrain_element_matrix(sub, di, dj, false);
4353 
4354  if (scaling_factor[i] != 1.0)
4355  sub *= scaling_factor[i];
4356 
4357  jacobian.add_matrix(sub, di, dj);
4358 }
SystemBase & _sys
Definition: Assembly.h:2282
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:1124
const std::vector< Real > & arrayScalingFactor() const
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
Definition: SystemBase.C:1519
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
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:2788
virtual void add_matrix(const DenseMatrix< T > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
virtual numeric_index_type m() const=0
const libMesh::CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2288
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89
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
void constrain_element_matrix(DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const

◆ addJacobianBlockNonlocalTags()

void Assembly::addJacobianBlockNonlocalTags ( libMesh::SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const libMesh::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 4361 of file Assembly.C.

4369 {
4370  for (auto tag : tags)
4372  jacobian, ivar, jvar, dof_map, idof_indices, jdof_indices, GlobalDataKey{}, tag);
4373 }
void addJacobianBlockNonlocal(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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:4303

◆ addJacobianBlockTags()

void Assembly::addJacobianBlockTags ( libMesh::SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const libMesh::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 4235 of file Assembly.C.

4242 {
4243  for (auto tag : tags)
4244  addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices, GlobalDataKey{}, tag);
4245 }
void addJacobianBlock(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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. ...

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

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

3863 {
3864  auto i = ivar.number();
3865  auto j = jvar.number();
3866  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
3867  if (jacobianBlockUsed(tag, i, j) && _sys.hasMatrix(tag))
3869  jacobianBlock(i, j, LocalDataKey{}, tag),
3870  ivar,
3871  jvar,
3872  ivar.dofIndices(),
3873  jvar.dofIndices());
3874 }
SystemBase & _sys
Definition: Assembly.h:2282
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:2209
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
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:1113
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
void addJacobianBlock(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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. ...
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007

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

4029 {
4030  for (const auto & it : _cm_ff_entry)
4031  {
4032  auto ivar = it.first;
4033  auto jvar = it.second;
4034  auto i = ivar->number();
4035  auto j = jvar->number();
4036  for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
4037  tag++)
4038  if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
4039  {
4041  jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
4042  *ivar,
4043  *jvar,
4044  ivar->dofIndicesLower(),
4045  jvar->dofIndicesLower());
4046 
4048  jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
4049  *ivar,
4050  *jvar,
4051  ivar->dofIndicesLower(),
4052  jvar->dofIndices());
4053 
4055  jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
4056  *ivar,
4057  *jvar,
4058  ivar->dofIndices(),
4059  jvar->dofIndicesLower());
4060  }
4061  }
4062 }
SystemBase & _sys
Definition: Assembly.h:2282
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:2245
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
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:3158
void addJacobianBlock(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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. ...
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
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:2316

◆ addJacobianNeighbor() [1/2]

void Assembly::addJacobianNeighbor ( GlobalDataKey  )

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

Definition at line 3912 of file Assembly.C.

Referenced by addJacobianNeighborTags().

3913 {
3914  for (const auto & it : _cm_ff_entry)
3915  {
3916  auto ivar = it.first;
3917  auto jvar = it.second;
3918  auto i = ivar->number();
3919  auto j = jvar->number();
3920  for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
3921  tag < _jacobian_block_neighbor_used.size();
3922  tag++)
3923  if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
3924  {
3926  jacobianBlockNeighbor(Moose::ElementNeighbor, i, j, LocalDataKey{}, tag),
3927  *ivar,
3928  *jvar,
3929  ivar->dofIndices(),
3930  jvar->dofIndicesNeighbor());
3931 
3933  jacobianBlockNeighbor(Moose::NeighborElement, i, j, LocalDataKey{}, tag),
3934  *ivar,
3935  *jvar,
3936  ivar->dofIndicesNeighbor(),
3937  jvar->dofIndices());
3938 
3940  jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
3941  *ivar,
3942  *jvar,
3943  ivar->dofIndicesNeighbor(),
3944  jvar->dofIndicesNeighbor());
3945  }
3946  }
3947 }
SystemBase & _sys
Definition: Assembly.h:2282
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:3117
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
void addJacobianBlock(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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. ...
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
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:2227
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:2314

◆ addJacobianNeighbor() [2/2]

void Assembly::addJacobianNeighbor ( libMesh::SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const libMesh::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.

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

3951 {
3952  for (const auto & it : _cm_ff_entry)
3953  {
3954  auto ivar = it.first;
3955  auto jvar = it.second;
3956  auto i = ivar->number();
3957  auto j = jvar->number();
3958  for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
3959  tag++)
3960  if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
3961  {
3963  jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
3964  *ivar,
3965  *jvar,
3966  ivar->dofIndicesLower(),
3967  jvar->dofIndicesLower());
3968 
3970  jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
3971  *ivar,
3972  *jvar,
3973  ivar->dofIndicesLower(),
3974  jvar->dofIndicesNeighbor());
3975 
3977  jacobianBlockMortar(Moose::LowerPrimary, i, j, LocalDataKey{}, tag),
3978  *ivar,
3979  *jvar,
3980  ivar->dofIndicesLower(),
3981  jvar->dofIndices());
3982 
3984  jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
3985  *ivar,
3986  *jvar,
3987  ivar->dofIndicesNeighbor(),
3988  jvar->dofIndicesLower());
3989 
3991  jacobianBlockMortar(Moose::PrimaryLower, i, j, LocalDataKey{}, tag),
3992  *ivar,
3993  *jvar,
3994  ivar->dofIndices(),
3995  jvar->dofIndicesLower());
3996  }
3997 
3998  for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
3999  tag < _jacobian_block_neighbor_used.size();
4000  tag++)
4001  if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
4002  {
4004  jacobianBlockNeighbor(Moose::ElementNeighbor, i, j, LocalDataKey{}, tag),
4005  *ivar,
4006  *jvar,
4007  ivar->dofIndices(),
4008  jvar->dofIndicesNeighbor());
4009 
4011  jacobianBlockNeighbor(Moose::NeighborElement, i, j, LocalDataKey{}, tag),
4012  *ivar,
4013  *jvar,
4014  ivar->dofIndicesNeighbor(),
4015  jvar->dofIndices());
4016 
4018  jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
4019  *ivar,
4020  *jvar,
4021  ivar->dofIndicesNeighbor(),
4022  jvar->dofIndicesNeighbor());
4023  }
4024  }
4025 }
SystemBase & _sys
Definition: Assembly.h:2282
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:3117
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:2245
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
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:3158
void addJacobianBlock(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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. ...
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
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:2227
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:2316
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:2314

◆ addJacobianNeighborTags()

void Assembly::addJacobianNeighborTags ( libMesh::SparseMatrix< Number > &  jacobian,
unsigned int  ivar,
unsigned int  jvar,
const libMesh::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 4445 of file Assembly.C.

4453 {
4454  for (const auto tag : tags)
4456  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, GlobalDataKey{}, tag);
4457 }
void addJacobianNeighbor(GlobalDataKey)
Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objec...
Definition: Assembly.C:3912

◆ addJacobianNonlocal()

void Assembly::addJacobianNonlocal ( GlobalDataKey  )

Adds non-local Jacobian to the global Jacobian matrices.

Definition at line 3890 of file Assembly.C.

3891 {
3892  for (const auto & it : _cm_nonlocal_entry)
3893  {
3894  auto ivar = it.first;
3895  auto jvar = it.second;
3896  auto i = ivar->number();
3897  auto j = jvar->number();
3898  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
3899  tag < _jacobian_block_nonlocal_used.size();
3900  tag++)
3901  if (jacobianBlockNonlocalUsed(tag, i, j) && _sys.hasMatrix(tag))
3903  jacobianBlockNonlocal(i, j, LocalDataKey{}, tag),
3904  *ivar,
3905  *jvar,
3906  ivar->dofIndices(),
3907  jvar->allDofIndices());
3908  }
3909 }
SystemBase & _sys
Definition: Assembly.h:2282
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:1124
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:2263
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2312
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
void addJacobianBlock(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::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. ...
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2309

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

4468 {
4469  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
4471  for (const auto & var_j : vars)
4472  addJacobianCoupledVarPair(var_i, *var_j);
4473 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
char ** vars
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
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:3862
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:144
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 4460 of file Assembly.C.

4461 {
4462  for (const auto & it : _cm_ss_entry)
4463  addJacobianCoupledVarPair(*it.first, *it.second);
4464 }
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition: Assembly.h:2307
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:3862

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

3328 {
3329  for (const auto & vector_tag : vector_tags)
3330  if (_sys.hasVector(vector_tag._id))
3331  addResidual(vector_tag);
3332 }
SystemBase & _sys
Definition: Assembly.h:2282
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
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:3327

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

3311 {
3312  mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3313  "Non-residual tag in Assembly::addResidual");
3314 
3315  auto & tag_Re = _sub_Re[vector_tag._type_id];
3316  NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3317  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3318  for (const auto & var : vars)
3319  addResidualBlock(residual,
3320  tag_Re[var->number()],
3321  var->dofIndices(),
3322  var->arrayScalingFactor(),
3323  var->isNodal());
3324 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
TagID _id
The id associated with the vector tag.
Definition: VectorTag.h:30
char ** vars
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:47
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630
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:3254
Moose::VectorTagType _type
The type of the vector tag.
Definition: VectorTag.h:53
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

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

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

3259 {
3260  if (dof_indices.size() > 0 && res_block.size())
3261  {
3262  _temp_dof_indices = dof_indices;
3263  _tmp_Re = res_block;
3264  processLocalResidual(_tmp_Re, _temp_dof_indices, scaling_factor, is_nodal);
3266  }
3267 }
virtual void add_vector(const T *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:3218
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:2636
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:2791
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 3377 of file Assembly.C.

3378 {
3379  for (const auto & vector_tag : vector_tags)
3380  if (_sys.hasVector(vector_tag._id))
3381  addResidualLower(vector_tag);
3382 }
SystemBase & _sys
Definition: Assembly.h:2282
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
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:3377

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

3361 {
3362  mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3363  "Non-residual tag in Assembly::addResidualLower");
3364 
3365  auto & tag_Rl = _sub_Rl[vector_tag._type_id];
3366  NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3367  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3368  for (const auto & var : vars)
3369  addResidualBlock(residual,
3370  tag_Rl[var->number()],
3371  var->dofIndicesLower(),
3372  var->arrayScalingFactor(),
3373  var->isNodal());
3374 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
TagID _id
The id associated with the vector tag.
Definition: VectorTag.h:30
char ** vars
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:47
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2633
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:3254
Moose::VectorTagType _type
The type of the vector tag.
Definition: VectorTag.h:53
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

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

3353 {
3354  for (const auto & vector_tag : vector_tags)
3355  if (_sys.hasVector(vector_tag._id))
3356  addResidualNeighbor(vector_tag);
3357 }
SystemBase & _sys
Definition: Assembly.h:2282
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
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:3352

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

3336 {
3337  mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3338  "Non-residual tag in Assembly::addResidualNeighbor");
3339 
3340  auto & tag_Rn = _sub_Rn[vector_tag._type_id];
3341  NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3342  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3343  for (const auto & var : vars)
3344  addResidualBlock(residual,
3345  tag_Rn[var->number()],
3346  var->dofIndicesNeighbor(),
3347  var->arrayScalingFactor(),
3348  var->isNodal());
3349 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
TagID _id
The id associated with the vector tag.
Definition: VectorTag.h:30
char ** vars
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2631
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:47
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
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:3254
Moose::VectorTagType _type
The type of the vector tag.
Definition: VectorTag.h:53
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

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

3402 {
3403  for (const auto & vector_tag : vector_tags)
3404  if (_sys.hasVector(vector_tag._id))
3405  addResidualScalar(vector_tag);
3406 }
SystemBase & _sys
Definition: Assembly.h:2282
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
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:3401

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

3387 {
3388  mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3389  "Non-residual tag in Assembly::addResidualScalar");
3390 
3391  // add the scalar variables residuals
3392  auto & tag_Re = _sub_Re[vector_tag._type_id];
3393  NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3394  const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
3395  for (const auto & var : vars)
3397  residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor(), false);
3398 }
SystemBase & _sys
Definition: Assembly.h:2282
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:757
TagID _id
The id associated with the vector tag.
Definition: VectorTag.h:30
char ** vars
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:47
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630
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:3254
Moose::VectorTagType _type
The type of the vector tag.
Definition: VectorTag.h:53
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ addStaticCondensation()

void Assembly::addStaticCondensation ( libMesh::StaticCondensation sc)
inline

Set the static condensation object.

Definition at line 594 of file Assembly.h.

594 { _sc = &sc; }
libMesh::StaticCondensation * _sc
A pointer to the static condensation class. Null if not present.
Definition: Assembly.h:2877

◆ adGradPhi() [1/2]

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

Definition at line 1292 of file Assembly.h.

1293  {
1294  return _ad_grad_phi_data.at(v.feType());
1295  }
const libMesh::FEType & feType() const
Get the type of finite element object.
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2750

◆ adGradPhi() [2/2]

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

Definition at line 3024 of file Assembly.h.

3025 {
3026  return _ad_vector_grad_phi_data.at(v.feType());
3027 }
const libMesh::FEType & feType() const
Get the type of finite element object.
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2751

◆ adJxW()

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

Definition at line 250 of file Assembly.h.

250 { return _ad_JxW; }
MooseArray< ADReal > _ad_JxW
Definition: Assembly.h:2804

◆ adJxWFace()

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

Definition at line 252 of file Assembly.h.

252 { return _ad_JxW_face; }
MooseArray< ADReal > _ad_JxW_face
Definition: Assembly.h:2816

◆ adNormals()

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

Definition at line 354 of file Assembly.h.

354 { return _ad_normals; }
MooseArray< VectorValue< ADReal > > _ad_normals
Definition: Assembly.h:2817

◆ adQPoints()

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

Definition at line 356 of file Assembly.h.

357  {
358  _calculate_xyz = true;
359  return _ad_q_points;
360  }
bool _calculate_xyz
Definition: Assembly.h:2827
MooseArray< VectorValue< ADReal > > _ad_q_points
Definition: Assembly.h:2805

◆ adQPointsFace()

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

Definition at line 362 of file Assembly.h.

363  {
364  _calculate_face_xyz = true;
365  return _ad_q_points_face;
366  }
bool _calculate_face_xyz
Definition: Assembly.h:2828
MooseArray< VectorValue< ADReal > > _ad_q_points_face
Definition: Assembly.h:2818

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

3195 {
3196  _disp_numbers_and_directions = std::move(disp_numbers_and_directions);
3197 }
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
Container of displacement numbers and directions.
Definition: Assembly.h:2825

◆ attachQRuleElem()

const libMesh::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 1873 of file Assembly.h.

1874  {
1875  auto qrule = qrules(dim).vol.get();
1876  fe.attach_quadrature_rule(qrule);
1877  return qrule;
1878  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2460
std::unique_ptr< libMesh::QBase > vol
volume/elem (meshdim) quadrature rule
Definition: Assembly.h:2412
virtual void attach_quadrature_rule(QBase *q)=0

◆ attachQRuleFace()

const libMesh::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 1885 of file Assembly.h.

1886  {
1887  auto qrule = qrules(dim).face.get();
1888  fe.attach_quadrature_rule(qrule);
1889  return qrule;
1890  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::unique_ptr< libMesh::QBase > face
area/face (meshdim-1) quadrature rule
Definition: Assembly.h:2414
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2460
virtual void attach_quadrature_rule(QBase *q)=0

◆ buildFaceFE()

void Assembly::buildFaceFE ( FEType  type) const
private

Build FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 294 of file Assembly.C.

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

295 {
296  if (!_building_helpers && type == _helper_type)
298 
299  if (!_fe_shape_data_face[type])
300  _fe_shape_data_face[type] = std::make_unique<FEShapeData>();
301 
302  // Build an FE object for this type for each dimension up to the dimension of the current mesh
303  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
304  {
305  if (!_fe_face[dim][type])
306  _fe_face[dim][type] = FEGenericBase<Real>::build(dim, type).release();
307 
308  _fe_face[dim][type]->get_phi();
309  _fe_face[dim][type]->get_dphi();
310  if (_need_second_derivative.count(type))
311  _fe_face[dim][type]->get_d2phi();
312  }
313 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2328
unsigned int _mesh_dimension
Definition: Assembly.h:2324
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2346
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736
bool _user_added_fe_face_of_helper_type
Definition: Assembly.h:2332

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

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

339 {
340  if (!_building_helpers && type == _helper_type)
342 
343  if (!_fe_shape_data_face_neighbor[type])
344  _fe_shape_data_face_neighbor[type] = std::make_unique<FEShapeData>();
345 
346  // Build an FE object for this type for each dimension up to the dimension of the current mesh
347  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
348  {
349  if (!_fe_face_neighbor[dim][type])
350  _fe_face_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
351 
352  _fe_face_neighbor[dim][type]->get_phi();
353  _fe_face_neighbor[dim][type]->get_dphi();
354  if (_need_second_derivative_neighbor.count(type))
355  _fe_face_neighbor[dim][type]->get_d2phi();
356  }
357 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2738
bool _user_added_fe_face_neighbor_of_helper_type
Definition: Assembly.h:2333
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2328
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
unsigned int _mesh_dimension
Definition: Assembly.h:2324
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2346
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2517

◆ buildFE()

void Assembly::buildFE ( FEType  type) const
private

Build FEs with a type.

Parameters
typeThe type of FE

Definition at line 268 of file Assembly.C.

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

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

◆ buildLowerDDualFE()

void Assembly::buildLowerDDualFE ( FEType  type) const
private

Definition at line 384 of file Assembly.C.

Referenced by feDualPhiLower(), and feGradDualPhiLower().

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

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

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

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

◆ buildNeighborFE()

void Assembly::buildNeighborFE ( FEType  type) const
private

Build FEs for a neighbor with a type.

Parameters
typeThe type of FE

Definition at line 316 of file Assembly.C.

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

317 {
318  if (!_building_helpers && type == _helper_type)
320 
321  if (!_fe_shape_data_neighbor[type])
322  _fe_shape_data_neighbor[type] = std::make_unique<FEShapeData>();
323 
324  // Build an FE object for this type for each dimension up to the dimension of the current mesh
325  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
326  {
327  if (!_fe_neighbor[dim][type])
328  _fe_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
329 
330  _fe_neighbor[dim][type]->get_phi();
331  _fe_neighbor[dim][type]->get_dphi();
332  if (_need_second_derivative_neighbor.count(type))
333  _fe_neighbor[dim][type]->get_d2phi();
334  }
335 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2737
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2328
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
unsigned int _mesh_dimension
Definition: Assembly.h:2324
bool _user_added_fe_neighbor_of_helper_type
Definition: Assembly.h:2334
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2516
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2346

◆ buildVectorDualLowerDFE()

void Assembly::buildVectorDualLowerDFE ( FEType  type) const
private

Definition at line 430 of file Assembly.C.

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

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

Referenced by getVectorFEFace().

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

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

Referenced by getVectorFEFaceNeighbor().

547 {
549  _vector_fe_shape_data_face_neighbor[type] = std::make_unique<VectorFEShapeData>();
550 
551  // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
552  unsigned int min_dim;
553  if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
554  type.family == L2_RAVIART_THOMAS)
555  min_dim = 2;
556  else
557  min_dim = 0;
558 
559  // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
560  // current mesh
561  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
562  {
563  if (!_vector_fe_face_neighbor[dim][type])
565  FEGenericBase<VectorValue<Real>>::build(dim, type).release();
566 
567  _vector_fe_face_neighbor[dim][type]->get_phi();
568  _vector_fe_face_neighbor[dim][type]->get_dphi();
569  if (_need_curl.count(type))
570  _vector_fe_face_neighbor[dim][type]->get_curl_phi();
571  if (_need_face_neighbor_div.count(type))
572  _vector_fe_face_neighbor[dim][type]->get_div_phi();
573  }
574 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2519
unsigned int _mesh_dimension
Definition: Assembly.h:2324
std::set< FEType > _need_curl
Definition: Assembly.h:2837
std::set< FEType > _need_face_neighbor_div
Definition: Assembly.h:2841
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2746

◆ buildVectorFE()

void Assembly::buildVectorFE ( FEType  type) const
private

Build Vector FEs with a type.

Parameters
typeThe type of FE

Definition at line 455 of file Assembly.C.

Referenced by getVectorFE().

456 {
457  if (!_vector_fe_shape_data[type])
458  _vector_fe_shape_data[type] = std::make_unique<VectorFEShapeData>();
459 
460  // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
461  unsigned int min_dim;
462  if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
463  type.family == L2_RAVIART_THOMAS)
464  min_dim = 2;
465  else
466  min_dim = 0;
467 
468  // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
469  // current mesh
470  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
471  {
472  if (!_vector_fe[dim][type])
473  _vector_fe[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
474 
475  _vector_fe[dim][type]->get_phi();
476  _vector_fe[dim][type]->get_dphi();
477  if (_need_curl.count(type))
478  _vector_fe[dim][type]->get_curl_phi();
479  if (_need_div.count(type))
480  _vector_fe[dim][type]->get_div_phi();
481  _vector_fe[dim][type]->get_xyz();
482  }
483 }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2374
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
unsigned int _mesh_dimension
Definition: Assembly.h:2324
std::set< FEType > _need_curl
Definition: Assembly.h:2837
std::set< FEType > _need_div
Definition: Assembly.h:2838
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:2743

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

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

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

Referenced by getVectorFENeighbor().

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

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

601 {
602  auto & qdefault = _qrules[Moose::ANY_BLOCK_ID];
603  mooseAssert(qdefault.size() > 0, "default quadrature must be initialized before order bumps");
604 
605  unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
606  auto & qvec = _qrules[block];
607  if (qvec.size() != ndims || !qvec[0].vol)
608  createQRules(qdefault[0].vol->type(), order, order, order, block);
609  else if (qvec[0].vol->get_order() < order || qvec[0].face->get_order() < order)
610  createQRules(qvec[0].vol->type(),
611  std::max(order, qvec[0].arbitrary_vol->get_order()),
612  std::max(order, qvec[0].vol->get_order()),
613  std::max(order, qvec[0].face->get_order()),
614  block);
615  // otherwise do nothing - quadrature order is already as high as requested
616 }
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:619
unsigned int _mesh_dimension
Definition: Assembly.h:2324
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:2429
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 577 of file Assembly.C.

578 {
579  auto & qdefault = _qrules[Moose::ANY_BLOCK_ID];
580  mooseAssert(qdefault.size() > 0, "default quadrature must be initialized before order bumps");
581 
582  unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
583  auto & qvec = _qrules[block];
584  if (qvec.size() != ndims || !qvec[0].vol)
585  createQRules(qdefault[0].vol->type(),
586  qdefault[0].arbitrary_vol->get_order(),
587  volume_order,
588  qdefault[0].face->get_order(),
589  block);
590  else if (qvec[0].vol->get_order() < volume_order)
591  createQRules(qvec[0].vol->type(),
592  qvec[0].arbitrary_vol->get_order(),
593  volume_order,
594  qvec[0].face->get_order(),
595  block);
596  // otherwise do nothing - quadrature order is already as high as requested
597 }
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:619
unsigned int _mesh_dimension
Definition: Assembly.h:2324
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
Definition: Assembly.h:2429
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 4065 of file Assembly.C.

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

4066 {
4067  for (const auto & it : _cm_ff_entry)
4068  cacheJacobianCoupledVarPair(*it.first, *it.second);
4069 
4070  for (const auto & it : _cm_fs_entry)
4071  cacheJacobianCoupledVarPair(*it.first, *it.second);
4072 
4073  for (const auto & it : _cm_sf_entry)
4074  cacheJacobianCoupledVarPair(*it.first, *it.second);
4075 }
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:2305
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:2303
void cacheJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Caches element matrix for ivar rows and jvar columns.
Definition: Assembly.C:4079

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

4478 {
4479  _cached_jacobian_rows[tag].push_back(i);
4480  _cached_jacobian_cols[tag].push_back(j);
4481  _cached_jacobian_values[tag].push_back(value);
4482 }
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2778
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2776
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2780

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

4490 {
4491  for (auto tag : tags)
4492  if (_sys.hasMatrix(tag))
4493  cacheJacobian(i, j, value, LocalDataKey{}, tag);
4494 }
SystemBase & _sys
Definition: Assembly.h:2282
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4065

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

3094 {
3095  if (!computingJacobian() || matrix_tags.empty())
3096  return;
3097 
3098  if (residuals.size() == 1)
3099  {
3100  // No constraining is required. (This is likely a finite volume computation if we only have a
3101  // single dof)
3103  residuals, input_row_indices, scaling_factor, LocalDataKey{}, matrix_tags);
3104  return;
3105  }
3106 
3107  const auto & compare_dofs = residuals[0].derivatives().nude_indices();
3108 #ifndef NDEBUG
3109  auto compare_dofs_set = std::set<dof_id_type>(compare_dofs.begin(), compare_dofs.end());
3110 
3111  for (const auto i : make_range(decltype(residuals.size())(1), residuals.size()))
3112  {
3113  const auto & residual = residuals[i];
3114  auto current_dofs_set = std::set<dof_id_type>(residual.derivatives().nude_indices().begin(),
3115  residual.derivatives().nude_indices().end());
3116  mooseAssert(compare_dofs_set == current_dofs_set,
3117  "We're going to see whether the dof sets are the same. IIRC the degree of freedom "
3118  "dependence (as indicated by the dof index set held by the ADReal) has to be the "
3119  "same for every residual passed to this method otherwise constrain_element_matrix "
3120  "will not work.");
3121  }
3122 #endif
3123  _column_indices.assign(compare_dofs.begin(), compare_dofs.end());
3124 
3125  // If there's no derivatives then there is nothing to do. Moreover, if we pass zero size column
3126  // indices to constrain_element_matrix then we will potentially get errors out of BLAS
3127  if (!_column_indices.size())
3128  return;
3129 
3130  // Need to make a copy because we might modify this in constrain_element_matrix
3131  _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3132 
3134  for (const auto i : index_range(_row_indices))
3135  {
3136  const auto & sparse_derivatives = residuals[i].derivatives();
3137 
3138  for (const auto j : index_range(_column_indices))
3139  _element_matrix(i, j) = sparse_derivatives[_column_indices[j]] * scaling_factor;
3140  }
3141 
3143 
3144  for (const auto i : index_range(_row_indices))
3145  for (const auto j : index_range(_column_indices))
3146  cacheJacobian(_row_indices[i], _column_indices[j], _element_matrix(i, j), {}, matrix_tags);
3147 }
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4065
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:3151
void resize(const unsigned int new_m, const unsigned int new_n)
IntRange< T > make_range(T beg, T end)
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:2868
DenseMatrix< Number > _element_matrix
A working matrix to avoid repeated heap allocations when caching Jacobians that must have libMesh-lev...
Definition: Assembly.h:2863
std::vector< dof_id_type > _column_indices
Definition: Assembly.h:2868
bool computingJacobian() const
Definition: Assembly.h:1916
const libMesh::DofMap & _dof_map
DOF map.
Definition: Assembly.h:2318
auto index_range(const T &sizable)
void constrain_element_matrix(DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const

◆ 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

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

◆ 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.

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

Referenced by cacheJacobianNonlocal().

3700 {
3701  if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3702  return;
3703  if (jac_block.n() == 0 || jac_block.m() == 0)
3704  return;
3705  if (!_sys.hasMatrix(tag))
3706  return;
3707 
3708  auto & scaling_factor = ivar.arrayScalingFactor();
3709 
3710  for (unsigned int i = 0; i < ivar.count(); ++i)
3711  {
3712  unsigned int iv = ivar.number();
3713  for (const auto & jt : ConstCouplingRow(iv + i, *_cm))
3714  {
3715  unsigned int jv = jvar.number();
3716  if (jt < jv || jt >= jv + jvar.count())
3717  continue;
3718  unsigned int j = jt - jv;
3719 
3720  auto di = ivar.componentDofIndices(idof_indices, i);
3721  auto dj = jvar.componentDofIndices(jdof_indices, j);
3722  auto indof = di.size();
3723  auto jndof = dj.size();
3724 
3725  unsigned int jj = j;
3726  if (iv == jv && _component_block_diagonal[iv])
3727  // here i must be equal to j
3728  jj = 0;
3729 
3730  auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3731  if (scaling_factor[i] != 1.0)
3732  sub *= scaling_factor[i];
3733 
3734  _dof_map.constrain_element_matrix(sub, di, dj, false);
3735 
3736  for (MooseIndex(di) i = 0; i < di.size(); i++)
3737  for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3738  if (sub(i, j) != 0.0) // no storage allocated for unimplemented jacobian terms,
3739  // maintaining maximum sparsity possible
3740  {
3741  _cached_jacobian_values[tag].push_back(sub(i, j));
3742  _cached_jacobian_rows[tag].push_back(di[i]);
3743  _cached_jacobian_cols[tag].push_back(dj[j]);
3744  }
3745  }
3746  }
3747 
3748  jac_block.zero();
3749 }
SystemBase & _sys
Definition: Assembly.h:2282
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2778
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:351
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:2788
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2776
const libMesh::CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2288
unsigned int n() const
const libMesh::DofMap & _dof_map
DOF map.
Definition: Assembly.h:2318
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2780
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const
void constrain_element_matrix(DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const

◆ cacheJacobianCoupledVarPair()

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

Caches element matrix for ivar rows and jvar columns.

Definition at line 4079 of file Assembly.C.

Referenced by cacheJacobian().

4081 {
4082  auto i = ivar.number();
4083  auto j = jvar.number();
4084  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
4085  if (jacobianBlockUsed(tag, i, j) && _sys.hasMatrix(tag))
4086  cacheJacobianBlock(jacobianBlock(i, j, LocalDataKey{}, tag),
4087  ivar,
4088  jvar,
4089  ivar.dofIndices(),
4090  jvar.dofIndices(),
4091  tag);
4092 }
SystemBase & _sys
Definition: Assembly.h:2282
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:2209
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
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:1113
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311
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...

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

Referenced by ComputeMortarFunctor::operator()().

4156 {
4157  for (const auto & it : _cm_ff_entry)
4158  {
4159  auto ivar = it.first;
4160  auto jvar = it.second;
4161  auto i = ivar->number();
4162  auto j = jvar->number();
4163  for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
4164  tag++)
4165  if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
4166  {
4167  cacheJacobianBlock(jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
4168  *ivar,
4169  *jvar,
4170  ivar->dofIndicesLower(),
4171  jvar->dofIndicesLower(),
4172  tag);
4173 
4174  cacheJacobianBlock(jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
4175  *ivar,
4176  *jvar,
4177  ivar->dofIndicesLower(),
4178  jvar->dofIndices(),
4179  tag);
4180 
4181  cacheJacobianBlock(jacobianBlockMortar(Moose::LowerPrimary, i, j, LocalDataKey{}, tag),
4182  *ivar,
4183  *jvar,
4184  ivar->dofIndicesLower(),
4185  jvar->dofIndicesNeighbor(),
4186  tag);
4187 
4188  cacheJacobianBlock(jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
4189  *ivar,
4190  *jvar,
4191  ivar->dofIndices(),
4192  jvar->dofIndicesLower(),
4193  tag);
4194 
4196  jacobianBlockMortar(Moose::SecondarySecondary, i, j, LocalDataKey{}, tag),
4197  *ivar,
4198  *jvar,
4199  ivar->dofIndices(),
4200  jvar->dofIndices(),
4201  tag);
4202 
4204  *ivar,
4205  *jvar,
4206  ivar->dofIndices(),
4207  jvar->dofIndicesNeighbor(),
4208  tag);
4209 
4210  cacheJacobianBlock(jacobianBlockMortar(Moose::PrimaryLower, i, j, LocalDataKey{}, tag),
4211  *ivar,
4212  *jvar,
4213  ivar->dofIndicesNeighbor(),
4214  jvar->dofIndicesLower(),
4215  tag);
4216 
4218  *ivar,
4219  *jvar,
4220  ivar->dofIndicesNeighbor(),
4221  jvar->dofIndices(),
4222  tag);
4223 
4224  cacheJacobianBlock(jacobianBlockMortar(Moose::PrimaryPrimary, i, j, LocalDataKey{}, tag),
4225  *ivar,
4226  *jvar,
4227  ivar->dofIndicesNeighbor(),
4228  jvar->dofIndicesNeighbor(),
4229  tag);
4230  }
4231  }
4232 }
SystemBase & _sys
Definition: Assembly.h:2282
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:2245
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
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:3158
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:2316
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...

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

Referenced by SubProblem::cacheJacobianNeighbor().

4118 {
4119  for (const auto & it : _cm_ff_entry)
4120  {
4121  auto ivar = it.first;
4122  auto jvar = it.second;
4123  auto i = ivar->number();
4124  auto j = jvar->number();
4125 
4126  for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
4127  tag < _jacobian_block_neighbor_used.size();
4128  tag++)
4129  if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
4130  {
4132  *ivar,
4133  *jvar,
4134  ivar->dofIndices(),
4135  jvar->dofIndicesNeighbor(),
4136  tag);
4138  *ivar,
4139  *jvar,
4140  ivar->dofIndicesNeighbor(),
4141  jvar->dofIndices(),
4142  tag);
4144  jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
4145  *ivar,
4146  *jvar,
4147  ivar->dofIndicesNeighbor(),
4148  jvar->dofIndicesNeighbor(),
4149  tag);
4150  }
4151  }
4152 }
SystemBase & _sys
Definition: Assembly.h:2282
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:3117
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
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:2227
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...
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:2314

◆ cacheJacobianNonlocal()

void Assembly::cacheJacobianNonlocal ( GlobalDataKey  )

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

Definition at line 4095 of file Assembly.C.

Referenced by SubProblem::cacheJacobian().

4096 {
4097  for (const auto & it : _cm_nonlocal_entry)
4098  {
4099  auto ivar = it.first;
4100  auto jvar = it.second;
4101  auto i = ivar->number();
4102  auto j = jvar->number();
4103  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
4104  tag < _jacobian_block_nonlocal_used.size();
4105  tag++)
4106  if (jacobianBlockNonlocalUsed(tag, i, j) && _sys.hasMatrix(tag))
4107  cacheJacobianBlockNonzero(jacobianBlockNonlocal(i, j, LocalDataKey{}, tag),
4108  *ivar,
4109  *jvar,
4110  ivar->dofIndices(),
4111  jvar->allDofIndices(),
4112  tag);
4113  }
4114 }
SystemBase & _sys
Definition: Assembly.h:2282
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:1124
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:2263
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2312
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2309
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:3694

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

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

3156 {
3157  mooseAssert(residuals.size() == row_indices.size(),
3158  "The number of residuals should match the number of dof indices");
3159  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3160 
3161  if (!computingJacobian() || matrix_tags.empty())
3162  return;
3163 
3164  for (const auto i : index_range(row_indices))
3165  {
3166  const auto row_index = row_indices[i];
3167 
3168  const auto & sparse_derivatives = residuals[i].derivatives();
3169  const auto & column_indices = sparse_derivatives.nude_indices();
3170  const auto & raw_derivatives = sparse_derivatives.nude_data();
3171 
3172  for (std::size_t j = 0; j < column_indices.size(); ++j)
3173  cacheJacobian(
3174  row_index, column_indices[j], raw_derivatives[j] * scaling_factor, {}, matrix_tags);
3175  }
3176 }
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4065
bool computingJacobian() const
Definition: Assembly.h:1916
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 3409 of file Assembly.C.

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

3410 {
3411  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3412  for (const auto & var : vars)
3413  for (const auto & vector_tag : tags)
3414  if (_sys.hasVector(vector_tag._id))
3415  cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3416  _cached_residual_rows[vector_tag._type_id],
3417  _sub_Re[vector_tag._type_id][var->number()],
3418  var->dofIndices(),
3419  var->arrayScalingFactor(),
3420  var->isNodal());
3421 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
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:2771
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
char ** vars
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2768
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:3270

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

3426 {
3427  const VectorTag & tag = _subproblem.getVectorTag(tag_id);
3428 
3429  _cached_residual_values[tag._type_id].push_back(value);
3430  _cached_residual_rows[tag._type_id].push_back(dof);
3431 }
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:2771
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:47
SubProblem & _subproblem
Definition: Assembly.h:2283
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2768
Storage for all of the information pretaining to a vector tag.
Definition: VectorTag.h:17
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:161

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

3436 {
3437  for (auto & tag : tags)
3438  cacheResidual(dof, value, tag);
3439 }
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:3409

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

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

3276 {
3277  if (dof_indices.size() > 0 && res_block.size())
3278  {
3279  _temp_dof_indices = dof_indices;
3280  _tmp_Re = res_block;
3281  processLocalResidual(_tmp_Re, _temp_dof_indices, scaling_factor, is_nodal);
3282 
3283  for (MooseIndex(_tmp_Re) i = 0; i < _tmp_Re.size(); i++)
3284  {
3285  cached_residual_values.push_back(_tmp_Re(i));
3286  cached_residual_rows.push_back(_temp_dof_indices[i]);
3287  }
3288  }
3289 
3290  res_block.zero();
3291 }
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:3218
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:2636
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:2791
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 3475 of file Assembly.C.

Referenced by ComputeMortarFunctor::operator()().

3476 {
3477  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3478  for (const auto & var : vars)
3479  for (const auto & vector_tag : tags)
3480  if (_sys.hasVector(vector_tag._id))
3481  cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3482  _cached_residual_rows[vector_tag._type_id],
3483  _sub_Rl[vector_tag._type_id][var->number()],
3484  var->dofIndicesLower(),
3485  var->arrayScalingFactor(),
3486  var->isNodal());
3487 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
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:2771
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
char ** vars
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2633
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2768
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:3270

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

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

3461 {
3462  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3463  for (const auto & var : vars)
3464  for (const auto & vector_tag : tags)
3465  if (_sys.hasVector(vector_tag._id))
3466  cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3467  _cached_residual_rows[vector_tag._type_id],
3468  _sub_Rn[vector_tag._type_id][var->number()],
3469  var->dofIndicesNeighbor(),
3470  var->arrayScalingFactor(),
3471  var->isNodal());
3472 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
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:2771
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:907
char ** vars
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2631
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2768
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:3270

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

3446 {
3447  // Add the residual value and dof_index to cached_residual_values and cached_residual_rows
3448  // respectively.
3449  // This is used by NodalConstraint.C to cache the residual calculated for primary and secondary
3450  // node.
3451  const VectorTag & vector_tag = _subproblem.getVectorTag(tag);
3452  for (MooseIndex(dof_index) i = 0; i < dof_index.size(); ++i)
3453  {
3454  _cached_residual_values[vector_tag._type_id].push_back(res(i));
3455  _cached_residual_rows[vector_tag._type_id].push_back(dof_index[i]);
3456  }
3457 }
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:2771
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:47
SubProblem & _subproblem
Definition: Assembly.h:2283
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2768
Storage for all of the information pretaining to a vector tag.
Definition: VectorTag.h:17
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition: SubProblem.C:161

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

Referenced by TaggingInterface::addResiduals().

3036 {
3037  mooseAssert(residuals.size() == input_row_indices.size(),
3038  "The number of residuals should match the number of dof indices");
3039  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3040 
3041  if (!computingResidual() || vector_tags.empty())
3042  return;
3043 
3044  if (residuals.size() == 1)
3045  {
3046  // No constraining is required. (This is likely a finite volume computation if we only have a
3047  // single dof)
3049  residuals, input_row_indices, scaling_factor, LocalDataKey{}, vector_tags);
3050  return;
3051  }
3052 
3053  // Need to make a copy because we might modify this in constrain_element_vector
3054  _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3055 
3057  for (const auto i : index_range(_row_indices))
3058  _element_vector(i) = MetaPhysicL::raw_value(residuals[i]) * scaling_factor;
3059 
3060  // At time of writing, this method doesn't do anything with the asymmetric_constraint_rows
3061  // argument, but we set it to false to be consistent with processLocalResidual
3063  _element_vector, _row_indices, /*asymmetric_constraint_rows=*/false);
3064 
3065  for (const auto i : index_range(_row_indices))
3066  cacheResidual(_row_indices[i], _element_vector(i), vector_tags);
3067 }
void resize(const unsigned int n)
auto raw_value(const Eigen::Map< T > &in)
Definition: EigenADReal.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:3409
void constrain_element_vector(DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const
bool computingResidual() const
Definition: Assembly.h:1911
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:2868
const libMesh::DofMap & _dof_map
DOF map.
Definition: Assembly.h:2318
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:2858
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:3071

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

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

3076 {
3077  mooseAssert(residuals.size() == row_indices.size(),
3078  "The number of residuals should match the number of dof indices");
3079  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3080 
3081  if (computingResidual() && !vector_tags.empty())
3082  for (const auto i : index_range(row_indices))
3083  cacheResidual(
3084  row_indices[i], MetaPhysicL::raw_value(residuals[i]) * scaling_factor, vector_tags);
3085 }
auto raw_value(const Eigen::Map< T > &in)
Definition: EigenADReal.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:3409
bool computingResidual() const
Definition: Assembly.h:1911
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 4527 of file Assembly.C.

Referenced by setCachedJacobian(), and zeroCachedJacobian().

4528 {
4529  for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4530  {
4531  _cached_jacobian_rows[tag].clear();
4532  _cached_jacobian_cols[tag].clear();
4533  _cached_jacobian_values[tag].clear();
4534  }
4535 }
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2778
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2776
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2780

◆ clearCachedQRules()

void Assembly::clearCachedQRules ( )

Set the cached quadrature rules to nullptr.

Definition at line 728 of file Assembly.C.

729 {
730  _current_qrule = nullptr;
731  _current_qrule_face = nullptr;
732  _current_qrule_lower = nullptr;
733  _current_qrule_neighbor = nullptr;
734 }
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2533
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
libMesh::QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2562
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380

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

Referenced by addCachedResidualDirectly().

3506 {
3507  for (const auto & vector_tag : _residual_vector_tags)
3508  clearCachedResiduals(vector_tag);
3509 }
const std::vector< VectorTag > & _residual_vector_tags
The residual vector tags that Assembly could possibly contribute to.
Definition: Assembly.h:2765
void clearCachedResiduals(GlobalDataKey)
Clears all of the residuals in _cached_residual_rows and _cached_residual_values. ...
Definition: Assembly.C:3505

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

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

◆ computeADFace()

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

compute AD things on an element face

Definition at line 2114 of file Assembly.C.

Referenced by reinitElemFaceRef(), and reinitFEFace().

2115 {
2116  const auto dim = elem.dim();
2117 
2118  if (_subproblem.haveADObjects())
2119  {
2120  auto n_qp = _current_qrule_face->n_points();
2121  resizeADMappingObjects(n_qp, dim);
2122  _ad_normals.resize(n_qp);
2123  _ad_JxW_face.resize(n_qp);
2124  if (_calculate_face_xyz)
2125  _ad_q_points_face.resize(n_qp);
2127  _ad_curvatures.resize(n_qp);
2128 
2129  if (_displaced)
2130  {
2131  const auto & qw = _current_qrule_face->get_weights();
2132  computeFaceMap(elem, side, qw);
2133  const std::vector<Real> dummy_qw(n_qp, 1.);
2134 
2135  for (unsigned int qp = 0; qp != n_qp; qp++)
2137  }
2138  else
2139  {
2140  for (unsigned qp = 0; qp < n_qp; ++qp)
2141  {
2142  _ad_JxW_face[qp] = _current_JxW_face[qp];
2143  _ad_normals[qp] = _current_normals[qp];
2144  }
2145  if (_calculate_face_xyz)
2146  for (unsigned qp = 0; qp < n_qp; ++qp)
2149  for (unsigned qp = 0; qp < n_qp; ++qp)
2150  _ad_curvatures[qp] = _curvatures[qp];
2151  }
2152 
2153  for (const auto & it : _fe_face[dim])
2154  {
2155  FEBase & fe = *it.second;
2156  auto fe_type = it.first;
2157  auto num_shapes = FEInterface::n_shape_functions(fe_type, &elem);
2158  auto & grad_phi = _ad_grad_phi_data_face[fe_type];
2159 
2160  grad_phi.resize(num_shapes);
2161  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2162  grad_phi[i].resize(n_qp);
2163 
2164  const auto & regular_grad_phi = _fe_shape_data_face[fe_type]->_grad_phi;
2165 
2166  if (_displaced)
2167  computeGradPhiAD(&elem, n_qp, grad_phi, &fe);
2168  else
2169  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2170  for (unsigned qp = 0; qp < n_qp; ++qp)
2171  grad_phi[i][qp] = regular_grad_phi[i][qp];
2172  }
2173  for (const auto & it : _vector_fe_face[dim])
2174  {
2175  FEVectorBase & fe = *it.second;
2176  auto fe_type = it.first;
2177  auto num_shapes = FEInterface::n_shape_functions(fe_type, &elem);
2178  auto & grad_phi = _ad_vector_grad_phi_data_face[fe_type];
2179 
2180  grad_phi.resize(num_shapes);
2181  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2182  grad_phi[i].resize(n_qp);
2183 
2184  const auto & regular_grad_phi = _vector_fe_shape_data_face[fe_type]->_grad_phi;
2185 
2186  if (_displaced)
2187  computeGradPhiAD(&elem, n_qp, grad_phi, &fe);
2188  else
2189  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2190  for (unsigned qp = 0; qp < n_qp; ++qp)
2191  grad_phi[i][qp] = regular_grad_phi[i][qp];
2192  }
2193  }
2194 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
MooseArray< VectorValue< ADReal > > _ad_normals
Definition: Assembly.h:2817
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
MooseArray< Real > _curvatures
Definition: Assembly.h:2819
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition: Assembly.h:2752
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
Definition: SubProblem.h:767
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2498
const std::vector< Real > & get_weights() const
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
void resizeADMappingObjects(unsigned int n_qp, unsigned int dim)
resize any objects that contribute to automatic differentiation-related mapping calculations ...
Definition: Assembly.C:973
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2744
MooseArray< ADReal > _ad_curvatures
Definition: Assembly.h:2820
void computeGradPhiAD(const Elem *elem, unsigned int n_qp, ADTemplateVariablePhiGradient< OutputType > &grad_phi, libMesh::FEGenericBase< OutputType > *fe)
compute gradient of phi possibly with derivative information with respect to nonlinear displacement v...
SubProblem & _subproblem
Definition: Assembly.h:2283
bool _calculate_curvatures
Definition: Assembly.h:2829
unsigned int n_points() const
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2486
const bool _displaced
Definition: Assembly.h:2285
bool _calculate_face_xyz
Definition: Assembly.h:2828
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:2500
MooseArray< VectorValue< ADReal > > _ad_q_points_face
Definition: Assembly.h:2818
virtual unsigned short dim() const=0
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2488
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
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:1003
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition: Assembly.h:2754
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:407
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2496
MooseArray< ADReal > _ad_JxW_face
Definition: Assembly.h:2816
void computeFaceMap(const Elem &elem, const unsigned int side, const std::vector< Real > &qw)
Definition: Assembly.C:1349

◆ computeCurrentElemVolume()

void Assembly::computeCurrentElemVolume ( )
private

Definition at line 1754 of file Assembly.C.

1755 {
1757  return;
1758 
1761  if (_calculate_ad_coord)
1764 
1765  _current_elem_volume = 0.;
1766  for (unsigned int qp = 0; qp < _current_qrule->n_points(); qp++)
1768 
1770 }
MooseArray< ADReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2396
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:2394
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2596
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2566
void setCoordinateTransformation(const libMesh::QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1731
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:2572
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2390
unsigned int n_points() const
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2833
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380
MooseArray< VectorValue< ADReal > > _ad_q_points
Definition: Assembly.h:2805
subdomain_id_type subdomain_id() const
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:2388

◆ computeCurrentFaceVolume()

void Assembly::computeCurrentFaceVolume ( )
private

Definition at line 1773 of file Assembly.C.

1774 {
1776  return;
1777 
1780  if (_calculate_ad_coord)
1783 
1784  _current_side_volume = 0.;
1785  for (unsigned int qp = 0; qp < _current_qrule_face->n_points(); qp++)
1787 
1789 }
MooseArray< ADReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2396
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:2394
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2498
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2566
void setCoordinateTransformation(const libMesh::QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1731
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
unsigned int n_points() const
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2833
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:2578
MooseArray< VectorValue< ADReal > > _ad_q_points_face
Definition: Assembly.h:2818
subdomain_id_type subdomain_id() const
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2598
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2496

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

Referenced by computeADFace().

1350 {
1351  // Important quantities calculated by this method:
1352  // - _ad_JxW_face
1353  // - _ad_q_points_face
1354  // - _ad_normals
1355  // - _ad_curvatures
1356 
1357  const Elem & side_elem = _compute_face_map_side_elem_builder(elem, side);
1358  const auto dim = elem.dim();
1359  const auto n_qp = qw.size();
1360  const auto & dpsidxi_map = _holder_fe_face_helper[dim]->get_fe_map().get_dpsidxi();
1361  const auto & dpsideta_map = _holder_fe_face_helper[dim]->get_fe_map().get_dpsideta();
1362  const auto & psi_map = _holder_fe_face_helper[dim]->get_fe_map().get_psi();
1363  std::vector<std::vector<Real>> const * d2psidxi2_map = nullptr;
1364  std::vector<std::vector<Real>> const * d2psidxideta_map = nullptr;
1365  std::vector<std::vector<Real>> const * d2psideta2_map = nullptr;
1366  const auto sys_num = _sys.number();
1367  const bool do_derivatives = ADReal::do_derivatives && sys_num == _subproblem.currentNlSysNum();
1368 
1370  {
1371  d2psidxi2_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psidxi2();
1372  d2psidxideta_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psidxideta();
1373  d2psideta2_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psideta2();
1374  }
1375 
1376  switch (dim)
1377  {
1378  case 1:
1379  {
1380  if (!n_qp)
1381  break;
1382 
1383  if (side_elem.node_id(0) == elem.node_id(0))
1384  _ad_normals[0] = Point(-1.);
1385  else
1386  _ad_normals[0] = Point(1.);
1387 
1388  VectorValue<ADReal> side_point;
1389  if (_calculate_face_xyz)
1390  {
1391  const Node & node = side_elem.node_ref(0);
1392  side_point = node;
1393 
1394  if (do_derivatives)
1395  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1397  side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1398  }
1399 
1400  for (const auto p : make_range(n_qp))
1401  {
1402  if (_calculate_face_xyz)
1403  {
1404  _ad_q_points_face[p].zero();
1405  _ad_q_points_face[p].add_scaled(side_point, psi_map[0][p]);
1406  }
1407 
1408  _ad_normals[p] = _ad_normals[0];
1409  _ad_JxW_face[p] = 1.0 * qw[p];
1410  }
1411 
1412  break;
1413  }
1414 
1415  case 2:
1416  {
1417  _ad_dxyzdxi_map.resize(n_qp);
1419  _ad_d2xyzdxi2_map.resize(n_qp);
1420 
1421  for (const auto p : make_range(n_qp))
1422  _ad_dxyzdxi_map[p].zero();
1423  if (_calculate_face_xyz)
1424  for (const auto p : make_range(n_qp))
1425  _ad_q_points_face[p].zero();
1427  for (const auto p : make_range(n_qp))
1428  _ad_d2xyzdxi2_map[p].zero();
1429 
1430  const auto n_mapping_shape_functions =
1431  FE<2, LAGRANGE>::n_dofs(&side_elem, side_elem.default_order());
1432 
1433  for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1434  {
1435  const Node & node = side_elem.node_ref(i);
1436  VectorValue<ADReal> side_point = node;
1437 
1438  if (do_derivatives)
1439  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1441  side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1442 
1443  for (const auto p : make_range(n_qp))
1444  _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1445  if (_calculate_face_xyz)
1446  for (const auto p : make_range(n_qp))
1447  _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1449  for (const auto p : make_range(n_qp))
1450  _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1451  }
1452 
1453  for (const auto p : make_range(n_qp))
1454  {
1455  _ad_normals[p] =
1456  (VectorValue<ADReal>(_ad_dxyzdxi_map[p](1), -_ad_dxyzdxi_map[p](0), 0.)).unit();
1457  const auto the_jac = _ad_dxyzdxi_map[p].norm();
1458  _ad_JxW_face[p] = the_jac * qw[p];
1460  {
1461  const auto numerator = _ad_d2xyzdxi2_map[p] * _ad_normals[p];
1462  const auto denominator = _ad_dxyzdxi_map[p].norm_sq();
1463  libmesh_assert_not_equal_to(denominator, 0);
1464  _ad_curvatures[p] = numerator / denominator;
1465  }
1466  }
1467 
1468  break;
1469  }
1470 
1471  case 3:
1472  {
1473  _ad_dxyzdxi_map.resize(n_qp);
1474  _ad_dxyzdeta_map.resize(n_qp);
1476  {
1477  _ad_d2xyzdxi2_map.resize(n_qp);
1478  _ad_d2xyzdxideta_map.resize(n_qp);
1479  _ad_d2xyzdeta2_map.resize(n_qp);
1480  }
1481 
1482  for (const auto p : make_range(n_qp))
1483  {
1484  _ad_dxyzdxi_map[p].zero();
1485  _ad_dxyzdeta_map[p].zero();
1486  }
1487  if (_calculate_face_xyz)
1488  for (const auto p : make_range(n_qp))
1489  _ad_q_points_face[p].zero();
1491  for (const auto p : make_range(n_qp))
1492  {
1493  _ad_d2xyzdxi2_map[p].zero();
1494  _ad_d2xyzdxideta_map[p].zero();
1495  _ad_d2xyzdeta2_map[p].zero();
1496  }
1497 
1498  const unsigned int n_mapping_shape_functions =
1499  FE<3, LAGRANGE>::n_dofs(&side_elem, side_elem.default_order());
1500 
1501  for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1502  {
1503  const Node & node = side_elem.node_ref(i);
1504  VectorValue<ADReal> side_point = node;
1505 
1506  if (do_derivatives)
1507  for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1509  side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1510 
1511  for (const auto p : make_range(n_qp))
1512  {
1513  _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1514  _ad_dxyzdeta_map[p].add_scaled(side_point, dpsideta_map[i][p]);
1515  }
1516  if (_calculate_face_xyz)
1517  for (const auto p : make_range(n_qp))
1518  _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1520  for (const auto p : make_range(n_qp))
1521  {
1522  _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1523  _ad_d2xyzdxideta_map[p].add_scaled(side_point, (*d2psidxideta_map)[i][p]);
1524  _ad_d2xyzdeta2_map[p].add_scaled(side_point, (*d2psideta2_map)[i][p]);
1525  }
1526  }
1527 
1528  for (const auto p : make_range(n_qp))
1529  {
1530  _ad_normals[p] = _ad_dxyzdxi_map[p].cross(_ad_dxyzdeta_map[p]).unit();
1531 
1532  const auto &dxdxi = _ad_dxyzdxi_map[p](0), &dxdeta = _ad_dxyzdeta_map[p](0),
1533  &dydxi = _ad_dxyzdxi_map[p](1), &dydeta = _ad_dxyzdeta_map[p](1),
1534  &dzdxi = _ad_dxyzdxi_map[p](2), &dzdeta = _ad_dxyzdeta_map[p](2);
1535 
1536  const auto g11 = (dxdxi * dxdxi + dydxi * dydxi + dzdxi * dzdxi);
1537 
1538  const auto g12 = (dxdxi * dxdeta + dydxi * dydeta + dzdxi * dzdeta);
1539 
1540  const auto & g21 = g12;
1541 
1542  const auto g22 = (dxdeta * dxdeta + dydeta * dydeta + dzdeta * dzdeta);
1543 
1544  const auto the_jac = std::sqrt(g11 * g22 - g12 * g21);
1545 
1546  _ad_JxW_face[p] = the_jac * qw[p];
1547 
1549  {
1550  const auto L = -_ad_d2xyzdxi2_map[p] * _ad_normals[p];
1551  const auto M = -_ad_d2xyzdxideta_map[p] * _ad_normals[p];
1552  const auto N = -_ad_d2xyzdeta2_map[p] * _ad_normals[p];
1553  const auto E = _ad_dxyzdxi_map[p].norm_sq();
1554  const auto F = _ad_dxyzdxi_map[p] * _ad_dxyzdeta_map[p];
1555  const auto G = _ad_dxyzdeta_map[p].norm_sq();
1556 
1557  const auto numerator = E * N - 2. * F * M + G * L;
1558  const auto denominator = E * G - F * F;
1559  libmesh_assert_not_equal_to(denominator, 0.);
1560  _ad_curvatures[p] = 0.5 * numerator / denominator;
1561  }
1562  }
1563 
1564  break;
1565  }
1566 
1567  default:
1568  mooseError("Invalid dimension dim = ", dim);
1569  }
1570 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
MooseArray< VectorValue< ADReal > > _ad_normals
Definition: Assembly.h:2817
libMesh::ElemSideBuilder _compute_face_map_side_elem_builder
In place side element builder for computeFaceMap()
Definition: Assembly.h:2851
SystemBase & _sys
Definition: Assembly.h:2282
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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:153
std::vector< VectorValue< ADReal > > _ad_dxyzdeta_map
Definition: Assembly.h:2798
MooseArray< ADReal > _ad_curvatures
Definition: Assembly.h:2820
const Node & node_ref(const unsigned int i) const
SubProblem & _subproblem
Definition: Assembly.h:2283
bool _calculate_curvatures
Definition: Assembly.h:2829
std::vector< VectorValue< ADReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:2797
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
Container of displacement numbers and directions.
Definition: Assembly.h:2825
std::vector< VectorValue< ADReal > > _ad_d2xyzdxi2_map
Definition: Assembly.h:2800
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1159
bool _calculate_face_xyz
Definition: Assembly.h:2828
std::vector< VectorValue< ADReal > > _ad_d2xyzdxideta_map
Definition: Assembly.h:2801
MooseArray< VectorValue< ADReal > > _ad_q_points_face
Definition: Assembly.h:2818
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
virtual unsigned short dim() const=0
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2488
IntRange< T > make_range(T beg, T end)
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
Definition: ADReal.h:21
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:407
const Node *const & node() const
Returns the reference to the node.
Definition: Assembly.h:506
virtual Order default_order() const=0
dof_id_type node_id(const unsigned int i) const
std::vector< VectorValue< ADReal > > _ad_d2xyzdeta2_map
Definition: Assembly.h:2802
MooseArray< ADReal > _ad_JxW_face
Definition: Assembly.h:2816

◆ computeGradPhiAD() [1/2]

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

Definition at line 893 of file Assembly.C.

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

◆ computeGradPhiAD() [2/2]

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

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

Referenced by computeADFace(), and reinitFE().

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

Referenced by computeADFace(), and reinitFE().

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

◆ computingJacobian()

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

Definition at line 1916 of file Assembly.h.

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

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

◆ computingResidual()

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

Definition at line 1911 of file Assembly.h.

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

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

◆ computingResidualAndJacobian()

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

Definition at line 1921 of file Assembly.h.

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

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

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

113  {
114  const T * const * ptr = &inref;
115  return *ptr;
116  }

◆ coordSystem()

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

Get the coordinate system type.

Returns
A reference to the coordinate system type

Definition at line 288 of file Assembly.h.

288 { return _coord_type; }
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:2392

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

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

◆ copyFaceShapes() [1/2]

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

Definition at line 3037 of file Assembly.C.

Referenced by copyFaceShapes().

3038 {
3039  phiFace(v).shallowCopy(v.phiFace());
3040  gradPhiFace(v).shallowCopy(v.gradPhiFace());
3041  if (v.computingSecond())
3042  secondPhiFace(v).shallowCopy(v.secondPhiFace());
3043 }
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:1312
virtual bool computingSecond() const =0
Whether or not this variable is computing any second derivatives.
const VariablePhiValue & phiFace() const
Definition: Assembly.h:1305
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:1307

◆ copyFaceShapes() [2/2]

void Assembly::copyFaceShapes ( unsigned int  var)

Definition at line 3046 of file Assembly.C.

3047 {
3048  auto & v = _sys.getVariable(_tid, var);
3049  if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3050  {
3051  auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3052  copyFaceShapes(v);
3053  }
3054  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3055  {
3056  auto & v = _sys.getActualFieldVariable<RealEigenVector>(_tid, var);
3057  copyFaceShapes(v);
3058  }
3059  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3060  {
3061  auto & v = _sys.getActualFieldVariable<RealVectorValue>(_tid, var);
3062  copyFaceShapes(v);
3063  if (v.computingCurl())
3064  _vector_curl_phi_face.shallowCopy(v.curlPhi());
3065  if (v.computingDiv())
3066  _vector_div_phi_face.shallowCopy(v.divPhi());
3067  }
3068  else
3069  mooseError("Unsupported variable field type!");
3070 }
SystemBase & _sys
Definition: Assembly.h:2282
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
VectorVariablePhiDivergence _vector_div_phi_face
Definition: Assembly.h:2700
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void copyFaceShapes(MooseVariableField< T > &v)
Definition: Assembly.C:3037
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:146
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:2699
MooseVariableField< T > & getActualFieldVariable(THREAD_ID tid, const std::string &var_name)
Returns a field variable pointer - this includes finite volume variables.
Definition: SystemBase.C:117

◆ copyNeighborShapes() [1/2]

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

Definition at line 3074 of file Assembly.C.

Referenced by copyNeighborShapes().

3075 {
3076  if (v.usesPhiNeighbor())
3077  {
3078  phiFaceNeighbor(v).shallowCopy(v.phiFaceNeighbor());
3079  phiNeighbor(v).shallowCopy(v.phiNeighbor());
3080  }
3081  if (v.usesGradPhiNeighbor())
3082  {
3083  gradPhiFaceNeighbor(v).shallowCopy(v.gradPhiFaceNeighbor());
3084  gradPhiNeighbor(v).shallowCopy(v.gradPhiNeighbor());
3085  }
3086  if (v.usesSecondPhiNeighbor())
3087  {
3088  secondPhiFaceNeighbor(v).shallowCopy(v.secondPhiFaceNeighbor());
3089  secondPhiNeighbor(v).shallowCopy(v.secondPhiNeighbor());
3090  }
3091 }
const VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1334
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:1325
const VariablePhiValue & phiFaceNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1330
const VariablePhiValue & phiNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1317
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:1321
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:1338

◆ copyNeighborShapes() [2/2]

void Assembly::copyNeighborShapes ( unsigned int  var)

Definition at line 3094 of file Assembly.C.

3095 {
3096  auto & v = _sys.getVariable(_tid, var);
3097  if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3098  {
3099  auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3100  copyNeighborShapes(v);
3101  }
3102  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3103  {
3104  auto & v = _sys.getActualFieldVariable<RealEigenVector>(_tid, var);
3105  copyNeighborShapes(v);
3106  }
3107  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3108  {
3109  auto & v = _sys.getActualFieldVariable<RealVectorValue>(_tid, var);
3110  copyNeighborShapes(v);
3111  }
3112  else
3113  mooseError("Unsupported variable field type!");
3114 }
SystemBase & _sys
Definition: Assembly.h:2282
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:146
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89
void copyNeighborShapes(MooseVariableField< T > &v)
Definition: Assembly.C:3074
MooseVariableField< T > & getActualFieldVariable(THREAD_ID tid, const std::string &var_name)
Returns a field variable pointer - this includes finite volume variables.
Definition: SystemBase.C:117

◆ copyShapes() [1/2]

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

Definition at line 3000 of file Assembly.C.

Referenced by copyShapes().

3001 {
3002  phi(v).shallowCopy(v.phi());
3003  gradPhi(v).shallowCopy(v.gradPhi());
3004  if (v.computingSecond())
3005  secondPhi(v).shallowCopy(v.secondPhi());
3006 }
virtual const FieldVariablePhiValue & phi() const =0
Return the variable&#39;s elemental shape functions.
const VariablePhiSecond & secondPhi() const
Definition: Assembly.h:1299
const VariablePhiValue & phi() const
Definition: Assembly.h:1290
const VariablePhiGradient & gradPhi() const
Definition: Assembly.h:1297
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 3009 of file Assembly.C.

3010 {
3011  auto & v = _sys.getVariable(_tid, var);
3012  if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3013  {
3014  auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3015  copyShapes(v);
3016  }
3017  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3018  {
3019  auto & v = _sys.getActualFieldVariable<RealEigenVector>(_tid, var);
3020  copyShapes(v);
3021  }
3022  else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3023  {
3024  auto & v = _sys.getActualFieldVariable<RealVectorValue>(_tid, var);
3025  copyShapes(v);
3026  if (v.computingCurl())
3027  curlPhi(v).shallowCopy(v.curlPhi());
3028  if (v.computingDiv())
3029  divPhi(v).shallowCopy(v.divPhi());
3030  }
3031  else
3032  mooseError("Unsupported variable field type!");
3033 }
void copyShapes(MooseVariableField< T > &v)
Definition: Assembly.C:3000
SystemBase & _sys
Definition: Assembly.h:2282
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const VectorVariablePhiDivergence & divPhi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1359
const VectorVariablePhiCurl & curlPhi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1355
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:146
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89
MooseVariableField< T > & getActualFieldVariable(THREAD_ID tid, const std::string &var_name)
Returns a field variable pointer - this includes finite volume variables.
Definition: SystemBase.C:117

◆ couplingEntries() [1/2]

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

Definition at line 1264 of file Assembly.h.

Referenced by MortarConstraint::computeJacobian().

1265  {
1266  return _cm_ff_entry;
1267  }
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301

◆ couplingEntries() [2/2]

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

Definition at line 1269 of file Assembly.h.

1270  {
1271  return _cm_ff_entry;
1272  }
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301

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

Referenced by bumpAllQRuleOrder(), and bumpVolumeQRuleOrder().

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

◆ curlPhi() [1/2]

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

Definition at line 1355 of file Assembly.h.

Referenced by copyShapes().

1356  {
1357  return _vector_curl_phi;
1358  }
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:2693

◆ curlPhi() [2/2]

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

Definition at line 1476 of file Assembly.h.

1477  {
1478  return _vector_curl_phi;
1479  }
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:2693

◆ curlPhiFace() [1/2]

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

Definition at line 1376 of file Assembly.h.

1377  {
1378  return _vector_curl_phi_face;
1379  }
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:2699

◆ curlPhiFace() [2/2]

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

Definition at line 1497 of file Assembly.h.

1498  {
1499  return _vector_curl_phi_face;
1500  }
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:2699

◆ curlPhiFaceNeighbor() [1/2]

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

Definition at line 1424 of file Assembly.h.

1425  {
1427  }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:2711

◆ curlPhiFaceNeighbor() [2/2]

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

Definition at line 1538 of file Assembly.h.

1539  {
1541  }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:2711

◆ curlPhiNeighbor() [1/2]

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

Definition at line 1399 of file Assembly.h.

1400  {
1402  }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:2705

◆ curlPhiNeighbor() [2/2]

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

Definition at line 1518 of file Assembly.h.

1519  {
1521  }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:2705

◆ currentBoundaryID()

const BoundaryID& Assembly::currentBoundaryID ( ) const
inline

Return the current boundary ID.

Definition at line 390 of file Assembly.h.

390 { return _current_boundary_id; }
BoundaryID _current_boundary_id
The current boundary ID.
Definition: Assembly.h:2570

◆ currentNeighborSubdomainID()

const SubdomainID& Assembly::currentNeighborSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 458 of file Assembly.h.

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

◆ currentSubdomainID()

const SubdomainID& Assembly::currentSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 380 of file Assembly.h.

380 { return _current_subdomain_id; }
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2568

◆ divPhi() [1/2]

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

Definition at line 1359 of file Assembly.h.

Referenced by copyShapes().

1360  {
1361  return _vector_div_phi;
1362  }
VectorVariablePhiDivergence _vector_div_phi
Definition: Assembly.h:2694

◆ divPhi() [2/2]

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

Definition at line 1480 of file Assembly.h.

1481  {
1482  return _vector_div_phi;
1483  }
VectorVariablePhiDivergence _vector_div_phi
Definition: Assembly.h:2694

◆ divPhiFace() [1/2]

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

Definition at line 1380 of file Assembly.h.

1381  {
1382  return _vector_div_phi_face;
1383  }
VectorVariablePhiDivergence _vector_div_phi_face
Definition: Assembly.h:2700

◆ divPhiFace() [2/2]

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

Definition at line 1501 of file Assembly.h.

1502  {
1503  return _vector_div_phi_face;
1504  }
VectorVariablePhiDivergence _vector_div_phi_face
Definition: Assembly.h:2700

◆ divPhiFaceNeighbor() [1/2]

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

Definition at line 1429 of file Assembly.h.

1430  {
1432  }
VectorVariablePhiDivergence _vector_div_phi_face_neighbor
Definition: Assembly.h:2712

◆ divPhiFaceNeighbor() [2/2]

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

Definition at line 1542 of file Assembly.h.

1543  {
1545  }
VectorVariablePhiDivergence _vector_div_phi_face_neighbor
Definition: Assembly.h:2712

◆ divPhiNeighbor() [1/2]

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

Definition at line 1404 of file Assembly.h.

1405  {
1406  return _vector_div_phi_neighbor;
1407  }
VectorVariablePhiDivergence _vector_div_phi_neighbor
Definition: Assembly.h:2706

◆ divPhiNeighbor() [2/2]

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

Definition at line 1522 of file Assembly.h.

1523  {
1524  return _vector_div_phi_neighbor;
1525  }
VectorVariablePhiDivergence _vector_div_phi_neighbor
Definition: Assembly.h:2706

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

Referenced by reinitLowerDElem(), and reinitNeighborLowerDElem().

3788 {
3789  FEType fe_type(elem->default_order(), LAGRANGE);
3790  std::unique_ptr<FEBase> fe(FEBase::build(elem->dim(), fe_type));
3791 
3792  // references to the quadrature points and weights
3793  const std::vector<Real> & JxW = fe->get_JxW();
3794  const std::vector<Point> & q_points = fe->get_xyz();
3795 
3796  // The default quadrature rule should integrate the mass matrix,
3797  // thus it should be plenty to compute the volume
3798  QGauss qrule(elem->dim(), fe_type.default_quadrature_order());
3799  fe->attach_quadrature_rule(&qrule);
3800  fe->reinit(elem);
3801 
3802  // perform a sanity check to ensure that size of quad rule and size of q_points is
3803  // identical
3804  mooseAssert(qrule.n_points() == q_points.size(),
3805  "The number of points in the quadrature rule doesn't match the number of passed-in "
3806  "points in Assembly::setCoordinateTransformation");
3807 
3808  // compute the coordinate transformation
3809  Real vol = 0;
3810  for (unsigned int qp = 0; qp < qrule.n_points(); ++qp)
3811  {
3812  Real coord;
3813  coordTransformFactor(_subproblem, elem->subdomain_id(), q_points[qp], coord);
3814  vol += JxW[qp] * coord;
3815  }
3816  return vol;
3817 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
LAGRANGE
std::unique_ptr< FEGenericBase< Real > > build(const unsigned int dim, const FEType &fet)
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:42
SubProblem & _subproblem
Definition: Assembly.h:2283
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:248
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const=0
virtual Order default_order() const=0

◆ elemVolume()

const Real& Assembly::elemVolume ( ) const
inline

Returns the reference to the current element volume.

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

Definition at line 401 of file Assembly.h.

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

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

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

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

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

349  {
350  mooseAssert(id < _neighbor_extra_elem_ids.size(), "An invalid extra element integer id");
351  return _neighbor_extra_elem_ids[id];
352  }
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition: Assembly.h:2509

◆ feADGradPhi() [1/2]

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

Definition at line 1603 of file Assembly.h.

1604  {
1605  return _ad_grad_phi_data[type];
1606  }
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2750

◆ feADGradPhi() [2/2]

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

Definition at line 2914 of file Assembly.h.

2915 {
2916  return _ad_vector_grad_phi_data[type];
2917 }
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2751

◆ feADGradPhiFace() [1/2]

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

Definition at line 1644 of file Assembly.h.

1645  {
1646  return _ad_grad_phi_data_face[type];
1647  }
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition: Assembly.h:2752

◆ feADGradPhiFace() [2/2]

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

Definition at line 2921 of file Assembly.h.

2922 {
2923  return _ad_vector_grad_phi_data_face[type];
2924 }
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition: Assembly.h:2754

◆ feCurlPhi() [1/3]

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

Definition at line 1704 of file Assembly.h.

1705  {
1706  _need_curl.insert(type);
1707  buildFE(type);
1708  return _fe_shape_data[type]->_curl_phi;
1709  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:268
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2735
std::set< FEType > _need_curl
Definition: Assembly.h:2837

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

4735 {
4736  _need_curl.insert(type);
4737  buildVectorFE(type);
4738  return _vector_fe_shape_data[type]->_curl_phi;
4739 }
std::set< FEType > _need_curl
Definition: Assembly.h:2837
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:455
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:2743

◆ feCurlPhiFace() [1/3]

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

Definition at line 1712 of file Assembly.h.

1713  {
1714  _need_curl.insert(type);
1715  buildFaceFE(type);
1716  return _fe_shape_data_face[type]->_curl_phi;
1717  }
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:294
std::set< FEType > _need_curl
Definition: Assembly.h:2837
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736

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

4744 {
4745  _need_curl.insert(type);
4746  buildVectorFaceFE(type);
4747 
4748  // If we're building for a face we probably need to build for a
4749  // neighbor while _need_curl is set;
4750  // onInterface/reinitNeighbor/etc don't distinguish
4752 
4753  return _vector_fe_shape_data_face[type]->_curl_phi;
4754 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2744
std::set< FEType > _need_curl
Definition: Assembly.h:2837
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:486
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546

◆ feCurlPhiFaceNeighbor() [1/3]

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

Definition at line 1728 of file Assembly.h.

1729  {
1730  _need_curl.insert(type);
1731  buildFaceNeighborFE(type);
1732  return _fe_shape_data_face_neighbor[type]->_curl_phi;
1733  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2738
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:338
std::set< FEType > _need_curl
Definition: Assembly.h:2837

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

4768 {
4769  _need_curl.insert(type);
4771 
4772  return _vector_fe_shape_data_face_neighbor[type]->_curl_phi;
4773 }
std::set< FEType > _need_curl
Definition: Assembly.h:2837
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2746
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546

◆ feCurlPhiNeighbor() [1/3]

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

Definition at line 1720 of file Assembly.h.

1721  {
1722  _need_curl.insert(type);
1723  buildNeighborFE(type);
1724  return _fe_shape_data_neighbor[type]->_curl_phi;
1725  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:316
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2737
std::set< FEType > _need_curl
Definition: Assembly.h:2837

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

4759 {
4760  _need_curl.insert(type);
4761  buildVectorNeighborFE(type);
4762  return _vector_fe_shape_data_neighbor[type]->_curl_phi;
4763 }
std::set< FEType > _need_curl
Definition: Assembly.h:2837
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:516
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2745

◆ feDivPhi() [1/3]

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

Definition at line 1736 of file Assembly.h.

1737  {
1738  buildFE(type);
1739  return _fe_shape_data[type]->_div_phi;
1740  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:268
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2735

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

4778 {
4779  _need_div.insert(type);
4780  buildVectorFE(type);
4781  return _vector_fe_shape_data[type]->_div_phi;
4782 }
std::set< FEType > _need_div
Definition: Assembly.h:2838
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:455
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:2743

◆ feDivPhiFace() [1/3]

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

Definition at line 1743 of file Assembly.h.

1744  {
1745  buildFaceFE(type);
1746  return _fe_shape_data_face[type]->_div_phi;
1747  }
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:294
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736

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

4787 {
4788  _need_face_div.insert(type);
4789  buildVectorFaceFE(type);
4790 
4791  // If we're building for a face we probably need to build for a
4792  // neighbor while _need_face_div is set;
4793  // onInterface/reinitNeighbor/etc don't distinguish
4795 
4796  return _vector_fe_shape_data_face[type]->_div_phi;
4797 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2744
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:486
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546
std::set< FEType > _need_face_div
Definition: Assembly.h:2839

◆ feDivPhiFaceNeighbor() [1/3]

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

Definition at line 1759 of file Assembly.h.

1760  {
1761  buildFaceNeighborFE(type);
1762  return _fe_shape_data_face_neighbor[type]->_div_phi;
1763  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2738
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:338

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

4811 {
4812  _need_face_neighbor_div.insert(type);
4814  return _vector_fe_shape_data_face_neighbor[type]->_div_phi;
4815 }
std::set< FEType > _need_face_neighbor_div
Definition: Assembly.h:2841
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2746
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546

◆ feDivPhiNeighbor() [1/3]

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

Definition at line 1751 of file Assembly.h.

1752  {
1753  buildNeighborFE(type);
1754  return _fe_shape_data_neighbor[type]->_div_phi;
1755  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:316
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2737

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

4802 {
4803  _need_neighbor_div.insert(type);
4804  buildVectorNeighborFE(type);
4805  return _vector_fe_shape_data_neighbor[type]->_div_phi;
4806 }
std::set< FEType > _need_neighbor_div
Definition: Assembly.h:2840
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:516
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2745

◆ feDualPhiLower() [1/3]

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

Definition at line 2890 of file Assembly.h.

2891 {
2892  buildLowerDDualFE(type);
2893  return _fe_shape_data_dual_lower[type]->_phi;
2894 }
void buildLowerDDualFE(FEType type) const
Definition: Assembly.C:384
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition: Assembly.h:2740

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

4630 {
4632  return _vector_fe_shape_data_dual_lower[type]->_phi;
4633 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
Definition: Assembly.h:2748
void buildVectorDualLowerDFE(FEType type) const
Definition: Assembly.C:430

◆ feGradDualPhiLower() [1/3]

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

Definition at line 2906 of file Assembly.h.

2907 {
2908  buildLowerDDualFE(type);
2909  return _fe_shape_data_dual_lower[type]->_grad_phi;
2910 }
void buildLowerDDualFE(FEType type) const
Definition: Assembly.C:384
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition: Assembly.h:2740

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

4646 {
4648  return _vector_fe_shape_data_dual_lower[type]->_grad_phi;
4649 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
Definition: Assembly.h:2748
void buildVectorDualLowerDFE(FEType type) const
Definition: Assembly.C:430

◆ feGradPhi() [1/3]

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

Definition at line 1596 of file Assembly.h.

1597  {
1598  buildFE(type);
1599  return _fe_shape_data[type]->_grad_phi;
1600  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:268
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2735

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

4605 {
4606  buildVectorFE(type);
4607  return _vector_fe_shape_data[type]->_grad_phi;
4608 }
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:455
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:2743

◆ feGradPhiFace() [1/3]

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

Definition at line 1637 of file Assembly.h.

1638  {
1639  buildFaceFE(type);
1640  return _fe_shape_data_face[type]->_grad_phi;
1641  }
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:294
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736

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

4662 {
4663  buildVectorFaceFE(type);
4664  return _vector_fe_shape_data_face[type]->_grad_phi;
4665 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2744
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:486

◆ feGradPhiFaceNeighbor() [1/3]

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

Definition at line 1688 of file Assembly.h.

1689  {
1690  buildFaceNeighborFE(type);
1691  return _fe_shape_data_face_neighbor[type]->_grad_phi;
1692  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2738
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:338

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

4718 {
4720  return _vector_fe_shape_data_face_neighbor[type]->_grad_phi;
4721 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2746
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546

◆ feGradPhiLower() [1/3]

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

Definition at line 2898 of file Assembly.h.

2899 {
2900  buildLowerDFE(type);
2901  return _fe_shape_data_lower[type]->_grad_phi;
2902 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition: Assembly.h:2739
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition: Assembly.C:360

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

4638 {
4639  buildVectorLowerDFE(type);
4640  return _vector_fe_shape_data_lower[type]->_grad_phi;
4641 }
void buildVectorLowerDFE(FEType type) const
Build Vector FEs for a lower dimensional element with a type.
Definition: Assembly.C:405
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
Definition: Assembly.h:2747

◆ feGradPhiNeighbor() [1/3]

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

Definition at line 1665 of file Assembly.h.

1666  {
1667  buildNeighborFE(type);
1668  return _fe_shape_data_neighbor[type]->_grad_phi;
1669  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:316
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2737

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

4693 {
4694  buildVectorNeighborFE(type);
4695  return _vector_fe_shape_data_neighbor[type]->_grad_phi;
4696 }
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:516
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2745

◆ fePhi() [1/3]

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

Definition at line 1589 of file Assembly.h.

1590  {
1591  buildFE(type);
1592  return _fe_shape_data[type]->_phi;
1593  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:268
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2735

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

4597 {
4598  buildVectorFE(type);
4599  return _vector_fe_shape_data[type]->_phi;
4600 }
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:455
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:2743

◆ fePhiFace() [1/3]

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

Definition at line 1630 of file Assembly.h.

1631  {
1632  buildFaceFE(type);
1633  return _fe_shape_data_face[type]->_phi;
1634  }
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:294
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736

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

4654 {
4655  buildVectorFaceFE(type);
4656  return _vector_fe_shape_data_face[type]->_phi;
4657 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2744
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:486

◆ fePhiFaceNeighbor() [1/3]

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

Definition at line 1680 of file Assembly.h.

1681  {
1682  buildFaceNeighborFE(type);
1683  return _fe_shape_data_face_neighbor[type]->_phi;
1684  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2738
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:338

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

4710 {
4712  return _vector_fe_shape_data_face_neighbor[type]->_phi;
4713 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2746
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546

◆ fePhiLower() [1/3]

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

Definition at line 2882 of file Assembly.h.

2883 {
2884  buildLowerDFE(type);
2885  return _fe_shape_data_lower[type]->_phi;
2886 }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition: Assembly.h:2739
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition: Assembly.C:360

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

4622 {
4623  buildVectorLowerDFE(type);
4624  return _vector_fe_shape_data_lower[type]->_phi;
4625 }
void buildVectorLowerDFE(FEType type) const
Build Vector FEs for a lower dimensional element with a type.
Definition: Assembly.C:405
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
Definition: Assembly.h:2747

◆ fePhiNeighbor() [1/3]

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

Definition at line 1658 of file Assembly.h.

1659  {
1660  buildNeighborFE(type);
1661  return _fe_shape_data_neighbor[type]->_phi;
1662  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:316
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2737

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

4685 {
4686  buildVectorNeighborFE(type);
4687  return _vector_fe_shape_data_neighbor[type]->_phi;
4688 }
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:516
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2745

◆ feSecondPhi() [1/3]

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

Definition at line 1609 of file Assembly.h.

1610  {
1611  _need_second_derivative.insert(type);
1612  buildFE(type);
1613  return _fe_shape_data[type]->_second_phi;
1614  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:268
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2735
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835

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

4613 {
4614  _need_second_derivative.insert(type);
4615  buildVectorFE(type);
4616  return _vector_fe_shape_data[type]->_second_phi;
4617 }
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:455
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:2743

◆ feSecondPhiFace() [1/3]

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

Definition at line 1650 of file Assembly.h.

1651  {
1652  _need_second_derivative.insert(type);
1653  buildFaceFE(type);
1654  return _fe_shape_data_face[type]->_second_phi;
1655  }
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:294
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736

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

4670 {
4671  _need_second_derivative.insert(type);
4672  buildVectorFaceFE(type);
4673 
4674  // If we're building for a face we probably need to build for a
4675  // neighbor while _need_second_derivative is set;
4676  // onInterface/reinitNeighbor/etc don't distinguish
4678 
4679  return _vector_fe_shape_data_face[type]->_second_phi;
4680 }
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2744
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:486
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546

◆ feSecondPhiFaceNeighbor() [1/3]

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

Definition at line 1696 of file Assembly.h.

1697  {
1698  _need_second_derivative_neighbor.insert(type);
1699  buildFaceNeighborFE(type);
1700  return _fe_shape_data_face_neighbor[type]->_second_phi;
1701  }
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2738
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:338

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

4726 {
4727  _need_second_derivative_neighbor.insert(type);
4729  return _vector_fe_shape_data_face_neighbor[type]->_second_phi;
4730 }
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2746
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546

◆ feSecondPhiNeighbor() [1/3]

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

Definition at line 1672 of file Assembly.h.

1673  {
1674  _need_second_derivative_neighbor.insert(type);
1675  buildNeighborFE(type);
1676  return _fe_shape_data_neighbor[type]->_second_phi;
1677  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:316
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2737
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836

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

4701 {
4702  _need_second_derivative_neighbor.insert(type);
4703  buildVectorNeighborFE(type);
4704  return _vector_fe_shape_data_neighbor[type]->_second_phi;
4705 }
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:516
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2745

◆ fieldScalarCouplingEntries()

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

Definition at line 1279 of file Assembly.h.

1280  {
1281  return _cm_fs_entry;
1282  }
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:2303

◆ genericQPoints() [1/3]

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

◆ genericQPoints() [2/3]

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

Definition at line 4977 of file Assembly.C.

4978 {
4979  return qPoints();
4980 }
const MooseArray< Point > & qPoints() const
Returns the reference to the quadrature points.
Definition: Assembly.h:230

◆ genericQPoints() [3/3]

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

Definition at line 4984 of file Assembly.C.

4985 {
4986  return adQPoints();
4987 }
const MooseArray< ADPoint > & adQPoints() const
Definition: Assembly.h:356

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

Referenced by PointVariableSamplerBase::initialize().

125  {
126  buildFE(type);
127  return constify_ref(_fe[dim][type]);
128  }
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:268
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
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:112
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2372

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

149  {
150  buildFaceFE(type);
151  return constify_ref(_fe_face[dim][type]);
152  }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
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:112
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:294

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

161  {
162  buildFaceNeighborFE(type);
163  return constify_ref(_fe_face_neighbor[dim][type]);
164  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
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:112
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:338
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2517

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

137  {
138  buildNeighborFE(type);
139  return constify_ref(_fe_neighbor[dim][type]);
140  }
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:316
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
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:112
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2516

◆ getJacobianDiagonal()

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

Definition at line 1857 of file Assembly.h.

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

1858  {
1859  unsigned int rows = ke.m();
1860  unsigned int cols = ke.n();
1861  DenseVector<Real> diag(rows);
1862  for (unsigned int i = 0; i < rows; i++)
1863  // % operation is needed to account for cases of no component coupling of array variables
1864  diag(i) = ke(i, i % cols);
1865  return diag;
1866  }
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 172 of file Assembly.h.

173  {
174  buildVectorFE(type);
175  return constify_ref(_vector_fe[dim][type]);
176  }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2374
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
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:112
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:455

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

197  {
198  buildVectorFaceFE(type);
199  return constify_ref(_vector_fe_face[dim][type]);
200  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
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:112
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2486
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:486

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

209  {
212  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2519
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:112
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546

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

185  {
186  buildVectorNeighborFE(type);
187  return constify_ref(_vector_fe_neighbor[dim][type]);
188  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
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:112
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:516
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2518

◆ gradPhi() [1/6]

const VariablePhiGradient& Assembly::gradPhi ( ) const
inline

Definition at line 1297 of file Assembly.h.

Referenced by copyShapes().

1297 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:2674

◆ gradPhi() [2/6]

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

Definition at line 1298 of file Assembly.h.

1298 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:2674

◆ gradPhi() [3/6]

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

Definition at line 1347 of file Assembly.h.

1348  {
1349  return _vector_grad_phi;
1350  }
VectorVariablePhiGradient _vector_grad_phi
Definition: Assembly.h:2691

◆ gradPhi() [4/6]

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

Definition at line 1436 of file Assembly.h.

1436 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:2674

◆ gradPhi() [5/6]

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

Definition at line 1468 of file Assembly.h.

1469  {
1470  return _vector_grad_phi;
1471  }
VectorVariablePhiGradient _vector_grad_phi
Definition: Assembly.h:2691

◆ gradPhi() [6/6]

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

Definition at line 1549 of file Assembly.h.

1549 { return _grad_phi; }
VariablePhiGradient _grad_phi
Definition: Assembly.h:2674

◆ gradPhiFace() [1/6]

const VariablePhiGradient& Assembly::gradPhiFace ( ) const
inline

Definition at line 1307 of file Assembly.h.

Referenced by copyFaceShapes().

1307 { return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2678

◆ gradPhiFace() [2/6]

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

Definition at line 1308 of file Assembly.h.

1309  {
1310  return _grad_phi_face;
1311  }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2678

◆ gradPhiFace() [3/6]

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

Definition at line 1368 of file Assembly.h.

1369  {
1370  return _vector_grad_phi_face;
1371  }
VectorVariablePhiGradient _vector_grad_phi_face
Definition: Assembly.h:2697

◆ gradPhiFace() [4/6]

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

Definition at line 1440 of file Assembly.h.

1440 { return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2678

◆ gradPhiFace() [5/6]

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

Definition at line 1489 of file Assembly.h.

1490  {
1491  return _vector_grad_phi_face;
1492  }
VectorVariablePhiGradient _vector_grad_phi_face
Definition: Assembly.h:2697

◆ gradPhiFace() [6/6]

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

Definition at line 1553 of file Assembly.h.

1554  {
1555  return _grad_phi_face;
1556  }
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2678

◆ gradPhiFaceNeighbor() [1/5]

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

Definition at line 1334 of file Assembly.h.

Referenced by copyNeighborShapes().

1335  {
1336  return _grad_phi_face_neighbor;
1337  }
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:2686

◆ gradPhiFaceNeighbor() [2/5]

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

Definition at line 1414 of file Assembly.h.

1415  {
1417  }
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition: Assembly.h:2709

◆ gradPhiFaceNeighbor() [3/5]

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

Definition at line 1457 of file Assembly.h.

1458  {
1459  return _grad_phi_face_neighbor;
1460  }
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:2686

◆ gradPhiFaceNeighbor() [4/5]

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

Definition at line 1530 of file Assembly.h.

1531  {
1533  }
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition: Assembly.h:2709

◆ gradPhiFaceNeighbor() [5/5]

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

Definition at line 1579 of file Assembly.h.

1580  {
1581  return _grad_phi_face_neighbor;
1582  }
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:2686

◆ gradPhiNeighbor() [1/5]

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

Definition at line 1321 of file Assembly.h.

Referenced by copyNeighborShapes().

1322  {
1323  return _grad_phi_neighbor;
1324  }
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:2682

◆ gradPhiNeighbor() [2/5]

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

Definition at line 1390 of file Assembly.h.

1391  {
1393  }
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition: Assembly.h:2703

◆ gradPhiNeighbor() [3/5]

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

Definition at line 1444 of file Assembly.h.

1445  {
1446  return _grad_phi_neighbor;
1447  }
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:2682

◆ gradPhiNeighbor() [4/5]

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

Definition at line 1510 of file Assembly.h.

1511  {
1513  }
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition: Assembly.h:2703

◆ gradPhiNeighbor() [5/5]

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

Definition at line 1566 of file Assembly.h.

1567  {
1568  return _grad_phi_neighbor;
1569  }
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:2682

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

Referenced by SubProblem::hasScalingVector().

4580 {
4581  _scaling_vector = &_sys.getVector("scaling_factors");
4582 }
SystemBase & _sys
Definition: Assembly.h:2282
const NumericVector< Real > * _scaling_vector
The map from global index to variable scaling factor.
Definition: Assembly.h:2844
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916

◆ hasStaticCondensation()

bool Assembly::hasStaticCondensation ( ) const
inline
Returns
Whether we have static condensation

Definition at line 599 of file Assembly.h.

599 { return _sc; }
libMesh::StaticCondensation * _sc
A pointer to the static condensation class. Null if not present.
Definition: Assembly.h:2877

◆ havePRefinement()

void Assembly::havePRefinement ( const std::unordered_set< 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 4864 of file Assembly.C.

Referenced by SubProblem::preparePRefinement().

4865 {
4866  if (_have_p_refinement)
4867  // Already performed tasks for p-refinement
4868  return;
4869 
4870  const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
4871  const FEType helper_type(helper_order, LAGRANGE);
4872  auto process_fe =
4873  [&disable_families](const unsigned int num_dimensionalities, auto & fe_container)
4874  {
4875  if (!disable_families.empty())
4876  for (const auto dim : make_range(num_dimensionalities))
4877  {
4878  auto fe_container_it = fe_container.find(dim);
4879  if (fe_container_it != fe_container.end())
4880  for (auto & [fe_type, fe_ptr] : fe_container_it->second)
4881  if (disable_families.count(fe_type.family))
4882  fe_ptr->add_p_level_in_reinit(false);
4883  }
4884  };
4885  auto process_fe_and_helpers = [process_fe, &helper_type](auto & unique_helper_container,
4886  auto & helper_container,
4887  const unsigned int num_dimensionalities,
4888  const bool user_added_helper_type,
4889  auto & fe_container)
4890  {
4891  unique_helper_container.resize(num_dimensionalities);
4892  for (const auto dim : make_range(num_dimensionalities))
4893  {
4894  auto & unique_helper = unique_helper_container[dim];
4895  unique_helper = FEGenericBase<Real>::build(dim, helper_type);
4896  // don't participate in p-refinement
4897  unique_helper->add_p_level_in_reinit(false);
4898  helper_container[dim] = unique_helper.get();
4899 
4900  // If the user did not request the helper type then we should erase it from our FE container
4901  // so that they're not penalized (in the "we should be able to do p-refinement sense") for
4902  // our perhaps silly helpers
4903  if (!user_added_helper_type)
4904  {
4905  auto & fe_container_dim = libmesh_map_find(fe_container, dim);
4906  auto fe_it = fe_container_dim.find(helper_type);
4907  mooseAssert(fe_it != fe_container_dim.end(), "We should have the helper type");
4908  delete fe_it->second;
4909  fe_container_dim.erase(fe_it);
4910  }
4911  }
4912 
4913  process_fe(num_dimensionalities, fe_container);
4914  };
4915 
4916  // Handle scalar field families
4917  process_fe_and_helpers(_unique_fe_helper,
4919  _mesh_dimension + 1,
4921  _fe);
4922  process_fe_and_helpers(_unique_fe_face_helper,
4924  _mesh_dimension + 1,
4926  _fe_face);
4927  process_fe_and_helpers(_unique_fe_face_neighbor_helper,
4929  _mesh_dimension + 1,
4932  process_fe_and_helpers(_unique_fe_neighbor_helper,
4934  _mesh_dimension + 1,
4936  _fe_neighbor);
4937  process_fe_and_helpers(_unique_fe_lower_helper,
4941  _fe_lower);
4942  // Handle vector field families
4943  process_fe(_mesh_dimension + 1, _vector_fe);
4944  process_fe(_mesh_dimension + 1, _vector_fe_face);
4945  process_fe(_mesh_dimension + 1, _vector_fe_neighbor);
4946  process_fe(_mesh_dimension + 1, _vector_fe_face_neighbor);
4947  process_fe(_mesh_dimension, _vector_fe_lower);
4948 
4950 
4951  _have_p_refinement = true;
4952 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
bool _user_added_fe_lower_of_helper_type
Definition: Assembly.h:2335
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition: Assembly.h:2343
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:2374
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2522
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
Definition: Assembly.h:2342
bool _user_added_fe_face_neighbor_of_helper_type
Definition: Assembly.h:2333
bool _have_p_refinement
Whether we have ever conducted p-refinement.
Definition: Assembly.h:2871
FIRST
MooseMesh & _mesh
Definition: Assembly.h:2322
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2523
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2340
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2519
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:2339
SECOND
unsigned int _mesh_dimension
Definition: Assembly.h:2324
bool _user_added_fe_neighbor_of_helper_type
Definition: Assembly.h:2334
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2516
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2486
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2526
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:3706
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2372
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2528
bool _user_added_fe_face_of_helper_type
Definition: Assembly.h:2332
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2488
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2518
IntRange< T > make_range(T beg, T end)
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2341
void helpersRequestData()
request phi, dphi, xyz, JxW, etc.
Definition: Assembly.C:4831
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2376
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2517
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
Definition: Assembly.h:2331
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2530

◆ helpersRequestData()

void Assembly::helpersRequestData ( )
private

request phi, dphi, xyz, JxW, etc.

data through the FE helper functions

Definition at line 4831 of file Assembly.C.

Referenced by Assembly(), and havePRefinement().

4832 {
4833  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
4834  {
4835  _holder_fe_helper[dim]->get_phi();
4836  _holder_fe_helper[dim]->get_dphi();
4837  _holder_fe_helper[dim]->get_xyz();
4838  _holder_fe_helper[dim]->get_JxW();
4839 
4840  _holder_fe_face_helper[dim]->get_phi();
4841  _holder_fe_face_helper[dim]->get_dphi();
4842  _holder_fe_face_helper[dim]->get_xyz();
4843  _holder_fe_face_helper[dim]->get_JxW();
4844  _holder_fe_face_helper[dim]->get_normals();
4845 
4848  _holder_fe_face_neighbor_helper[dim]->get_normals();
4849 
4850  _holder_fe_neighbor_helper[dim]->get_xyz();
4851  _holder_fe_neighbor_helper[dim]->get_JxW();
4852  }
4853 
4854  for (unsigned int dim = 0; dim < _mesh_dimension; dim++)
4855  {
4856  // We need these computations in order to compute correct lower-d element volumes in
4857  // curvilinear coordinates
4858  _holder_fe_lower_helper[dim]->get_xyz();
4859  _holder_fe_lower_helper[dim]->get_JxW();
4860  }
4861 }
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2522
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2523
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
unsigned int _mesh_dimension
Definition: Assembly.h:2324
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2488
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2376
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2530

◆ init()

void Assembly::init ( const libMesh::CouplingMatrix cm)

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

Definition at line 2470 of file Assembly.C.

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

◆ initNonlocalCoupling()

void Assembly::initNonlocalCoupling ( )

Create pair of variables requiring nonlocal jacobian contributions.

Definition at line 2652 of file Assembly.C.

Referenced by FEProblemBase::initialSetup().

2653 {
2654  _cm_nonlocal_entry.clear();
2655 
2656  auto & vars = _sys.getVariables(_tid);
2657 
2658  for (auto & ivar : vars)
2659  {
2660  auto i = ivar->number();
2661  auto ivar_start = _cm_nonlocal_entry.size();
2662  for (unsigned int k = 0; k < ivar->count(); ++k)
2663  {
2664  unsigned int iv = i + k;
2665  for (const auto & j : ConstCouplingRow(iv, _nonlocal_cm))
2666  if (!_sys.isScalarVariable(j))
2667  {
2668  auto & jvar = _sys.getVariable(_tid, j);
2669  auto pair = std::make_pair(ivar, &jvar);
2670  auto c = ivar_start;
2671  // check if the pair has been pushed or not
2672  bool has_pair = false;
2673  for (; c < _cm_nonlocal_entry.size(); ++c)
2674  if (_cm_nonlocal_entry[c] == pair)
2675  {
2676  has_pair = true;
2677  break;
2678  }
2679  if (!has_pair)
2680  _cm_nonlocal_entry.push_back(pair);
2681  }
2682  }
2683  }
2684 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
char ** vars
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2309
const libMesh::CouplingMatrix & _nonlocal_cm
Definition: Assembly.h:2289
virtual bool isScalarVariable(unsigned int var_name) const
Definition: SystemBase.C:868
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89

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

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

1114  {
1115  jacobianBlockUsed(tag, ivar, jvar, true);
1116  return _sub_Kee[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
1117  }
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:2209
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition: Assembly.h:2649
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:2785

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

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

2246  {
2247  _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2248  }
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:2316
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:2785

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

2255  {
2256  return _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2257  }
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:2316
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:2785

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

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

3163 {
3164  jacobianBlockLowerUsed(tag, ivar, jvar, true);
3166  {
3167  switch (type)
3168  {
3169  default:
3170  case Moose::LowerLower:
3171  return _sub_Kll[tag][ivar][0];
3172  case Moose::LowerSecondary:
3173  return _sub_Kle[tag][ivar][0];
3174  case Moose::LowerPrimary:
3175  return _sub_Kln[tag][ivar][0];
3176  case Moose::SecondaryLower:
3177  return _sub_Kel[tag][ivar][0];
3179  return _sub_Kee[tag][ivar][0];
3181  return _sub_Ken[tag][ivar][0];
3182  case Moose::PrimaryLower:
3183  return _sub_Knl[tag][ivar][0];
3185  return _sub_Kne[tag][ivar][0];
3186  case Moose::PrimaryPrimary:
3187  return _sub_Knn[tag][ivar][0];
3188  }
3189  }
3190  else
3191  {
3192  switch (type)
3193  {
3194  default:
3195  case Moose::LowerLower:
3196  return _sub_Kll[tag][ivar][jvar];
3197  case Moose::LowerSecondary:
3198  return _sub_Kle[tag][ivar][jvar];
3199  case Moose::LowerPrimary:
3200  return _sub_Kln[tag][ivar][jvar];
3201  case Moose::SecondaryLower:
3202  return _sub_Kel[tag][ivar][jvar];
3204  return _sub_Kee[tag][ivar][jvar];
3206  return _sub_Ken[tag][ivar][jvar];
3207  case Moose::PrimaryLower:
3208  return _sub_Knl[tag][ivar][jvar];
3210  return _sub_Kne[tag][ivar][jvar];
3211  case Moose::PrimaryPrimary:
3212  return _sub_Knn[tag][ivar][jvar];
3213  }
3214  }
3215 }
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
dlower/dsecondary (or dlower/delement)
Definition: Assembly.h:2661
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
dsecondary/dlower (or delement/dlower)
Definition: Assembly.h:2665
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:2245
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
dlower/dlower
Definition: Assembly.h:2659
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
dlower/dprimary (or dlower/dneighbor)
Definition: Assembly.h:2663
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2657
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2653
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition: Assembly.h:2655
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition: Assembly.h:2649
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:2785
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
dprimary/dlower (or dneighbor/dlower)
Definition: Assembly.h:2667

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

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

3119 {
3120  if (type == Moose::ElementElement)
3121  jacobianBlockUsed(tag, ivar, jvar, true);
3122  else
3123  jacobianBlockNeighborUsed(tag, ivar, jvar, true);
3124 
3126  {
3127  switch (type)
3128  {
3129  default:
3130  case Moose::ElementElement:
3131  return _sub_Kee[tag][ivar][0];
3133  return _sub_Ken[tag][ivar][0];
3135  return _sub_Kne[tag][ivar][0];
3137  return _sub_Knn[tag][ivar][0];
3138  }
3139  }
3140  else
3141  {
3142  switch (type)
3143  {
3144  default:
3145  case Moose::ElementElement:
3146  return _sub_Kee[tag][ivar][jvar];
3148  return _sub_Ken[tag][ivar][jvar];
3150  return _sub_Kne[tag][ivar][jvar];
3152  return _sub_Knn[tag][ivar][jvar];
3153  }
3154  }
3155 }
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:2209
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2657
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2653
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition: Assembly.h:2655
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition: Assembly.h:2649
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:2227
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:2785

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

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

2228  {
2229  _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2230  }
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:2314
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:2785

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

2237  {
2238  return _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2239  }
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:2314
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:2785

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

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

1125  {
1126  jacobianBlockNonlocalUsed(tag, ivar, jvar, true);
1127  return _sub_Keg[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
1128  }
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:2263
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
Definition: Assembly.h:2650
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:2785

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

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

2264  {
2265  _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2266  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2312
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:2785

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

2273  {
2274  return _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2275  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2312
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:2785

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

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

2210  {
2211  _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2212  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311
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:2785

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

2219  {
2220  return _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2221  }
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311
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:2785

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

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

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

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

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

◆ jxWMortar()

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

Returns a reference to JxW for mortar segment elements.

Definition at line 678 of file Assembly.h.

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

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

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

262 {
263  _need_JxW_neighbor = true;
264  return _current_JxW_neighbor;
265 }
MooseArray< Real > _current_JxW_neighbor
The current transformed jacobian weights on a neighbor&#39;s face.
Definition: Assembly.h:2539
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
Definition: Assembly.h:2537

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

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

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

◆ lowerDElemVolume()

const Real & Assembly::lowerDElemVolume ( ) const
inline

Definition at line 3179 of file Assembly.h.

3180 {
3183 }
Real _current_lower_d_elem_volume
The current lower dimensional element volume.
Definition: Assembly.h:2607
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition: Assembly.h:2605

◆ mappedNormals()

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

Definition at line 323 of file Assembly.h.

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

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

4586 {
4587  mooseAssert(_current_qrule == _current_qrule_arbitrary, "Rule should be arbitrary");
4588  mooseAssert(weights.size() == _current_physical_points.size(), "Size mismatch");
4589 
4590  for (MooseIndex(weights.size()) i = 0; i < weights.size(); ++i)
4591  _current_JxW[i] = weights[i];
4592 }
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2384
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2616
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:259
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2390
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380

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

Referenced by reinitFEFace().

4559 {
4560  mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
4561 
4563  return;
4564 
4565  MooseArray<Real> xfem_face_weight_multipliers;
4566  if (_xfem->getXFEMFaceWeights(
4567  xfem_face_weight_multipliers, elem, _current_qrule_face, _current_q_points_face, side))
4568  {
4569  mooseAssert(xfem_face_weight_multipliers.size() == _current_JxW_face.size(),
4570  "Size of weight multipliers in xfem doesn't match number of quadrature points");
4571  for (unsigned i = 0; i < xfem_face_weight_multipliers.size(); i++)
4572  _current_JxW_face[i] = _current_JxW_face[i] * xfem_face_weight_multipliers[i];
4573 
4574  xfem_face_weight_multipliers.release();
4575  }
4576 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2384
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2349
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2498
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:259
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:66
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:407
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2496

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

Referenced by reinitFE().

4539 {
4540  mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
4541 
4543  return;
4544 
4545  MooseArray<Real> xfem_weight_multipliers;
4546  if (_xfem->getXFEMWeights(xfem_weight_multipliers, elem, _current_qrule, _current_q_points))
4547  {
4548  mooseAssert(xfem_weight_multipliers.size() == _current_JxW.size(),
4549  "Size of weight multipliers in xfem doesn't match number of quadrature points");
4550  for (unsigned i = 0; i < xfem_weight_multipliers.size(); i++)
4551  _current_JxW[i] = _current_JxW[i] * xfem_weight_multipliers[i];
4552 
4553  xfem_weight_multipliers.release();
4554  }
4555 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2384
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2349
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:259
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2390
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380
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:2388

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

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

◆ msmElem()

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

Definition at line 1926 of file Assembly.h.

1926 { return _msm_elem; }
const Elem * _msm_elem
Definition: Assembly.h:2853

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

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

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

◆ neighbor()

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

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

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

◆ neighborLowerDElemVolume()

const Real & Assembly::neighborLowerDElemVolume ( ) const
inline

Definition at line 3186 of file Assembly.h.

3187 {
3190 }
Real _current_neighbor_lower_d_elem_volume
The current neighboring lower dimensional element volume.
Definition: Assembly.h:2611
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition: Assembly.h:2609

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

413 { 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:2584

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

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

470  {
473  }
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:2588
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:2590

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

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

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

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

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

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

◆ nonlocalCouplingEntries()

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

Definition at line 1274 of file Assembly.h.

1275  {
1276  return _cm_nonlocal_entry;
1277  }
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2309

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

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

◆ numExtraElemIntegers()

unsigned int Assembly::numExtraElemIntegers ( ) const
inline

Number of extra element integers Assembly tracked.

Definition at line 334 of file Assembly.h.

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

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

◆ phi() [1/6]

const VariablePhiValue& Assembly::phi ( ) const
inline

Definition at line 1290 of file Assembly.h.

Referenced by copyShapes().

1290 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:2673

◆ phi() [2/6]

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

Definition at line 1296 of file Assembly.h.

1296 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:2673

◆ phi() [3/6]

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

Definition at line 1343 of file Assembly.h.

1344  {
1345  return _vector_phi;
1346  }
VectorVariablePhiValue _vector_phi
Definition: Assembly.h:2690

◆ phi() [4/6]

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

Definition at line 1435 of file Assembly.h.

1435 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:2673

◆ phi() [5/6]

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

Definition at line 1467 of file Assembly.h.

1467 { return _vector_phi; }
VectorVariablePhiValue _vector_phi
Definition: Assembly.h:2690

◆ phi() [6/6]

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

Definition at line 1548 of file Assembly.h.

1548 { return _phi; }
VariablePhiValue _phi
Definition: Assembly.h:2673

◆ phiFace() [1/6]

const VariablePhiValue& Assembly::phiFace ( ) const
inline

Definition at line 1305 of file Assembly.h.

Referenced by copyFaceShapes().

1305 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:2677

◆ phiFace() [2/6]

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

Definition at line 1306 of file Assembly.h.

1306 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:2677

◆ phiFace() [3/6]

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

Definition at line 1364 of file Assembly.h.

1365  {
1366  return _vector_phi_face;
1367  }
VectorVariablePhiValue _vector_phi_face
Definition: Assembly.h:2696

◆ phiFace() [4/6]

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

Definition at line 1439 of file Assembly.h.

1439 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:2677

◆ phiFace() [5/6]

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

Definition at line 1485 of file Assembly.h.

1486  {
1487  return _vector_phi_face;
1488  }
VectorVariablePhiValue _vector_phi_face
Definition: Assembly.h:2696

◆ phiFace() [6/6]

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

Definition at line 1552 of file Assembly.h.

1552 { return _phi_face; }
VariablePhiValue _phi_face
Definition: Assembly.h:2677

◆ phiFaceNeighbor() [1/5]

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

Definition at line 1330 of file Assembly.h.

Referenced by copyNeighborShapes().

1331  {
1332  return _phi_face_neighbor;
1333  }
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:2685

◆ phiFaceNeighbor() [2/5]

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

Definition at line 1409 of file Assembly.h.

1410  {
1412  }
VectorVariablePhiValue _vector_phi_face_neighbor
Definition: Assembly.h:2708

◆ phiFaceNeighbor() [3/5]

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

Definition at line 1453 of file Assembly.h.

1454  {
1455  return _phi_face_neighbor;
1456  }
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:2685

◆ phiFaceNeighbor() [4/5]

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

Definition at line 1526 of file Assembly.h.

1527  {
1529  }
VectorVariablePhiValue _vector_phi_face_neighbor
Definition: Assembly.h:2708

◆ phiFaceNeighbor() [5/5]

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

Definition at line 1575 of file Assembly.h.

1576  {
1577  return _phi_face_neighbor;
1578  }
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:2685

◆ phiNeighbor() [1/5]

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

Definition at line 1317 of file Assembly.h.

Referenced by copyNeighborShapes().

1318  {
1319  return _phi_neighbor;
1320  }
VariablePhiValue _phi_neighbor
Definition: Assembly.h:2681

◆ phiNeighbor() [2/5]

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

Definition at line 1385 of file Assembly.h.

1386  {
1387  return _vector_phi_neighbor;
1388  }
VectorVariablePhiValue _vector_phi_neighbor
Definition: Assembly.h:2702

◆ phiNeighbor() [3/5]

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

Definition at line 1443 of file Assembly.h.

1443 { return _phi_neighbor; }
VariablePhiValue _phi_neighbor
Definition: Assembly.h:2681

◆ phiNeighbor() [4/5]

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

Definition at line 1506 of file Assembly.h.

1507  {
1508  return _vector_phi_neighbor;
1509  }
VectorVariablePhiValue _vector_phi_neighbor
Definition: Assembly.h:2702

◆ phiNeighbor() [5/5]

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

Definition at line 1562 of file Assembly.h.

1563  {
1564  return _phi_neighbor;
1565  }
VariablePhiValue _phi_neighbor
Definition: Assembly.h:2681

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

242 { 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:2616

◆ prepare()

void Assembly::prepare ( )

Definition at line 2718 of file Assembly.C.

2719 {
2721  prepareResidual();
2722 }
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
Definition: Assembly.C:2687
void prepareResidual()
Sizes and zeroes the residual for the current element.
Definition: Assembly.C:2709

◆ prepareBlock()

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

Definition at line 2899 of file Assembly.C.

2902 {
2903  const auto & iv = _sys.getVariable(_tid, ivar);
2904  const auto & jv = _sys.getVariable(_tid, jvar);
2905  const unsigned int ivn = iv.number();
2906  const unsigned int jvn = jv.number();
2907  const unsigned int icount = iv.count();
2908  unsigned int jcount = jv.count();
2909  if (ivn == jvn && _component_block_diagonal[ivn])
2910  jcount = 1;
2911 
2912  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2913  {
2914  jacobianBlock(ivn, jvn, LocalDataKey{}, tag)
2915  .resize(dof_indices.size() * icount, dof_indices.size() * jcount);
2916  jacobianBlockUsed(tag, ivn, jvn, false);
2917  }
2918 
2919  for (auto & tag_Re : _sub_Re)
2920  tag_Re[ivn].resize(dof_indices.size() * icount);
2921 }
SystemBase & _sys
Definition: Assembly.h:2282
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:2209
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
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:2788
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:1113
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89

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

2928 {
2929  const auto & iv = _sys.getVariable(_tid, ivar);
2930  const auto & jv = _sys.getVariable(_tid, jvar);
2931  const unsigned int ivn = iv.number();
2932  const unsigned int jvn = jv.number();
2933  const unsigned int icount = iv.count();
2934  unsigned int jcount = jv.count();
2935  if (ivn == jvn && _component_block_diagonal[ivn])
2936  jcount = 1;
2937 
2938  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2939  tag < _jacobian_block_nonlocal_used.size();
2940  tag++)
2941  {
2942  jacobianBlockNonlocal(ivn, jvn, LocalDataKey{}, tag)
2943  .resize(idof_indices.size() * icount, jdof_indices.size() * jcount);
2944 
2945  jacobianBlockNonlocalUsed(tag, ivn, jvn, false);
2946  }
2947 }
SystemBase & _sys
Definition: Assembly.h:2282
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:1124
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:2263
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2312
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:2788
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:89

◆ prepareJacobianBlock()

void Assembly::prepareJacobianBlock ( )

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

Definition at line 2687 of file Assembly.C.

Referenced by prepare(), and reinitFVFace().

2688 {
2689  for (const auto & it : _cm_ff_entry)
2690  {
2691  MooseVariableFEBase & ivar = *(it.first);
2692  MooseVariableFEBase & jvar = *(it.second);
2693 
2694  unsigned int vi = ivar.number();
2695  unsigned int vj = jvar.number();
2696 
2697  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2698 
2699  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2700  {
2701  jacobianBlock(vi, vj, LocalDataKey{}, tag)
2702  .resize(ivar.dofIndices().size() * ivar.count(), jvar.dofIndices().size() * jcount);
2703  jacobianBlockUsed(tag, vi, vj, false);
2704  }
2705  }
2706 }
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:2209
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:2788
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:1113
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311
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 2843 of file Assembly.C.

Referenced by SubProblem::reinitLowerDElem().

2844 {
2845  for (const auto & it : _cm_ff_entry)
2846  {
2847  MooseVariableFEBase & ivar = *(it.first);
2848  MooseVariableFEBase & jvar = *(it.second);
2849 
2850  unsigned int vi = ivar.number();
2851  unsigned int vj = jvar.number();
2852 
2853  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2854 
2855  for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
2856  tag++)
2857  {
2858  // To cover all possible cases we should have 9 combinations below for every 2-permutation
2859  // of Lower,Secondary,Primary. However, 4 cases will in general be covered by calls to
2860  // prepare() and prepareNeighbor(). These calls will cover SecondarySecondary
2861  // (ElementElement), SecondaryPrimary (ElementNeighbor), PrimarySecondary (NeighborElement),
2862  // and PrimaryPrimary (NeighborNeighbor). With these covered we only need to prepare the 5
2863  // remaining below
2864 
2865  // derivatives w.r.t. lower dimensional residuals
2866  jacobianBlockMortar(Moose::LowerLower, vi, vj, LocalDataKey{}, tag)
2867  .resize(ivar.dofIndicesLower().size() * ivar.count(),
2868  jvar.dofIndicesLower().size() * jcount);
2869 
2870  jacobianBlockMortar(Moose::LowerSecondary, vi, vj, LocalDataKey{}, tag)
2871  .resize(ivar.dofIndicesLower().size() * ivar.count(),
2872  jvar.dofIndices().size() * jvar.count());
2873 
2874  jacobianBlockMortar(Moose::LowerPrimary, vi, vj, LocalDataKey{}, tag)
2875  .resize(ivar.dofIndicesLower().size() * ivar.count(),
2876  jvar.dofIndicesNeighbor().size() * jvar.count());
2877 
2878  // derivatives w.r.t. interior secondary residuals
2879  jacobianBlockMortar(Moose::SecondaryLower, vi, vj, LocalDataKey{}, tag)
2880  .resize(ivar.dofIndices().size() * ivar.count(),
2881  jvar.dofIndicesLower().size() * jvar.count());
2882 
2883  // derivatives w.r.t. interior primary residuals
2884  jacobianBlockMortar(Moose::PrimaryLower, vi, vj, LocalDataKey{}, tag)
2885  .resize(ivar.dofIndicesNeighbor().size() * ivar.count(),
2886  jvar.dofIndicesLower().size() * jvar.count());
2887 
2888  jacobianBlockLowerUsed(tag, vi, vj, false);
2889  }
2890  }
2891 
2892  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2893  for (const auto & var : vars)
2894  for (auto & tag_Rl : _sub_Rl)
2895  tag_Rl[var->number()].resize(var->dofIndicesLower().size() * var->count());
2896 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
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:2245
char ** vars
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:2320
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:2788
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:2301
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:3158
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2633
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:2316

◆ prepareNeighbor()

void Assembly::prepareNeighbor ( )

Definition at line 2804 of file Assembly.C.

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

2805 {
2806  for (const auto & it : _cm_ff_entry)
2807  {
2808  MooseVariableFEBase & ivar = *(it.first);
2809  MooseVariableFEBase & jvar = *(it.second);
2810 
2811  unsigned int vi = ivar.number();
2812  unsigned int vj = jvar.number();
2813 
2814  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2815 
2816  for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
2817  tag < _jacobian_block_neighbor_used.size();
2818  tag++)
2819  {
2820  jacobianBlockNeighbor(Moose::ElementNeighbor, vi, vj, LocalDataKey{}, tag)
2821  .resize(ivar.dofIndices().size() * ivar.count(),
2822  jvar.dofIndicesNeighbor().size() * jcount);
2823 
2824  jacobianBlockNeighbor(Moose::NeighborElement, vi, vj, LocalDataKey{}, tag)
2825  .resize(ivar.dofIndicesNeighbor().size() * ivar.count(),
2826  jvar.dofIndices().size() * jcount);
2827 
2828  jacobianBlockNeighbor(Moose::NeighborNeighbor, vi, vj, LocalDataKey{}, tag)
2829  .resize(ivar.dofIndicesNeighbor().size() * ivar.count(),
2830  jvar.dofIndicesNeighbor().size() * jcount);
2831 
2832  jacobianBlockNeighborUsed(tag, vi, vj, false);
2833  }
2834  }
2835 
2836  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2837  for (const auto & var : vars)
2838  for (auto & tag_Rn : _sub_Rn)
2839  tag_Rn[var->number()].resize(var->dofIndicesNeighbor().size() * var->count());
2840 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
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:3117
char ** vars
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2631
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:2320
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:2788
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:2301
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:2227
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:2314

◆ prepareNonlocal()

void Assembly::prepareNonlocal ( )

Definition at line 2725 of file Assembly.C.

2726 {
2727  for (const auto & it : _cm_nonlocal_entry)
2728  {
2729  MooseVariableFEBase & ivar = *(it.first);
2730  MooseVariableFEBase & jvar = *(it.second);
2731 
2732  unsigned int vi = ivar.number();
2733  unsigned int vj = jvar.number();
2734 
2735  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2736 
2737  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2738  tag < _jacobian_block_nonlocal_used.size();
2739  tag++)
2740  {
2741  jacobianBlockNonlocal(vi, vj, LocalDataKey{}, tag)
2742  .resize(ivar.dofIndices().size() * ivar.count(), jvar.allDofIndices().size() * jcount);
2743  jacobianBlockNonlocalUsed(tag, vi, vj, false);
2744  }
2745  }
2746 }
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:1124
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:2263
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:2312
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:2788
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:2309

◆ prepareOffDiagScalar()

void Assembly::prepareOffDiagScalar ( )

Definition at line 2974 of file Assembly.C.

Referenced by NodalScalarKernel::reinit().

2975 {
2976  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2977  const std::vector<MooseVariableScalar *> & scalar_vars = _sys.getScalarVariables(_tid);
2978 
2979  for (const auto & ivar : scalar_vars)
2980  {
2981  auto idofs = ivar->dofIndices().size();
2982 
2983  for (const auto & jvar : vars)
2984  {
2985  auto jdofs = jvar->dofIndices().size() * jvar->count();
2986  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2987  {
2988  jacobianBlock(ivar->number(), jvar->number(), LocalDataKey{}, tag).resize(idofs, jdofs);
2989  jacobianBlockUsed(tag, ivar->number(), jvar->number(), false);
2990 
2991  jacobianBlock(jvar->number(), ivar->number(), LocalDataKey{}, tag).resize(jdofs, idofs);
2992  jacobianBlockUsed(tag, jvar->number(), ivar->number(), false);
2993  }
2994  }
2995  }
2996 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:757
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:2209
char ** vars
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
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:1113
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311

◆ prepareResidual()

void Assembly::prepareResidual ( )

Sizes and zeroes the residual for the current element.

Definition at line 2709 of file Assembly.C.

Referenced by prepare(), and reinitFVFace().

2710 {
2711  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2712  for (const auto & var : vars)
2713  for (auto & tag_Re : _sub_Re)
2714  tag_Re[var->number()].resize(var->dofIndices().size() * var->count());
2715 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
char ** vars
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630

◆ prepareScalar()

void Assembly::prepareScalar ( )

Definition at line 2950 of file Assembly.C.

Referenced by FEProblemBase::reinitScalars().

2951 {
2952  const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
2953  for (const auto & ivar : vars)
2954  {
2955  auto idofs = ivar->dofIndices().size();
2956 
2957  for (auto & tag_Re : _sub_Re)
2958  tag_Re[ivar->number()].resize(idofs);
2959 
2960  for (const auto & jvar : vars)
2961  {
2962  auto jdofs = jvar->dofIndices().size();
2963 
2964  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2965  {
2966  jacobianBlock(ivar->number(), jvar->number(), LocalDataKey{}, tag).resize(idofs, jdofs);
2967  jacobianBlockUsed(tag, ivar->number(), jvar->number(), false);
2968  }
2969  }
2970  }
2971 }
SystemBase & _sys
Definition: Assembly.h:2282
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:757
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:2209
char ** vars
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
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:1113
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311

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

Referenced by SystemBase::prepareFace().

2750 {
2751  for (const auto & it : _cm_ff_entry)
2752  {
2753  MooseVariableFEBase & ivar = *(it.first);
2754  MooseVariableFEBase & jvar = *(it.second);
2755 
2756  unsigned int vi = ivar.number();
2757  unsigned int vj = jvar.number();
2758 
2759  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2760 
2761  if (vi == var->number() || vj == var->number())
2762  {
2763  for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2764  {
2765  jacobianBlock(vi, vj, LocalDataKey{}, tag)
2766  .resize(ivar.dofIndices().size() * ivar.count(), jvar.dofIndices().size() * jcount);
2767  jacobianBlockUsed(tag, vi, vj, false);
2768  }
2769  }
2770  }
2771 
2772  for (auto & tag_Re : _sub_Re)
2773  tag_Re[var->number()].resize(var->dofIndices().size() * var->count());
2774 }
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:2209
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:2788
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:1113
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2301
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2311
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.

◆ prepareVariableNonlocal()

void Assembly::prepareVariableNonlocal ( MooseVariableFieldBase var)

Definition at line 2777 of file Assembly.C.

Referenced by SystemBase::prepareFace().

2778 {
2779  for (const auto & it : _cm_nonlocal_entry)
2780  {
2781  MooseVariableFEBase & ivar = *(it.first);
2782  MooseVariableFEBase & jvar = *(it.second);
2783 
2784  unsigned int vi = ivar.number();
2785  unsigned int vj = jvar.number();
2786 
2787  unsigned int jcount = (vi == vj && _component_block_diagonal[vi]) ? 1 : jvar.count();
2788 
2789  if (vi == var->number() || vj == var->number())
2790  {
2791  for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2792  tag < _jacobian_block_nonlocal_used.size();
2793  tag++)
2794  {
2795  jacobianBlockNonlocal(vi, vj, LocalDataKey{}, tag)
2796  .resize(ivar.dofIndices().size() * ivar.count(), jvar.allDofIndices().size() * jcount);
2797  jacobianBlockNonlocalUsed(tag, vi, vj);
2798  }
2799  }
2800  }
2801 }
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:1124
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:2263
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:2312
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:2788
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:2309

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

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

3222 {
3223  // For an array variable, ndof is the number of dofs of the zero-th component and
3224  // ntdof is the number of dofs of all components.
3225  // For standard or vector variables, ndof will be the same as ntdof.
3226  auto ndof = dof_indices.size();
3227  auto ntdof = res_block.size();
3228  auto count = ntdof / ndof;
3229  mooseAssert(count == scaling_factor.size(), "Inconsistent of number of components");
3230  mooseAssert(count * ndof == ntdof, "Inconsistent of number of components");
3231  if (count > 1)
3232  {
3233  // expanding dof indices
3234  dof_indices.resize(ntdof);
3235  unsigned int p = 0;
3236  for (MooseIndex(count) j = 0; j < count; ++j)
3237  for (MooseIndex(ndof) i = 0; i < ndof; ++i)
3238  {
3239  dof_indices[p] = dof_indices[i] + (is_nodal ? j : j * ndof);
3240  res_block(p) *= scaling_factor[j];
3241  ++p;
3242  }
3243  }
3244  else
3245  {
3246  if (scaling_factor[0] != 1.0)
3247  res_block *= scaling_factor[0];
3248  }
3249 
3250  _dof_map.constrain_element_vector(res_block, dof_indices, false);
3251 }
void constrain_element_vector(DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const
virtual unsigned int size() const override final
const libMesh::DofMap & _dof_map
DOF map.
Definition: Assembly.h:2318

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

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

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

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

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

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

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

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

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

◆ qRule()

const libMesh::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 218 of file Assembly.h.

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

218 { return constify_ref(_current_qrule); }
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:112
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380

◆ qruleArbitraryFace()

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

Definition at line 1926 of file Assembly.C.

Referenced by reinitElemFaceRef().

1927 {
1928  return qruleFaceHelper<ArbitraryQuadrature>(
1929  elem, side, [](QRules & q) { return q.arbitrary_face.get(); });
1930 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:407

◆ qRuleFace()

const libMesh::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 294 of file Assembly.h.

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

libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
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:112

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

Referenced by reinitElemFaceRef().

1921 {
1922  return qruleFaceHelper<QBase>(elem, side, [](QRules & q) { return q.face.get(); });
1923 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:407

◆ qruleFaceHelper()

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

Definition at line 2441 of file Assembly.h.

2442  {
2443  auto dim = elem->dim();
2444  auto neighbor = elem->neighbor_ptr(side);
2445  auto q = rule_fn(qrules(dim, elem->subdomain_id()));
2446  if (!neighbor)
2447  return q;
2448 
2449  // find the maximum face quadrature order for all blocks the face is in
2450  auto neighbor_block = neighbor->subdomain_id();
2451  if (neighbor_block == elem->subdomain_id())
2452  return q;
2453 
2454  auto q_neighbor = rule_fn(qrules(dim, neighbor_block));
2455  if (q->get_order() > q_neighbor->get_order())
2456  return q;
2457  return q_neighbor;
2458  }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2460
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:431
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:407

◆ qRuleMortar()

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

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

Definition at line 683 of file Assembly.h.

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

683 { return constify_ref(_qrule_msm); }
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:112
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2556

◆ qRuleNeighbor()

const libMesh::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 479 of file Assembly.h.

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

480  {
482  }
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2533
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:112

◆ qrules() [1/2]

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

Definition at line 2460 of file Assembly.h.

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

2460 { 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:153
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2460
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2568

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

2466  {
2467  if (_qrules.find(block) == _qrules.end())
2468  {
2469  mooseAssert(_qrules.find(Moose::ANY_BLOCK_ID) != _qrules.end(),
2470  "missing quadrature rules for specified block");
2471  mooseAssert(_qrules[Moose::ANY_BLOCK_ID].size() > dim,
2472  "quadrature rules not sized property for dimension");
2473  return _qrules[Moose::ANY_BLOCK_ID][dim];
2474  }
2475  mooseAssert(_qrules.find(block) != _qrules.end(),
2476  "missing quadrature rules for specified block");
2477  mooseAssert(_qrules[block].size() > dim, "quadrature rules not sized property for dimension");
2478  return _qrules[block][dim];
2479  }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
Definition: Assembly.h:2429
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19

◆ reinit() [1/5]

void Assembly::reinit ( const Elem *  elem)

◆ 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.

◆ reinit() [3/5]

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

Reinitialize the assembly data on an side of an element.

◆ 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.

◆ reinit() [5/5]

void Assembly::reinit ( const Node *  node)

Reinitialize assembly data for a node.

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

1793 {
1794  _current_elem = elem;
1795  _current_neighbor_elem = nullptr;
1797  "current subdomain has been set incorrectly");
1799 
1800  FEMap::inverse_map(elem->dim(), elem, physical_points, _temp_reference_points);
1801 
1803 
1804  // Save off the physical points
1805  _current_physical_points = physical_points;
1806 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2616
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2596
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2580
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2566
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
std::vector< Point > _temp_reference_points
Temporary work data for reinitAtPhysical()
Definition: Assembly.h:2794
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const=0
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2568

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

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

2278 {
2279  const unsigned int elem_dim = elem->dim();
2280  mooseAssert(elem_dim == _mesh_dimension - 1,
2281  "Dual shape functions should only be computed on lower dimensional face elements");
2282 
2283  for (const auto & it : _fe_lower[elem_dim])
2284  {
2285  FEBase & fe_lower = *it.second;
2286  // We use customized quadrature rule for integration along the mortar segment elements
2287  fe_lower.set_calculate_default_dual_coeff(false);
2288  fe_lower.reinit_dual_shape_coeffs(elem, pts, JxW);
2289  }
2290 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
unsigned int _mesh_dimension
Definition: Assembly.h:2324
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2526
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:248
void set_calculate_default_dual_coeff(const bool val)
virtual unsigned short dim() const=0
virtual void reinit_dual_shape_coeffs(const Elem *, const std::vector< Point > &, const std::vector< Real > &)

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

2002 {
2003  _current_neighbor_side = neighbor_side;
2004 
2005  reinit(elem, side);
2006 
2007  unsigned int neighbor_dim = neighbor->dim();
2008 
2009  if (neighbor_reference_points)
2010  _current_neighbor_ref_points = *neighbor_reference_points;
2011  else
2012  FEMap::inverse_map(
2014 
2016 
2019 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
std::vector< Point > _current_neighbor_ref_points
The current reference points on the neighbor element.
Definition: Assembly.h:2874
void reinitFEFaceNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition: Assembly.C:1573
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:2584
void reinitNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Reinitializes the neighbor side using reference coordinates.
Definition: Assembly.C:1687
std::vector< T > stdVector() const
Extremely inefficient way to produce a std::vector from a MooseArray!
Definition: MooseArray.h:344
libMesh::ElemSideBuilder _current_neighbor_side_elem_builder
In place side element builder for _current_neighbor_side_elem.
Definition: Assembly.h:2849
virtual unsigned short dim() const=0
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:431
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:2586
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:407
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2496

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

Referenced by SubProblem::reinitElemFaceRef().

2027 {
2028  _current_elem = elem;
2029 
2030  unsigned int elem_dim = elem->dim();
2031 
2032  // Attach the quadrature rules
2033  if (pts)
2034  {
2035  auto face_rule = qruleArbitraryFace(elem, elem_side);
2036  face_rule->setPoints(*pts);
2037  setFaceQRule(face_rule, elem_dim);
2038  }
2039  else
2040  {
2041  auto rule = qruleFace(elem, elem_side);
2042  if (_current_qrule_face != rule)
2043  setFaceQRule(rule, elem_dim);
2044  }
2045 
2046  // reinit face
2047  for (const auto & it : _fe_face[elem_dim])
2048  {
2049  FEBase & fe_face = *it.second;
2050  FEType fe_type = it.first;
2051  FEShapeData & fesd = *_fe_shape_data_face[fe_type];
2052 
2053  fe_face.reinit(elem, elem_side, tolerance, pts, weights);
2054 
2055  _current_fe_face[fe_type] = &fe_face;
2056 
2057  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face.get_phi()));
2058  fesd._grad_phi.shallowCopy(
2059  const_cast<std::vector<std::vector<RealGradient>> &>(fe_face.get_dphi()));
2060  if (_need_second_derivative_neighbor.count(fe_type))
2061  fesd._second_phi.shallowCopy(
2062  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_d2phi()));
2063  }
2064  for (const auto & it : _vector_fe_face[elem_dim])
2065  {
2066  FEVectorBase & fe_face = *it.second;
2067  const FEType & fe_type = it.first;
2068 
2069  _current_vector_fe_face[fe_type] = &fe_face;
2070 
2071  VectorFEShapeData & fesd = *_vector_fe_shape_data_face[fe_type];
2072 
2073  fe_face.reinit(elem, elem_side, tolerance, pts, weights);
2074 
2075  fesd._phi.shallowCopy(
2076  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_phi()));
2077  fesd._grad_phi.shallowCopy(
2078  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_dphi()));
2079  if (_need_second_derivative.count(fe_type))
2080  fesd._second_phi.shallowCopy(
2081  const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_face.get_d2phi()));
2082  if (_need_curl.count(fe_type))
2083  fesd._curl_phi.shallowCopy(
2084  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_curl_phi()));
2085  if (_need_face_div.count(fe_type))
2086  fesd._div_phi.shallowCopy(
2087  const_cast<std::vector<std::vector<Real>> &>(fe_face.get_div_phi()));
2088  }
2089  if (!_unique_fe_face_helper.empty())
2090  {
2091  mooseAssert(elem_dim < _unique_fe_face_helper.size(), "We should be in bounds here");
2092  _unique_fe_face_helper[elem_dim]->reinit(elem, elem_side, tolerance, pts, weights);
2093  }
2094 
2095  // During that last loop the helper objects will have been reinitialized
2097  const_cast<std::vector<Point> &>(_holder_fe_face_helper[elem_dim]->get_xyz()));
2099  const_cast<std::vector<Point> &>(_holder_fe_face_helper[elem_dim]->get_normals()));
2100  _current_tangents.shallowCopy(const_cast<std::vector<std::vector<Point>> &>(
2101  _holder_fe_face_helper[elem_dim]->get_tangents()));
2102  // Note that if the user did pass in points and not weights to this method, JxW will be garbage
2103  // and should not be used
2105  const_cast<std::vector<Real> &>(_holder_fe_face_helper[elem_dim]->get_JxW()));
2108  const_cast<std::vector<Real> &>(_holder_fe_face_helper[elem_dim]->get_curvatures()));
2109 
2110  computeADFace(*elem, elem_side);
2111 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
MooseArray< Real > _curvatures
Definition: Assembly.h:2819
virtual_for_inffe const std::vector< std::vector< OutputDivergence > > & get_div_phi() const
void setFaceQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:676
ArbitraryQuadrature * qruleArbitraryFace(const Elem *elem, unsigned int side)
Definition: Assembly.C:1926
std::map< FEType, FEBase * > _current_fe_face
The "face" fe object that matches the current elem.
Definition: Assembly.h:2354
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2498
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2566
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2340
std::map< FEType, FEVectorBase * > _current_vector_fe_face
The "face" vector fe object that matches the current elem.
Definition: Assembly.h:2363
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:296
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
const std::vector< std::vector< OutputGradient > > & get_dphi() const
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2744
MooseArray< std::vector< Point > > _current_tangents
The current tangent vectors at the quadrature points.
Definition: Assembly.h:2504
bool _calculate_curvatures
Definition: Assembly.h:2829
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
std::set< FEType > _need_curl
Definition: Assembly.h:2837
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2486
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
libMesh::QBase * qruleFace(const Elem *elem, unsigned int side)
This is an abstraction over the internal qrules function.
Definition: Assembly.C:1920
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:2500
virtual unsigned short dim() const=0
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2488
void computeADFace(const Elem &elem, const unsigned int side)
compute AD things on an element face
Definition: Assembly.C:2114
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2496
std::set< FEType > _need_face_div
Definition: Assembly.h:2839
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi() const
const std::vector< std::vector< OutputShape > > & get_phi() const

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

763 {
764  unsigned int dim = elem->dim();
765 
766  for (const auto & it : _fe[dim])
767  {
768  FEBase & fe = *it.second;
769  const FEType & fe_type = it.first;
770 
771  _current_fe[fe_type] = &fe;
772 
773  FEShapeData & fesd = *_fe_shape_data[fe_type];
774 
775  fe.reinit(elem);
776 
777  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe.get_phi()));
778  fesd._grad_phi.shallowCopy(
779  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_dphi()));
780  if (_need_second_derivative.count(fe_type))
781  fesd._second_phi.shallowCopy(
782  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe.get_d2phi()));
783  }
784  for (const auto & it : _vector_fe[dim])
785  {
786  FEVectorBase & fe = *it.second;
787  const FEType & fe_type = it.first;
788 
789  _current_vector_fe[fe_type] = &fe;
790 
791  VectorFEShapeData & fesd = *_vector_fe_shape_data[fe_type];
792 
793  fe.reinit(elem);
794 
795  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_phi()));
796  fesd._grad_phi.shallowCopy(
797  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe.get_dphi()));
798  if (_need_second_derivative.count(fe_type))
799  fesd._second_phi.shallowCopy(
800  const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe.get_d2phi()));
801  if (_need_curl.count(fe_type))
802  fesd._curl_phi.shallowCopy(
803  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_curl_phi()));
804  if (_need_div.count(fe_type))
805  fesd._div_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe.get_div_phi()));
806  }
807  if (!_unique_fe_helper.empty())
808  {
809  mooseAssert(dim < _unique_fe_helper.size(), "We should be in bounds here");
810  _unique_fe_helper[dim]->reinit(elem);
811  }
812 
813  // During that last loop the helper objects will have been reinitialized as well
814  // We need to dig out the q_points and JxW from it.
816  const_cast<std::vector<Point> &>(_holder_fe_helper[dim]->get_xyz()));
817  _current_JxW.shallowCopy(const_cast<std::vector<Real> &>(_holder_fe_helper[dim]->get_JxW()));
818 
820  {
821  auto n_qp = _current_qrule->n_points();
823  if (_displaced)
824  {
825  const auto & qw = _current_qrule->get_weights();
826  for (unsigned int qp = 0; qp != n_qp; qp++)
828  }
829  else
830  {
831  for (unsigned qp = 0; qp < n_qp; ++qp)
832  _ad_JxW[qp] = _current_JxW[qp];
833  if (_calculate_xyz)
834  for (unsigned qp = 0; qp < n_qp; ++qp)
836  }
837 
838  for (const auto & it : _fe[dim])
839  {
840  FEBase & fe = *it.second;
841  auto fe_type = it.first;
842  auto num_shapes = FEInterface::n_shape_functions(fe_type, elem);
843  auto & grad_phi = _ad_grad_phi_data[fe_type];
844 
845  grad_phi.resize(num_shapes);
846  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
847  grad_phi[i].resize(n_qp);
848 
849  if (_displaced)
850  computeGradPhiAD(elem, n_qp, grad_phi, &fe);
851  else
852  {
853  const auto & regular_grad_phi = _fe_shape_data[fe_type]->_grad_phi;
854  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
855  for (unsigned qp = 0; qp < n_qp; ++qp)
856  grad_phi[i][qp] = regular_grad_phi[i][qp];
857  }
858  }
859  for (const auto & it : _vector_fe[dim])
860  {
861  FEVectorBase & fe = *it.second;
862  auto fe_type = it.first;
863  auto num_shapes = FEInterface::n_shape_functions(fe_type, elem);
864  auto & grad_phi = _ad_vector_grad_phi_data[fe_type];
865 
866  grad_phi.resize(num_shapes);
867  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
868  grad_phi[i].resize(n_qp);
869 
870  if (_displaced)
871  computeGradPhiAD(elem, n_qp, grad_phi, &fe);
872  else
873  {
874  const auto & regular_grad_phi = _vector_fe_shape_data[fe_type]->_grad_phi;
875  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
876  for (unsigned qp = 0; qp < n_qp; ++qp)
877  grad_phi[i][qp] = regular_grad_phi[i][qp];
878  }
879  }
880  }
881 
882  auto n = numExtraElemIntegers();
883  for (auto i : make_range(n))
886 
887  if (_xfem != nullptr)
889 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
std::map< FEType, FEBase * > _current_fe
The "volume" fe object that matches the current elem.
Definition: Assembly.h:2352
virtual_for_inffe const std::vector< std::vector< OutputDivergence > > & get_div_phi() const
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2374
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
Definition: SubProblem.h:767
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2735
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2349
void modifyWeightsDueToXFEM(const Elem *elem)
Update the integration weights for XFEM partial elements.
Definition: Assembly.C:4538
const std::vector< Real > & get_weights() const
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2566
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
void resizeADMappingObjects(unsigned int n_qp, unsigned int dim)
resize any objects that contribute to automatic differentiation-related mapping calculations ...
Definition: Assembly.C:973
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:296
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:2339
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition: Assembly.h:334
std::map< FEType, FEVectorBase * > _current_vector_fe
The "volume" vector fe object that matches the current elem.
Definition: Assembly.h:2361
const std::vector< std::vector< OutputGradient > > & get_dphi() const
void computeGradPhiAD(const Elem *elem, unsigned int n_qp, ADTemplateVariablePhiGradient< OutputType > &grad_phi, libMesh::FEGenericBase< OutputType > *fe)
compute gradient of phi possibly with derivative information with respect to nonlinear displacement v...
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2750
SubProblem & _subproblem
Definition: Assembly.h:2283
bool _calculate_xyz
Definition: Assembly.h:2827
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2390
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
std::set< FEType > _need_curl
Definition: Assembly.h:2837
unsigned int n_points() const
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2751
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2372
std::set< FEType > _need_div
Definition: Assembly.h:2838
const bool _displaced
Definition: Assembly.h:2285
MooseArray< VectorValue< ADReal > > _ad_q_points
Definition: Assembly.h:2805
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const=0
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:2743
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:1003
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2376
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2507
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:2388
dof_id_type get_extra_integer(const unsigned int index) const
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi() const
const std::vector< std::vector< OutputShape > > & get_phi() const
MooseArray< ADReal > _ad_JxW
Definition: Assembly.h:2804

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

1270 {
1271  unsigned int dim = elem->dim();
1272 
1273  for (const auto & it : _fe_face[dim])
1274  {
1275  FEBase & fe_face = *it.second;
1276  const FEType & fe_type = it.first;
1277  FEShapeData & fesd = *_fe_shape_data_face[fe_type];
1278  fe_face.reinit(elem, side);
1279  _current_fe_face[fe_type] = &fe_face;
1280 
1281  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face.get_phi()));
1282  fesd._grad_phi.shallowCopy(
1283  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_dphi()));
1284  if (_need_second_derivative.count(fe_type))
1285  fesd._second_phi.shallowCopy(
1286  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_d2phi()));
1287  }
1288  for (const auto & it : _vector_fe_face[dim])
1289  {
1290  FEVectorBase & fe_face = *it.second;
1291  const FEType & fe_type = it.first;
1292 
1293  _current_vector_fe_face[fe_type] = &fe_face;
1294 
1295  VectorFEShapeData & fesd = *_vector_fe_shape_data_face[fe_type];
1296 
1297  fe_face.reinit(elem, side);
1298 
1299  fesd._phi.shallowCopy(
1300  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_phi()));
1301  fesd._grad_phi.shallowCopy(
1302  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_dphi()));
1303  if (_need_second_derivative.count(fe_type))
1304  fesd._second_phi.shallowCopy(
1305  const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_face.get_d2phi()));
1306  if (_need_curl.count(fe_type))
1307  fesd._curl_phi.shallowCopy(
1308  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_curl_phi()));
1309  if (_need_face_div.count(fe_type))
1310  fesd._div_phi.shallowCopy(
1311  const_cast<std::vector<std::vector<Real>> &>(fe_face.get_div_phi()));
1312  }
1313  if (!_unique_fe_face_helper.empty())
1314  {
1315  mooseAssert(dim < _unique_fe_face_helper.size(), "We should be in bounds here");
1316  _unique_fe_face_helper[dim]->reinit(elem, side);
1317  }
1318 
1319  // During that last loop the helper objects will have been reinitialized as well
1320  // We need to dig out the q_points and JxW from it.
1322  const_cast<std::vector<Point> &>(_holder_fe_face_helper[dim]->get_xyz()));
1324  const_cast<std::vector<Real> &>(_holder_fe_face_helper[dim]->get_JxW()));
1326  const_cast<std::vector<Point> &>(_holder_fe_face_helper[dim]->get_normals()));
1327 
1328  _mapped_normals.resize(_current_normals.size(), Eigen::Map<RealDIMValue>(nullptr));
1329  for (unsigned int i = 0; i < _current_normals.size(); i++)
1330  // Note: this does NOT do any allocation. It is "reconstructing" the object in place
1331  new (&_mapped_normals[i]) Eigen::Map<RealDIMValue>(const_cast<Real *>(&_current_normals[i](0)));
1332 
1335  const_cast<std::vector<Real> &>(_holder_fe_face_helper[dim]->get_curvatures()));
1336 
1337  computeADFace(*elem, side);
1338 
1339  if (_xfem != nullptr)
1341 
1342  auto n = numExtraElemIntegers();
1343  for (auto i : make_range(n))
1346 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
MooseArray< Real > _curvatures
Definition: Assembly.h:2819
virtual_for_inffe const std::vector< std::vector< OutputDivergence > > & get_div_phi() const
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2349
std::map< FEType, FEBase * > _current_fe_face
The "face" fe object that matches the current elem.
Definition: Assembly.h:2354
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2498
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2566
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2340
std::map< FEType, FEVectorBase * > _current_vector_fe_face
The "face" vector fe object that matches the current elem.
Definition: Assembly.h:2363
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:296
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition: Assembly.h:334
void modifyFaceWeightsDueToXFEM(const Elem *elem, unsigned int side=0)
Update the face integration weights for XFEM partial elements.
Definition: Assembly.C:4558
std::vector< Eigen::Map< RealDIMValue > > _mapped_normals
Mapped normals.
Definition: Assembly.h:2502
const std::vector< std::vector< OutputGradient > > & get_dphi() const
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2744
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition: MooseArray.h:259
bool _calculate_curvatures
Definition: Assembly.h:2829
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
std::set< FEType > _need_curl
Definition: Assembly.h:2837
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2486
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:2500
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const=0
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2736
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2488
IntRange< T > make_range(T beg, T end)
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2507
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:407
void computeADFace(const Elem &elem, const unsigned int side)
compute AD things on an element face
Definition: Assembly.C:2114
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2496
std::set< FEType > _need_face_div
Definition: Assembly.h:2839
dof_id_type get_extra_integer(const unsigned int index) const
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi() const
const std::vector< std::vector< OutputShape > > & get_phi() const

◆ reinitFEFaceNeighbor()

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

Definition at line 1573 of file Assembly.C.

Referenced by reinitElemAndNeighbor().

1574 {
1575  unsigned int neighbor_dim = neighbor->dim();
1576 
1577  // reinit neighbor face
1578  for (const auto & it : _fe_face_neighbor[neighbor_dim])
1579  {
1580  FEBase & fe_face_neighbor = *it.second;
1581  FEType fe_type = it.first;
1582  FEShapeData & fesd = *_fe_shape_data_face_neighbor[fe_type];
1583 
1584  fe_face_neighbor.reinit(neighbor, &reference_points);
1585 
1586  _current_fe_face_neighbor[fe_type] = &fe_face_neighbor;
1587 
1588  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_phi()));
1589  fesd._grad_phi.shallowCopy(
1590  const_cast<std::vector<std::vector<RealGradient>> &>(fe_face_neighbor.get_dphi()));
1591  if (_need_second_derivative_neighbor.count(fe_type))
1592  fesd._second_phi.shallowCopy(
1593  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_d2phi()));
1594  }
1595  for (const auto & it : _vector_fe_face_neighbor[neighbor_dim])
1596  {
1597  FEVectorBase & fe_face_neighbor = *it.second;
1598  const FEType & fe_type = it.first;
1599 
1600  _current_vector_fe_face_neighbor[fe_type] = &fe_face_neighbor;
1601 
1602  VectorFEShapeData & fesd = *_vector_fe_shape_data_face_neighbor[fe_type];
1603 
1604  fe_face_neighbor.reinit(neighbor, &reference_points);
1605 
1606  fesd._phi.shallowCopy(
1607  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face_neighbor.get_phi()));
1608  fesd._grad_phi.shallowCopy(
1609  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_dphi()));
1610  if (_need_second_derivative.count(fe_type))
1611  fesd._second_phi.shallowCopy(const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(
1612  fe_face_neighbor.get_d2phi()));
1613  if (_need_curl.count(fe_type))
1614  fesd._curl_phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(
1615  fe_face_neighbor.get_curl_phi()));
1616  if (_need_face_neighbor_div.count(fe_type))
1617  fesd._div_phi.shallowCopy(
1618  const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_div_phi()));
1619  }
1620  if (!_unique_fe_face_neighbor_helper.empty())
1621  {
1622  mooseAssert(neighbor_dim < _unique_fe_face_neighbor_helper.size(),
1623  "We should be in bounds here");
1624  _unique_fe_face_neighbor_helper[neighbor_dim]->reinit(neighbor, &reference_points);
1625  }
1626 
1628  const_cast<std::vector<Point> &>(_holder_fe_face_neighbor_helper[neighbor_dim]->get_xyz()));
1629 }
virtual_for_inffe const std::vector< std::vector< OutputDivergence > > & get_div_phi() const
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2738
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2523
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2519
std::map< FEType, FEBase * > _current_fe_face_neighbor
The "neighbor face" fe object that matches the current elem.
Definition: Assembly.h:2358
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:296
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
const std::vector< std::vector< OutputGradient > > & get_dphi() const
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
The "neighbor face" vector fe object that matches the current elem.
Definition: Assembly.h:2367
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
std::set< FEType > _need_curl
Definition: Assembly.h:2837
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
std::set< FEType > _need_face_neighbor_div
Definition: Assembly.h:2841
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2746
virtual unsigned short dim() const=0
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:431
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2341
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2517
MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
Definition: Assembly.h:2535
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi() const
const std::vector< std::vector< OutputShape > > & get_phi() const

◆ reinitFENeighbor()

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

Definition at line 1632 of file Assembly.C.

1633 {
1634  unsigned int neighbor_dim = neighbor->dim();
1635 
1636  // reinit neighbor face
1637  for (const auto & it : _fe_neighbor[neighbor_dim])
1638  {
1639  FEBase & fe_neighbor = *it.second;
1640  FEType fe_type = it.first;
1641  FEShapeData & fesd = *_fe_shape_data_neighbor[fe_type];
1642 
1643  fe_neighbor.reinit(neighbor, &reference_points);
1644 
1645  _current_fe_neighbor[fe_type] = &fe_neighbor;
1646 
1647  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_neighbor.get_phi()));
1648  fesd._grad_phi.shallowCopy(
1649  const_cast<std::vector<std::vector<RealGradient>> &>(fe_neighbor.get_dphi()));
1650  if (_need_second_derivative_neighbor.count(fe_type))
1651  fesd._second_phi.shallowCopy(
1652  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_neighbor.get_d2phi()));
1653  }
1654  for (const auto & it : _vector_fe_neighbor[neighbor_dim])
1655  {
1656  FEVectorBase & fe_neighbor = *it.second;
1657  const FEType & fe_type = it.first;
1658 
1659  _current_vector_fe_neighbor[fe_type] = &fe_neighbor;
1660 
1661  VectorFEShapeData & fesd = *_vector_fe_shape_data_neighbor[fe_type];
1662 
1663  fe_neighbor.reinit(neighbor, &reference_points);
1664 
1665  fesd._phi.shallowCopy(
1666  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_neighbor.get_phi()));
1667  fesd._grad_phi.shallowCopy(
1668  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_neighbor.get_dphi()));
1669  if (_need_second_derivative.count(fe_type))
1670  fesd._second_phi.shallowCopy(
1671  const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_neighbor.get_d2phi()));
1672  if (_need_curl.count(fe_type))
1673  fesd._curl_phi.shallowCopy(
1674  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_neighbor.get_curl_phi()));
1675  if (_need_neighbor_div.count(fe_type))
1676  fesd._div_phi.shallowCopy(
1677  const_cast<std::vector<std::vector<Real>> &>(fe_neighbor.get_div_phi()));
1678  }
1679  if (!_unique_fe_neighbor_helper.empty())
1680  {
1681  mooseAssert(neighbor_dim < _unique_fe_neighbor_helper.size(), "We should be in bounds here");
1682  _unique_fe_neighbor_helper[neighbor_dim]->reinit(neighbor, &reference_points);
1683  }
1684 }
virtual_for_inffe const std::vector< std::vector< OutputDivergence > > & get_div_phi() const
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
Definition: Assembly.h:2342
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2737
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
const std::vector< std::vector< OutputGradient > > & get_dphi() const
std::map< FEType, FEBase * > _current_fe_neighbor
The "neighbor" fe object that matches the current elem.
Definition: Assembly.h:2356
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2516
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
std::set< FEType > _need_neighbor_div
Definition: Assembly.h:2840
std::set< FEType > _need_curl
Definition: Assembly.h:2837
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
virtual unsigned short dim() const=0
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:431
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2518
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2745
std::map< FEType, FEVectorBase * > _current_vector_fe_neighbor
The "neighbor" vector fe object that matches the current elem.
Definition: Assembly.h:2365
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi() const
const std::vector< std::vector< OutputShape > > & get_phi() const

◆ reinitFVFace()

void Assembly::reinitFVFace ( const FaceInfo fi)

Definition at line 1860 of file Assembly.C.

Referenced by SubProblem::reinitFVFace().

1861 {
1862  _current_elem = &fi.elem();
1864  _current_side = fi.elemSideID();
1867  "current subdomain has been set incorrectly");
1868 
1871 
1872  prepareResidual();
1873  prepareNeighbor();
1875 
1876  unsigned int dim = _current_elem->dim();
1877  if (_current_qrule_face != qrules(dim).fv_face.get())
1878  {
1879  setFaceQRule(qrules(dim).fv_face.get(), dim);
1880  // The order of the element that is used for initing here doesn't matter since this will just
1881  // be used for constant monomials (which only need a single integration point)
1882  if (dim == 3)
1883  _current_qrule_face->init(QUAD4, /* p_level = */ 0, /* simple_type_only = */ true);
1884  else
1885  _current_qrule_face->init(EDGE2, /* p_level = */ 0, /* simple_type_only = */ true);
1886  }
1887 
1889 
1890  mooseAssert(_current_qrule_face->n_points() == 1,
1891  "Our finite volume quadrature rule should always yield a single point");
1892 
1893  // We've initialized the reference points. Now we need to compute the physical location of the
1894  // quadrature points. We do not do any FE initialization so we cannot simply copy over FE
1895  // results like we do in reinitFEFace. Instead we handle the computation of the physical
1896  // locations manually
1898  const auto & ref_points = _current_qrule_face->get_points();
1899  const auto & ref_point = ref_points[0];
1900  auto physical_point = FEMap::map(_current_side_elem->dim(), _current_side_elem, ref_point);
1901  _current_q_points_face[0] = physical_point;
1902 
1904  {
1906  "current neighbor subdomain has been set incorrectly");
1907  // Now handle the neighbor qrule/qpoints
1908  ArbitraryQuadrature * const neighbor_rule =
1910  // Here we are setting a reference point that is correct for the neighbor *side* element. It
1911  // would be wrong if this reference point is used for a volumetric FE reinit with the neighbor
1912  neighbor_rule->setPoints(ref_points);
1913  setNeighborQRule(neighbor_rule, _current_neighbor_elem->dim());
1915  _current_q_points_face_neighbor[0] = std::move(physical_point);
1916  }
1917 }
void setFaceQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:676
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
Definition: Assembly.C:2687
const Elem & elem() const
Definition: FaceInfo.h:81
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2596
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2580
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2566
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
void prepareNeighbor()
Definition: Assembly.C:2804
unsigned int elemSideID() const
Definition: FaceInfo.h:109
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
unsigned int neighborSideID() const
Definition: FaceInfo.h:110
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:2584
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2460
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
const Elem * neighborPtr() const
Definition: FaceInfo.h:84
void prepareResidual()
Sizes and zeroes the residual for the current element.
Definition: Assembly.C:2709
SubdomainID _current_neighbor_subdomain_id
The current neighbor subdomain ID.
Definition: Assembly.h:2582
unsigned int n_points() const
subdomain_id_type subdomain_id() const
void setNeighborQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition: Assembly.C:711
const std::vector< Point > & get_points() const
virtual unsigned short dim() const=0
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:431
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
virtual void init(const Elem &e, unsigned int p_level=invalid_uint)
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2574
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2598
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2496
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2576
MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
Definition: Assembly.h:2535
libMesh::ElemSideBuilder _current_side_elem_builder
In place side element builder for _current_side_elem.
Definition: Assembly.h:2847
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2568

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

Referenced by SubProblem::reinitLowerDElem().

2296 {
2298 
2299  const unsigned int elem_dim = elem->dim();
2300  mooseAssert(elem_dim < _mesh_dimension,
2301  "The lower dimensional element should truly be a lower dimensional element");
2302 
2303  if (pts)
2304  {
2305  // Lower rule matches the face rule for the higher dimensional element
2306  ArbitraryQuadrature * lower_rule = qrules(elem_dim + 1).arbitrary_face.get();
2307 
2308  // This also sets the quadrature weights to unity
2309  lower_rule->setPoints(*pts);
2310 
2311  if (weights)
2312  lower_rule->setWeights(*weights);
2313 
2314  setLowerQRule(lower_rule, elem_dim);
2315  }
2316  else if (_current_qrule_lower != qrules(elem_dim + 1).face.get())
2317  setLowerQRule(qrules(elem_dim + 1).face.get(), elem_dim);
2318 
2319  for (const auto & it : _fe_lower[elem_dim])
2320  {
2321  FEBase & fe_lower = *it.second;
2322  FEType fe_type = it.first;
2323 
2324  fe_lower.reinit(elem);
2325 
2326  if (FEShapeData * fesd = _fe_shape_data_lower[fe_type].get())
2327  {
2328  fesd->_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_lower.get_phi()));
2329  fesd->_grad_phi.shallowCopy(
2330  const_cast<std::vector<std::vector<RealGradient>> &>(fe_lower.get_dphi()));
2331  if (_need_second_derivative_neighbor.count(fe_type))
2332  fesd->_second_phi.shallowCopy(
2333  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_lower.get_d2phi()));
2334  }
2335 
2336  // Dual shape functions need to be computed after primal basis being initialized
2337  if (FEShapeData * fesd = _fe_shape_data_dual_lower[fe_type].get())
2338  {
2339  fesd->_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_lower.get_dual_phi()));
2340  fesd->_grad_phi.shallowCopy(
2341  const_cast<std::vector<std::vector<RealGradient>> &>(fe_lower.get_dual_dphi()));
2342  if (_need_second_derivative_neighbor.count(fe_type))
2343  fesd->_second_phi.shallowCopy(
2344  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_lower.get_dual_d2phi()));
2345  }
2346  }
2347  if (!_unique_fe_lower_helper.empty())
2348  {
2349  mooseAssert(elem_dim < _unique_fe_lower_helper.size(), "We should be in bounds here");
2350  _unique_fe_lower_helper[elem_dim]->reinit(elem);
2351  }
2352 
2354  return;
2355 
2356  if (pts && !weights)
2357  {
2358  // We only have dummy weights so the JxWs computed during our FE reinits are meaningless and
2359  // we cannot use them
2360 
2362  // We are in a Cartesian coordinate system and we can just use the element volume method
2363  // which has fast computation for certain element types
2365  else
2366  // We manually compute the volume taking the curvilinear coordinate transformations into
2367  // account
2369  }
2370  else
2371  {
2372  // During that last loop the helper objects will have been reinitialized as well
2373  FEBase & helper_fe = *_holder_fe_lower_helper[elem_dim];
2374  const auto & physical_q_points = helper_fe.get_xyz();
2375  const auto & JxW = helper_fe.get_JxW();
2376  MooseArray<Real> coord;
2378  _current_qrule_lower, physical_q_points, coord, elem->subdomain_id());
2380  for (const auto qp : make_range(_current_qrule_lower->n_points()))
2381  _current_lower_d_elem_volume += JxW[qp] * coord[qp];
2382  }
2383 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition: Assembly.h:2343
const std::vector< std::vector< OutputShape > > & get_dual_phi() const
void setCoordinateTransformation(const libMesh::QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1731
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
void setWeights(const std::vector< libMesh::Real > &weights)
Set the quadrature weights.
std::unique_ptr< libMesh::QBase > face
area/face (meshdim-1) quadrature rule
Definition: Assembly.h:2414
unsigned int _mesh_dimension
Definition: Assembly.h:2324
const std::vector< std::vector< OutputGradient > > & get_dphi() const
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2460
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
void setPoints(const std::vector< libMesh::Point > &points)
Set the quadrature points.
Real elementVolume(const Elem *elem) const
On-demand computation of volume element accounting for RZ/RSpherical.
Definition: Assembly.C:3787
const std::vector< std::vector< OutputGradient > > & get_dual_dphi() const
libMesh::QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2562
SubProblem & _subproblem
Definition: Assembly.h:2283
virtual_for_inffe const std::vector< Real > & get_JxW() const
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
unsigned int n_points() const
virtual_for_inffe const std::vector< Point > & get_xyz() const
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition: Assembly.h:2739
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition: Assembly.h:2601
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2526
Real _current_lower_d_elem_volume
The current lower dimensional element volume.
Definition: Assembly.h:2607
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:248
subdomain_id_type subdomain_id() const
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition: Assembly.h:2740
virtual unsigned short dim() const=0
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition: Assembly.h:2605
virtual Real volume() const
IntRange< T > make_range(T beg, T end)
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1272
std::unique_ptr< ArbitraryQuadrature > arbitrary_face
area/face (meshdim-1) custom points quadrature rule
Definition: Assembly.h:2420
void setLowerQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for lower dimensional integration.
Definition: Assembly.C:692
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2530
const std::vector< std::vector< OutputShape > > & get_phi() const
const std::vector< std::vector< OutputTensor > > & get_dual_d2phi() const

◆ reinitMortarElem()

void Assembly::reinitMortarElem ( const Elem elem)

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

Definition at line 2407 of file Assembly.C.

Referenced by SubProblem::reinitMortarElem().

2408 {
2409  mooseAssert(elem->dim() == _mesh_dimension - 1,
2410  "You should be calling reinitMortarElem on a lower dimensional element");
2411 
2412  _fe_msm->reinit(elem);
2413  _msm_elem = elem;
2414 
2415  MooseArray<Point> array_q_points;
2416  array_q_points.shallowCopy(const_cast<std::vector<Point> &>(_fe_msm->get_xyz()));
2418 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2551
void setCoordinateTransformation(const libMesh::QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1731
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:296
unsigned int _mesh_dimension
Definition: Assembly.h:2324
const Elem * _msm_elem
Definition: Assembly.h:2853
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2556
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const=0
MooseArray< Real > _coord_msm
The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment m...
Definition: Assembly.h:2544

◆ reinitNeighbor()

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

Reinitializes the neighbor side using reference coordinates.

Definition at line 1687 of file Assembly.C.

Referenced by reinitElemAndNeighbor().

1688 {
1689  unsigned int neighbor_dim = neighbor->dim();
1691  "Neighbor subdomain ID has not been correctly set");
1692 
1693  ArbitraryQuadrature * neighbor_rule =
1694  qrules(neighbor_dim, _current_neighbor_subdomain_id).neighbor.get();
1695  neighbor_rule->setPoints(reference_points);
1696  setNeighborQRule(neighbor_rule, neighbor_dim);
1697 
1700  "current neighbor subdomain has been set incorrectly");
1701 
1702  // Calculate the volume of the neighbor
1704  {
1705  unsigned int dim = neighbor->dim();
1707  QBase * qrule = qrules(dim).vol.get();
1708 
1709  fe.attach_quadrature_rule(qrule);
1710  fe.reinit(neighbor);
1711 
1712  const std::vector<Real> & JxW = fe.get_JxW();
1713  MooseArray<Point> q_points;
1714  q_points.shallowCopy(const_cast<std::vector<Point> &>(fe.get_xyz()));
1715 
1717 
1719  for (unsigned int qp = 0; qp < qrule->n_points(); qp++)
1721  }
1722 
1723  auto n = numExtraElemIntegers();
1724  for (auto i : make_range(n))
1727 }
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:2588
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition: Assembly.h:2541
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2522
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:2590
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2580
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
void setCoordinateTransformation(const libMesh::QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1731
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:296
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition: Assembly.h:334
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2460
std::unique_ptr< libMesh::QBase > vol
volume/elem (meshdim) quadrature rule
Definition: Assembly.h:2412
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:2582
virtual_for_inffe const std::vector< Real > & get_JxW() const
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition: Assembly.h:2509
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
unsigned int n_points() const
virtual_for_inffe const std::vector< Point > & get_xyz() const
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:248
subdomain_id_type subdomain_id() const
void setNeighborQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition: Assembly.C:711
virtual unsigned short dim() const=0
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:431
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:2422
virtual void attach_quadrature_rule(QBase *q)=0
dof_id_type get_extra_integer(const unsigned int index) const

◆ 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.

◆ 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.

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

Referenced by SubProblem::reinitNeighborFaceRef().

2202 {
2204 
2205  unsigned int neighbor_dim = neighbor->dim();
2206 
2207  ArbitraryQuadrature * neighbor_rule =
2208  qrules(neighbor_dim, neighbor->subdomain_id()).neighbor.get();
2209  neighbor_rule->setPoints(*pts);
2210 
2211  // Attach this quadrature rule to all the _fe_face_neighbor FE objects. This
2212  // has to have garbage quadrature weights but that's ok because we never
2213  // actually use the JxW coming from these FE reinit'd objects, e.g. we use the
2214  // JxW coming from the element face reinit for DGKernels or we use the JxW
2215  // coming from reinit of the mortar segment element in the case of mortar
2216  setNeighborQRule(neighbor_rule, neighbor_dim);
2217 
2218  // reinit neighbor face
2219  for (const auto & it : _fe_face_neighbor[neighbor_dim])
2220  {
2221  FEBase & fe_face_neighbor = *it.second;
2222  FEType fe_type = it.first;
2223  FEShapeData & fesd = *_fe_shape_data_face_neighbor[fe_type];
2224 
2225  fe_face_neighbor.reinit(neighbor, neighbor_side, tolerance, pts, weights);
2226 
2227  _current_fe_face_neighbor[fe_type] = &fe_face_neighbor;
2228 
2229  fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_phi()));
2230  fesd._grad_phi.shallowCopy(
2231  const_cast<std::vector<std::vector<RealGradient>> &>(fe_face_neighbor.get_dphi()));
2232  if (_need_second_derivative_neighbor.count(fe_type))
2233  fesd._second_phi.shallowCopy(
2234  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_d2phi()));
2235  }
2236  for (const auto & it : _vector_fe_face_neighbor[neighbor_dim])
2237  {
2238  FEVectorBase & fe_face_neighbor = *it.second;
2239  const FEType & fe_type = it.first;
2240 
2241  _current_vector_fe_face_neighbor[fe_type] = &fe_face_neighbor;
2242 
2243  VectorFEShapeData & fesd = *_vector_fe_shape_data_face_neighbor[fe_type];
2244 
2245  fe_face_neighbor.reinit(neighbor, neighbor_side, tolerance, pts, weights);
2246 
2247  fesd._phi.shallowCopy(
2248  const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face_neighbor.get_phi()));
2249  fesd._grad_phi.shallowCopy(
2250  const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_dphi()));
2251  if (_need_second_derivative.count(fe_type))
2252  fesd._second_phi.shallowCopy(const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(
2253  fe_face_neighbor.get_d2phi()));
2254  if (_need_curl.count(fe_type))
2255  fesd._curl_phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(
2256  fe_face_neighbor.get_curl_phi()));
2257  if (_need_face_neighbor_div.count(fe_type))
2258  fesd._div_phi.shallowCopy(
2259  const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_div_phi()));
2260  }
2261  if (!_unique_fe_face_neighbor_helper.empty())
2262  {
2263  mooseAssert(neighbor_dim < _unique_fe_face_neighbor_helper.size(),
2264  "We should be in bounds here");
2265  _unique_fe_face_neighbor_helper[neighbor_dim]->reinit(
2266  neighbor, neighbor_side, tolerance, pts, weights);
2267  }
2268  // During that last loop the helper objects will have been reinitialized as well
2269  // We need to dig out the q_points from it
2271  const_cast<std::vector<Point> &>(_holder_fe_face_neighbor_helper[neighbor_dim]->get_xyz()));
2272 }
virtual_for_inffe const std::vector< std::vector< OutputDivergence > > & get_div_phi() const
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2738
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2580
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2523
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2519
std::map< FEType, FEBase * > _current_fe_face_neighbor
The "neighbor face" fe object that matches the current elem.
Definition: Assembly.h:2358
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:296
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2836
const std::vector< std::vector< OutputGradient > > & get_dphi() const
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2460
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
void setPoints(const std::vector< libMesh::Point > &points)
Set the quadrature points.
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
The "neighbor face" vector fe object that matches the current elem.
Definition: Assembly.h:2367
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
std::set< FEType > _need_curl
Definition: Assembly.h:2837
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2835
std::set< FEType > _need_face_neighbor_div
Definition: Assembly.h:2841
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2746
subdomain_id_type subdomain_id() const
void setNeighborQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition: Assembly.C:711
virtual unsigned short dim() const=0
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:431
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2341
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2517
MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
Definition: Assembly.h:2535
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi() const
const std::vector< std::vector< OutputShape > > & get_phi() const

◆ reinitNeighborLowerDElem()

void Assembly::reinitNeighborLowerDElem ( const Elem elem)

reinitialize a neighboring lower dimensional element

Definition at line 2386 of file Assembly.C.

Referenced by SubProblem::reinitNeighborLowerDElem().

2387 {
2388  mooseAssert(elem->dim() < _mesh_dimension,
2389  "You should be calling reinitNeighborLowerDElem on a lower dimensional element");
2390 
2392 
2394  return;
2395 
2397  // We are in a Cartesian coordinate system and we can just use the element volume method which
2398  // has fast computation for certain element types
2400  else
2401  // We manually compute the volume taking the curvilinear coordinate transformations into
2402  // account
2404 }
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:375
unsigned int _mesh_dimension
Definition: Assembly.h:2324
const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
Definition: Assembly.h:2603
Real elementVolume(const Elem *elem) const
On-demand computation of volume element accounting for RZ/RSpherical.
Definition: Assembly.C:3787
SubProblem & _subproblem
Definition: Assembly.h:2283
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const=0
virtual Real volume() const
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1272
Real _current_neighbor_lower_d_elem_volume
The current neighboring lower dimensional element volume.
Definition: Assembly.h:2611
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition: Assembly.h:2609

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

Referenced by TaggingInterface::prepareVectorTagInternal().

1087  {
1088  return _sub_Re[tag_id][var_num];
1089  }
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630

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

Referenced by TaggingInterface::prepareVectorTagLower().

1105  {
1106  return _sub_Rl[tag_id][var_num];
1107  }
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2633

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

Referenced by TaggingInterface::prepareVectorTagNeighbor().

1096  {
1097  return _sub_Rn[tag_id][var_num];
1098  }
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2631

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

Referenced by computeADFace(), and reinitFE().

974 {
975  _ad_dxyzdxi_map.resize(n_qp);
976  _ad_dxidx_map.resize(n_qp);
977  _ad_dxidy_map.resize(n_qp); // 1D element may live in 2D ...
978  _ad_dxidz_map.resize(n_qp); // ... or 3D
979 
980  if (dim > 1)
981  {
982  _ad_dxyzdeta_map.resize(n_qp);
983  _ad_detadx_map.resize(n_qp);
984  _ad_detady_map.resize(n_qp);
985  _ad_detadz_map.resize(n_qp);
986 
987  if (dim > 2)
988  {
989  _ad_dxyzdzeta_map.resize(n_qp);
990  _ad_dzetadx_map.resize(n_qp);
991  _ad_dzetady_map.resize(n_qp);
992  _ad_dzetadz_map.resize(n_qp);
993  }
994  }
995 
996  _ad_jac.resize(n_qp);
997  _ad_JxW.resize(n_qp);
998  if (_calculate_xyz)
999  _ad_q_points.resize(n_qp);
1000 }
std::vector< ADReal > _ad_detadz_map
Definition: Assembly.h:2811
std::vector< ADReal > _ad_detady_map
Definition: Assembly.h:2810
std::vector< ADReal > _ad_dzetadz_map
Definition: Assembly.h:2814
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::vector< VectorValue< ADReal > > _ad_dxyzdeta_map
Definition: Assembly.h:2798
std::vector< VectorValue< ADReal > > _ad_dxyzdzeta_map
Definition: Assembly.h:2799
std::vector< ADReal > _ad_dzetadx_map
Definition: Assembly.h:2812
std::vector< ADReal > _ad_dzetady_map
Definition: Assembly.h:2813
std::vector< ADReal > _ad_dxidz_map
Definition: Assembly.h:2808
std::vector< ADReal > _ad_detadx_map
Definition: Assembly.h:2809
bool _calculate_xyz
Definition: Assembly.h:2827
std::vector< VectorValue< ADReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:2797
std::vector< ADReal > _ad_jac
Definition: Assembly.h:2803
std::vector< ADReal > _ad_dxidx_map
Definition: Assembly.h:2806
std::vector< ADReal > _ad_dxidy_map
Definition: Assembly.h:2807
MooseArray< VectorValue< ADReal > > _ad_q_points
Definition: Assembly.h:2805
void resize(unsigned int size)
Change the number of elements the array can store.
Definition: MooseArray.h:216
MooseArray< ADReal > _ad_JxW
Definition: Assembly.h:2804

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

Referenced by ArrayDGKernel::computeElemNeighJacobian(), ArrayKernel::computeJacobian(), ArrayIntegratedBC::computeJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), and ArrayDGLowerDKernel::computeLowerDJacobian().

1813  {
1814  unsigned int pace = (_component_block_diagonal[ivar] ? 0 : nphi);
1815  for (unsigned int k = 0; k < v.size(); ++k, i += ntest, j += pace)
1816  ke(i, j) += v(k);
1817  }
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:2788

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

Referenced by ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), ArrayKernel::computeOffDiagJacobian(), ArrayIntegratedBC::computeOffDiagJacobian(), ArrayKernel::computeOffDiagJacobianScalar(), ArrayIntegratedBC::computeOffDiagJacobianScalar(), and ArrayDGLowerDKernel::computeOffDiagLowerDJacobian().

1839  {
1840  if (ivar == jvar && _component_block_diagonal[ivar])
1841  {
1842  for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1843  ke(i, j) += v(k, k);
1844  }
1845  else
1846  {
1847  const unsigned int saved_j = j;
1848  for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1849  {
1850  j = saved_j;
1851  for (unsigned int l = 0; l < v.cols(); ++l, j += nphi)
1852  ke(i, j) += v(k, l);
1853  }
1854  }
1855  }
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:2788

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

Referenced by ArrayDGKernel::computeElemNeighResidual(), ArrayDGLowerDKernel::computeLowerDResidual(), ArrayKernel::computeResidual(), ArrayLowerDIntegratedBC::computeResidual(), and ArrayIntegratedBC::computeResidual().

1791  {
1792  for (unsigned int j = 0; j < v.size(); ++j, i += ntest)
1793  re(i) += v(j);
1794  }

◆ scalarFieldCouplingEntries()

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

Definition at line 1284 of file Assembly.h.

Referenced by MortarScalarBase::computeScalarOffDiagJacobian().

1285  {
1286  return _cm_sf_entry;
1287  }
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:2305

◆ secondPhi() [1/6]

const VariablePhiSecond& Assembly::secondPhi ( ) const
inline

Definition at line 1299 of file Assembly.h.

Referenced by copyShapes().

1299 { return _second_phi; }
VariablePhiSecond _second_phi
Definition: Assembly.h:2675

◆ secondPhi() [2/6]

const VariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1300 of file Assembly.h.

1301  {
1302  return _second_phi;
1303  }
VariablePhiSecond _second_phi
Definition: Assembly.h:2675

◆ secondPhi() [3/6]

const VectorVariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1351 of file Assembly.h.

1352  {
1353  return _vector_second_phi;
1354  }
VectorVariablePhiSecond _vector_second_phi
Definition: Assembly.h:2692

◆ secondPhi() [4/6]

VariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< Real > &  )
inline

Definition at line 1437 of file Assembly.h.

1437 { return _second_phi; }
VariablePhiSecond _second_phi
Definition: Assembly.h:2675

◆ secondPhi() [5/6]

VectorVariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1472 of file Assembly.h.

1473  {
1474  return _vector_second_phi;
1475  }
VectorVariablePhiSecond _vector_second_phi
Definition: Assembly.h:2692

◆ secondPhi() [6/6]

VariablePhiSecond& Assembly::secondPhi ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1550 of file Assembly.h.

1550 { return _second_phi; }
VariablePhiSecond _second_phi
Definition: Assembly.h:2675

◆ secondPhiFace() [1/5]

const VariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1312 of file Assembly.h.

Referenced by copyFaceShapes().

1313  {
1314  return _second_phi_face;
1315  }
VariablePhiSecond _second_phi_face
Definition: Assembly.h:2679

◆ secondPhiFace() [2/5]

const VectorVariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1372 of file Assembly.h.

1373  {
1374  return _vector_second_phi_face;
1375  }
VectorVariablePhiSecond _vector_second_phi_face
Definition: Assembly.h:2698

◆ secondPhiFace() [3/5]

VariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< Real > &  )
inline

Definition at line 1441 of file Assembly.h.

1441 { return _second_phi_face; }
VariablePhiSecond _second_phi_face
Definition: Assembly.h:2679

◆ secondPhiFace() [4/5]

VectorVariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1493 of file Assembly.h.

1494  {
1495  return _vector_second_phi_face;
1496  }
VectorVariablePhiSecond _vector_second_phi_face
Definition: Assembly.h:2698

◆ secondPhiFace() [5/5]

VariablePhiSecond& Assembly::secondPhiFace ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1557 of file Assembly.h.

1558  {
1559  return _second_phi_face;
1560  }
VariablePhiSecond _second_phi_face
Definition: Assembly.h:2679

◆ secondPhiFaceNeighbor() [1/5]

const VariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1338 of file Assembly.h.

Referenced by copyNeighborShapes().

1339  {
1341  }
VariablePhiSecond _second_phi_face_neighbor
Definition: Assembly.h:2687

◆ secondPhiFaceNeighbor() [2/5]

const VectorVariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1419 of file Assembly.h.

1420  {
1422  }
VectorVariablePhiSecond _vector_second_phi_face_neighbor
Definition: Assembly.h:2710

◆ secondPhiFaceNeighbor() [3/5]

VariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< Real > &  )
inline

Definition at line 1461 of file Assembly.h.

1462  {
1464  }
VariablePhiSecond _second_phi_face_neighbor
Definition: Assembly.h:2687

◆ secondPhiFaceNeighbor() [4/5]

VectorVariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1534 of file Assembly.h.

1535  {
1537  }
VectorVariablePhiSecond _vector_second_phi_face_neighbor
Definition: Assembly.h:2710

◆ secondPhiFaceNeighbor() [5/5]

VariablePhiSecond& Assembly::secondPhiFaceNeighbor ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1583 of file Assembly.h.

1584  {
1586  }
VariablePhiSecond _second_phi_face_neighbor
Definition: Assembly.h:2687

◆ secondPhiNeighbor() [1/5]

const VariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< Real > &  ) const
inline

Definition at line 1325 of file Assembly.h.

Referenced by copyNeighborShapes().

1326  {
1327  return _second_phi_neighbor;
1328  }
VariablePhiSecond _second_phi_neighbor
Definition: Assembly.h:2683

◆ secondPhiNeighbor() [2/5]

const VectorVariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< RealVectorValue > &  ) const
inline

Definition at line 1395 of file Assembly.h.

1396  {
1398  }
VectorVariablePhiSecond _vector_second_phi_neighbor
Definition: Assembly.h:2704

◆ secondPhiNeighbor() [3/5]

VariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< Real > &  )
inline

Definition at line 1448 of file Assembly.h.

1449  {
1450  return _second_phi_neighbor;
1451  }
VariablePhiSecond _second_phi_neighbor
Definition: Assembly.h:2683

◆ secondPhiNeighbor() [4/5]

VectorVariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< RealVectorValue > &  )
inline

Definition at line 1514 of file Assembly.h.

1515  {
1517  }
VectorVariablePhiSecond _vector_second_phi_neighbor
Definition: Assembly.h:2704

◆ secondPhiNeighbor() [5/5]

VariablePhiSecond& Assembly::secondPhiNeighbor ( const MooseVariableField< RealEigenVector > &  )
inline

Definition at line 1570 of file Assembly.h.

1571  {
1572  return _second_phi_neighbor;
1573  }
VariablePhiSecond _second_phi_neighbor
Definition: Assembly.h:2683

◆ setCachedJacobian()

void Assembly::setCachedJacobian ( GlobalDataKey  )

Sets previously-cached Jacobian values via SparseMatrix::set() calls.

Definition at line 4497 of file Assembly.C.

Referenced by NonlinearSystemBase::computeJacobianInternal(), and NonlinearSystemBase::computeNodalBCsResidualAndJacobian().

4498 {
4499  for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4500  if (_sys.hasMatrix(tag))
4501  {
4502  // First zero the rows (including the diagonals) to prepare for
4503  // setting the cached values.
4505 
4506  // TODO: Use SparseMatrix::set_values() for efficiency
4507  for (MooseIndex(_cached_jacobian_values) i = 0; i < _cached_jacobian_values[tag].size(); ++i)
4508  _sys.getMatrix(tag).set(_cached_jacobian_rows[tag][i],
4509  _cached_jacobian_cols[tag][i],
4510  _cached_jacobian_values[tag][i]);
4511  }
4512 
4514 }
SystemBase & _sys
Definition: Assembly.h:2282
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2778
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2776
virtual void set(const numeric_index_type i, const numeric_index_type j, const T value)=0
virtual void zero_rows(std::vector< numeric_index_type > &rows, T diag_value=0.0)
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2780
void clearCachedJacobian()
Clear any currently cached jacobians.
Definition: Assembly.C:4527

◆ setCoordinateTransformation()

template<typename Points , typename Coords >
void Assembly::setCoordinateTransformation ( const libMesh::QBase qrule,
const Points &  q_points,
Coords &  coord,
SubdomainID  sub_id 
)
private

Definition at line 1731 of file Assembly.C.

Referenced by computeCurrentElemVolume(), computeCurrentFaceVolume(), reinitLowerDElem(), reinitMortarElem(), and reinitNeighbor().

1735 {
1736 
1737  mooseAssert(qrule, "The quadrature rule is null in Assembly::setCoordinateTransformation");
1738  auto n_points = qrule->n_points();
1739  mooseAssert(n_points == q_points.size(),
1740  "The number of points in the quadrature rule doesn't match the number of passed-in "
1741  "points in Assembly::setCoordinateTransformation");
1742 
1743  // Make sure to honor the name of this method and set the _coord_type member because users may
1744  // make use of the const Moose::CoordinateSystem & coordTransformation() { return _coord_type; }
1745  // API. MaterialBase for example uses it
1747 
1748  coord.resize(n_points);
1749  for (unsigned int qp = 0; qp < n_points; qp++)
1750  coordTransformFactor(_subproblem, sub_id, q_points[qp], coord[qp]);
1751 }
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:42
SubProblem & _subproblem
Definition: Assembly.h:2283
unsigned int n_points() const
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1272
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:2392

◆ setCurrentBoundaryID()

void Assembly::setCurrentBoundaryID ( BoundaryID  i)
inline

set the current boundary ID

Definition at line 395 of file Assembly.h.

Referenced by SubProblem::setCurrentBoundaryID().

395 { _current_boundary_id = i; }
BoundaryID _current_boundary_id
The current boundary ID.
Definition: Assembly.h:2570

◆ setCurrentLowerDElem()

void Assembly::setCurrentLowerDElem ( const Elem *const  lower_d_elem)
inline

Set the current lower dimensional element.

This may be null

Definition at line 3200 of file Assembly.h.

Referenced by SubProblem::setCurrentLowerDElem().

3201 {
3202  _current_lower_d_elem = lower_d_elem;
3203 }
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition: Assembly.h:2601

◆ setCurrentNeighborSubdomainID()

void Assembly::setCurrentNeighborSubdomainID ( SubdomainID  i)
inline

set the current subdomain ID

Definition at line 463 of file Assembly.h.

Referenced by DisplacedProblem::setNeighborSubdomainID().

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

◆ setCurrentSubdomainID()

void Assembly::setCurrentSubdomainID ( SubdomainID  i)
inline

set the current subdomain ID

Definition at line 385 of file Assembly.h.

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildPRefinementAndCoarseningMaps(), MaxQpsThread::operator()(), and DisplacedProblem::setCurrentSubdomainID().

385 { _current_subdomain_id = i; }
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2568

◆ setFaceQRule() [1/2]

void Assembly::setFaceQRule ( libMesh::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 676 of file Assembly.C.

Referenced by reinitElemFaceRef(), reinitFVFace(), and setLowerQRule().

677 {
678  _current_qrule_face = qrule;
679 
680  for (auto & it : _fe_face[dim])
681  it.second->attach_quadrature_rule(qrule);
682  for (auto & it : _vector_fe_face[dim])
683  it.second->attach_quadrature_rule(qrule);
684  if (!_unique_fe_face_helper.empty())
685  {
686  mooseAssert(dim < _unique_fe_face_helper.size(), "We should not be indexing out of bounds");
687  _unique_fe_face_helper[dim]->attach_quadrature_rule(qrule);
688  }
689 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2484
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2340
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2486

◆ 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.

◆ setLowerQRule()

void Assembly::setLowerQRule ( libMesh::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 692 of file Assembly.C.

Referenced by reinitLowerDElem().

693 {
694  // The lower-dimensional quadrature rule matches the face quadrature rule
695  setFaceQRule(qrule, dim);
696 
697  _current_qrule_lower = qrule;
698 
699  for (auto & it : _fe_lower[dim])
700  it.second->attach_quadrature_rule(qrule);
701  for (auto & it : _vector_fe_lower[dim])
702  it.second->attach_quadrature_rule(qrule);
703  if (!_unique_fe_lower_helper.empty())
704  {
705  mooseAssert(dim < _unique_fe_lower_helper.size(), "We should not be indexing out of bounds");
706  _unique_fe_lower_helper[dim]->attach_quadrature_rule(qrule);
707  }
708 }
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition: Assembly.h:2343
void setFaceQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:676
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
libMesh::QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2562
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2526
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2528

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

Referenced by MortarConstraintBase::MortarConstraintBase().

738 {
739  if (order != _qrule_msm->get_order())
740  {
741  // If custom mortar qrule has not yet been specified
743  {
744  _custom_mortar_qrule = true;
745  const unsigned int dim = _qrule_msm->get_dim();
746  const QuadratureType type = _qrule_msm->type();
747  delete _qrule_msm;
748 
749  _qrule_msm = QBase::build(type, dim, order).release();
750  _fe_msm->attach_quadrature_rule(_qrule_msm);
751  }
752  else
753  mooseError("Mortar quadrature_order: ",
754  order,
755  " does not match previously specified quadrature_order: ",
757  ". Quadrature_order (when specified) must match for all mortar constraints.");
758  }
759 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2551
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
QuadratureType
virtual QuadratureType type() const=0
Order get_order() const
unsigned int get_dim() const
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2556
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh...
Definition: Assembly.h:2558

◆ setNeighborQRule()

void Assembly::setNeighborQRule ( libMesh::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 711 of file Assembly.C.

Referenced by reinitFVFace(), reinitNeighbor(), and reinitNeighborFaceRef().

712 {
713  _current_qrule_neighbor = qrule;
714 
715  for (auto & it : _fe_face_neighbor[dim])
716  it.second->attach_quadrature_rule(qrule);
717  for (auto & it : _vector_fe_face_neighbor[dim])
718  it.second->attach_quadrature_rule(qrule);
719  if (!_unique_fe_face_neighbor_helper.empty())
720  {
721  mooseAssert(dim < _unique_fe_face_neighbor_helper.size(),
722  "We should not be indexing out of bounds");
723  _unique_fe_face_neighbor_helper[dim]->attach_quadrature_rule(qrule);
724  }
725 }
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2533
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2519
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2341
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2517

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

3554 {
3555  auto & tag_Re = _sub_Re[vector_tag._type_id];
3556  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3557  for (const auto & var : vars)
3558  setResidualBlock(residual,
3559  tag_Re[var->number()],
3560  var->dofIndices(),
3561  var->arrayScalingFactor(),
3562  var->isNodal());
3563 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
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:3294
char ** vars
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:47
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2630

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

Referenced by setResidual(), and setResidualNeighbor().

3299 {
3300  if (dof_indices.size() > 0)
3301  {
3302  std::vector<dof_id_type> di(dof_indices);
3303  _tmp_Re = res_block;
3304  processLocalResidual(_tmp_Re, di, scaling_factor, is_nodal);
3305  residual.insert(_tmp_Re, di);
3306  }
3307 }
virtual void insert(const T *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:3218
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:2636

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

3569 {
3570  auto & tag_Rn = _sub_Rn[vector_tag._type_id];
3571  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3572  for (const auto & var : vars)
3573  setResidualBlock(residual,
3574  tag_Rn[var->number()],
3575  var->dofIndicesNeighbor(),
3576  var->arrayScalingFactor(),
3577  var->isNodal());
3578 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:752
SystemBase & _sys
Definition: Assembly.h:2282
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:3294
char ** vars
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2631
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
Definition: VectorTag.h:47
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2320

◆ setVolumeQRule() [1/2]

void Assembly::setVolumeQRule ( libMesh::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 657 of file Assembly.C.

658 {
659  _current_qrule = qrule;
660 
661  if (qrule) // Don't set a NULL qrule
662  {
663  for (auto & it : _fe[dim])
664  it.second->attach_quadrature_rule(qrule);
665  for (auto & it : _vector_fe[dim])
666  it.second->attach_quadrature_rule(qrule);
667  if (!_unique_fe_helper.empty())
668  {
669  mooseAssert(dim < _unique_fe_helper.size(), "We should not be indexing out of bounds");
670  _unique_fe_helper[dim]->attach_quadrature_rule(qrule);
671  }
672  }
673 }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2374
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
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:2339
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2372

◆ setVolumeQRule() [2/2]

void Assembly::setVolumeQRule ( const Elem *  elem)

Set the volumetric quadrature rule based on the provided element.

◆ setXFEM()

void Assembly::setXFEM ( std::shared_ptr< XFEMInterface xfem)
inline

Set the pointer to the XFEM controller object.

Definition at line 1771 of file Assembly.h.

1771 { _xfem = xfem; }
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2349

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

Referenced by computeADFace(), computeFaceMap(), modifyFaceWeightsDueToXFEM(), qruleArbitraryFace(), qruleFace(), qruleFaceHelper(), reinitElemAndNeighbor(), and reinitFEFace().

407 { return _current_side; }
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2574

◆ sideElem()

const Elem*& Assembly::sideElem ( )
inline

Returns the side element.

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

Definition at line 419 of file Assembly.h.

419 { return _current_side_elem; }
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2576

◆ sideElemVolume()

const Real& Assembly::sideElemVolume ( ) const
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 425 of file Assembly.h.

425 { return _current_side_volume; }
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:2578

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

329 { return _current_tangents; }
MooseArray< std::vector< Point > > _current_tangents
The current tangent vectors at the quadrature points.
Definition: Assembly.h:2504

◆ writeableQRule()

libMesh::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 224 of file Assembly.h.

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps(), and MooseMesh::buildPRefinementAndCoarseningMaps().

224 { return _current_qrule; }
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2380

◆ writeableQRuleFace()

libMesh::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 300 of file Assembly.h.

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps(), and MooseMesh::buildPRefinementAndCoarseningMaps().

300 { return _current_qrule_face; }
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2492

◆ writeableQRuleNeighbor()

libMesh::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 488 of file Assembly.h.

488 { return _current_qrule_neighbor; }
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2533

◆ zeroCachedJacobian()

void Assembly::zeroCachedJacobian ( GlobalDataKey  )

Zero out previously-cached Jacobian rows.

Definition at line 4517 of file Assembly.C.

4518 {
4519  for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4520  if (_sys.hasMatrix(tag))
4522 
4524 }
SystemBase & _sys
Definition: Assembly.h:2282
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2778
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition: SystemBase.h:351
virtual void zero_rows(std::vector< numeric_index_type > &rows, T diag_value=0.0)
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:1007
void clearCachedJacobian()
Clear any currently cached jacobians.
Definition: Assembly.C:4527

Member Data Documentation

◆ _ad_coord

MooseArray<ADReal> Assembly::_ad_coord
private

The AD version of the current coordinate transformation coefficients.

Definition at line 2396 of file Assembly.h.

Referenced by adCoordTransformation(), computeCurrentElemVolume(), computeCurrentFaceVolume(), and ~Assembly().

◆ _ad_curvatures

MooseArray<ADReal> Assembly::_ad_curvatures
protected

Definition at line 2820 of file Assembly.h.

Referenced by adCurvatures(), computeADFace(), computeFaceMap(), and ~Assembly().

◆ _ad_d2xyzdeta2_map

std::vector<VectorValue<ADReal> > Assembly::_ad_d2xyzdeta2_map
protected

Definition at line 2802 of file Assembly.h.

Referenced by computeFaceMap().

◆ _ad_d2xyzdxi2_map

std::vector<VectorValue<ADReal> > Assembly::_ad_d2xyzdxi2_map
protected

Definition at line 2800 of file Assembly.h.

Referenced by computeFaceMap().

◆ _ad_d2xyzdxideta_map

std::vector<VectorValue<ADReal> > Assembly::_ad_d2xyzdxideta_map
protected

Definition at line 2801 of file Assembly.h.

Referenced by computeFaceMap().

◆ _ad_detadx_map

std::vector<ADReal> Assembly::_ad_detadx_map
protected

Definition at line 2809 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_detady_map

std::vector<ADReal> Assembly::_ad_detady_map
protected

Definition at line 2810 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_detadz_map

std::vector<ADReal> Assembly::_ad_detadz_map
protected

Definition at line 2811 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxidx_map

std::vector<ADReal> Assembly::_ad_dxidx_map
protected

Definition at line 2806 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxidy_map

std::vector<ADReal> Assembly::_ad_dxidy_map
protected

Definition at line 2807 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxidz_map

std::vector<ADReal> Assembly::_ad_dxidz_map
protected

Definition at line 2808 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxyzdeta_map

std::vector<VectorValue<ADReal> > Assembly::_ad_dxyzdeta_map
protected

Definition at line 2798 of file Assembly.h.

Referenced by computeFaceMap(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxyzdxi_map

std::vector<VectorValue<ADReal> > Assembly::_ad_dxyzdxi_map
protected

AD quantities.

Definition at line 2797 of file Assembly.h.

Referenced by computeFaceMap(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dxyzdzeta_map

std::vector<VectorValue<ADReal> > Assembly::_ad_dxyzdzeta_map
protected

Definition at line 2799 of file Assembly.h.

Referenced by computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dzetadx_map

std::vector<ADReal> Assembly::_ad_dzetadx_map
protected

Definition at line 2812 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dzetady_map

std::vector<ADReal> Assembly::_ad_dzetady_map
protected

Definition at line 2813 of file Assembly.h.

Referenced by computeGradPhiAD(), computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dzetadz_map

std::vector<ADReal> Assembly::_ad_dzetadz_map
protected

Definition at line 2814 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 2750 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 2752 of file Assembly.h.

Referenced by computeADFace(), feADGradPhiFace(), and ~Assembly().

◆ _ad_jac

std::vector<ADReal> Assembly::_ad_jac
protected

Definition at line 2803 of file Assembly.h.

Referenced by computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_JxW

MooseArray<ADReal> Assembly::_ad_JxW
protected

◆ _ad_JxW_face

MooseArray<ADReal> Assembly::_ad_JxW_face
protected

Definition at line 2816 of file Assembly.h.

Referenced by adJxWFace(), computeADFace(), computeFaceMap(), and ~Assembly().

◆ _ad_normals

MooseArray<VectorValue<ADReal> > Assembly::_ad_normals
protected

Definition at line 2817 of file Assembly.h.

Referenced by adNormals(), computeADFace(), computeFaceMap(), and ~Assembly().

◆ _ad_q_points

MooseArray<VectorValue<ADReal> > Assembly::_ad_q_points
protected

◆ _ad_q_points_face

MooseArray<VectorValue<ADReal> > 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 2751 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 2754 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 2785 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 2346 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 2780 of file Assembly.h.

Referenced by addCachedJacobian(), cacheJacobian(), 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 2778 of file Assembly.h.

Referenced by addCachedJacobian(), cacheJacobian(), 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 2771 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 2768 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 2833 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 2828 of file Assembly.h.

Referenced by adCoordTransformation(), adQPointsFace(), computeADFace(), and computeFaceMap().

◆ _calculate_xyz

bool Assembly::_calculate_xyz
mutableprotected

◆ _cm

const libMesh::CouplingMatrix* Assembly::_cm
private

Coupling matrices.

Definition at line 2288 of file Assembly.h.

Referenced by addJacobianBlock(), addJacobianBlockNonlocal(), cacheJacobianBlockNonzero(), and init().

◆ _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 2303 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 2309 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 2305 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 2307 of file Assembly.h.

Referenced by addJacobianScalar(), and init().

◆ _column_indices

std::vector<dof_id_type> Assembly::_column_indices
protected

Definition at line 2868 of file Assembly.h.

Referenced by cacheJacobian().

◆ _component_block_diagonal

std::vector<bool> Assembly::_component_block_diagonal
protected

◆ _compute_face_map_side_elem_builder

libMesh::ElemSideBuilder Assembly::_compute_face_map_side_elem_builder
protected

In place side element builder for computeFaceMap()

Definition at line 2851 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 2295 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 2292 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 2298 of file Assembly.h.

Referenced by computingResidualAndJacobian().

◆ _coord

MooseArray<Real> Assembly::_coord
private

The current coordinate transformation coefficients.

Definition at line 2394 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 2544 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 2541 of file Assembly.h.

Referenced by reinitNeighbor(), and ~Assembly().

◆ _coord_type

Moose::CoordinateSystemType Assembly::_coord_type
private

The coordinate system.

Definition at line 2392 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 2570 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 2566 of file Assembly.h.

Referenced by computeCurrentElemVolume(), computeCurrentFaceVolume(), elem(), reinitAtPhysical(), reinitElemFaceRef(), reinitFE(), reinitFEFace(), and reinitFVFace().

◆ _current_elem_volume

Real Assembly::_current_elem_volume
protected

Volume of the current element.

Definition at line 2572 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 2596 of file Assembly.h.

Referenced by computeCurrentElemVolume(), 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 2352 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 2354 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 2490 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 2358 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 2378 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 2356 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 2390 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 2498 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 2539 of file Assembly.h.

Referenced by JxWNeighbor().

◆ _current_lower_d_elem

const Elem* Assembly::_current_lower_d_elem
protected

The current lower dimensional element.

Definition at line 2601 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 2607 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 2580 of file Assembly.h.

Referenced by neighbor(), 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 2603 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 2611 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 2594 of file Assembly.h.

Referenced by nodeNeighbor().

◆ _current_neighbor_ref_points

std::vector<Point> Assembly::_current_neighbor_ref_points
protected

The current reference points on the neighbor element.

Definition at line 2874 of file Assembly.h.

Referenced by reinitElemAndNeighbor().

◆ _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 2584 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 2586 of file Assembly.h.

Referenced by reinitElemAndNeighbor().

◆ _current_neighbor_side_elem_builder

libMesh::ElemSideBuilder Assembly::_current_neighbor_side_elem_builder
protected

In place side element builder for _current_neighbor_side_elem.

Definition at line 2849 of file Assembly.h.

Referenced by reinitElemAndNeighbor().

◆ _current_neighbor_subdomain_id

SubdomainID Assembly::_current_neighbor_subdomain_id
protected

The current neighbor subdomain ID.

Definition at line 2582 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 2590 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 2592 of file Assembly.h.

Referenced by node().

◆ _current_normals

MooseArray<Point> Assembly::_current_normals
private

The current Normal vectors at the quadrature points.

Definition at line 2500 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 2616 of file Assembly.h.

Referenced by modifyArbitraryWeights(), physicalPoints(), reinitAtPhysical(), and ~Assembly().

◆ _current_q_points

MooseArray<Point> Assembly::_current_q_points
private

The current list of quadrature points.

Definition at line 2388 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 2535 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 2494 of file Assembly.h.

◆ _current_qrule

libMesh::QBase* Assembly::_current_qrule
private

The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac kernels)

Definition at line 2380 of file Assembly.h.

Referenced by clearCachedQRules(), computeCurrentElemVolume(), modifyArbitraryWeights(), modifyWeightsDueToXFEM(), qRule(), 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 2384 of file Assembly.h.

Referenced by modifyArbitraryWeights(), modifyFaceWeightsDueToXFEM(), and modifyWeightsDueToXFEM().

◆ _current_qrule_arbitrary_face

ArbitraryQuadrature* Assembly::_current_qrule_arbitrary_face
private

The current arbitrary quadrature rule used on the element face.

Definition at line 2386 of file Assembly.h.

◆ _current_qrule_face

libMesh::QBase* Assembly::_current_qrule_face
private

◆ _current_qrule_lower

libMesh::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 2562 of file Assembly.h.

Referenced by clearCachedQRules(), reinitLowerDElem(), and setLowerQRule().

◆ _current_qrule_neighbor

libMesh::QBase* Assembly::_current_qrule_neighbor
private

quadrature rule used on neighbors

Definition at line 2533 of file Assembly.h.

Referenced by clearCachedQRules(), qRuleNeighbor(), setNeighborQRule(), and writeableQRuleNeighbor().

◆ _current_qrule_volume

libMesh::QBase* Assembly::_current_qrule_volume
private

The current volumetric quadrature for the element.

Definition at line 2382 of file Assembly.h.

◆ _current_side

unsigned int Assembly::_current_side
protected

The current side of the selected element (valid only when working with sides)

Definition at line 2574 of file Assembly.h.

Referenced by 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 2576 of file Assembly.h.

Referenced by reinitFVFace(), and sideElem().

◆ _current_side_elem_builder

libMesh::ElemSideBuilder Assembly::_current_side_elem_builder
protected

In place side element builder for _current_side_elem.

Definition at line 2847 of file Assembly.h.

Referenced by reinitFVFace().

◆ _current_side_volume

Real Assembly::_current_side_volume
protected

Volume of the current side element.

Definition at line 2578 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 2598 of file Assembly.h.

Referenced by computeCurrentFaceVolume(), and reinitFVFace().

◆ _current_subdomain_id

SubdomainID Assembly::_current_subdomain_id
protected

The current subdomain ID.

Definition at line 2568 of file Assembly.h.

Referenced by currentSubdomainID(), qrules(), 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 2504 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 2361 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 2363 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 2367 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 2365 of file Assembly.h.

Referenced by reinitFENeighbor().

◆ _curvatures

MooseArray<Real> Assembly::_curvatures
protected

Definition at line 2819 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 2558 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 2825 of file Assembly.h.

Referenced by assignDisplacements(), computeFaceMap(), and computeSinglePointMapAD().

◆ _displaced

const bool Assembly::_displaced
private

Definition at line 2285 of file Assembly.h.

Referenced by computeADFace(), and reinitFE().

◆ _dof_map

const libMesh::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 2863 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 2858 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 2507 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 2372 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 2484 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 2526 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 2551 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 2516 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 2735 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 2739 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 2674 of file Assembly.h.

Referenced by gradPhi().

◆ _grad_phi_face

VariablePhiGradient Assembly::_grad_phi_face
protected

Definition at line 2678 of file Assembly.h.

Referenced by gradPhiFace().

◆ _grad_phi_face_neighbor

VariablePhiGradient Assembly::_grad_phi_face_neighbor
protected

Definition at line 2686 of file Assembly.h.

Referenced by gradPhiFaceNeighbor().

◆ _grad_phi_neighbor

VariablePhiGradient Assembly::_grad_phi_neighbor
protected

Definition at line 2682 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 2871 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 2328 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 2488 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 2376 of file Assembly.h.

Referenced by Assembly(), havePRefinement(), helpersRequestData(), 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 2530 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 2522 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 2511 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 2316 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 2314 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 2549 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 2502 of file Assembly.h.

Referenced by mappedNormals(), and reinitFEFace().

◆ _max_cached_jacobians

unsigned int Assembly::_max_cached_jacobians
protected

Definition at line 2782 of file Assembly.h.

Referenced by addCachedJacobian().

◆ _max_cached_residuals

unsigned int Assembly::_max_cached_residuals
protected

Definition at line 2773 of file Assembly.h.

Referenced by clearCachedResiduals().

◆ _mesh

MooseMesh& Assembly::_mesh
private

Definition at line 2322 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 2853 of file Assembly.h.

Referenced by msmElem(), and reinitMortarElem().

◆ _need_curl

std::set<FEType> Assembly::_need_curl
mutableprotected

◆ _need_div

std::set<FEType> Assembly::_need_div
mutableprotected

Definition at line 2838 of file Assembly.h.

Referenced by buildVectorFE(), and reinitFE().

◆ _need_dual

bool Assembly::_need_dual
protected

Whether dual shape functions need to be computed for mortar constraints.

Definition at line 2613 of file Assembly.h.

Referenced by activateDual(), and needDual().

◆ _need_face_div

std::set<FEType> Assembly::_need_face_div
mutableprotected

Definition at line 2839 of file Assembly.h.

Referenced by buildVectorFaceFE(), reinitElemFaceRef(), and reinitFEFace().

◆ _need_face_neighbor_div

std::set<FEType> Assembly::_need_face_neighbor_div
mutableprotected

◆ _need_JxW_neighbor

bool Assembly::_need_JxW_neighbor
mutableprivate

Flag to indicate that JxW_neighbor is needed.

Definition at line 2537 of file Assembly.h.

Referenced by JxWNeighbor().

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

Referenced by lowerDElemVolume(), and reinitLowerDElem().

◆ _need_neighbor_div

std::set<FEType> Assembly::_need_neighbor_div
mutableprotected

Definition at line 2840 of file Assembly.h.

Referenced by buildVectorNeighborFE(), and reinitFENeighbor().

◆ _need_neighbor_elem_volume

bool Assembly::_need_neighbor_elem_volume
mutableprotected

true is apps need to compute neighbor element volume

Definition at line 2588 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 2609 of file Assembly.h.

Referenced by neighborLowerDElemVolume(), and reinitNeighborLowerDElem().

◆ _need_second_derivative

std::set<FEType> Assembly::_need_second_derivative
mutableprotected

◆ _need_second_derivative_neighbor

std::set<FEType> 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 2509 of file Assembly.h.

Referenced by Assembly(), extraElemIDNeighbor(), and reinitNeighbor().

◆ _nonlocal_cm

const libMesh::CouplingMatrix& Assembly::_nonlocal_cm
private

Definition at line 2289 of file Assembly.h.

Referenced by initNonlocalCoupling().

◆ _phi

VariablePhiValue Assembly::_phi
protected

Definition at line 2673 of file Assembly.h.

Referenced by phi().

◆ _phi_face

VariablePhiValue Assembly::_phi_face
protected

Definition at line 2677 of file Assembly.h.

Referenced by phiFace().

◆ _phi_face_neighbor

VariablePhiValue Assembly::_phi_face_neighbor
protected

Definition at line 2685 of file Assembly.h.

Referenced by phiFaceNeighbor().

◆ _phi_neighbor

VariablePhiValue Assembly::_phi_neighbor
protected

Definition at line 2681 of file Assembly.h.

Referenced by phiNeighbor().

◆ _qrule_msm

libMesh::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 2556 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 2429 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 2765 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 2868 of file Assembly.h.

Referenced by cacheJacobian(), and cacheResiduals().

◆ _sc

libMesh::StaticCondensation* Assembly::_sc
protected

A pointer to the static condensation class. Null if not present.

Definition at line 2877 of file Assembly.h.

Referenced by addStaticCondensation(), and hasStaticCondensation().

◆ _scaling_vector

const NumericVector<Real>* Assembly::_scaling_vector = nullptr
protected

The map from global index to variable scaling factor.

Definition at line 2844 of file Assembly.h.

Referenced by hasScalingVector().

◆ _second_phi

VariablePhiSecond Assembly::_second_phi
protected

Definition at line 2675 of file Assembly.h.

Referenced by secondPhi().

◆ _second_phi_face

VariablePhiSecond Assembly::_second_phi_face
protected

Definition at line 2679 of file Assembly.h.

Referenced by secondPhiFace().

◆ _second_phi_face_neighbor

VariablePhiSecond Assembly::_second_phi_face_neighbor
protected

Definition at line 2687 of file Assembly.h.

Referenced by secondPhiFaceNeighbor().

◆ _second_phi_neighbor

VariablePhiSecond Assembly::_second_phi_neighbor
protected

Definition at line 2683 of file Assembly.h.

Referenced by secondPhiNeighbor().

◆ _sub_Kee

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kee
protected

Definition at line 2649 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 2650 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 2665 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 2653 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 2661 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 2659 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 2663 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 2655 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 2667 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 2657 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 2633 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 2791 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 2794 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 2670 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 2636 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 2340 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 2339 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 2343 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 2342 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 2333 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 2332 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 2335 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 2334 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 2331 of file Assembly.h.

Referenced by buildFE(), and havePRefinement().

◆ _vector_curl_phi

VectorVariablePhiCurl Assembly::_vector_curl_phi
protected

Definition at line 2693 of file Assembly.h.

Referenced by curlPhi().

◆ _vector_curl_phi_face

VectorVariablePhiCurl Assembly::_vector_curl_phi_face
protected

Definition at line 2699 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 2711 of file Assembly.h.

Referenced by curlPhiFaceNeighbor().

◆ _vector_curl_phi_neighbor

VectorVariablePhiCurl Assembly::_vector_curl_phi_neighbor
protected

Definition at line 2705 of file Assembly.h.

Referenced by curlPhiNeighbor().

◆ _vector_div_phi

VectorVariablePhiDivergence Assembly::_vector_div_phi
protected

Definition at line 2694 of file Assembly.h.

Referenced by divPhi().

◆ _vector_div_phi_face

VectorVariablePhiDivergence Assembly::_vector_div_phi_face
protected

Definition at line 2700 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 2712 of file Assembly.h.

Referenced by divPhiFaceNeighbor().

◆ _vector_div_phi_neighbor

VectorVariablePhiDivergence Assembly::_vector_div_phi_neighbor
protected

Definition at line 2706 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 2374 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 2486 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 2528 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 2743 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 2748 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 2744 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 2747 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 2745 of file Assembly.h.

Referenced by buildVectorNeighborFE(), and reinitFENeighbor().

◆ _vector_grad_phi

VectorVariablePhiGradient Assembly::_vector_grad_phi
protected

Definition at line 2691 of file Assembly.h.

Referenced by gradPhi().

◆ _vector_grad_phi_face

VectorVariablePhiGradient Assembly::_vector_grad_phi_face
protected

Definition at line 2697 of file Assembly.h.

Referenced by gradPhiFace().

◆ _vector_grad_phi_face_neighbor

VectorVariablePhiGradient Assembly::_vector_grad_phi_face_neighbor
protected

Definition at line 2709 of file Assembly.h.

Referenced by gradPhiFaceNeighbor().

◆ _vector_grad_phi_neighbor

VectorVariablePhiGradient Assembly::_vector_grad_phi_neighbor
protected

Definition at line 2703 of file Assembly.h.

Referenced by gradPhiNeighbor().

◆ _vector_phi

VectorVariablePhiValue Assembly::_vector_phi
protected

Definition at line 2690 of file Assembly.h.

Referenced by phi().

◆ _vector_phi_face

VectorVariablePhiValue Assembly::_vector_phi_face
protected

Definition at line 2696 of file Assembly.h.

Referenced by phiFace().

◆ _vector_phi_face_neighbor

VectorVariablePhiValue Assembly::_vector_phi_face_neighbor
protected

Definition at line 2708 of file Assembly.h.

Referenced by phiFaceNeighbor().

◆ _vector_phi_neighbor

VectorVariablePhiValue Assembly::_vector_phi_neighbor
protected

Definition at line 2702 of file Assembly.h.

Referenced by phiNeighbor().

◆ _vector_second_phi

VectorVariablePhiSecond Assembly::_vector_second_phi
protected

Definition at line 2692 of file Assembly.h.

Referenced by secondPhi().

◆ _vector_second_phi_face

VectorVariablePhiSecond Assembly::_vector_second_phi_face
protected

Definition at line 2698 of file Assembly.h.

Referenced by secondPhiFace().

◆ _vector_second_phi_face_neighbor

VectorVariablePhiSecond Assembly::_vector_second_phi_face_neighbor
protected

Definition at line 2710 of file Assembly.h.

Referenced by secondPhiFaceNeighbor().

◆ _vector_second_phi_neighbor

VectorVariablePhiSecond Assembly::_vector_second_phi_neighbor
protected

Definition at line 2704 of file Assembly.h.

Referenced by secondPhiNeighbor().

◆ _xfem

std::shared_ptr<XFEMInterface> Assembly::_xfem
private

The XFEM controller.

Definition at line 2349 of file Assembly.h.

Referenced by modifyFaceWeightsDueToXFEM(), modifyWeightsDueToXFEM(), reinitFE(), reinitFEFace(), and setXFEM().


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