https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Public Types | 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 Types

using InternalDataKey = Moose::PassKey< Moose::Kokkos::Assembly >
 Key structure for APIs manipulating internal shape and quadrature data.
 

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.
 
const FEBase *const & getFENeighbor (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current 'neighbor' FE.
 
const FEBase *const & getFEFace (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current "face" FE.
 
const FEBase *const & getFEFaceNeighbor (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current "neighbor" FE.
 
const FEVectorBase *const & getVectorFE (FEType type, unsigned int dim) const
 Get a reference to a pointer that will contain the current volume FEVector.
 
const FEVectorBase *const & getVectorFENeighbor (FEType type, unsigned int dim) const
 GetVector a reference to a pointer that will contain the current 'neighbor' FE.
 
const FEVectorBase *const & getVectorFEFace (FEType type, unsigned int dim) const
 GetVector a reference to a pointer that will contain the current "face" FE.
 
const FEVectorBase *const & getVectorFEFaceNeighbor (FEType type, unsigned int dim) const
 GetVector a reference to a pointer that will contain the current "neighbor" FE.
 
const libMesh::QBase *const & qRule () const
 Returns the reference to the current quadrature being used.
 
libMesh::QBase *const & writeableQRule ()
 Returns the reference to the current quadrature being used.
 
libMesh::QBasewriteableQRule (unsigned int dim, SubdomainID block, InternalDataKey)
 Returns the pointer to the quadrature of specified block and dimension.
 
const MooseArray< Point > & qPoints () const
 Returns the reference to the quadrature points.
 
const std::vector< Point > & qPointsMortar () const
 Returns the reference to the mortar segment element quadrature points.
 
const MooseArray< Point > & physicalPoints () const
 The current points in physical space where we have reinited through reinitAtPhysical()
 
const MooseArray< Real > & JxW () const
 Returns the reference to the transformed jacobian weights.
 
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.
 
const MooseArray< Real > & mortarCoordTransformation () const
 Returns the reference to the coordinate transformation coefficients on the mortar segment mesh.
 
const MooseArray< ADReal > & adCoordTransformation () const
 Returns the reference to the AD version of the coordinate transformation coefficients.
 
const Moose::CoordinateSystemTypecoordSystem () const
 Get the coordinate system type.
 
const libMesh::QBase *const & qRuleFace () const
 Returns the reference to the current quadrature being used on a current face.
 
libMesh::QBase *const & writeableQRuleFace ()
 Returns the reference to the current quadrature being used on a current face.
 
libMesh::QBasewriteableQRuleFace (unsigned int dim, SubdomainID block, InternalDataKey)
 Returns the pointer to the quadrature used on a face of specified block and dimension.
 
const MooseArray< Point > & qPointsFace () const
 Returns the reference to the current quadrature being used.
 
const MooseArray< Real > & JxWFace () const
 Returns the reference to the transformed jacobian weights on a current face.
 
const MooseArray< Point > & normals () const
 Returns the array of normals for quadrature points on a current side.
 
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.
 
unsigned int numExtraElemIntegers () const
 Number of extra element integers Assembly tracked.
 
const dof_id_type & extraElemID (unsigned int id) const
 Returns an integer ID of the current element given the index associated with the integer.
 
const dof_id_type & extraElemIDNeighbor (unsigned int id) const
 Returns an integer ID of the current element given the index associated with the integer.
 
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.
 
const SubdomainIDcurrentSubdomainID () const
 Return the current subdomain ID.
 
void setCurrentSubdomainID (SubdomainID i)
 set the current subdomain ID
 
const BoundaryIDcurrentBoundaryID () const
 Return the current boundary ID.
 
void setCurrentBoundaryID (BoundaryID i)
 set the current boundary ID
 
const Real & elemVolume () const
 Returns the reference to the current element volume.
 
const unsigned intside () const
 Returns the current side.
 
const unsigned intneighborSide () const
 Returns the current neighboring side.
 
const Elem *const & sideElem () const
 Returns the side element.
 
const Real & sideElemVolume () const
 Returns the reference to the volume of current side element.
 
const Elem *const & neighbor () const
 Return the neighbor element.
 
const Elem *const & lowerDElem () const
 Return the lower dimensional element.
 
const Elem *const & neighborLowerDElem () const
 Return the neighboring lower dimensional element.
 
const Real & lowerDElemVolume () const
 
const Real & neighborLowerDElemVolume () const
 
const SubdomainIDcurrentNeighborSubdomainID () const
 Return the current subdomain ID.
 
void setCurrentNeighborSubdomainID (SubdomainID i)
 set the current subdomain ID
 
const Real & neighborVolume ()
 Returns the reference to the current neighbor volume.
 
const libMesh::QBase *const & qRuleNeighbor () const
 Returns the reference to the current quadrature being used on a current neighbor.
 
libMesh::QBase *const & writeableQRuleNeighbor ()
 Returns the reference to the current quadrature being used on a current neighbor.
 
const MooseArray< Real > & JxWNeighbor () const
 Returns the reference to the transformed jacobian weights on a current face.
 
const MooseArray< Point > & qPointsFaceNeighbor () const
 Returns the reference to the current quadrature points being used on the neighbor face.
 
const Node *const & node () const
 Returns the reference to the node.
 
const Node *const & nodeNeighbor () const
 Returns the reference to the neighboring node.
 
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.
 
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.
 
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.
 
void setVolumeQRule (libMesh::QBase *qrule, unsigned int dim)
 Set the qrule to be used for volume integration.
 
void setFaceQRule (libMesh::QBase *qrule, unsigned int dim)
 Set the qrule to be used for face integration.
 
void setMortarQRule (Order order)
 Specifies a custom qrule for integration on mortar segment mesh.
 
void activateDual ()
 Indicates that dual shape functions are used for mortar constraint.
 
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)
 
void clearCachedQRules ()
 Set the cached quadrature rules to nullptr.
 
void setNeighborQRule (libMesh::QBase *qrule, unsigned int dim)
 Set the qrule to be used for neighbor integration.
 
void reinit (const Elem *elem)
 Reinitialize objects (JxW, q_points, ...) for an elements.
 
void setVolumeQRule (const Elem *elem)
 Set the volumetric quadrature rule based on the provided element.
 
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.
 
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.
 
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.
 
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.
 
void reinitNeighborLowerDElem (const Elem *elem)
 reinitialize a neighboring lower dimensional element
 
void reinitMortarElem (const Elem *elem)
 reinitialize a mortar segment mesh element in order to get a proper JxW
 
const std::vector< Real > & jxWMortar () const
 Returns a reference to JxW for mortar segment elements.
 
const libMesh::QBase *const & qRuleMortar () const
 Returns a reference to the quadrature rule for the mortar segments.
 
void reinitAtPhysical (const Elem *elem, const std::vector< Point > &physical_points)
 Reinitialize the assembly data at specific physical point in the given element.
 
void reinit (const Elem *elem, const std::vector< Point > &reference_points)
 Reinitialize the assembly data at specific points in the reference element.
 
void setFaceQRule (const Elem *const elem, const unsigned int side)
 Set the face quadrature rule based on the provided element and side.
 
void reinit (const Elem *elem, unsigned int side)
 Reinitialize the assembly data on an side of an element.
 
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.
 
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.
 
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.
 
void reinitNeighborAtPhysical (const Elem *neighbor, const std::vector< Point > &physical_points)
 Reinitializes the neighbor at the physical coordinates within element given.
 
void reinitNeighbor (const Elem *neighbor, const std::vector< Point > &reference_points)
 Reinitializes the neighbor side using reference coordinates.
 
void reinit (const Node *node)
 Reinitialize assembly data for a node.
 
void init (const libMesh::CouplingMatrix *cm)
 Initialize the Assembly object and set the CouplingMatrix for use throughout.
 
void initNonlocalCoupling ()
 Create pair of variables requiring nonlocal jacobian contributions.
 
void prepareJacobianBlock ()
 Sizes and zeroes the Jacobian blocks used for the current element.
 
void prepareResidual ()
 Sizes and zeroes the residual for the current element.
 
void prepare ()
 
void prepareNonlocal ()
 
void prepareVariable (MooseVariableFieldBase *var)
 Used for preparing the dense residual and jacobian blocks for one particular variable.
 
void prepareVariableNonlocal (MooseVariableFieldBase *var)
 
void prepareNeighbor ()
 
void prepareLowerD ()
 Prepare the Jacobians and residuals for a lower dimensional element.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
void cacheResidualLower (GlobalDataKey, const std::vector< VectorTag > &tags)
 Takes the values that are currently in _sub_Rl and appends them to the cached values.
 
void addCachedResiduals (GlobalDataKey, const std::vector< VectorTag > &tags)
 Pushes all cached residuals to the global residual vectors associated with each tag.
 
void clearCachedResiduals (GlobalDataKey)
 Clears all of the residuals in _cached_residual_rows and _cached_residual_values.
 
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)
 
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.
 
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.
 
void addJacobian (GlobalDataKey)
 Adds all local Jacobian to the global Jacobian matrices.
 
void addJacobianNonlocal (GlobalDataKey)
 Adds non-local Jacobian to the global Jacobian matrices.
 
void addJacobianNeighbor (GlobalDataKey)
 Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objects like DGKernels.
 
void addJacobianScalar (GlobalDataKey)
 Add Jacobians for pairs of scalar variables into the global Jacobian matrices.
 
void addJacobianOffDiagScalar (unsigned int ivar, GlobalDataKey)
 Add Jacobians for a scalar variables with all other field variables into the global Jacobian matrices.
 
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.
 
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.
 
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.
 
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.
 
void addJacobianNeighborLowerD (GlobalDataKey)
 Add all portions of the Jacobian except PrimaryPrimary, e.g.
 
void addJacobianLowerD (GlobalDataKey)
 Add portions of the Jacobian of LowerLower, LowerSecondary, and SecondaryLower for boundary conditions.
 
void cacheJacobianMortar (GlobalDataKey)
 Cache all portions of the Jacobian, e.g.
 
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.
 
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.
 
void cacheJacobian (GlobalDataKey)
 Takes the values that are currently in _sub_Kee and appends them to the cached values.
 
void cacheJacobianNonlocal (GlobalDataKey)
 Takes the values that are currently in _sub_Keg and appends them to the cached values.
 
void cacheJacobianNeighbor (GlobalDataKey)
 Takes the values that are currently in the neighbor Dense Matrices and appends them to the cached values.
 
void addCachedJacobian (GlobalDataKey)
 Adds the values that have been cached by calling cacheJacobian() and or cacheJacobianNeighbor() to the jacobian matrix.
 
void setCachedJacobian (GlobalDataKey)
 Sets previously-cached Jacobian values via SparseMatrix::set() calls.
 
void zeroCachedJacobian (GlobalDataKey)
 Zero out previously-cached Jacobian rows.
 
DenseVector< Number > & residualBlock (unsigned int var_num, LocalDataKey, TagID tag_id)
 Get local residual block for a variable and a tag.
 
DenseVector< Number > & residualBlockNeighbor (unsigned int var_num, LocalDataKey, TagID tag_id)
 Get local neighbor residual block for a variable and a tag.
 
DenseVector< Number > & residualBlockLower (unsigned int var_num, LocalDataKey, TagID tag_id)
 Get residual block for lower.
 
DenseMatrix< Number > & jacobianBlock (unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
 Get local Jacobian block for a pair of variables and a tag.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
void cacheJacobianBlock (const DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &tags)
 Cache a local Jacobian block with the provided rows (idof_indices) and columns (jdof_indices) for eventual accumulation into the global matrices specified by tags.
 
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.
 
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.
 
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.
 
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.
 
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.
 
void setXFEM (std::shared_ptr< XFEMInterface > xfem)
 Set the pointer to the XFEM controller object.
 
void assignDisplacements (std::vector< std::pair< unsigned int, unsigned short > > &&disp_numbers_and_directions)
 Assign the displacement numbers and directions.
 
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.
 
void saveLocalADArray (std::vector< ADReal > &re, unsigned int i, unsigned int ntest, const ADRealEigenVector &v) const
 
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.
 
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.
 
DenseVector< Real > getJacobianDiagonal (const DenseMatrix< Number > &ke)
 
const libMesh::QBaseattachQRuleElem (unsigned int dim, FEBase &fe)
 Attaches the current elem/volume quadrature rule to the given fe.
 
const libMesh::QBaseattachQRuleFace (unsigned int dim, FEBase &fe)
 Attaches the current face/area quadrature rule to the given fe.
 
void hasScalingVector ()
 signals this object that a vector containing variable scaling factors should be used when doing residual and matrix assembly
 
void modifyArbitraryWeights (const std::vector< Real > &weights)
 Modify the weights when using the arbitrary quadrature rule.
 
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.
 
void setCurrentLowerDElem (const Elem *const lower_d_elem)
 Set the current lower dimensional element.
 
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<typename Points , typename Coords >
void setCoordinateTransformation (const QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
 
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.
 

Protected Attributes

const Elem * _current_elem
 The current "element" we are currently on.
 
SubdomainID _current_subdomain_id
 The current subdomain ID.
 
BoundaryID _current_boundary_id
 The current boundary ID.
 
Real _current_elem_volume
 Volume of the current element.
 
unsigned int _current_side
 The current side of the selected element (valid only when working with sides)
 
const Elem * _current_side_elem
 The current "element" making up the side we are currently on.
 
Real _current_side_volume
 Volume of the current side element.
 
const Elem * _current_neighbor_elem
 The current neighbor "element".
 
SubdomainID _current_neighbor_subdomain_id
 The current neighbor subdomain ID.
 
unsigned int _current_neighbor_side
 The current side of the selected neighboring element (valid only when working with sides)
 
const Elem * _current_neighbor_side_elem
 The current side element of the ncurrent neighbor element.
 
bool _need_neighbor_elem_volume
 true is apps need to compute neighbor element volume
 
Real _current_neighbor_volume
 Volume of the current neighbor.
 
const Node * _current_node
 The current node we are working with.
 
const Node * _current_neighbor_node
 The current neighboring node we are working with.
 
bool _current_elem_volume_computed
 Boolean to indicate whether current element volumes has been computed.
 
bool _current_side_volume_computed
 Boolean to indicate whether current element side volumes has been computed.
 
const Elem * _current_lower_d_elem
 The current lower dimensional element.
 
const Elem * _current_neighbor_lower_d_elem
 The current neighboring lower dimensional element.
 
bool _need_lower_d_elem_volume
 Whether we need to compute the lower dimensional element volume.
 
Real _current_lower_d_elem_volume
 The current lower dimensional element volume.
 
bool _need_neighbor_lower_d_elem_volume
 Whether we need to compute the neighboring lower dimensional element volume.
 
Real _current_neighbor_lower_d_elem_volume
 The current neighboring lower dimensional element volume.
 
bool _need_dual
 Whether dual shape functions need to be computed for mortar constraints.
 
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.
 
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
 
DenseVector< Number > _tmp_Re
 auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction)
 
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>
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
 jacobian contributions from the neighbor and element <Tag, ivar, jvar>
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
 jacobian contributions from the neighbor <Tag, ivar, jvar>
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
 dlower/dlower
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
 dlower/dsecondary (or dlower/delement)
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
 dlower/dprimary (or dlower/dneighbor)
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
 dsecondary/dlower (or delement/dlower)
 
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
 dprimary/dlower (or dneighbor/dlower)
 
DenseMatrix< Number > _tmp_Ke
 auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction)
 
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.
 
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.
 
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.
 
std::vector< std::vector< Real > > _cached_residual_values
 Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME)
 
std::vector< std::vector< dof_id_type > > _cached_residual_rows
 Where the cached values should go (the first vector is for TIME vs NONTIME)
 
unsigned int _max_cached_residuals
 
std::vector< std::vector< Real > > _cached_jacobian_values
 Values cached by calling cacheJacobian()
 
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
 Row where the corresponding cached value should go.
 
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
 Column where the corresponding cached value should go.
 
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.
 
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.
 
std::vector< dof_id_type > _temp_dof_indices
 Temporary work vector to keep from reallocating it.
 
std::vector< Point > _temp_reference_points
 Temporary work data for reinitAtPhysical()
 
std::vector< VectorValue< ADReal > > _ad_dxyzdxi_map
 AD quantities.
 
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.
 
bool _calculate_xyz
 
bool _calculate_face_xyz
 
bool _calculate_curvatures
 
bool _calculate_ad_coord
 Whether to calculate coord with AD.
 
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.
 
libMesh::ElemSideBuilder _current_side_elem_builder
 In place side element builder for _current_side_elem.
 
libMesh::ElemSideBuilder _current_neighbor_side_elem_builder
 In place side element builder for _current_neighbor_side_elem.
 
libMesh::ElemSideBuilder _compute_face_map_side_elem_builder
 In place side element builder for computeFaceMap()
 
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.
 
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.
 
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.
 
std::vector< dof_id_type > _column_indices
 
bool _have_p_refinement
 Whether we have ever conducted p-refinement.
 
std::vector< Point > _current_neighbor_ref_points
 The current reference points on the neighbor element.
 

Private Member Functions

void setLowerQRule (libMesh::QBase *qrule, unsigned int dim)
 Set the qrule to be used for lower dimensional integration.
 
void computeADFace (const Elem &elem, const unsigned int side)
 compute AD things on an element face
 
void reinitFE (const Elem *elem)
 Just an internal helper function to reinit the volume FE objects.
 
void reinitFEFace (const Elem *elem, unsigned int side)
 Just an internal helper function to reinit the face FE objects.
 
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.
 
void modifyFaceWeightsDueToXFEM (const Elem *elem, unsigned int side=0)
 Update the face integration weights for XFEM partial elements.
 
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
 
void resizeADMappingObjects (unsigned int n_qp, unsigned int dim)
 resize any objects that contribute to automatic differentiation-related mapping calculations
 
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
 
void addResidual (const VectorTag &vector_tag)
 Add local residuals of all field variables for a tag onto the tag's residual vector.
 
void addResidualNeighbor (const VectorTag &vector_tag)
 Add local neighbor residuals of all field variables for a tag onto the tag's residual vector.
 
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.
 
void addResidualScalar (const VectorTag &vector_tag)
 Add residuals of all scalar variables for a tag onto the tag's residual vector.
 
void clearCachedResiduals (const VectorTag &vector_tag)
 Clears all of the cached residuals for a specific vector tag.
 
void cacheResidual (dof_id_type dof, Real value, TagID tag_id)
 Cache individual residual contributions.
 
void cacheResidual (dof_id_type dof, Real value, const std::set< TagID > &tags)
 Cache individual residual contributions.
 
void processLocalResidual (DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
 Appling scaling, constraints to the local residual block and populate the full DoF indices for array variable.
 
void addResidualBlock (NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
 Add a local residual block to a global residual vector with proper scaling.
 
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)
 Push a local residual block with proper scaling into cache.
 
void setResidualBlock (NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
 Set a local residual block to a global residual vector with proper scaling.
 
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.
 
void cacheJacobianBlock (const 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.
 
void cacheJacobianBlockNonzero (const 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.
 
void addJacobianCoupledVarPair (const MooseVariableBase &ivar, const MooseVariableBase &jvar)
 Adds element matrices for ivar rows and jvar columns to the global Jacobian matrices.
 
void cacheJacobianCoupledVarPair (const MooseVariableBase &ivar, const MooseVariableBase &jvar)
 Caches element matrix for ivar rows and jvar columns.
 
void clearCachedJacobian ()
 Clear any currently cached jacobians.
 
void buildFE (FEType type) const
 Build FEs with a type.
 
void buildFaceFE (FEType type) const
 Build FEs for a face with a type.
 
void buildNeighborFE (FEType type) const
 Build FEs for a neighbor with a type.
 
void buildFaceNeighborFE (FEType type) const
 Build FEs for a neighbor face with a type.
 
void buildLowerDFE (FEType type) const
 Build FEs for a lower dimensional element with a type.
 
void buildLowerDDualFE (FEType type) const
 
void buildVectorFE (FEType type) const
 Build Vector FEs with a type.
 
void buildVectorFaceFE (FEType type) const
 Build Vector FEs for a face with a type.
 
void buildVectorNeighborFE (FEType type) const
 Build Vector FEs for a neighbor with a type.
 
void buildVectorFaceNeighborFE (FEType type) const
 Build Vector FEs for a neighbor face with a type.
 
void buildVectorLowerDFE (FEType type) const
 Build Vector FEs for a lower dimensional element with a type.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
void helpersRequestData ()
 request phi, dphi, xyz, JxW, etc.
 
libMesh::QBaseqruleFace (const Elem *elem, unsigned int side)
 This is an abstraction over the internal qrules function.
 
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.
 

Private Attributes

SystemBase_sys
 
SubProblem_subproblem
 
const bool _displaced
 
const libMesh::CouplingMatrix_cm
 Coupling matrices.
 
const libMesh::CouplingMatrix_nonlocal_cm
 
const bool & _computing_residual
 Whether we are currently computing the residual.
 
const bool & _computing_jacobian
 Whether we are currently computing the Jacobian.
 
const bool & _computing_residual_and_jacobian
 Whether we are currently computing the residual and Jacobian.
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
 Entries in the coupling matrix for field variables.
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
 Entries in the coupling matrix for field variables vs scalar variables.
 
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
 Entries in the coupling matrix for scalar variables vs field variables.
 
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
 Entries in the coupling matrix for scalar variables.
 
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
 Entries in the coupling matrix for field variables for nonlocal calculations.
 
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
 Flag that indicates if the jacobian block was used.
 
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.
 
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.
 
const libMesh::DofMap_dof_map
 DOF map.
 
THREAD_ID _tid
 Thread number (id)
 
MooseMesh_mesh
 
unsigned int _mesh_dimension
 
const FEType _helper_type
 The finite element type of the FE helper classes.
 
bool _user_added_fe_of_helper_type
 Whether user code requested a FEType the same as our _helper_type.
 
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.
 
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.
 
std::shared_ptr< XFEMInterface_xfem
 The XFEM controller.
 
std::map< FEType, FEBase * > _current_fe
 The "volume" fe object that matches the current elem.
 
std::map< FEType, FEBase * > _current_fe_face
 The "face" fe object that matches the current elem.
 
std::map< FEType, FEBase * > _current_fe_neighbor
 The "neighbor" fe object that matches the current elem.
 
std::map< FEType, FEBase * > _current_fe_face_neighbor
 The "neighbor face" fe object that matches the current elem.
 
std::map< FEType, FEVectorBase * > _current_vector_fe
 The "volume" vector fe object that matches the current elem.
 
std::map< FEType, FEVectorBase * > _current_vector_fe_face
 The "face" vector fe object that matches the current elem.
 
std::map< FEType, FEVectorBase * > _current_vector_fe_neighbor
 The "neighbor" vector fe object that matches the current elem.
 
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
 The "neighbor face" vector fe object that matches the current elem.
 
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
 Each dimension's actual fe objects indexed on type.
 
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
 Each dimension's actual vector fe objects indexed on type.
 
std::map< unsigned int, FEBase * > _holder_fe_helper
 Each dimension's helper objects.
 
FEBase * _current_fe_helper
 The current helper object for transforming coordinates.
 
libMesh::QBase_current_qrule
 The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac kernels)
 
libMesh::QBase_current_qrule_volume
 The current volumetric quadrature for the element.
 
ArbitraryQuadrature_current_qrule_arbitrary
 The current arbitrary quadrature rule used within the element interior.
 
ArbitraryQuadrature_current_qrule_arbitrary_face
 The current arbitrary quadrature rule used on the element face.
 
MooseArray< Point > _current_q_points
 The current list of quadrature points.
 
MooseArray< Real > _current_JxW
 The current list of transformed jacobian weights.
 
Moose::CoordinateSystemType _coord_type
 The coordinate system.
 
MooseArray< Real > _coord
 The current coordinate transformation coefficients.
 
MooseArray< ADReal_ad_coord
 The AD version of the current coordinate transformation coefficients.
 
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
 Holds quadrature rules for each dimension.
 
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
 types of finite elements
 
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
 types of vector finite elements
 
std::map< unsigned int, FEBase * > _holder_fe_face_helper
 Each dimension's helper objects.
 
FEBase * _current_fe_face_helper
 helper object for transforming coordinates
 
libMesh::QBase_current_qrule_face
 quadrature rule used on faces
 
ArbitraryQuadrature_current_qface_arbitrary
 The current arbitrary quadrature rule used on element faces.
 
MooseArray< Point > _current_q_points_face
 The current quadrature points on a face.
 
MooseArray< Real > _current_JxW_face
 The current transformed jacobian weights on a face.
 
MooseArray< Point > _current_normals
 The current Normal vectors at the quadrature points.
 
std::vector< Eigen::Map< RealDIMValue > > _mapped_normals
 Mapped normals.
 
MooseArray< std::vector< Point > > _current_tangents
 The current tangent vectors at the quadrature points.
 
std::vector< dof_id_type > _extra_elem_ids
 Extra element IDs.
 
std::vector< dof_id_type > _neighbor_extra_elem_ids
 Extra element IDs of neighbor.
 
std::map< unsigned int, const std::vector< Point > * > _holder_normals
 Holds pointers to the dimension's normal vectors.
 
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
 types of finite elements
 
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.
 
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.
 
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
 Vector FE objects for lower dimensional elements.
 
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
 helper object for transforming coordinates for lower dimensional element quadrature points
 
libMesh::QBase_current_qrule_neighbor
 quadrature rule used on neighbors
 
MooseArray< Point > _current_q_points_face_neighbor
 The current quadrature points on the neighbor face.
 
bool _need_JxW_neighbor
 Flag to indicate that JxW_neighbor is needed.
 
MooseArray< Real > _current_JxW_neighbor
 The current transformed jacobian weights on a neighbor's face.
 
MooseArray< Real > _coord_neighbor
 The current coordinate transformation coefficients.
 
MooseArray< Real > _coord_msm
 The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment mesh.
 
const std::vector< Real > * _JxW_msm
 A JxW for working on mortar segement elements.
 
std::unique_ptr< FEBase > _fe_msm
 A FE object for working on mortar segement elements.
 
libMesh::QBase_qrule_msm
 A qrule object for working on mortar segement elements.
 
bool _custom_mortar_qrule
 Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh.
 
libMesh::QBase_current_qrule_lower
 quadrature rule used on lower dimensional elements.
 

Detailed Description

Keeps track of stuff related to assembling.

Definition at line 100 of file Assembly.h.

Member Typedef Documentation

◆ InternalDataKey

Key structure for APIs manipulating internal shape and quadrature data.

Developers in blessed classes may create keys using simple curly braces {} or may be more explicit and use Assembly::InternalDataKey{}

Definition at line 219 of file Assembly.h.

Constructor & Destructor Documentation

◆ Assembly()

Assembly::Assembly ( SystemBase sys,
THREAD_ID  tid 
)

Definition at line 79 of file Assembly.C.

80 : _sys(sys),
82 _displaced(dynamic_cast<DisplacedSystem *>(&sys) ? true : false),
83 _nonlocal_cm(_subproblem.nonlocalCouplingMatrix(_sys.number())),
84 _computing_residual(_subproblem.currentlyComputingResidual()),
85 _computing_jacobian(_subproblem.currentlyComputingJacobian()),
86 _computing_residual_and_jacobian(_subproblem.currentlyComputingResidualAndJacobian()),
87 _dof_map(_sys.dofMap()),
88 _tid(tid),
89 _mesh(sys.mesh()),
90 _mesh_dimension(_mesh.dimension()),
91 _helper_type(_mesh.hasSecondOrderElements() ? SECOND : FIRST, LAGRANGE),
97 _building_helpers(false),
98 _current_qrule(nullptr),
99 _current_qrule_volume(nullptr),
102 _current_qrule_face(nullptr),
105 _need_JxW_neighbor(false),
106 _qrule_msm(nullptr),
108 _current_qrule_lower(nullptr),
109
110 _current_elem(nullptr),
112 _current_side(0),
113 _current_side_elem(nullptr),
115 _current_neighbor_elem(nullptr),
120 _current_node(nullptr),
121 _current_neighbor_node(nullptr),
124
125 _current_lower_d_elem(nullptr),
129 _need_dual(false),
130
132 _cached_residual_values(2), // The 2 is for TIME and NONTIME
133 _cached_residual_rows(2), // The 2 is for TIME and NONTIME
136
138 _calculate_xyz(false),
139 _calculate_face_xyz(false),
141 _calculate_ad_coord(false),
142 _have_p_refinement(false)
143{
144 const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
145 _building_helpers = true;
146 // Build fe's for the helpers
147 buildFE(FEType(helper_order, LAGRANGE));
148 buildFaceFE(FEType(helper_order, LAGRANGE));
149 buildNeighborFE(FEType(helper_order, LAGRANGE));
150 buildFaceNeighborFE(FEType(helper_order, LAGRANGE));
151 buildLowerDFE(FEType(helper_order, LAGRANGE));
152 _building_helpers = false;
153
154 // Build an FE helper object for this type for each dimension up to the dimension of the current
155 // mesh
156 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
157 {
158 _holder_fe_helper[dim] = _fe[dim][FEType(helper_order, LAGRANGE)];
159 _holder_fe_face_helper[dim] = _fe_face[dim][FEType(helper_order, LAGRANGE)];
160 _holder_fe_face_neighbor_helper[dim] = _fe_face_neighbor[dim][FEType(helper_order, LAGRANGE)];
161 _holder_fe_neighbor_helper[dim] = _fe_neighbor[dim][FEType(helper_order, LAGRANGE)];
162 }
163
164 for (unsigned int dim = 0; dim < _mesh_dimension; dim++)
165 _holder_fe_lower_helper[dim] = _fe_lower[dim][FEType(helper_order, LAGRANGE)];
166
167 // request phi, dphi, xyz, JxW, etc. data
169
170 // For 3D mortar, mortar segments are always TRI3 elements so we want FIRST LAGRANGE regardless
171 // of discretization
172 _fe_msm = (_mesh_dimension == 2)
173 ? FEGenericBase<Real>::build(_mesh_dimension - 1, FEType(helper_order, LAGRANGE))
174 : FEGenericBase<Real>::build(_mesh_dimension - 1, FEType(FIRST, LAGRANGE));
175 // This FE object should not take part in p-refinement
176 _fe_msm->add_p_level_in_reinit(false);
177 _JxW_msm = &_fe_msm->get_JxW();
178 // Prerequest xyz so that it is computed for _fe_msm so that it can be used for calculating
179 // _coord_msm
180 _fe_msm->get_xyz();
181
182 _extra_elem_ids.resize(_mesh.getMesh().n_elem_integers() + 1);
183 _neighbor_extra_elem_ids.resize(_mesh.getMesh().n_elem_integers() + 1);
184}
unsigned int dim
SystemBase & _sys
Definition Assembly.h:2304
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points
Definition Assembly.h:2552
const bool & _computing_jacobian
Whether we are currently computing the Jacobian.
Definition Assembly.h:2317
const std::vector< Real > * _JxW_msm
A JxW for working on mortar segement elements.
Definition Assembly.h:2571
const bool _displaced
Definition Assembly.h:2307
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition Assembly.h:2514
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:2807
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition Assembly.h:2620
const FEType _helper_type
The finite element type of the FE helper classes.
Definition Assembly.h:2350
Real _current_elem_volume
Volume of the current element.
Definition Assembly.h:2594
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition Assembly.h:2368
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition Assembly.h:2402
const bool & _computing_residual
Whether we are currently computing the residual.
Definition Assembly.h:2314
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
Definition Assembly.h:2559
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
Definition Assembly.h:2353
bool _calculate_xyz
Definition Assembly.h:2849
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition Assembly.C:336
const libMesh::CouplingMatrix & _nonlocal_cm
Definition Assembly.h:2311
Real _current_neighbor_volume
Volume of the current neighbor.
Definition Assembly.h:2612
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition Assembly.h:2631
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition Assembly.h:2414
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition Assembly.h:2548
const libMesh::DofMap & _dof_map
DOF map.
Definition Assembly.h:2340
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition Assembly.h:2539
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition Assembly.h:2623
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition Assembly.h:2596
const bool & _computing_residual_and_jacobian
Whether we are currently computing the residual and Jacobian.
Definition Assembly.h:2320
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition Assembly.C:314
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition Assembly.h:2573
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition Assembly.h:2616
void buildFE(FEType type) const
Build FEs with a type.
Definition Assembly.C:266
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition Assembly.h:2608
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition Assembly.h:2855
void helpersRequestData()
request phi, dphi, xyz, JxW, etc.
Definition Assembly.C:4809
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition Assembly.h:2555
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition Assembly.C:358
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition Assembly.h:2538
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension's actual fe objects indexed on type.
Definition Assembly.h:2394
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition Assembly.h:2618
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition Assembly.h:2506
const std::vector< VectorTag > & _residual_vector_tags
The residual vector tags that Assembly could possibly contribute to.
Definition Assembly.h:2787
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition Assembly.h:2602
bool _user_added_fe_face_neighbor_of_helper_type
Definition Assembly.h:2355
MooseMesh & _mesh
Definition Assembly.h:2344
ArbitraryQuadrature * _current_qface_arbitrary
The current arbitrary quadrature rule used on element faces.
Definition Assembly.h:2516
const Node * _current_node
The current node we are working with.
Definition Assembly.h:2614
THREAD_ID _tid
Thread number (id)
Definition Assembly.h:2342
bool _calculate_face_xyz
Definition Assembly.h:2850
bool _calculate_curvatures
Definition Assembly.h:2851
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME)
Definition Assembly.h:2790
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition Assembly.h:2406
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition Assembly.h:2531
unsigned int _max_cached_residuals
Definition Assembly.h:2795
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition Assembly.C:292
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition Assembly.h:2545
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh.
Definition Assembly.h:2580
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition Assembly.h:2627
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition Assembly.h:2610
SubProblem & _subproblem
Definition Assembly.h:2305
Real _current_side_volume
Volume of the current side element.
Definition Assembly.h:2600
bool _user_added_fe_neighbor_of_helper_type
Definition Assembly.h:2356
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension's helper objects.
Definition Assembly.h:2544
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition Assembly.h:2578
unsigned int _max_cached_jacobians
Definition Assembly.h:2804
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition Assembly.h:2598
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:2793
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension's helper objects.
Definition Assembly.h:2398
const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
Definition Assembly.h:2625
libMesh::QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition Assembly.h:2584
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides)
Definition Assembly.h:2606
const Elem * _current_elem
The current "element" we are currently on.
Definition Assembly.h:2588
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension's helper objects.
Definition Assembly.h:2510
bool _have_p_refinement
Whether we have ever conducted p-refinement.
Definition Assembly.h:2893
libMesh::QBase * _current_qrule_volume
The current volumetric quadrature for the element.
Definition Assembly.h:2404
bool _user_added_fe_face_of_helper_type
Definition Assembly.h:2354
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition Assembly.h:2529
bool _user_added_fe_lower_of_helper_type
Definition Assembly.h:2357
unsigned int _mesh_dimension
Definition Assembly.h:2346
bool _need_dual
Whether dual shape functions need to be computed for mortar constraints.
Definition Assembly.h:2635
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition MooseMesh.C:3557
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition MooseMesh.C:3824
SubProblem & subproblem()
Definition SystemBase.h:102
MeshBase & mesh
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
@ VECTOR_TAG_RESIDUAL
@ COORD_XYZ
Definition MooseTypes.h:865
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ ~Assembly()

Assembly::~Assembly ( )
virtual

Definition at line 186 of file Assembly.C.

187{
188 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
189 for (auto & it : _fe[dim])
190 delete it.second;
191
192 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
193 for (auto & it : _fe_face[dim])
194 delete it.second;
195
196 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
197 for (auto & it : _fe_neighbor[dim])
198 delete it.second;
199
200 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
201 for (auto & it : _fe_face_neighbor[dim])
202 delete it.second;
203
204 for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
205 for (auto & it : _fe_lower[dim])
206 delete it.second;
207
208 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
209 for (auto & it : _vector_fe[dim])
210 delete it.second;
211
212 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
213 for (auto & it : _vector_fe_face[dim])
214 delete it.second;
215
216 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
217 for (auto & it : _vector_fe_neighbor[dim])
218 delete it.second;
219
220 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
221 for (auto & it : _vector_fe_face_neighbor[dim])
222 delete it.second;
223
224 for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
225 for (auto & it : _vector_fe_lower[dim])
226 delete it.second;
227
228 for (auto & it : _ad_grad_phi_data)
229 it.second.release();
230
231 for (auto & it : _ad_vector_grad_phi_data)
232 it.second.release();
233
234 for (auto & it : _ad_grad_phi_data_face)
235 it.second.release();
236
237 for (auto & it : _ad_vector_grad_phi_data_face)
238 it.second.release();
239
241
242 _coord.release();
245
254
255 delete _qrule_msm;
256}
MooseArray< Real > _curvatures
Definition Assembly.h:2841
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition Assembly.h:2563
MooseArray< VectorValue< ADReal > > _ad_q_points
Definition Assembly.h:2827
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called....
Definition Assembly.h:2638
MooseArray< VectorValue< ADReal > > _ad_normals
Definition Assembly.h:2839
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition Assembly.h:2773
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension's actual vector fe objects indexed on type.
Definition Assembly.h:2396
MooseArray< ADReal > _ad_JxW_face
Definition Assembly.h:2838
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition Assembly.h:2540
MooseArray< ADReal > _ad_JxW
Definition Assembly.h:2826
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition Assembly.h:2508
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition Assembly.h:2776
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition Assembly.h:2550
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition Assembly.h:2774
MooseArray< ADReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition Assembly.h:2418
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition Assembly.h:2416
MooseArray< ADReal > _ad_curvatures
Definition Assembly.h:2842
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition Assembly.h:2772
MooseArray< VectorValue< ADReal > > _ad_q_points_face
Definition Assembly.h:2840
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition Assembly.h:2541
MooseArray< Real > _coord_msm
The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment m...
Definition Assembly.h:2566
void release()
Manually deallocates the data pointer.
Definition MooseArray.h:66

Member Function Documentation

◆ activateDual()

void Assembly::activateDual ( )
inline

Indicates that dual shape functions are used for mortar constraint.

Definition at line 608 of file Assembly.h.

608{ _need_dual = true; }

Referenced by MortarConstraintBase::MortarConstraintBase().

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

292 {
293 // Coord values for non-cartesian coordinate systems are functions of the locations of the
294 // quadrature points in physical space. We also have no way of knowing whether this was called
295 // from a volumetric or face object so we should set both volumetric and face xyz to true
296 _calculate_xyz = true;
297 _calculate_face_xyz = true;
298
299 _calculate_ad_coord = true;
300 return _ad_coord;
301 }

◆ adCurvatures()

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

Definition at line 4796 of file Assembly.C.

4797{
4798 _calculate_curvatures = true;
4799 const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
4800 const FEType helper_type(helper_order, LAGRANGE);
4801 // Must prerequest the second derivatives. Sadly because there is only one
4802 // _need_second_derivative map for both volumetric and face FE objects we must request both here
4803 feSecondPhi<Real>(helper_type);
4804 feSecondPhiFace<Real>(helper_type);
4805 return _ad_curvatures;
4806}

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

3799{
3800#ifndef NDEBUG
3802 {
3803 mooseAssert(_cached_jacobian_rows.size() == _cached_jacobian_cols.size(),
3804 "Error: Cached data sizes MUST be the same!");
3805 for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3806 mooseAssert(_cached_jacobian_rows[i].size() == _cached_jacobian_cols[i].size(),
3807 "Error: Cached data sizes MUST be the same for a given tag!");
3808 }
3809#endif
3810
3811 for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3812 if (_sys.hasMatrix(i))
3813 for (MooseIndex(_cached_jacobian_rows[i]) j = 0; j < _cached_jacobian_rows[i].size(); j++)
3817
3818 for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3819 {
3820 if (!_sys.hasMatrix(i))
3821 continue;
3822
3825
3826 // Try to be more efficient from now on
3827 // The 2 is just a fudge factor to keep us from having to grow the vector during assembly
3828 _cached_jacobian_values[i].clear();
3830
3831 _cached_jacobian_rows[i].clear();
3833
3834 _cached_jacobian_cols[i].clear();
3836 }
3837}
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition Assembly.h:2802
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition Assembly.h:2800
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition Assembly.h:2798
virtual bool checkNonlocalCouplingRequirement() const =0
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
Definition SystemBase.h:388
virtual void add(const numeric_index_type i, const numeric_index_type j, const T value)=0

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

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

3516{
3517 const auto & values = _cached_residual_values[vector_tag._type_id];
3518 const auto & rows = _cached_residual_rows[vector_tag._type_id];
3519
3520 mooseAssert(values.size() == rows.size(),
3521 "Number of cached residuals and number of rows must match!");
3522
3523 if (!values.empty())
3524 {
3525 residual.add_vector(values, rows);
3526 clearCachedResiduals(vector_tag);
3527 }
3528}
std::array< Real, 2 > values
Definition MortarUtils.C:52
void clearCachedResiduals(GlobalDataKey)
Clears all of the residuals in _cached_residual_rows and _cached_residual_values.
Definition Assembly.C:3483
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
virtual void add_vector(const T *v, const std::vector< numeric_index_type > &dof_indices)

Referenced by addCachedResiduals().

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

3469{
3470 for (const auto & vector_tag : tags)
3471 {
3472 if (!_sys.hasVector(vector_tag._id))
3473 {
3474 _cached_residual_values[vector_tag._type_id].clear();
3475 _cached_residual_rows[vector_tag._type_id].clear();
3476 continue;
3477 }
3478 addCachedResidualDirectly(_sys.getVector(vector_tag._id), GlobalDataKey{}, vector_tag);
3479 }
3480}
void addCachedResidualDirectly(NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
Adds the values that have been cached by calling cacheResidual(), cacheResidualNeighbor(),...
Definition Assembly.C:3513
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition SystemBase.C:923
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition SystemBase.C:932

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

◆ addJacobian()

void Assembly::addJacobian ( GlobalDataKey  )

Adds all local Jacobian to the global Jacobian matrices.

Definition at line 3855 of file Assembly.C.

3856{
3857 for (const auto & it : _cm_ff_entry)
3858 addJacobianCoupledVarPair(*it.first, *it.second);
3859
3860 for (const auto & it : _cm_sf_entry)
3861 addJacobianCoupledVarPair(*it.first, *it.second);
3862
3863 for (const auto & it : _cm_fs_entry)
3864 addJacobianCoupledVarPair(*it.first, *it.second);
3865}
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition Assembly.h:2327
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition Assembly.h:2323
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:3840
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition Assembly.h:2325

◆ addJacobianBlock() [1/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 3553 of file Assembly.C.

3559{
3560 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3561 return;
3562 if (jac_block.n() == 0 || jac_block.m() == 0)
3563 return;
3564
3565 const auto & scaling_factors = ivar.arrayScalingFactor();
3566 const unsigned int iv = ivar.number();
3567 const unsigned int jv = jvar.number();
3568
3569 for (unsigned int i = 0; i < ivar.count(); ++i)
3570 {
3571 for (const auto & jt : libMesh::ConstCouplingRow(iv + i, *_cm))
3572 {
3573 if (jt < jv || jt >= jv + jvar.count())
3574 continue;
3575 unsigned int j = jt - jv;
3576
3577 auto di = ivar.componentDofIndices(idof_indices, i);
3578 auto dj = jvar.componentDofIndices(jdof_indices, j);
3579 auto indof = di.size();
3580 auto jndof = dj.size();
3581
3582 unsigned int jj = j;
3583 if (iv == jv && _component_block_diagonal[iv])
3584 // here i must be equal to j
3585 jj = 0;
3586
3587 auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3588 if (scaling_factors[i] != 1.0)
3589 sub *= scaling_factors[i];
3590
3591 // If we're computing the jacobian for automatically scaling variables we do not want
3592 // to constrain the element matrix because it introduces 1s on the diagonal for the
3593 // constrained dofs
3595 _dof_map.constrain_element_matrix(sub, di, dj, false);
3596
3597 jacobian.add_matrix(sub, di, dj);
3598 }
3599 }
3600}
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:2810
const libMesh::CouplingMatrix * _cm
Coupling matrices.
Definition Assembly.h:2310
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.
unsigned int n() const
unsigned int m() const
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
virtual void add_matrix(const DenseMatrix< T > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...

◆ addJacobianBlock() [2/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().

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

4289{
4290 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
4291 return;
4292 if (jacobian.n() == 0 || jacobian.m() == 0)
4293 return;
4294 if (!(*_cm)(ivar, jvar))
4295 return;
4296
4297 auto & iv = _sys.getVariable(_tid, ivar);
4298 auto & jv = _sys.getVariable(_tid, jvar);
4299 auto & scaling_factor = iv.arrayScalingFactor();
4300
4301 const unsigned int ivn = iv.number();
4302 const unsigned int jvn = jv.number();
4303 auto & keg = jacobianBlockNonlocal(ivn, jvn, LocalDataKey{}, tag);
4304
4305 // It is guaranteed by design iv.number <= ivar since iv is obtained
4306 // through SystemBase::getVariable with ivar.
4307 // Most of times ivar will just be equal to iv.number except for array variables,
4308 // where ivar could be a number for a component of an array variable but calling
4309 // getVariable will return the array variable that has the number of the 0th component.
4310 // It is the same for jvar.
4311 const unsigned int i = ivar - ivn;
4312 const unsigned int j = jvar - jvn;
4313
4314 // DoF indices are independently given
4315 auto di = idof_indices;
4316 auto dj = jdof_indices;
4317
4318 auto indof = di.size();
4319 auto jndof = dj.size();
4320
4321 unsigned int jj = j;
4322 if (ivar == jvar && _component_block_diagonal[ivn])
4323 jj = 0;
4324
4325 auto sub = keg.sub_matrix(i * indof, indof, jj * jndof, jndof);
4326 // If we're computing the jacobian for automatically scaling variables we do not want to
4327 // constrain the element matrix because it introduces 1s on the diagonal for the constrained
4328 // dofs
4330 dof_map.constrain_element_matrix(sub, di, dj, false);
4331
4332 if (scaling_factor[i] != 1.0)
4333 sub *= scaling_factor[i];
4334
4335 jacobian.add_matrix(sub, di, dj);
4336}
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:1144
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
virtual numeric_index_type n() const=0
virtual numeric_index_type m() const=0

Referenced by addJacobianBlockNonlocalTags().

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

4347{
4348 for (auto tag : tags)
4350 jacobian, ivar, jvar, dof_map, idof_indices, jdof_indices, GlobalDataKey{}, tag);
4351}
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:4281

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

4220{
4221 for (auto tag : tags)
4222 addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices, GlobalDataKey{}, tag);
4223}
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 3840 of file Assembly.C.

3841{
3842 auto i = ivar.number();
3843 auto j = jvar.number();
3844 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
3845 if (jacobianBlockUsed(tag, i, j) && _sys.hasMatrix(tag))
3847 jacobianBlock(i, j, LocalDataKey{}, tag),
3848 ivar,
3849 jvar,
3850 ivar.dofIndices(),
3851 jvar.dofIndices());
3852}
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:2231
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:1133
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition Assembly.h:2333
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.

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

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

4007{
4008 for (const auto & it : _cm_ff_entry)
4009 {
4010 auto ivar = it.first;
4011 auto jvar = it.second;
4012 auto i = ivar->number();
4013 auto j = jvar->number();
4014 for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
4015 tag++)
4016 if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
4017 {
4019 jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
4020 *ivar,
4021 *jvar,
4022 ivar->dofIndicesLower(),
4023 jvar->dofIndicesLower());
4024
4026 jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
4027 *ivar,
4028 *jvar,
4029 ivar->dofIndicesLower(),
4030 jvar->dofIndices());
4031
4033 jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
4034 *ivar,
4035 *jvar,
4036 ivar->dofIndices(),
4037 jvar->dofIndicesLower());
4038 }
4039 }
4040}
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:2267
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:3159
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:2338
@ LowerLower
Definition MooseTypes.h:856
@ LowerSecondary
Definition MooseTypes.h:857
@ SecondaryLower
Definition MooseTypes.h:859

◆ addJacobianNeighbor() [1/2]

void Assembly::addJacobianNeighbor ( GlobalDataKey  )

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

Definition at line 3890 of file Assembly.C.

3891{
3892 for (const auto & it : _cm_ff_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_neighbor_used) tag = 0;
3899 tag < _jacobian_block_neighbor_used.size();
3900 tag++)
3901 if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
3902 {
3904 jacobianBlockNeighbor(Moose::ElementNeighbor, i, j, LocalDataKey{}, tag),
3905 *ivar,
3906 *jvar,
3907 ivar->dofIndices(),
3908 jvar->dofIndicesNeighbor());
3909
3911 jacobianBlockNeighbor(Moose::NeighborElement, i, j, LocalDataKey{}, tag),
3912 *ivar,
3913 *jvar,
3914 ivar->dofIndicesNeighbor(),
3915 jvar->dofIndices());
3916
3918 jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
3919 *ivar,
3920 *jvar,
3921 ivar->dofIndicesNeighbor(),
3922 jvar->dofIndicesNeighbor());
3923 }
3924 }
3925}
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:2336
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:3118
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:2249
@ NeighborNeighbor
Definition MooseTypes.h:808
@ NeighborElement
Definition MooseTypes.h:807
@ ElementNeighbor
Definition MooseTypes.h:806

Referenced by addJacobianNeighborTags().

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

3929{
3930 for (const auto & it : _cm_ff_entry)
3931 {
3932 auto ivar = it.first;
3933 auto jvar = it.second;
3934 auto i = ivar->number();
3935 auto j = jvar->number();
3936 for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
3937 tag++)
3938 if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
3939 {
3941 jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
3942 *ivar,
3943 *jvar,
3944 ivar->dofIndicesLower(),
3945 jvar->dofIndicesLower());
3946
3948 jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
3949 *ivar,
3950 *jvar,
3951 ivar->dofIndicesLower(),
3952 jvar->dofIndicesNeighbor());
3953
3955 jacobianBlockMortar(Moose::LowerPrimary, i, j, LocalDataKey{}, tag),
3956 *ivar,
3957 *jvar,
3958 ivar->dofIndicesLower(),
3959 jvar->dofIndices());
3960
3962 jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
3963 *ivar,
3964 *jvar,
3965 ivar->dofIndicesNeighbor(),
3966 jvar->dofIndicesLower());
3967
3969 jacobianBlockMortar(Moose::PrimaryLower, i, j, LocalDataKey{}, tag),
3970 *ivar,
3971 *jvar,
3972 ivar->dofIndices(),
3973 jvar->dofIndicesLower());
3974 }
3975
3976 for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
3977 tag < _jacobian_block_neighbor_used.size();
3978 tag++)
3979 if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
3980 {
3982 jacobianBlockNeighbor(Moose::ElementNeighbor, i, j, LocalDataKey{}, tag),
3983 *ivar,
3984 *jvar,
3985 ivar->dofIndices(),
3986 jvar->dofIndicesNeighbor());
3987
3989 jacobianBlockNeighbor(Moose::NeighborElement, i, j, LocalDataKey{}, tag),
3990 *ivar,
3991 *jvar,
3992 ivar->dofIndicesNeighbor(),
3993 jvar->dofIndices());
3994
3996 jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
3997 *ivar,
3998 *jvar,
3999 ivar->dofIndicesNeighbor(),
4000 jvar->dofIndicesNeighbor());
4001 }
4002 }
4003}
@ PrimaryLower
Definition MooseTypes.h:860
@ LowerPrimary
Definition MooseTypes.h:858

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

4431{
4432 for (const auto tag : tags)
4434 jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, GlobalDataKey{}, tag);
4435}
void addJacobianNeighbor(GlobalDataKey)
Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objec...
Definition Assembly.C:3890

◆ addJacobianNonlocal()

void Assembly::addJacobianNonlocal ( GlobalDataKey  )

Adds non-local Jacobian to the global Jacobian matrices.

Definition at line 3868 of file Assembly.C.

3869{
3870 for (const auto & it : _cm_nonlocal_entry)
3871 {
3872 auto ivar = it.first;
3873 auto jvar = it.second;
3874 auto i = ivar->number();
3875 auto j = jvar->number();
3876 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
3877 tag < _jacobian_block_nonlocal_used.size();
3878 tag++)
3879 if (jacobianBlockNonlocalUsed(tag, i, j) && _sys.hasMatrix(tag))
3881 jacobianBlockNonlocal(i, j, LocalDataKey{}, tag),
3882 *ivar,
3883 *jvar,
3884 ivar->dofIndices(),
3885 jvar->allDofIndices());
3886 }
3887}
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition Assembly.h:2331
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:2285
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition Assembly.h:2334

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

4446{
4447 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
4449 for (const auto & var_j : vars)
4450 addJacobianCoupledVarPair(var_i, *var_j);
4451}
char ** vars
Class for scalar variables (they are different).
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition SystemBase.h:779
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

◆ addJacobianScalar()

void Assembly::addJacobianScalar ( GlobalDataKey  )

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

Definition at line 4438 of file Assembly.C.

4439{
4440 for (const auto & it : _cm_ss_entry)
4441 addJacobianCoupledVarPair(*it.first, *it.second);
4442}
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition Assembly.h:2329

◆ addResidual() [1/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 3302 of file Assembly.C.

3303{
3304 mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3305 "Non-residual tag in Assembly::addResidual");
3306
3307 auto & tag_Re = _sub_Re[vector_tag._type_id];
3308 NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3309 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3310 for (const auto & var : vars)
3311 addResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3312}
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition Assembly.h:2652
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
Add a local residual block to a global residual vector with proper scaling.
Definition Assembly.C:3249
TagID _id
The id associated with the vector tag.
Definition VectorTag.h:30
Moose::VectorTagType _type
The type of the vector tag.
Definition VectorTag.h:53

◆ addResidual() [2/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 3315 of file Assembly.C.

3316{
3317 for (const auto & vector_tag : vector_tags)
3318 if (_sys.hasVector(vector_tag._id))
3319 addResidual(vector_tag);
3320}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
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:3315

Referenced by addResidual().

◆ 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 
)
private

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

Definition at line 3249 of file Assembly.C.

3253{
3254 if (dof_indices.size() > 0 && res_block.size())
3255 {
3256 _temp_dof_indices = dof_indices;
3257 _tmp_Re = res_block;
3260 }
3261}
void processLocalResidual(DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
Appling scaling, constraints to the local residual block and populate the full DoF indices for array ...
Definition Assembly.C:3219
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction)
Definition Assembly.h:2658
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition Assembly.h:2813
virtual unsigned int size() const override final

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

◆ addResidualLower() [1/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 3345 of file Assembly.C.

3346{
3347 mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3348 "Non-residual tag in Assembly::addResidualLower");
3349
3350 auto & tag_Rl = _sub_Rl[vector_tag._type_id];
3351 NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3352 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3353 for (const auto & var : vars)
3355 residual, tag_Rl[var->number()], var->dofIndicesLower(), var->arrayScalingFactor());
3356}
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition Assembly.h:2655

◆ addResidualLower() [2/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 3359 of file Assembly.C.

3360{
3361 for (const auto & vector_tag : vector_tags)
3362 if (_sys.hasVector(vector_tag._id))
3363 addResidualLower(vector_tag);
3364}
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:3359

Referenced by addResidualLower().

◆ addResidualNeighbor() [1/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 3323 of file Assembly.C.

3324{
3325 mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3326 "Non-residual tag in Assembly::addResidualNeighbor");
3327
3328 auto & tag_Rn = _sub_Rn[vector_tag._type_id];
3329 NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3330 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3331 for (const auto & var : vars)
3333 residual, tag_Rn[var->number()], var->dofIndicesNeighbor(), var->arrayScalingFactor());
3334}
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition Assembly.h:2653

◆ addResidualNeighbor() [2/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 3337 of file Assembly.C.

3338{
3339 for (const auto & vector_tag : vector_tags)
3340 if (_sys.hasVector(vector_tag._id))
3341 addResidualNeighbor(vector_tag);
3342}
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:3337

Referenced by addResidualNeighbor().

◆ addResidualScalar() [1/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 3368 of file Assembly.C.

3369{
3370 mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3371 "Non-residual tag in Assembly::addResidualScalar");
3372
3373 // add the scalar variables residuals
3374 auto & tag_Re = _sub_Re[vector_tag._type_id];
3375 NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3376 const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
3377 for (const auto & var : vars)
3378 addResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3379}
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition SystemBase.h:786

◆ addResidualScalar() [2/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 3382 of file Assembly.C.

3383{
3384 for (const auto & vector_tag : vector_tags)
3385 if (_sys.hasVector(vector_tag._id))
3386 addResidualScalar(vector_tag);
3387}
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:3382

Referenced by addResidualScalar().

◆ adGradPhi() [1/2]

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

Definition at line 3042 of file Assembly.h.

3044{
3045 return _ad_vector_grad_phi_data.at(v.feType());
3046}
const libMesh::FEType & feType() const
Get the type of finite element object.

◆ adGradPhi() [2/2]

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

Definition at line 1313 of file Assembly.h.

1314 {
1315 return _ad_grad_phi_data.at(v.feType());
1316 }

◆ adJxW()

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

Definition at line 269 of file Assembly.h.

269{ return _ad_JxW; }

◆ adJxWFace()

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

Definition at line 271 of file Assembly.h.

271{ return _ad_JxW_face; }

◆ adNormals()

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

Definition at line 384 of file Assembly.h.

384{ return _ad_normals; }

◆ adQPoints()

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

Definition at line 386 of file Assembly.h.

387 {
388 _calculate_xyz = true;
389 return _ad_q_points;
390 }

Referenced by genericQPoints().

◆ adQPointsFace()

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

Definition at line 392 of file Assembly.h.

393 {
394 _calculate_face_xyz = true;
395 return _ad_q_points_face;
396 }

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

3214{
3215 _disp_numbers_and_directions = std::move(disp_numbers_and_directions);
3216}
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
Container of displacement numbers and directions.
Definition Assembly.h:2847

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

1900 {
1901 auto qrule = qrules(dim).vol.get();
1902 fe.attach_quadrature_rule(qrule);
1903 return qrule;
1904 }
QRules & qrules(unsigned int dim)
Definition Assembly.h:2482
std::unique_ptr< libMesh::QBase > vol
volume/elem (meshdim) quadrature rule
Definition Assembly.h:2434

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

1912 {
1913 auto qrule = qrules(dim).face.get();
1914 fe.attach_quadrature_rule(qrule);
1915 return qrule;
1916 }
std::unique_ptr< libMesh::QBase > face
area/face (meshdim-1) quadrature rule
Definition Assembly.h:2436

◆ buildFaceFE()

void Assembly::buildFaceFE ( FEType  type) const
private

Build FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 292 of file Assembly.C.

293{
294 if (!_building_helpers && type == _helper_type)
296
297 if (!_fe_shape_data_face[type])
298 _fe_shape_data_face[type] = std::make_unique<FEShapeData>();
299
300 // Build an FE object for this type for each dimension up to the dimension of the current mesh
301 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
302 {
303 if (!_fe_face[dim][type])
304 _fe_face[dim][type] = FEGenericBase<Real>::build(dim, type).release();
305
306 _fe_face[dim][type]->get_phi();
307 _fe_face[dim][type]->get_dphi();
308 if (_need_second_derivative.count(type))
309 _fe_face[dim][type]->get_d2phi();
310 }
311}
std::set< FEType > _need_second_derivative
Definition Assembly.h:2857
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition Assembly.h:2758

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

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

337{
338 if (!_building_helpers && type == _helper_type)
340
342 _fe_shape_data_face_neighbor[type] = std::make_unique<FEShapeData>();
343
344 // Build an FE object for this type for each dimension up to the dimension of the current mesh
345 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
346 {
347 if (!_fe_face_neighbor[dim][type])
348 _fe_face_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
349
350 _fe_face_neighbor[dim][type]->get_phi();
351 _fe_face_neighbor[dim][type]->get_dphi();
352 if (_need_second_derivative_neighbor.count(type))
353 _fe_face_neighbor[dim][type]->get_d2phi();
354 }
355}
std::set< FEType > _need_second_derivative_neighbor
Definition Assembly.h:2858
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition Assembly.h:2760

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

◆ buildFE()

void Assembly::buildFE ( FEType  type) const
private

Build FEs with a type.

Parameters
typeThe type of FE

Definition at line 266 of file Assembly.C.

267{
268 if (!_building_helpers && type == _helper_type)
270
271 if (!_fe_shape_data[type])
272 _fe_shape_data[type] = std::make_unique<FEShapeData>();
273
274 // Build an FE object for this type for each dimension up to the dimension of the current mesh
275 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
276 {
277 if (!_fe[dim][type])
278 _fe[dim][type] = FEGenericBase<Real>::build(dim, type).release();
279
280 _fe[dim][type]->get_phi();
281 _fe[dim][type]->get_dphi();
282 // Pre-request xyz. We have always computed xyz, but due to
283 // recent optimizations in libmesh, we now need to explicity
284 // request it, since apps (Yak) may rely on it being computed.
285 _fe[dim][type]->get_xyz();
286 if (_need_second_derivative.count(type))
287 _fe[dim][type]->get_d2phi();
288 }
289}
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition Assembly.h:2757

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

◆ buildLowerDDualFE()

void Assembly::buildLowerDDualFE ( FEType  type) const
private

Definition at line 382 of file Assembly.C.

383{
384 if (!_fe_shape_data_dual_lower[type])
385 _fe_shape_data_dual_lower[type] = std::make_unique<FEShapeData>();
386
387 // Build an FE object for this type for each dimension up to the dimension of
388 // the current mesh minus one (because this is for lower-dimensional
389 // elements!)
390 for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
391 {
392 if (!_fe_lower[dim][type])
393 _fe_lower[dim][type] = FEGenericBase<Real>::build(dim, type).release();
394
395 _fe_lower[dim][type]->get_dual_phi();
396 _fe_lower[dim][type]->get_dual_dphi();
397 if (_need_second_derivative.count(type))
398 _fe_lower[dim][type]->get_dual_d2phi();
399 }
400}
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition Assembly.h:2762

Referenced by feDualPhiLower(), and feGradDualPhiLower().

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

359{
360 if (!_building_helpers && type == _helper_type)
362
363 if (!_fe_shape_data_lower[type])
364 _fe_shape_data_lower[type] = std::make_unique<FEShapeData>();
365
366 // Build an FE object for this type for each dimension up to the dimension of
367 // the current mesh minus one (because this is for lower-dimensional
368 // elements!)
369 for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
370 {
371 if (!_fe_lower[dim][type])
372 _fe_lower[dim][type] = FEGenericBase<Real>::build(dim, type).release();
373
374 _fe_lower[dim][type]->get_phi();
375 _fe_lower[dim][type]->get_dphi();
376 if (_need_second_derivative.count(type))
377 _fe_lower[dim][type]->get_d2phi();
378 }
379}
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition Assembly.h:2761

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

◆ buildNeighborFE()

void Assembly::buildNeighborFE ( FEType  type) const
private

Build FEs for a neighbor with a type.

Parameters
typeThe type of FE

Definition at line 314 of file Assembly.C.

315{
316 if (!_building_helpers && type == _helper_type)
318
319 if (!_fe_shape_data_neighbor[type])
320 _fe_shape_data_neighbor[type] = std::make_unique<FEShapeData>();
321
322 // Build an FE object for this type for each dimension up to the dimension of the current mesh
323 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
324 {
325 if (!_fe_neighbor[dim][type])
326 _fe_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
327
328 _fe_neighbor[dim][type]->get_phi();
329 _fe_neighbor[dim][type]->get_dphi();
330 if (_need_second_derivative_neighbor.count(type))
331 _fe_neighbor[dim][type]->get_d2phi();
332 }
333}
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition Assembly.h:2759

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

◆ buildVectorDualLowerDFE()

void Assembly::buildVectorDualLowerDFE ( FEType  type) const
private

Definition at line 428 of file Assembly.C.

429{
431 _vector_fe_shape_data_dual_lower[type] = std::make_unique<VectorFEShapeData>();
432
433 // Build an FE object for this type for each dimension up to the dimension of
434 // the current mesh minus one (because this is for lower-dimensional
435 // elements!)
436 unsigned int dim = ((type.family == LAGRANGE_VEC) || (type.family == MONOMIAL_VEC)) ? 0 : 2;
437 const auto ending_dim = cast_int<unsigned int>(_mesh_dimension - 1);
438 if (ending_dim < dim)
439 return;
440 for (; dim <= ending_dim; dim++)
441 {
442 if (!_vector_fe_lower[dim][type])
443 _vector_fe_lower[dim][type] = FEVectorBase::build(dim, type).release();
444
445 _vector_fe_lower[dim][type]->get_dual_phi();
446 _vector_fe_lower[dim][type]->get_dual_dphi();
447 if (_need_second_derivative.count(type))
448 _vector_fe_lower[dim][type]->get_dual_d2phi();
449 }
450}
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
Definition Assembly.h:2770

◆ buildVectorFaceFE()

void Assembly::buildVectorFaceFE ( FEType  type) const
private

Build Vector FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 484 of file Assembly.C.

485{
487 _vector_fe_shape_data_face[type] = std::make_unique<VectorFEShapeData>();
488
489 // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
490 unsigned int min_dim;
491 if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
492 type.family == L2_RAVIART_THOMAS)
493 min_dim = 2;
494 else
495 min_dim = 0;
496
497 // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
498 // current mesh
499 for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
500 {
501 if (!_vector_fe_face[dim][type])
502 _vector_fe_face[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
503
504 _vector_fe_face[dim][type]->get_phi();
505 _vector_fe_face[dim][type]->get_dphi();
506 if (_need_curl.count(type))
507 _vector_fe_face[dim][type]->get_curl_phi();
508 if (_need_face_div.count(type))
509 _vector_fe_face[dim][type]->get_div_phi();
510 }
511}
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition Assembly.h:2766
std::set< FEType > _need_curl
Definition Assembly.h:2859
std::set< FEType > _need_face_div
Definition Assembly.h:2861

Referenced by getVectorFEFace().

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

545{
547 _vector_fe_shape_data_face_neighbor[type] = std::make_unique<VectorFEShapeData>();
548
549 // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
550 unsigned int min_dim;
551 if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
552 type.family == L2_RAVIART_THOMAS)
553 min_dim = 2;
554 else
555 min_dim = 0;
556
557 // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
558 // current mesh
559 for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
560 {
561 if (!_vector_fe_face_neighbor[dim][type])
563 FEGenericBase<VectorValue<Real>>::build(dim, type).release();
564
565 _vector_fe_face_neighbor[dim][type]->get_phi();
566 _vector_fe_face_neighbor[dim][type]->get_dphi();
567 if (_need_curl.count(type))
568 _vector_fe_face_neighbor[dim][type]->get_curl_phi();
569 if (_need_face_neighbor_div.count(type))
570 _vector_fe_face_neighbor[dim][type]->get_div_phi();
571 }
572}
std::set< FEType > _need_face_neighbor_div
Definition Assembly.h:2863
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition Assembly.h:2768

Referenced by getVectorFEFaceNeighbor().

◆ buildVectorFE()

void Assembly::buildVectorFE ( FEType  type) const
private

Build Vector FEs with a type.

Parameters
typeThe type of FE

Definition at line 453 of file Assembly.C.

454{
455 if (!_vector_fe_shape_data[type])
456 _vector_fe_shape_data[type] = std::make_unique<VectorFEShapeData>();
457
458 // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
459 unsigned int min_dim;
460 if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
461 type.family == L2_RAVIART_THOMAS)
462 min_dim = 2;
463 else
464 min_dim = 0;
465
466 // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
467 // current mesh
468 for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
469 {
470 if (!_vector_fe[dim][type])
471 _vector_fe[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
472
473 _vector_fe[dim][type]->get_phi();
474 _vector_fe[dim][type]->get_dphi();
475 if (_need_curl.count(type))
476 _vector_fe[dim][type]->get_curl_phi();
477 if (_need_div.count(type))
478 _vector_fe[dim][type]->get_div_phi();
479 _vector_fe[dim][type]->get_xyz();
480 }
481}
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:2765
std::set< FEType > _need_div
Definition Assembly.h:2860

Referenced by getVectorFE().

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

404{
406 _vector_fe_shape_data_lower[type] = std::make_unique<VectorFEShapeData>();
407
408 // Build an FE object for this type for each dimension up to the dimension of
409 // the current mesh minus one (because this is for lower-dimensional
410 // elements!)
411 unsigned int dim = ((type.family == LAGRANGE_VEC) || (type.family == MONOMIAL_VEC)) ? 0 : 2;
412 const auto ending_dim = cast_int<unsigned int>(_mesh_dimension - 1);
413 if (ending_dim < dim)
414 return;
415 for (; dim <= ending_dim; dim++)
416 {
417 if (!_vector_fe_lower[dim][type])
418 _vector_fe_lower[dim][type] = FEVectorBase::build(dim, type).release();
419
420 _vector_fe_lower[dim][type]->get_phi();
421 _vector_fe_lower[dim][type]->get_dphi();
422 if (_need_second_derivative.count(type))
423 _vector_fe_lower[dim][type]->get_d2phi();
424 }
425}
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
Definition Assembly.h:2769

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

515{
517 _vector_fe_shape_data_neighbor[type] = std::make_unique<VectorFEShapeData>();
518
519 // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
520 unsigned int min_dim;
521 if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
522 type.family == L2_RAVIART_THOMAS)
523 min_dim = 2;
524 else
525 min_dim = 0;
526
527 // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
528 // current mesh
529 for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
530 {
531 if (!_vector_fe_neighbor[dim][type])
532 _vector_fe_neighbor[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
533
534 _vector_fe_neighbor[dim][type]->get_phi();
535 _vector_fe_neighbor[dim][type]->get_dphi();
536 if (_need_curl.count(type))
537 _vector_fe_neighbor[dim][type]->get_curl_phi();
538 if (_need_neighbor_div.count(type))
539 _vector_fe_neighbor[dim][type]->get_div_phi();
540 }
541}
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition Assembly.h:2767
std::set< FEType > _need_neighbor_div
Definition Assembly.h:2862

Referenced by getVectorFENeighbor().

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

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

576{
577 auto & qdefault = _qrules[Moose::ANY_BLOCK_ID];
578 mooseAssert(qdefault.size() > 0, "default quadrature must be initialized before order bumps");
579
580 unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
581 auto & qvec = _qrules[block];
582 if (qvec.size() != ndims || !qvec[0].vol)
583 createQRules(qdefault[0].vol->type(),
584 qdefault[0].arbitrary_vol->get_order(),
585 volume_order,
586 qdefault[0].face->get_order(),
587 block);
588 else if (qvec[0].vol->get_order() < volume_order)
589 createQRules(qvec[0].vol->type(),
590 qvec[0].arbitrary_vol->get_order(),
591 volume_order,
592 qvec[0].face->get_order(),
593 block);
594 // otherwise do nothing - quadrature order is already as high as requested
595}

◆ cacheJacobian() [1/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 3108 of file Assembly.h.

3113{
3114 if (!computingJacobian() || matrix_tags.empty())
3115 return;
3116
3117 if (residuals.size() == 1)
3118 {
3119 // No constraining is required. (This is likely a finite volume computation if we only have a
3120 // single dof)
3122 residuals, input_row_indices, scaling_factor, LocalDataKey{}, matrix_tags);
3123 return;
3124 }
3125
3126 const auto & compare_dofs = residuals[0].derivatives().nude_indices();
3127#ifndef NDEBUG
3128 auto compare_dofs_set = std::set<dof_id_type>(compare_dofs.begin(), compare_dofs.end());
3129
3130 for (const auto i : make_range(decltype(residuals.size())(1), residuals.size()))
3131 {
3132 const auto & residual = residuals[i];
3133 auto current_dofs_set = std::set<dof_id_type>(residual.derivatives().nude_indices().begin(),
3134 residual.derivatives().nude_indices().end());
3135 mooseAssert(compare_dofs_set == current_dofs_set,
3136 "We're going to see whether the dof sets are the same. IIRC the degree of freedom "
3137 "dependence (as indicated by the dof index set held by the ADReal) has to be the "
3138 "same for every residual passed to this method otherwise constrain_element_matrix "
3139 "will not work.");
3140 }
3141#endif
3142 _column_indices.assign(compare_dofs.begin(), compare_dofs.end());
3143
3144 // If there's no derivatives then there is nothing to do. Moreover, if we pass zero size column
3145 // indices to constrain_element_matrix then we will potentially get errors out of BLAS
3146 if (!_column_indices.size())
3147 return;
3148
3149 // Need to make a copy because we might modify this in constrain_element_matrix
3150 _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3151
3153 for (const auto i : index_range(_row_indices))
3154 {
3155 const auto & sparse_derivatives = residuals[i].derivatives();
3156
3157 for (const auto j : index_range(_column_indices))
3158 _element_matrix(i, j) = sparse_derivatives[_column_indices[j]] * scaling_factor;
3159 }
3160
3162
3163 for (const auto i : index_range(_row_indices))
3164 for (const auto j : index_range(_column_indices))
3165 cacheJacobian(_row_indices[i], _column_indices[j], _element_matrix(i, j), {}, matrix_tags);
3166}
for(PetscInt i=0;i< nvars;++i)
DenseMatrix< Number > _element_matrix
A working matrix to avoid repeated heap allocations when caching Jacobians that must have libMesh-lev...
Definition Assembly.h:2885
std::vector< dof_id_type > _column_indices
Definition Assembly.h:2890
bool computingJacobian() const
Definition Assembly.h:1942
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition Assembly.C:4043
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:3170
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:2890
void resize(const unsigned int new_m, const unsigned int new_n)
auto index_range(const T &sizable)
IntRange< T > make_range(T beg, T end)

◆ cacheJacobian() [2/4]

void Assembly::cacheJacobian ( GlobalDataKey  )

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

Definition at line 4043 of file Assembly.C.

4044{
4045 for (const auto & it : _cm_ff_entry)
4046 cacheJacobianCoupledVarPair(*it.first, *it.second);
4047
4048 for (const auto & it : _cm_fs_entry)
4049 cacheJacobianCoupledVarPair(*it.first, *it.second);
4050
4051 for (const auto & it : _cm_sf_entry)
4052 cacheJacobianCoupledVarPair(*it.first, *it.second);
4053}
void cacheJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Caches element matrix for ivar rows and jvar columns.
Definition Assembly.C:4057

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

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

4468{
4469 for (auto tag : tags)
4470 if (_sys.hasMatrix(tag))
4471 cacheJacobian(i, j, value, LocalDataKey{}, tag);
4472}
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ cacheJacobian() [4/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 4454 of file Assembly.C.

4456{
4457 _cached_jacobian_rows[tag].push_back(i);
4458 _cached_jacobian_cols[tag].push_back(j);
4459 _cached_jacobian_values[tag].push_back(value);
4460}

◆ cacheJacobianBlock() [1/2]

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

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

Definition at line 3604 of file Assembly.C.

3610{
3611 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3612 return;
3613 if (jac_block.n() == 0 || jac_block.m() == 0)
3614 return;
3615 if (!_sys.hasMatrix(tag))
3616 return;
3617
3618 auto & scaling_factors = ivar.arrayScalingFactor();
3619 const unsigned int iv = ivar.number();
3620 const unsigned int jv = jvar.number();
3621
3622 for (unsigned int i = 0; i < ivar.count(); ++i)
3623 {
3624 for (const auto & jt : libMesh::ConstCouplingRow(iv + i, *_cm))
3625 {
3626 if (jt < jv || jt >= jv + jvar.count())
3627 continue;
3628 unsigned int j = jt - jv;
3629
3630 auto di = ivar.componentDofIndices(idof_indices, i);
3631 auto dj = jvar.componentDofIndices(jdof_indices, j);
3632 auto indof = di.size();
3633 auto jndof = dj.size();
3634
3635 unsigned int jj = j;
3636 if (iv == jv && _component_block_diagonal[iv])
3637 // here i must be equal to j
3638 jj = 0;
3639
3640 auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3641 if (scaling_factors[i] != 1.0)
3642 sub *= scaling_factors[i];
3643
3644 // If we're computing the jacobian for automatically scaling variables we do not want
3645 // to constrain the element matrix because it introduces 1s on the diagonal for the
3646 // constrained dofs
3648 _dof_map.constrain_element_matrix(sub, di, dj, false);
3649
3650 for (MooseIndex(di) i = 0; i < di.size(); i++)
3651 for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3652 {
3653 _cached_jacobian_values[tag].push_back(sub(i, j));
3654 _cached_jacobian_rows[tag].push_back(di[i]);
3655 _cached_jacobian_cols[tag].push_back(dj[j]);
3656 }
3657 }
3658 }
3659}

◆ cacheJacobianBlock() [2/2]

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

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

The scaling_factor will be applied before caching. The input block is left unchanged; any constraints and scaling are applied to Assembly's work matrix. Only blessed framework classes may call this API by creating the requisite LocalDataKey class.

Definition at line 3719 of file Assembly.C.

3725{
3726 const auto has_matrix =
3727 std::any_of(tags.begin(), tags.end(), [this](const auto tag) { return _sys.hasMatrix(tag); });
3728
3729 // Work on a reusable Assembly-owned copy so callers retain their local matrix. This also lets us
3730 // apply constraints and scaling once before caching the same block to every requested matrix tag.
3731 if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m() &&
3732 has_matrix)
3733 {
3734 _row_indices.assign(idof_indices.begin(), idof_indices.end());
3735 _column_indices.assign(jdof_indices.begin(), jdof_indices.end());
3736 _element_matrix = jac_block;
3737
3738 // If we're computing the jacobian for automatically scaling variables we do not want to
3739 // constrain the element matrix because it introduces 1s on the diagonal for the constrained
3740 // dofs
3743
3744 if (scaling_factor != 1.0)
3745 _element_matrix *= scaling_factor;
3746
3747 for (const auto i : index_range(_row_indices))
3748 for (const auto j : index_range(_column_indices))
3750 _row_indices[i], _column_indices[j], _element_matrix(i, j), LocalDataKey{}, tags);
3751 }
3752}

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

◆ cacheJacobianBlockNonzero()

void Assembly::cacheJacobianBlockNonzero ( const 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 3663 of file Assembly.C.

3669{
3670 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3671 return;
3672 if (jac_block.n() == 0 || jac_block.m() == 0)
3673 return;
3674 if (!_sys.hasMatrix(tag))
3675 return;
3676
3677 auto & scaling_factor = ivar.arrayScalingFactor();
3678
3679 for (unsigned int i = 0; i < ivar.count(); ++i)
3680 {
3681 unsigned int iv = ivar.number();
3682 for (const auto & jt : libMesh::ConstCouplingRow(iv + i, *_cm))
3683 {
3684 unsigned int jv = jvar.number();
3685 if (jt < jv || jt >= jv + jvar.count())
3686 continue;
3687 unsigned int j = jt - jv;
3688
3689 auto di = ivar.componentDofIndices(idof_indices, i);
3690 auto dj = jvar.componentDofIndices(jdof_indices, j);
3691 auto indof = di.size();
3692 auto jndof = dj.size();
3693
3694 unsigned int jj = j;
3695 if (iv == jv && _component_block_diagonal[iv])
3696 // here i must be equal to j
3697 jj = 0;
3698
3699 auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3700 if (scaling_factor[i] != 1.0)
3701 sub *= scaling_factor[i];
3702
3703 _dof_map.constrain_element_matrix(sub, di, dj, false);
3704
3705 for (MooseIndex(di) i = 0; i < di.size(); i++)
3706 for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3707 if (sub(i, j) != 0.0) // no storage allocated for unimplemented jacobian terms,
3708 // maintaining maximum sparsity possible
3709 {
3710 _cached_jacobian_values[tag].push_back(sub(i, j));
3711 _cached_jacobian_rows[tag].push_back(di[i]);
3712 _cached_jacobian_cols[tag].push_back(dj[j]);
3713 }
3714 }
3715 }
3716}

Referenced by cacheJacobianNonlocal().

◆ cacheJacobianCoupledVarPair()

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

Caches element matrix for ivar rows and jvar columns.

Definition at line 4057 of file Assembly.C.

4059{
4060 auto i = ivar.number();
4061 auto j = jvar.number();
4062 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
4063 if (jacobianBlockUsed(tag, i, j) && _sys.hasMatrix(tag))
4064 cacheJacobianBlock(jacobianBlock(i, j, LocalDataKey{}, tag),
4065 ivar,
4066 jvar,
4067 ivar.dofIndices(),
4068 jvar.dofIndices(),
4069 tag);
4070}
void cacheJacobianBlock(const DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &tags)
Cache a local Jacobian block with the provided rows (idof_indices) and columns (jdof_indices) for eve...
Definition Assembly.C:3719

Referenced by cacheJacobian().

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

4134{
4135 for (const auto & it : _cm_ff_entry)
4136 {
4137 auto ivar = it.first;
4138 auto jvar = it.second;
4139 auto i = ivar->number();
4140 auto j = jvar->number();
4141 for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
4142 tag++)
4143 if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
4144 {
4145 cacheJacobianBlock(jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
4146 *ivar,
4147 *jvar,
4148 ivar->dofIndicesLower(),
4149 jvar->dofIndicesLower(),
4150 tag);
4151
4153 *ivar,
4154 *jvar,
4155 ivar->dofIndicesLower(),
4156 jvar->dofIndices(),
4157 tag);
4158
4160 *ivar,
4161 *jvar,
4162 ivar->dofIndicesLower(),
4163 jvar->dofIndicesNeighbor(),
4164 tag);
4165
4167 *ivar,
4168 *jvar,
4169 ivar->dofIndices(),
4170 jvar->dofIndicesLower(),
4171 tag);
4172
4174 jacobianBlockMortar(Moose::SecondarySecondary, i, j, LocalDataKey{}, tag),
4175 *ivar,
4176 *jvar,
4177 ivar->dofIndices(),
4178 jvar->dofIndices(),
4179 tag);
4180
4182 *ivar,
4183 *jvar,
4184 ivar->dofIndices(),
4185 jvar->dofIndicesNeighbor(),
4186 tag);
4187
4189 *ivar,
4190 *jvar,
4191 ivar->dofIndicesNeighbor(),
4192 jvar->dofIndicesLower(),
4193 tag);
4194
4196 *ivar,
4197 *jvar,
4198 ivar->dofIndicesNeighbor(),
4199 jvar->dofIndices(),
4200 tag);
4201
4203 *ivar,
4204 *jvar,
4205 ivar->dofIndicesNeighbor(),
4206 jvar->dofIndicesNeighbor(),
4207 tag);
4208 }
4209 }
4210}
@ SecondarySecondary
Definition MooseTypes.h:852
@ SecondaryPrimary
Definition MooseTypes.h:853
@ PrimarySecondary
Definition MooseTypes.h:854
@ PrimaryPrimary
Definition MooseTypes.h:855

Referenced by ComputeMortarFunctor::operator()().

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

4096{
4097 for (const auto & it : _cm_ff_entry)
4098 {
4099 auto ivar = it.first;
4100 auto jvar = it.second;
4101 auto i = ivar->number();
4102 auto j = jvar->number();
4103
4104 for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
4105 tag < _jacobian_block_neighbor_used.size();
4106 tag++)
4107 if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
4108 {
4110 *ivar,
4111 *jvar,
4112 ivar->dofIndices(),
4113 jvar->dofIndicesNeighbor(),
4114 tag);
4116 *ivar,
4117 *jvar,
4118 ivar->dofIndicesNeighbor(),
4119 jvar->dofIndices(),
4120 tag);
4122 jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
4123 *ivar,
4124 *jvar,
4125 ivar->dofIndicesNeighbor(),
4126 jvar->dofIndicesNeighbor(),
4127 tag);
4128 }
4129 }
4130}

Referenced by SubProblem::cacheJacobianNeighbor().

◆ cacheJacobianNonlocal()

void Assembly::cacheJacobianNonlocal ( GlobalDataKey  )

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

Definition at line 4073 of file Assembly.C.

4074{
4075 for (const auto & it : _cm_nonlocal_entry)
4076 {
4077 auto ivar = it.first;
4078 auto jvar = it.second;
4079 auto i = ivar->number();
4080 auto j = jvar->number();
4081 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
4082 tag < _jacobian_block_nonlocal_used.size();
4083 tag++)
4084 if (jacobianBlockNonlocalUsed(tag, i, j) && _sys.hasMatrix(tag))
4085 cacheJacobianBlockNonzero(jacobianBlockNonlocal(i, j, LocalDataKey{}, tag),
4086 *ivar,
4087 *jvar,
4088 ivar->dofIndices(),
4089 jvar->allDofIndices(),
4090 tag);
4091 }
4092}
void cacheJacobianBlockNonzero(const 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:3663

Referenced by SubProblem::cacheJacobian().

◆ 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 \emph not call DofMap::constrain_element_matrix. Only blessed framework classes may call this API by creating the requisiste LocalDataKey class

Definition at line 3170 of file Assembly.h.

3175{
3176 mooseAssert(residuals.size() == row_indices.size(),
3177 "The number of residuals should match the number of dof indices");
3178 mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3179
3180 if (!computingJacobian() || matrix_tags.empty())
3181 return;
3182
3183 for (const auto i : index_range(row_indices))
3184 {
3185 const auto row_index = row_indices[i];
3186
3187 const auto & sparse_derivatives = residuals[i].derivatives();
3188 const auto & column_indices = sparse_derivatives.nude_indices();
3189 const auto & raw_derivatives = sparse_derivatives.nude_data();
3190
3191 for (std::size_t j = 0; j < column_indices.size(); ++j)
3193 row_index, column_indices[j], raw_derivatives[j] * scaling_factor, {}, matrix_tags);
3194 }
3195}

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

◆ cacheResidual() [1/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 3415 of file Assembly.C.

3416{
3417 for (auto & tag : tags)
3418 cacheResidual(dof, value, tag);
3419}
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:3390

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

3406{
3407 const VectorTag & tag = _subproblem.getVectorTag(tag_id);
3408
3409 _cached_residual_values[tag._type_id].push_back(value);
3410 _cached_residual_rows[tag._type_id].push_back(dof);
3411}
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition SubProblem.C:160
Storage for all of the information pretaining to a vector tag.
Definition VectorTag.h:18

◆ cacheResidual() [3/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 3390 of file Assembly.C.

3391{
3392 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3393 for (const auto & var : vars)
3394 for (const auto & vector_tag : tags)
3395 if (_sys.hasVector(vector_tag._id))
3396 cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3397 _cached_residual_rows[vector_tag._type_id],
3398 _sub_Re[vector_tag._type_id][var->number()],
3399 var->dofIndices(),
3400 var->arrayScalingFactor());
3401}
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)
Push a local residual block with proper scaling into cache.
Definition Assembly.C:3264

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

◆ 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 
)
private

Push a local residual block with proper scaling into cache.

Definition at line 3264 of file Assembly.C.

3269{
3270 if (dof_indices.size() > 0 && res_block.size())
3271 {
3272 _temp_dof_indices = dof_indices;
3273 _tmp_Re = res_block;
3275
3276 for (MooseIndex(_tmp_Re) i = 0; i < _tmp_Re.size(); i++)
3277 {
3278 cached_residual_values.push_back(_tmp_Re(i));
3279 cached_residual_rows.push_back(_temp_dof_indices[i]);
3280 }
3281 }
3282
3283 res_block.zero();
3284}
virtual void zero() override final

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

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

3455{
3456 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3457 for (const auto & var : vars)
3458 for (const auto & vector_tag : tags)
3459 if (_sys.hasVector(vector_tag._id))
3460 cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3461 _cached_residual_rows[vector_tag._type_id],
3462 _sub_Rl[vector_tag._type_id][var->number()],
3463 var->dofIndicesLower(),
3464 var->arrayScalingFactor());
3465}

Referenced by ComputeMortarFunctor::operator()().

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

3441{
3442 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3443 for (const auto & var : vars)
3444 for (const auto & vector_tag : tags)
3445 if (_sys.hasVector(vector_tag._id))
3446 cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3447 _cached_residual_rows[vector_tag._type_id],
3448 _sub_Rn[vector_tag._type_id][var->number()],
3449 var->dofIndicesNeighbor(),
3450 var->arrayScalingFactor());
3451}

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

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

3426{
3427 // Add the residual value and dof_index to cached_residual_values and cached_residual_rows
3428 // respectively.
3429 // This is used by NodalConstraint.C to cache the residual calculated for primary and secondary
3430 // node.
3431 const VectorTag & vector_tag = _subproblem.getVectorTag(tag);
3432 for (MooseIndex(dof_index) i = 0; i < dof_index.size(); ++i)
3433 {
3434 _cached_residual_values[vector_tag._type_id].push_back(res(i));
3435 _cached_residual_rows[vector_tag._type_id].push_back(dof_index[i]);
3436 }
3437}

◆ 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 \emph 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 3050 of file Assembly.h.

3055{
3056 mooseAssert(residuals.size() == input_row_indices.size(),
3057 "The number of residuals should match the number of dof indices");
3058 mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3059
3060 if (!computingResidual() || vector_tags.empty())
3061 return;
3062
3063 if (residuals.size() == 1)
3064 {
3065 // No constraining is required. (This is likely a finite volume computation if we only have a
3066 // single dof)
3068 residuals, input_row_indices, scaling_factor, LocalDataKey{}, vector_tags);
3069 return;
3070 }
3071
3072 // Need to make a copy because we might modify this in constrain_element_vector
3073 _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3074
3076 for (const auto i : index_range(_row_indices))
3077 _element_vector(i) = MetaPhysicL::raw_value(residuals[i]) * scaling_factor;
3078
3079 // At time of writing, this method doesn't do anything with the asymmetric_constraint_rows
3080 // argument, but we set it to false to be consistent with processLocalResidual
3082 _element_vector, _row_indices, /*asymmetric_constraint_rows=*/false);
3083
3084 for (const auto i : index_range(_row_indices))
3085 cacheResidual(_row_indices[i], _element_vector(i), vector_tags);
3086}
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:3090
bool computingResidual() const
Definition Assembly.h:1937
DenseVector< Number > _element_vector
A working vector to avoid repeated heap allocations when caching residuals that must have libMesh-lev...
Definition Assembly.h:2880
void resize(const unsigned int n)
void constrain_element_vector(DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const
We need to instantiate the following CompareTypes to tell the compiler that ADReal is a subtype of Ch...
auto raw_value(const Eigen::Map< T > &in)

Referenced by TaggingInterface::addResiduals().

◆ 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 \emph 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 \emph 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 3090 of file Assembly.h.

3095{
3096 mooseAssert(residuals.size() == row_indices.size(),
3097 "The number of residuals should match the number of dof indices");
3098 mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3099
3100 if (computingResidual() && !vector_tags.empty())
3101 for (const auto i : index_range(row_indices))
3103 row_indices[i], MetaPhysicL::raw_value(residuals[i]) * scaling_factor, vector_tags);
3104}

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

◆ clearCachedJacobian()

void Assembly::clearCachedJacobian ( )
private

Clear any currently cached jacobians.

This is automatically called by setCachedJacobian

Definition at line 4505 of file Assembly.C.

4506{
4507 for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4508 {
4509 _cached_jacobian_rows[tag].clear();
4510 _cached_jacobian_cols[tag].clear();
4511 _cached_jacobian_values[tag].clear();
4512 }
4513}

Referenced by setCachedJacobian(), and zeroCachedJacobian().

◆ clearCachedQRules()

void Assembly::clearCachedQRules ( )

Set the cached quadrature rules to nullptr.

Definition at line 726 of file Assembly.C.

727{
728 _current_qrule = nullptr;
729 _current_qrule_face = nullptr;
730 _current_qrule_lower = nullptr;
731 _current_qrule_neighbor = nullptr;
732}

◆ clearCachedResiduals() [1/2]

void Assembly::clearCachedResiduals ( const VectorTag vector_tag)
private

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

Definition at line 3491 of file Assembly.C.

3492{
3493 auto & values = _cached_residual_values[vector_tag._type_id];
3494 auto & rows = _cached_residual_rows[vector_tag._type_id];
3495
3496 mooseAssert(values.size() == rows.size(),
3497 "Number of cached residuals and number of rows must match!");
3498
3499 // Keep track of the largest size so we can use it to reserve and avoid
3500 // as much dynamic allocation as possible
3501 if (_max_cached_residuals < values.size())
3503
3504 // Clear both vectors (keeps the capacity the same)
3505 values.clear();
3506 rows.clear();
3507 // And then reserve: use 2 as a fudge factor to *really* avoid dynamic allocation!
3508 values.reserve(_max_cached_residuals * 2);
3509 rows.reserve(_max_cached_residuals * 2);
3510}

◆ clearCachedResiduals() [2/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 3483 of file Assembly.C.

3484{
3485 for (const auto & vector_tag : _residual_vector_tags)
3486 clearCachedResiduals(vector_tag);
3487}

Referenced by addCachedResidualDirectly(), and clearCachedResiduals().

◆ computeADFace()

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

compute AD things on an element face

Definition at line 2111 of file Assembly.C.

2112{
2113 const auto dim = elem.dim();
2114
2116 {
2117 auto n_qp = _current_qrule_face->n_points();
2118 resizeADMappingObjects(n_qp, dim);
2119 _ad_normals.resize(n_qp);
2120 _ad_JxW_face.resize(n_qp);
2124 _ad_curvatures.resize(n_qp);
2125
2126 if (_displaced)
2127 {
2128 const auto & qw = _current_qrule_face->get_weights();
2129 computeFaceMap(elem, side, qw);
2130 const std::vector<Real> dummy_qw(n_qp, 1.);
2131
2132 for (unsigned int qp = 0; qp != n_qp; qp++)
2134 }
2135 else
2136 {
2137 for (unsigned qp = 0; qp < n_qp; ++qp)
2138 {
2140 _ad_normals[qp] = _current_normals[qp];
2141 }
2143 for (unsigned qp = 0; qp < n_qp; ++qp)
2146 for (unsigned qp = 0; qp < n_qp; ++qp)
2147 _ad_curvatures[qp] = _curvatures[qp];
2148 }
2149
2150 for (const auto & it : _fe_face[dim])
2151 {
2152 FEBase & fe = *it.second;
2153 auto fe_type = it.first;
2154 auto num_shapes = FEInterface::n_shape_functions(fe_type, &elem);
2155 auto & grad_phi = _ad_grad_phi_data_face[fe_type];
2156
2157 grad_phi.resize(num_shapes);
2158 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2159 grad_phi[i].resize(n_qp);
2160
2161 const auto & regular_grad_phi = _fe_shape_data_face[fe_type]->_grad_phi;
2162
2163 if (_displaced)
2164 computeGradPhiAD(&elem, n_qp, grad_phi, &fe);
2165 else
2166 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2167 for (unsigned qp = 0; qp < n_qp; ++qp)
2168 grad_phi[i][qp] = regular_grad_phi[i][qp];
2169 }
2170 for (const auto & it : _vector_fe_face[dim])
2171 {
2172 FEVectorBase & fe = *it.second;
2173 auto fe_type = it.first;
2174 auto num_shapes = FEInterface::n_shape_functions(fe_type, &elem);
2175 auto & grad_phi = _ad_vector_grad_phi_data_face[fe_type];
2176
2177 grad_phi.resize(num_shapes);
2178 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2179 grad_phi[i].resize(n_qp);
2180
2181 const auto & regular_grad_phi = _vector_fe_shape_data_face[fe_type]->_grad_phi;
2182
2183 if (_displaced)
2184 computeGradPhiAD(&elem, n_qp, grad_phi, &fe);
2185 else
2186 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2187 for (unsigned qp = 0; qp < n_qp; ++qp)
2188 grad_phi[i][qp] = regular_grad_phi[i][qp];
2189 }
2190 }
2191}
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition Assembly.h:2520
const Elem *const & elem() const
Return the current element.
Definition Assembly.h:405
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition Assembly.h:2518
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...
const unsigned int & side() const
Returns the current side.
Definition Assembly.h:437
void resizeADMappingObjects(unsigned int n_qp, unsigned int dim)
resize any objects that contribute to automatic differentiation-related mapping calculations
Definition Assembly.C:971
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition Assembly.h:2522
void computeFaceMap(const Elem &elem, const unsigned int side, const std::vector< Real > &qw)
Definition Assembly.C:1348
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:1001
void resize(unsigned int size)
Change the number of elements the array can store.
Definition MooseArray.h:216
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
Definition SubProblem.h:775
unsigned int n_points() const
const std::vector< Real > & get_weights() const
FEGenericBase< RealGradient > FEVectorBase
FEGenericBase< Real > FEBase

Referenced by reinitElemFaceRef(), and reinitFEFace().

◆ computeCurrentElemVolume()

void Assembly::computeCurrentElemVolume ( )
private

Definition at line 1754 of file Assembly.C.

1755{
1757 return;
1758
1764
1766 for (unsigned int qp = 0; qp < _current_qrule->n_points(); qp++)
1768
1770}
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition Assembly.h:2410
void setCoordinateTransformation(const libMesh::QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition Assembly.h:2412

Referenced by reinit(), and reinit().

◆ computeCurrentFaceVolume()

void Assembly::computeCurrentFaceVolume ( )
private

Definition at line 1773 of file Assembly.C.

1774{
1776 return;
1777
1783
1785 for (unsigned int qp = 0; qp < _current_qrule_face->n_points(); qp++)
1787
1789}

Referenced by reinit(), and reinit().

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

1349{
1350 // Important quantities calculated by this method:
1351 // - _ad_JxW_face
1352 // - _ad_q_points_face
1353 // - _ad_normals
1354 // - _ad_curvatures
1355
1356 const Elem & side_elem = _compute_face_map_side_elem_builder(elem, side);
1357 const auto dim = elem.dim();
1358 const auto n_qp = qw.size();
1359 const auto & dpsidxi_map = _holder_fe_face_helper[dim]->get_fe_map().get_dpsidxi();
1360 const auto & dpsideta_map = _holder_fe_face_helper[dim]->get_fe_map().get_dpsideta();
1361 const auto & psi_map = _holder_fe_face_helper[dim]->get_fe_map().get_psi();
1362 std::vector<std::vector<Real>> const * d2psidxi2_map = nullptr;
1363 std::vector<std::vector<Real>> const * d2psidxideta_map = nullptr;
1364 std::vector<std::vector<Real>> const * d2psideta2_map = nullptr;
1365 const auto sys_num = _sys.number();
1366 const bool do_derivatives = ADReal::do_derivatives && sys_num == _subproblem.currentNlSysNum();
1367
1369 {
1370 d2psidxi2_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psidxi2();
1371 d2psidxideta_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psidxideta();
1372 d2psideta2_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psideta2();
1373 }
1374
1375 switch (dim)
1376 {
1377 case 1:
1378 {
1379 if (!n_qp)
1380 break;
1381
1382 if (side_elem.node_id(0) == elem.node_id(0))
1383 _ad_normals[0] = Point(-1.);
1384 else
1385 _ad_normals[0] = Point(1.);
1386
1387 VectorValue<ADReal> side_point;
1389 {
1390 const Node & node = side_elem.node_ref(0);
1391 side_point = node;
1392
1393 if (do_derivatives)
1394 for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1396 side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1397 }
1398
1399 for (const auto p : make_range(n_qp))
1400 {
1402 {
1403 _ad_q_points_face[p].zero();
1404 _ad_q_points_face[p].add_scaled(side_point, psi_map[0][p]);
1405 }
1406
1407 _ad_normals[p] = _ad_normals[0];
1408 _ad_JxW_face[p] = 1.0 * qw[p];
1409 }
1410
1411 break;
1412 }
1413
1414 case 2:
1415 {
1416 _ad_dxyzdxi_map.resize(n_qp);
1418 _ad_d2xyzdxi2_map.resize(n_qp);
1419
1420 for (const auto p : make_range(n_qp))
1421 _ad_dxyzdxi_map[p].zero();
1423 for (const auto p : make_range(n_qp))
1426 for (const auto p : make_range(n_qp))
1428
1429 const auto n_mapping_shape_functions =
1430 libMesh::FE<2, LAGRANGE>::n_dofs(&side_elem, side_elem.default_order());
1431
1432 for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1433 {
1434 const Node & node = side_elem.node_ref(i);
1435 VectorValue<ADReal> side_point = node;
1436
1437 if (do_derivatives)
1438 for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1440 side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1441
1442 for (const auto p : make_range(n_qp))
1443 _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1445 for (const auto p : make_range(n_qp))
1446 _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1448 for (const auto p : make_range(n_qp))
1449 _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1450 }
1451
1452 for (const auto p : make_range(n_qp))
1453 {
1454 _ad_normals[p] =
1455 (VectorValue<ADReal>(_ad_dxyzdxi_map[p](1), -_ad_dxyzdxi_map[p](0), 0.)).unit();
1456 const auto the_jac = _ad_dxyzdxi_map[p].norm();
1457 _ad_JxW_face[p] = the_jac * qw[p];
1459 {
1460 const auto numerator = _ad_d2xyzdxi2_map[p] * _ad_normals[p];
1461 const auto denominator = _ad_dxyzdxi_map[p].norm_sq();
1462 libmesh_assert_not_equal_to(denominator, 0);
1463 _ad_curvatures[p] = numerator / denominator;
1464 }
1465 }
1466
1467 break;
1468 }
1469
1470 case 3:
1471 {
1472 _ad_dxyzdxi_map.resize(n_qp);
1473 _ad_dxyzdeta_map.resize(n_qp);
1475 {
1476 _ad_d2xyzdxi2_map.resize(n_qp);
1477 _ad_d2xyzdxideta_map.resize(n_qp);
1478 _ad_d2xyzdeta2_map.resize(n_qp);
1479 }
1480
1481 for (const auto p : make_range(n_qp))
1482 {
1483 _ad_dxyzdxi_map[p].zero();
1484 _ad_dxyzdeta_map[p].zero();
1485 }
1487 for (const auto p : make_range(n_qp))
1490 for (const auto p : make_range(n_qp))
1491 {
1492 _ad_d2xyzdxi2_map[p].zero();
1493 _ad_d2xyzdxideta_map[p].zero();
1494 _ad_d2xyzdeta2_map[p].zero();
1495 }
1496
1497 const unsigned int n_mapping_shape_functions =
1498 libMesh::FE<3, LAGRANGE>::n_dofs(&side_elem, side_elem.default_order());
1499
1500 for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1501 {
1502 const Node & node = side_elem.node_ref(i);
1503 VectorValue<ADReal> side_point = node;
1504
1505 if (do_derivatives)
1506 for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1508 side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1509
1510 for (const auto p : make_range(n_qp))
1511 {
1512 _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1513 _ad_dxyzdeta_map[p].add_scaled(side_point, dpsideta_map[i][p]);
1514 }
1516 for (const auto p : make_range(n_qp))
1517 _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1519 for (const auto p : make_range(n_qp))
1520 {
1521 _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1522 _ad_d2xyzdxideta_map[p].add_scaled(side_point, (*d2psidxideta_map)[i][p]);
1523 _ad_d2xyzdeta2_map[p].add_scaled(side_point, (*d2psideta2_map)[i][p]);
1524 }
1525 }
1526
1527 for (const auto p : make_range(n_qp))
1528 {
1529 _ad_normals[p] = _ad_dxyzdxi_map[p].cross(_ad_dxyzdeta_map[p]).unit();
1530
1531 const auto &dxdxi = _ad_dxyzdxi_map[p](0), &dxdeta = _ad_dxyzdeta_map[p](0),
1532 &dydxi = _ad_dxyzdxi_map[p](1), &dydeta = _ad_dxyzdeta_map[p](1),
1533 &dzdxi = _ad_dxyzdxi_map[p](2), &dzdeta = _ad_dxyzdeta_map[p](2);
1534
1535 const auto g11 = (dxdxi * dxdxi + dydxi * dydxi + dzdxi * dzdxi);
1536
1537 const auto g12 = (dxdxi * dxdeta + dydxi * dydeta + dzdxi * dzdeta);
1538
1539 const auto & g21 = g12;
1540
1541 const auto g22 = (dxdeta * dxdeta + dydeta * dydeta + dzdeta * dzdeta);
1542
1543 using std::sqrt;
1544 const auto the_jac = 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}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
std::vector< VectorValue< ADReal > > _ad_dxyzdxi_map
AD quantities.
Definition Assembly.h:2819
std::vector< VectorValue< ADReal > > _ad_d2xyzdeta2_map
Definition Assembly.h:2824
std::vector< VectorValue< ADReal > > _ad_d2xyzdxideta_map
Definition Assembly.h:2823
std::vector< VectorValue< ADReal > > _ad_dxyzdeta_map
Definition Assembly.h:2820
const Node *const & node() const
Returns the reference to the node.
Definition Assembly.h:536
libMesh::ElemSideBuilder _compute_face_map_side_elem_builder
In place side element builder for computeFaceMap()
Definition Assembly.h:2873
std::vector< VectorValue< ADReal > > _ad_d2xyzdxi2_map
Definition Assembly.h:2822
virtual unsigned int currentNlSysNum() const =0
unsigned int number() const
Gets the number of this system.
unsigned int n_dofs(const ElemType t, const Order o)
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &derivs, libMesh::dof_id_type index, Real value)
Definition ADReal.h:21
const Number zero

Referenced by computeADFace().

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

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

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

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

Referenced by computeADFace(), and reinitFE().

◆ computingJacobian()

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

Definition at line 1942 of file Assembly.h.

1942{ return _computing_jacobian; }

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

◆ computingResidual()

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

Definition at line 1937 of file Assembly.h.

1937{ return _computing_residual; }

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

◆ computingResidualAndJacobian()

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

Definition at line 1947 of file Assembly.h.

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

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

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

◆ coordSystem()

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

Get the coordinate system type.

Returns
A reference to the coordinate system type

Definition at line 307 of file Assembly.h.

307{ return _coord_type; }

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

279{ return _coord; }

◆ copyFaceShapes() [1/2]

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

Definition at line 3038 of file Assembly.C.

3039{
3040 phiFace(v).shallowCopy(v.phiFace());
3041 gradPhiFace(v).shallowCopy(v.gradPhiFace());
3042 if (v.computingSecond())
3043 secondPhiFace(v).shallowCopy(v.secondPhiFace());
3044}
const VariablePhiValue & phiFace() const
Definition Assembly.h:1326
const VariablePhiGradient & gradPhiFace() const
Definition Assembly.h:1328
const VariablePhiSecond & secondPhiFace(const MooseVariableField< Real > &) const
Definition Assembly.h:1333
virtual const FieldVariablePhiGradient & gradPhiFace() const =0
Return the gradients of the variable's shape functions on an element face.
virtual const FieldVariablePhiSecond & secondPhiFace() const =0
Return the rank-2 tensor of second derivatives of the variable's shape functions on an element face.
virtual bool computingSecond() const =0
Whether or not this variable is computing any second derivatives.
virtual const FieldVariablePhiValue & phiFace() const =0
Return the variable's shape functions on an element face.

Referenced by copyFaceShapes().

◆ copyFaceShapes() [2/2]

void Assembly::copyFaceShapes ( unsigned int  var)

Definition at line 3047 of file Assembly.C.

3048{
3049 auto & v = _sys.getVariable(_tid, var);
3050 if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3051 {
3052 auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3053 copyFaceShapes(v);
3054 }
3055 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3056 {
3058 copyFaceShapes(v);
3059 }
3060 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3061 {
3063 copyFaceShapes(v);
3064 if (v.computingCurl())
3065 _vector_curl_phi_face.shallowCopy(v.curlPhi());
3066 if (v.computingDiv())
3067 _vector_div_phi_face.shallowCopy(v.divPhi());
3068 }
3069 else
3070 mooseError("Unsupported variable field type!");
3071}
void copyFaceShapes(MooseVariableField< T > &v)
Definition Assembly.C:3038
VectorVariablePhiCurl _vector_curl_phi_face
Definition Assembly.h:2721
VectorVariablePhiDivergence _vector_div_phi_face
Definition Assembly.h:2722
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
@ VAR_FIELD_STANDARD
Definition MooseTypes.h:777
@ VAR_FIELD_ARRAY
Definition MooseTypes.h:780
@ VAR_FIELD_VECTOR
Definition MooseTypes.h:779
VectorValue< Real > RealVectorValue
Definition SubProblem.h:34
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition MooseTypes.h:147

◆ copyNeighborShapes() [1/2]

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

Definition at line 3075 of file Assembly.C.

3076{
3077 if (v.usesPhiNeighbor())
3078 {
3079 phiFaceNeighbor(v).shallowCopy(v.phiFaceNeighbor());
3080 phiNeighbor(v).shallowCopy(v.phiNeighbor());
3081 }
3082 if (v.usesGradPhiNeighbor())
3083 {
3084 gradPhiFaceNeighbor(v).shallowCopy(v.gradPhiFaceNeighbor());
3085 gradPhiNeighbor(v).shallowCopy(v.gradPhiNeighbor());
3086 }
3087 if (v.usesSecondPhiNeighbor())
3088 {
3089 secondPhiFaceNeighbor(v).shallowCopy(v.secondPhiFaceNeighbor());
3090 secondPhiNeighbor(v).shallowCopy(v.secondPhiNeighbor());
3091 }
3092}
const VariablePhiSecond & secondPhiNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1346
const VariablePhiGradient & gradPhiNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1342
const VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1355
const VariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1359
const VariablePhiValue & phiNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1338
const VariablePhiValue & phiFaceNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1351
virtual const FieldVariablePhiGradient & gradPhiFaceNeighbor() const =0
Return the gradients of the variable's shape functions on a neighboring element face.
virtual const FieldVariablePhiGradient & gradPhiNeighbor() const =0
Return the gradients of the variable's shape functions on a neighboring element.
virtual const FieldVariablePhiValue & phiFaceNeighbor() const =0
Return the variable's shape functions on a neighboring element face.
bool usesPhiNeighbor() const
Whether or not this variable is actually using the shape function value.
virtual const FieldVariablePhiSecond & secondPhiFaceNeighbor() const =0
Return the rank-2 tensor of second derivatives of the variable's shape functions on a neighboring ele...
virtual const FieldVariablePhiSecond & secondPhiNeighbor() const =0
Return the rank-2 tensor of second derivatives of the variable's shape functions on a neighboring ele...
virtual bool usesSecondPhiNeighbor() const =0
Whether or not this variable is actually using the shape function second derivatives.
virtual const FieldVariablePhiValue & phiNeighbor() const =0
Return the variable's shape functions on a neighboring element.
bool usesGradPhiNeighbor() const
Whether or not this variable is actually using the shape function gradient.

Referenced by copyNeighborShapes().

◆ copyNeighborShapes() [2/2]

void Assembly::copyNeighborShapes ( unsigned int  var)

Definition at line 3095 of file Assembly.C.

3096{
3097 auto & v = _sys.getVariable(_tid, var);
3098 if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3099 {
3100 auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3102 }
3103 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3104 {
3107 }
3108 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3109 {
3112 }
3113 else
3114 mooseError("Unsupported variable field type!");
3115}
void copyNeighborShapes(MooseVariableField< T > &v)
Definition Assembly.C:3075

◆ copyShapes() [1/2]

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

Definition at line 3001 of file Assembly.C.

3002{
3003 phi(v).shallowCopy(v.phi());
3004 gradPhi(v).shallowCopy(v.gradPhi());
3005 if (v.computingSecond())
3006 secondPhi(v).shallowCopy(v.secondPhi());
3007}
const VariablePhiGradient & gradPhi() const
Definition Assembly.h:1318
const VariablePhiValue & phi() const
Definition Assembly.h:1311
const VariablePhiSecond & secondPhi() const
Definition Assembly.h:1320
virtual const FieldVariablePhiSecond & secondPhi() const =0
Return the rank-2 tensor of second derivatives of the variable's elemental shape functions.
virtual const FieldVariablePhiValue & phi() const =0
Return the variable's elemental shape functions.
virtual const FieldVariablePhiGradient & gradPhi() const =0
Return the gradients of the variable's elemental shape functions.

Referenced by copyShapes().

◆ copyShapes() [2/2]

void Assembly::copyShapes ( unsigned int  var)

Definition at line 3010 of file Assembly.C.

3011{
3012 auto & v = _sys.getVariable(_tid, var);
3013 if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3014 {
3015 auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3016 copyShapes(v);
3017 }
3018 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3019 {
3021 copyShapes(v);
3022 }
3023 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3024 {
3026 copyShapes(v);
3027 if (v.computingCurl())
3028 curlPhi(v).shallowCopy(v.curlPhi());
3029 if (v.computingDiv())
3030 divPhi(v).shallowCopy(v.divPhi());
3031 }
3032 else
3033 mooseError("Unsupported variable field type!");
3034}
const VectorVariablePhiDivergence & divPhi(const MooseVariableField< RealVectorValue > &) const
Definition Assembly.h:1380
const VectorVariablePhiCurl & curlPhi(const MooseVariableField< RealVectorValue > &) const
Definition Assembly.h:1376
void copyShapes(MooseVariableField< T > &v)
Definition Assembly.C:3001

◆ couplingEntries() [1/2]

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

Definition at line 1285 of file Assembly.h.

1286 {
1287 return _cm_ff_entry;
1288 }

Referenced by MortarConstraint::computeJacobian().

◆ couplingEntries() [2/2]

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

Definition at line 1290 of file Assembly.h.

1291 {
1292 return _cm_ff_entry;
1293 }

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

623{
624 auto & qvec = _qrules[block];
625 unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
626 if (qvec.size() != ndims)
627 qvec.resize(ndims);
628
629 for (unsigned int i = 0; i < qvec.size(); i++)
630 {
631 int dim = i;
632 auto & q = qvec[dim];
633 q.vol = QBase::build(type, dim, volume_order);
634 q.vol->allow_rules_with_negative_weights = allow_negative_qweights;
635 q.face = QBase::build(type, dim - 1, face_order);
636 q.face->allow_rules_with_negative_weights = allow_negative_qweights;
637 q.fv_face = QBase::build(libMesh::QMONOMIAL, dim - 1, CONSTANT);
638 q.fv_face->allow_rules_with_negative_weights = allow_negative_qweights;
639 q.neighbor = std::make_unique<ArbitraryQuadrature>(dim - 1, face_order);
640 q.neighbor->allow_rules_with_negative_weights = allow_negative_qweights;
641 q.arbitrary_vol = std::make_unique<ArbitraryQuadrature>(dim, order);
642 q.arbitrary_vol->allow_rules_with_negative_weights = allow_negative_qweights;
643 q.arbitrary_face = std::make_unique<ArbitraryQuadrature>(dim - 1, face_order);
644 q.arbitrary_face->allow_rules_with_negative_weights = allow_negative_qweights;
645 }
646
647 delete _qrule_msm;
648 _custom_mortar_qrule = false;
649 _qrule_msm = QBase::build(type, _mesh_dimension - 1, face_order).release();
650 _qrule_msm->allow_rules_with_negative_weights = allow_negative_qweights;
651 _fe_msm->attach_quadrature_rule(_qrule_msm);
652}
bool allow_rules_with_negative_weights

Referenced by bumpAllQRuleOrder(), and bumpVolumeQRuleOrder().

◆ curlPhi() [1/2]

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

Definition at line 1497 of file Assembly.h.

1498 {
1499 return _vector_curl_phi;
1500 }
VectorVariablePhiCurl _vector_curl_phi
Definition Assembly.h:2715

◆ curlPhi() [2/2]

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

Definition at line 1376 of file Assembly.h.

1377 {
1378 return _vector_curl_phi;
1379 }

Referenced by copyShapes().

◆ curlPhiFace() [1/2]

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

Definition at line 1518 of file Assembly.h.

1519 {
1520 return _vector_curl_phi_face;
1521 }

◆ curlPhiFace() [2/2]

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

Definition at line 1397 of file Assembly.h.

1398 {
1399 return _vector_curl_phi_face;
1400 }

◆ curlPhiFaceNeighbor() [1/2]

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

Definition at line 1559 of file Assembly.h.

1560 {
1562 }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition Assembly.h:2733

◆ curlPhiFaceNeighbor() [2/2]

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

Definition at line 1445 of file Assembly.h.

1446 {
1448 }

◆ curlPhiNeighbor() [1/2]

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

Definition at line 1539 of file Assembly.h.

1540 {
1542 }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition Assembly.h:2727

◆ curlPhiNeighbor() [2/2]

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

Definition at line 1420 of file Assembly.h.

1421 {
1423 }

◆ currentBoundaryID()

const BoundaryID & Assembly::currentBoundaryID ( ) const
inline

Return the current boundary ID.

Definition at line 420 of file Assembly.h.

420{ return _current_boundary_id; }
BoundaryID _current_boundary_id
The current boundary ID.
Definition Assembly.h:2592

◆ currentNeighborSubdomainID()

const SubdomainID & Assembly::currentNeighborSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 488 of file Assembly.h.

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

◆ currentSubdomainID()

const SubdomainID & Assembly::currentSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 410 of file Assembly.h.

410{ return _current_subdomain_id; }
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition Assembly.h:2590

◆ divPhi() [1/2]

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

Definition at line 1501 of file Assembly.h.

1502 {
1503 return _vector_div_phi;
1504 }
VectorVariablePhiDivergence _vector_div_phi
Definition Assembly.h:2716

◆ divPhi() [2/2]

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

Definition at line 1380 of file Assembly.h.

1381 {
1382 return _vector_div_phi;
1383 }

Referenced by copyShapes().

◆ divPhiFace() [1/2]

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

Definition at line 1522 of file Assembly.h.

1523 {
1524 return _vector_div_phi_face;
1525 }

◆ divPhiFace() [2/2]

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

Definition at line 1401 of file Assembly.h.

1402 {
1403 return _vector_div_phi_face;
1404 }

◆ divPhiFaceNeighbor() [1/2]

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

Definition at line 1563 of file Assembly.h.

1564 {
1566 }
VectorVariablePhiDivergence _vector_div_phi_face_neighbor
Definition Assembly.h:2734

◆ divPhiFaceNeighbor() [2/2]

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

Definition at line 1450 of file Assembly.h.

1451 {
1453 }

◆ divPhiNeighbor() [1/2]

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

Definition at line 1543 of file Assembly.h.

1544 {
1546 }
VectorVariablePhiDivergence _vector_div_phi_neighbor
Definition Assembly.h:2728

◆ divPhiNeighbor() [2/2]

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

Definition at line 1425 of file Assembly.h.

1426 {
1428 }

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

3756{
3757 FEType fe_type(elem->default_order(), LAGRANGE);
3758 std::unique_ptr<FEBase> fe(FEBase::build(elem->dim(), fe_type));
3759
3760 // references to the quadrature points and weights
3761 const std::vector<Real> & JxW = fe->get_JxW();
3762 const std::vector<Point> & q_points = fe->get_xyz();
3763
3764 // The default quadrature rule should integrate the mass matrix,
3765 // thus it should be plenty to compute the volume
3766 QGauss qrule(elem->dim(), fe_type.default_quadrature_order());
3767 fe->attach_quadrature_rule(&qrule);
3768 fe->reinit(elem);
3769
3770 // perform a sanity check to ensure that size of quad rule and size of q_points is
3771 // identical
3772 mooseAssert(qrule.n_points() == q_points.size(),
3773 "The number of points in the quadrature rule doesn't match the number of passed-in "
3774 "points in Assembly::setCoordinateTransformation");
3775
3776 // compute the coordinate transformation
3777 Real vol = 0;
3778 for (unsigned int qp = 0; qp < qrule.n_points(); ++qp)
3779 {
3780 Real coord;
3781 coordTransformFactor(_subproblem, elem->subdomain_id(), q_points[qp], coord);
3782 vol += JxW[qp] * coord;
3783 }
3784 return vol;
3785}
void coordTransformFactor(const SubProblem &s, SubdomainID sub_id, const P &point, C &factor, SubdomainID neighbor_sub_id=libMesh::Elem::invalid_subdomain_id)
Computes a conversion multiplier for use when computing integraals for the current coordinate system ...
Definition Assembly.C:41
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition Assembly.h:267

Referenced by MoveNodesByParsedExpressionModifier::prepare(), reinitLowerDElem(), reinitNeighborLowerDElem(), and MoveNodesByParsedExpressionModifier::writeOutputs().

◆ elemVolume()

const Real & Assembly::elemVolume ( ) const
inline

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

370 {
371 mooseAssert(id < _extra_elem_ids.size(), "An invalid extra element integer id");
372 return _extra_elem_ids[id];
373 }

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

379 {
380 mooseAssert(id < _neighbor_extra_elem_ids.size(), "An invalid extra element integer id");
381 return _neighbor_extra_elem_ids[id];
382 }

◆ feADGradPhi() [1/2]

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

Definition at line 1624 of file Assembly.h.

1625 {
1626 return _ad_grad_phi_data[type];
1627 }

◆ feADGradPhi() [2/2]

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

Definition at line 2932 of file Assembly.h.

2934{
2935 return _ad_vector_grad_phi_data[type];
2936}

◆ feADGradPhiFace() [1/2]

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

Definition at line 1665 of file Assembly.h.

1666 {
1667 return _ad_grad_phi_data_face[type];
1668 }

◆ feADGradPhiFace() [2/2]

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

Definition at line 2939 of file Assembly.h.

2941{
2942 return _ad_vector_grad_phi_data_face[type];
2943}

◆ feCurlPhi() [1/3]

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

Definition at line 1725 of file Assembly.h.

1726 {
1727 _need_curl.insert(type);
1728 buildFE(type);
1729 return _fe_shape_data[type]->_curl_phi;
1730 }

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

4713{
4714 _need_curl.insert(type);
4715 buildVectorFE(type);
4716 return _vector_fe_shape_data[type]->_curl_phi;
4717}
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition Assembly.C:453

◆ feCurlPhiFace() [1/3]

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

Definition at line 1733 of file Assembly.h.

1734 {
1735 _need_curl.insert(type);
1736 buildFaceFE(type);
1737 return _fe_shape_data_face[type]->_curl_phi;
1738 }

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

4722{
4723 _need_curl.insert(type);
4724 buildVectorFaceFE(type);
4725
4726 // If we're building for a face we probably need to build for a
4727 // neighbor while _need_curl is set;
4728 // onInterface/reinitNeighbor/etc don't distinguish
4730
4731 return _vector_fe_shape_data_face[type]->_curl_phi;
4732}
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition Assembly.C:544
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition Assembly.C:484

◆ feCurlPhiFaceNeighbor() [1/3]

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

Definition at line 1749 of file Assembly.h.

1750 {
1751 _need_curl.insert(type);
1752 buildFaceNeighborFE(type);
1753 return _fe_shape_data_face_neighbor[type]->_curl_phi;
1754 }

◆ feCurlPhiFaceNeighbor() [2/3]

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

◆ feCurlPhiFaceNeighbor() [3/3]

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

Definition at line 4744 of file Assembly.C.

4746{
4747 _need_curl.insert(type);
4749
4750 return _vector_fe_shape_data_face_neighbor[type]->_curl_phi;
4751}

◆ feCurlPhiNeighbor() [1/3]

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

Definition at line 1741 of file Assembly.h.

1742 {
1743 _need_curl.insert(type);
1744 buildNeighborFE(type);
1745 return _fe_shape_data_neighbor[type]->_curl_phi;
1746 }

◆ feCurlPhiNeighbor() [2/3]

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

◆ feCurlPhiNeighbor() [3/3]

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

Definition at line 4735 of file Assembly.C.

4737{
4738 _need_curl.insert(type);
4740 return _vector_fe_shape_data_neighbor[type]->_curl_phi;
4741}
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition Assembly.C:514

◆ feDivPhi() [1/3]

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

Definition at line 1757 of file Assembly.h.

1758 {
1759 buildFE(type);
1760 return _fe_shape_data[type]->_div_phi;
1761 }

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

4756{
4757 _need_div.insert(type);
4758 buildVectorFE(type);
4759 return _vector_fe_shape_data[type]->_div_phi;
4760}

◆ feDivPhiFace() [1/3]

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

Definition at line 1764 of file Assembly.h.

1765 {
1766 buildFaceFE(type);
1767 return _fe_shape_data_face[type]->_div_phi;
1768 }

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

4765{
4766 _need_face_div.insert(type);
4767 buildVectorFaceFE(type);
4768
4769 // If we're building for a face we probably need to build for a
4770 // neighbor while _need_face_div is set;
4771 // onInterface/reinitNeighbor/etc don't distinguish
4773
4774 return _vector_fe_shape_data_face[type]->_div_phi;
4775}

◆ feDivPhiFaceNeighbor() [1/3]

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

Definition at line 1780 of file Assembly.h.

1781 {
1782 buildFaceNeighborFE(type);
1783 return _fe_shape_data_face_neighbor[type]->_div_phi;
1784 }

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

4789{
4790 _need_face_neighbor_div.insert(type);
4792 return _vector_fe_shape_data_face_neighbor[type]->_div_phi;
4793}

◆ feDivPhiNeighbor() [1/3]

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

Definition at line 1772 of file Assembly.h.

1773 {
1774 buildNeighborFE(type);
1775 return _fe_shape_data_neighbor[type]->_div_phi;
1776 }

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

4780{
4781 _need_neighbor_div.insert(type);
4783 return _vector_fe_shape_data_neighbor[type]->_div_phi;
4784}

◆ feDualPhiLower() [1/3]

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

Definition at line 2909 of file Assembly.h.

2910{
2911 buildLowerDDualFE(type);
2912 return _fe_shape_data_dual_lower[type]->_phi;
2913}
void buildLowerDDualFE(FEType type) const
Definition Assembly.C:382

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

4608{
4610 return _vector_fe_shape_data_dual_lower[type]->_phi;
4611}
void buildVectorDualLowerDFE(FEType type) const
Definition Assembly.C:428

◆ feGradDualPhiLower() [1/3]

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

Definition at line 2925 of file Assembly.h.

2926{
2927 buildLowerDDualFE(type);
2928 return _fe_shape_data_dual_lower[type]->_grad_phi;
2929}

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

4624{
4626 return _vector_fe_shape_data_dual_lower[type]->_grad_phi;
4627}

◆ feGradPhi() [1/3]

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

Definition at line 1617 of file Assembly.h.

1618 {
1619 buildFE(type);
1620 return _fe_shape_data[type]->_grad_phi;
1621 }

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

4583{
4584 buildVectorFE(type);
4585 return _vector_fe_shape_data[type]->_grad_phi;
4586}

◆ feGradPhiFace() [1/3]

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

Definition at line 1658 of file Assembly.h.

1659 {
1660 buildFaceFE(type);
1661 return _fe_shape_data_face[type]->_grad_phi;
1662 }

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

4640{
4641 buildVectorFaceFE(type);
4642 return _vector_fe_shape_data_face[type]->_grad_phi;
4643}

◆ feGradPhiFaceNeighbor() [1/3]

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

Definition at line 1709 of file Assembly.h.

1710 {
1711 buildFaceNeighborFE(type);
1712 return _fe_shape_data_face_neighbor[type]->_grad_phi;
1713 }

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

4696{
4698 return _vector_fe_shape_data_face_neighbor[type]->_grad_phi;
4699}

◆ feGradPhiLower() [1/3]

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

Definition at line 2917 of file Assembly.h.

2918{
2919 buildLowerDFE(type);
2920 return _fe_shape_data_lower[type]->_grad_phi;
2921}

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

4616{
4617 buildVectorLowerDFE(type);
4618 return _vector_fe_shape_data_lower[type]->_grad_phi;
4619}
void buildVectorLowerDFE(FEType type) const
Build Vector FEs for a lower dimensional element with a type.
Definition Assembly.C:403

◆ feGradPhiNeighbor() [1/3]

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

Definition at line 1686 of file Assembly.h.

1687 {
1688 buildNeighborFE(type);
1689 return _fe_shape_data_neighbor[type]->_grad_phi;
1690 }

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

4671{
4673 return _vector_fe_shape_data_neighbor[type]->_grad_phi;
4674}

◆ fePhi() [1/3]

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

Definition at line 1610 of file Assembly.h.

1611 {
1612 buildFE(type);
1613 return _fe_shape_data[type]->_phi;
1614 }

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

4575{
4576 buildVectorFE(type);
4577 return _vector_fe_shape_data[type]->_phi;
4578}

◆ fePhiFace() [1/3]

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

Definition at line 1651 of file Assembly.h.

1652 {
1653 buildFaceFE(type);
1654 return _fe_shape_data_face[type]->_phi;
1655 }

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

4632{
4633 buildVectorFaceFE(type);
4634 return _vector_fe_shape_data_face[type]->_phi;
4635}

◆ fePhiFaceNeighbor() [1/3]

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

Definition at line 1701 of file Assembly.h.

1702 {
1703 buildFaceNeighborFE(type);
1704 return _fe_shape_data_face_neighbor[type]->_phi;
1705 }

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

4688{
4690 return _vector_fe_shape_data_face_neighbor[type]->_phi;
4691}

◆ fePhiLower() [1/3]

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

Definition at line 2901 of file Assembly.h.

2902{
2903 buildLowerDFE(type);
2904 return _fe_shape_data_lower[type]->_phi;
2905}

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

4600{
4601 buildVectorLowerDFE(type);
4602 return _vector_fe_shape_data_lower[type]->_phi;
4603}

◆ fePhiNeighbor() [1/3]

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

Definition at line 1679 of file Assembly.h.

1680 {
1681 buildNeighborFE(type);
1682 return _fe_shape_data_neighbor[type]->_phi;
1683 }

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

4663{
4665 return _vector_fe_shape_data_neighbor[type]->_phi;
4666}

◆ feSecondPhi() [1/3]

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

Definition at line 1630 of file Assembly.h.

1631 {
1632 _need_second_derivative.insert(type);
1633 buildFE(type);
1634 return _fe_shape_data[type]->_second_phi;
1635 }

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

4591{
4592 _need_second_derivative.insert(type);
4593 buildVectorFE(type);
4594 return _vector_fe_shape_data[type]->_second_phi;
4595}

◆ feSecondPhiFace() [1/3]

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

Definition at line 1671 of file Assembly.h.

1672 {
1673 _need_second_derivative.insert(type);
1674 buildFaceFE(type);
1675 return _fe_shape_data_face[type]->_second_phi;
1676 }

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

4648{
4649 _need_second_derivative.insert(type);
4650 buildVectorFaceFE(type);
4651
4652 // If we're building for a face we probably need to build for a
4653 // neighbor while _need_second_derivative is set;
4654 // onInterface/reinitNeighbor/etc don't distinguish
4656
4657 return _vector_fe_shape_data_face[type]->_second_phi;
4658}

◆ feSecondPhiFaceNeighbor() [1/3]

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

Definition at line 1717 of file Assembly.h.

1718 {
1720 buildFaceNeighborFE(type);
1721 return _fe_shape_data_face_neighbor[type]->_second_phi;
1722 }

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

4704{
4707 return _vector_fe_shape_data_face_neighbor[type]->_second_phi;
4708}

◆ feSecondPhiNeighbor() [1/3]

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

Definition at line 1693 of file Assembly.h.

1694 {
1696 buildNeighborFE(type);
1697 return _fe_shape_data_neighbor[type]->_second_phi;
1698 }

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

4679{
4682 return _vector_fe_shape_data_neighbor[type]->_second_phi;
4683}

◆ fieldScalarCouplingEntries()

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

Definition at line 1300 of file Assembly.h.

1301 {
1302 return _cm_fs_entry;
1303 }

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

4956{
4957 return qPoints();
4958}
const MooseArray< Point > & qPoints() const
Returns the reference to the quadrature points.
Definition Assembly.h:249

◆ genericQPoints() [3/3]

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

Definition at line 4961 of file Assembly.C.

4963{
4964 return adQPoints();
4965}
const MooseArray< ADPoint > & adQPoints() const
Definition Assembly.h:386

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

124 {
125 buildFE(type);
126 return constify_ref(_fe[dim][type]);
127 }
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-refe...
Definition Assembly.h:111

Referenced by PointVariableSamplerBase::initialize().

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

148 {
149 buildFaceFE(type);
150 return constify_ref(_fe_face[dim][type]);
151 }

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

160 {
162 return constify_ref(_fe_face_neighbor[dim][type]);
163 }

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

136 {
137 buildNeighborFE(type);
138 return constify_ref(_fe_neighbor[dim][type]);
139 }

◆ getJacobianDiagonal()

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

Definition at line 1883 of file Assembly.h.

1884 {
1885 unsigned int rows = ke.m();
1886 unsigned int cols = ke.n();
1887 DenseVector<Real> diag(rows);
1888 for (unsigned int i = 0; i < rows; i++)
1889 // % operation is needed to account for cases of no component coupling of array variables
1890 diag(i) = ke(i, i % cols);
1891 return diag;
1892 }

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

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

172 {
173 buildVectorFE(type);
174 return constify_ref(_vector_fe[dim][type]);
175 }

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

196 {
197 buildVectorFaceFE(type);
198 return constify_ref(_vector_fe_face[dim][type]);
199 }

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

208 {
210 return constify_ref(_vector_fe_face_neighbor[dim][type]);
211 }

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

184 {
186 return constify_ref(_vector_fe_neighbor[dim][type]);
187 }

◆ gradPhi() [1/6]

const VariablePhiGradient & Assembly::gradPhi ( ) const
inline

Definition at line 1318 of file Assembly.h.

1318{ return _grad_phi; }
VariablePhiGradient _grad_phi
Definition Assembly.h:2696

Referenced by copyShapes().

◆ gradPhi() [2/6]

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

Definition at line 1457 of file Assembly.h.

1457{ return _grad_phi; }

◆ gradPhi() [3/6]

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

Definition at line 1319 of file Assembly.h.

1319{ return _grad_phi; }

◆ gradPhi() [4/6]

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

Definition at line 1570 of file Assembly.h.

1570{ return _grad_phi; }

◆ gradPhi() [5/6]

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

Definition at line 1489 of file Assembly.h.

1490 {
1491 return _vector_grad_phi;
1492 }
VectorVariablePhiGradient _vector_grad_phi
Definition Assembly.h:2713

◆ gradPhi() [6/6]

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

Definition at line 1368 of file Assembly.h.

1369 {
1370 return _vector_grad_phi;
1371 }

◆ gradPhiFace() [1/6]

const VariablePhiGradient & Assembly::gradPhiFace ( ) const
inline

Definition at line 1328 of file Assembly.h.

1328{ return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition Assembly.h:2700

Referenced by copyFaceShapes().

◆ gradPhiFace() [2/6]

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

Definition at line 1461 of file Assembly.h.

1461{ return _grad_phi_face; }

◆ gradPhiFace() [3/6]

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

Definition at line 1329 of file Assembly.h.

1330 {
1331 return _grad_phi_face;
1332 }

◆ gradPhiFace() [4/6]

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

Definition at line 1574 of file Assembly.h.

1575 {
1576 return _grad_phi_face;
1577 }

◆ gradPhiFace() [5/6]

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

Definition at line 1510 of file Assembly.h.

1511 {
1512 return _vector_grad_phi_face;
1513 }
VectorVariablePhiGradient _vector_grad_phi_face
Definition Assembly.h:2719

◆ gradPhiFace() [6/6]

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

Definition at line 1389 of file Assembly.h.

1390 {
1391 return _vector_grad_phi_face;
1392 }

◆ gradPhiFaceNeighbor() [1/5]

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

Definition at line 1478 of file Assembly.h.

1479 {
1481 }
VariablePhiGradient _grad_phi_face_neighbor
Definition Assembly.h:2708

◆ gradPhiFaceNeighbor() [2/5]

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

Definition at line 1355 of file Assembly.h.

1356 {
1358 }

Referenced by copyNeighborShapes().

◆ gradPhiFaceNeighbor() [3/5]

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

Definition at line 1600 of file Assembly.h.

1601 {
1603 }

◆ gradPhiFaceNeighbor() [4/5]

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

Definition at line 1551 of file Assembly.h.

1552 {
1554 }
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition Assembly.h:2731

◆ gradPhiFaceNeighbor() [5/5]

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

Definition at line 1435 of file Assembly.h.

1436 {
1438 }

◆ gradPhiNeighbor() [1/5]

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

Definition at line 1465 of file Assembly.h.

1466 {
1467 return _grad_phi_neighbor;
1468 }
VariablePhiGradient _grad_phi_neighbor
Definition Assembly.h:2704

◆ gradPhiNeighbor() [2/5]

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

Definition at line 1342 of file Assembly.h.

1343 {
1344 return _grad_phi_neighbor;
1345 }

Referenced by copyNeighborShapes().

◆ gradPhiNeighbor() [3/5]

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

Definition at line 1587 of file Assembly.h.

1588 {
1589 return _grad_phi_neighbor;
1590 }

◆ gradPhiNeighbor() [4/5]

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

Definition at line 1531 of file Assembly.h.

1532 {
1534 }
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition Assembly.h:2725

◆ gradPhiNeighbor() [5/5]

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

Definition at line 1411 of file Assembly.h.

1412 {
1414 }

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

4558{
4559 _scaling_vector = &_sys.getVector("scaling_factors");
4560}
const NumericVector< Real > * _scaling_vector
The map from global index to variable scaling factor.
Definition Assembly.h:2866

Referenced by SubProblem::hasScalingVector().

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

4843{
4845 // Already performed tasks for p-refinement
4846 return;
4847
4848 const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
4849 const FEType helper_type(helper_order, LAGRANGE);
4850 auto process_fe =
4851 [&disable_families](const unsigned int num_dimensionalities, auto & fe_container)
4852 {
4853 if (!disable_families.empty())
4854 for (const auto dim : make_range(num_dimensionalities))
4855 {
4856 auto fe_container_it = fe_container.find(dim);
4857 if (fe_container_it != fe_container.end())
4858 for (auto & [fe_type, fe_ptr] : fe_container_it->second)
4859 if (disable_families.count(fe_type.family))
4860 fe_ptr->add_p_level_in_reinit(false);
4861 }
4862 };
4863 auto process_fe_and_helpers = [process_fe, &helper_type](auto & unique_helper_container,
4864 auto & helper_container,
4865 const unsigned int num_dimensionalities,
4866 const bool user_added_helper_type,
4867 auto & fe_container)
4868 {
4869 unique_helper_container.resize(num_dimensionalities);
4870 for (const auto dim : make_range(num_dimensionalities))
4871 {
4872 auto & unique_helper = unique_helper_container[dim];
4873 unique_helper = FEGenericBase<Real>::build(dim, helper_type);
4874 // don't participate in p-refinement
4875 unique_helper->add_p_level_in_reinit(false);
4876 helper_container[dim] = unique_helper.get();
4877
4878 // If the user did not request the helper type then we should erase it from our FE container
4879 // so that they're not penalized (in the "we should be able to do p-refinement sense") for
4880 // our perhaps silly helpers
4881 if (!user_added_helper_type)
4882 {
4883 auto & fe_container_dim = libmesh_map_find(fe_container, dim);
4884 auto fe_it = fe_container_dim.find(helper_type);
4885 mooseAssert(fe_it != fe_container_dim.end(), "We should have the helper type");
4886 delete fe_it->second;
4887 fe_container_dim.erase(fe_it);
4888 }
4889 }
4890
4891 process_fe(num_dimensionalities, fe_container);
4892 };
4893
4894 // Handle scalar field families
4895 process_fe_and_helpers(_unique_fe_helper,
4897 _mesh_dimension + 1,
4899 _fe);
4900 process_fe_and_helpers(_unique_fe_face_helper,
4902 _mesh_dimension + 1,
4904 _fe_face);
4905 process_fe_and_helpers(_unique_fe_face_neighbor_helper,
4907 _mesh_dimension + 1,
4910 process_fe_and_helpers(_unique_fe_neighbor_helper,
4912 _mesh_dimension + 1,
4914 _fe_neighbor);
4915 process_fe_and_helpers(_unique_fe_lower_helper,
4919 _fe_lower);
4920 // Handle vector field families
4921 process_fe(_mesh_dimension + 1, _vector_fe);
4922 process_fe(_mesh_dimension + 1, _vector_fe_face);
4923 process_fe(_mesh_dimension + 1, _vector_fe_neighbor);
4925 process_fe(_mesh_dimension, _vector_fe_lower);
4926
4928
4929 _have_p_refinement = true;
4930}
unsigned int count
Definition MortarUtils.C:53
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition Assembly.h:2365
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition Assembly.h:2363
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition Assembly.h:2362
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:2361
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
Definition Assembly.h:2364

Referenced by SubProblem::preparePRefinement().

◆ helpersRequestData()

void Assembly::helpersRequestData ( )
private

request phi, dphi, xyz, JxW, etc.

data through the FE helper functions

Definition at line 4809 of file Assembly.C.

4810{
4811 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
4812 {
4813 _holder_fe_helper[dim]->get_phi();
4814 _holder_fe_helper[dim]->get_dphi();
4815 _holder_fe_helper[dim]->get_xyz();
4816 _holder_fe_helper[dim]->get_JxW();
4817
4818 _holder_fe_face_helper[dim]->get_phi();
4819 _holder_fe_face_helper[dim]->get_dphi();
4820 _holder_fe_face_helper[dim]->get_xyz();
4821 _holder_fe_face_helper[dim]->get_JxW();
4822 _holder_fe_face_helper[dim]->get_normals();
4823
4826 _holder_fe_face_neighbor_helper[dim]->get_normals();
4827
4828 _holder_fe_neighbor_helper[dim]->get_xyz();
4829 _holder_fe_neighbor_helper[dim]->get_JxW();
4830 }
4831
4832 for (unsigned int dim = 0; dim < _mesh_dimension; dim++)
4833 {
4834 // We need these computations in order to compute correct lower-d element volumes in
4835 // curvilinear coordinates
4836 _holder_fe_lower_helper[dim]->get_xyz();
4837 _holder_fe_lower_helper[dim]->get_JxW();
4838 }
4839}

Referenced by Assembly(), and havePRefinement().

◆ init()

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

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

◆ initNonlocalCoupling()

void Assembly::initNonlocalCoupling ( )

Create pair of variables requiring nonlocal jacobian contributions.

Definition at line 2649 of file Assembly.C.

2650{
2651 _cm_nonlocal_entry.clear();
2652
2653 auto & vars = _sys.getVariables(_tid);
2654
2655 for (auto & ivar : vars)
2656 {
2657 auto i = ivar->number();
2658 auto ivar_start = _cm_nonlocal_entry.size();
2659 for (unsigned int k = 0; k < ivar->count(); ++k)
2660 {
2661 unsigned int iv = i + k;
2662 for (const auto & j : libMesh::ConstCouplingRow(iv, _nonlocal_cm))
2663 if (!_sys.isScalarVariable(j))
2664 {
2665 auto & jvar = _sys.getVariable(_tid, j);
2666 auto pair = std::make_pair(ivar, &jvar);
2667 auto c = ivar_start;
2668 // check if the pair has been pushed or not
2669 bool has_pair = false;
2670 for (; c < _cm_nonlocal_entry.size(); ++c)
2671 if (_cm_nonlocal_entry[c] == pair)
2672 {
2673 has_pair = true;
2674 break;
2675 }
2676 if (!has_pair)
2677 _cm_nonlocal_entry.push_back(pair);
2678 }
2679 }
2680 }
2681}

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

1134 {
1135 jacobianBlockUsed(tag, ivar, jvar, true);
1136 return _sub_Kee[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
1137 }
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition Assembly.h:2671

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

◆ jacobianBlockLowerUsed() [1/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 2276 of file Assembly.h.

2277 {
2278 return _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2279 }

◆ jacobianBlockLowerUsed() [2/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 2267 of file Assembly.h.

2268 {
2269 _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2270 }

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

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

3164{
3165 jacobianBlockLowerUsed(tag, ivar, jvar, true);
3167 {
3168 switch (type)
3169 {
3170 default:
3171 case Moose::LowerLower:
3172 return _sub_Kll[tag][ivar][0];
3174 return _sub_Kle[tag][ivar][0];
3176 return _sub_Kln[tag][ivar][0];
3178 return _sub_Kel[tag][ivar][0];
3180 return _sub_Kee[tag][ivar][0];
3182 return _sub_Ken[tag][ivar][0];
3184 return _sub_Knl[tag][ivar][0];
3186 return _sub_Kne[tag][ivar][0];
3188 return _sub_Knn[tag][ivar][0];
3189 }
3190 }
3191 else
3192 {
3193 switch (type)
3194 {
3195 default:
3196 case Moose::LowerLower:
3197 return _sub_Kll[tag][ivar][jvar];
3199 return _sub_Kle[tag][ivar][jvar];
3201 return _sub_Kln[tag][ivar][jvar];
3203 return _sub_Kel[tag][ivar][jvar];
3205 return _sub_Kee[tag][ivar][jvar];
3207 return _sub_Ken[tag][ivar][jvar];
3209 return _sub_Knl[tag][ivar][jvar];
3211 return _sub_Kne[tag][ivar][jvar];
3213 return _sub_Knn[tag][ivar][jvar];
3214 }
3215 }
3216}
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
dlower/dlower
Definition Assembly.h:2681
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition Assembly.h:2675
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
dlower/dsecondary (or dlower/delement)
Definition Assembly.h:2683
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition Assembly.h:2679
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
dlower/dprimary (or dlower/dneighbor)
Definition Assembly.h:2685
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
dsecondary/dlower (or delement/dlower)
Definition Assembly.h:2687
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition Assembly.h:2677
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
dprimary/dlower (or dneighbor/dlower)
Definition Assembly.h:2689

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

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

3120{
3121 if (type == Moose::ElementElement)
3122 jacobianBlockUsed(tag, ivar, jvar, true);
3123 else
3124 jacobianBlockNeighborUsed(tag, ivar, jvar, true);
3125
3127 {
3128 switch (type)
3129 {
3130 default:
3132 return _sub_Kee[tag][ivar][0];
3134 return _sub_Ken[tag][ivar][0];
3136 return _sub_Kne[tag][ivar][0];
3138 return _sub_Knn[tag][ivar][0];
3139 }
3140 }
3141 else
3142 {
3143 switch (type)
3144 {
3145 default:
3147 return _sub_Kee[tag][ivar][jvar];
3149 return _sub_Ken[tag][ivar][jvar];
3151 return _sub_Kne[tag][ivar][jvar];
3153 return _sub_Knn[tag][ivar][jvar];
3154 }
3155 }
3156}
@ ElementElement
Definition MooseTypes.h:805

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

◆ jacobianBlockNeighborUsed() [1/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 2258 of file Assembly.h.

2259 {
2260 return _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2261 }

◆ jacobianBlockNeighborUsed() [2/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 2249 of file Assembly.h.

2250 {
2251 _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2252 }

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

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

1145 {
1146 jacobianBlockNonlocalUsed(tag, ivar, jvar, true);
1147 return _sub_Keg[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
1148 }
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
Definition Assembly.h:2672

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

◆ jacobianBlockNonlocalUsed() [1/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 2294 of file Assembly.h.

2295 {
2296 return _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2297 }

◆ jacobianBlockNonlocalUsed() [2/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 2285 of file Assembly.h.

2286 {
2287 _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2288 }

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

◆ jacobianBlockUsed() [1/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 2240 of file Assembly.h.

2241 {
2242 return _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2243 }

◆ jacobianBlockUsed() [2/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 2231 of file Assembly.h.

2232 {
2233 _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2234 }

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

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

267{ return _current_JxW; }

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

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

342{ return _current_JxW_face; }

◆ jxWMortar()

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

Returns a reference to JxW for mortar segment elements.

Definition at line 698 of file Assembly.h.

698{ return *_JxW_msm; }

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

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

260{
261 _need_JxW_neighbor = true;
263}
MooseArray< Real > _current_JxW_neighbor
The current transformed jacobian weights on a neighbor's face.
Definition Assembly.h:2561

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

467{ return _current_lower_d_elem; }

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

◆ lowerDElemVolume()

const Real & Assembly::lowerDElemVolume ( ) const
inline

Definition at line 3198 of file Assembly.h.

3199{
3202}
Real _current_lower_d_elem_volume
The current lower dimensional element volume.
Definition Assembly.h:2629

◆ mappedNormals()

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

Definition at line 353 of file Assembly.h.

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

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

4564{
4565 mooseAssert(_current_qrule == _current_qrule_arbitrary, "Rule should be arbitrary");
4566 mooseAssert(weights.size() == _current_physical_points.size(), "Size mismatch");
4567
4568 for (MooseIndex(weights.size()) i = 0; i < weights.size(); ++i)
4569 _current_JxW[i] = weights[i];
4570}
unsigned int size() const
The number of elements that can currently be stored in the array.
Definition MooseArray.h:259

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

4537{
4538 mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
4539
4541 return;
4542
4543 MooseArray<Real> xfem_face_weight_multipliers;
4544 if (_xfem->getXFEMFaceWeights(
4545 xfem_face_weight_multipliers, elem, _current_qrule_face, _current_q_points_face, side))
4546 {
4547 mooseAssert(xfem_face_weight_multipliers.size() == _current_JxW_face.size(),
4548 "Size of weight multipliers in xfem doesn't match number of quadrature points");
4549 for (unsigned i = 0; i < xfem_face_weight_multipliers.size(); i++)
4550 _current_JxW_face[i] = _current_JxW_face[i] * xfem_face_weight_multipliers[i];
4551
4552 xfem_face_weight_multipliers.release();
4553 }
4554}
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition Assembly.h:2371
forward declarations
Definition MooseArray.h:18

Referenced by reinitFEFace().

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

4517{
4518 mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
4519
4521 return;
4522
4523 MooseArray<Real> xfem_weight_multipliers;
4524 if (_xfem->getXFEMWeights(xfem_weight_multipliers, elem, _current_qrule, _current_q_points))
4525 {
4526 mooseAssert(xfem_weight_multipliers.size() == _current_JxW.size(),
4527 "Size of weight multipliers in xfem doesn't match number of quadrature points");
4528 for (unsigned i = 0; i < xfem_weight_multipliers.size(); i++)
4529 _current_JxW[i] = _current_JxW[i] * xfem_weight_multipliers[i];
4530
4531 xfem_weight_multipliers.release();
4532 }
4533}

Referenced by reinitFE().

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

285{ return _coord_msm; }

◆ msmElem()

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

Definition at line 1952 of file Assembly.h.

1952{ return _msm_elem; }
const Elem * _msm_elem
Definition Assembly.h:2875

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

614{ return _need_dual; }

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

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

◆ neighborLowerDElemVolume()

const Real & Assembly::neighborLowerDElemVolume ( ) const
inline

Definition at line 3205 of file Assembly.h.

3206{
3209}
Real _current_neighbor_lower_d_elem_volume
The current neighboring lower dimensional element volume.
Definition Assembly.h:2633

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

443{ return _current_neighbor_side; }

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

500 {
503 }

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

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

536{ return _current_node; }

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

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

542{ return _current_neighbor_node; }

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

◆ nonlocalCouplingEntries()

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

Definition at line 1295 of file Assembly.h.

1296 {
1297 return _cm_nonlocal_entry;
1298 }

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

348{ return _current_normals; }

◆ numExtraElemIntegers()

unsigned int Assembly::numExtraElemIntegers ( ) const
inline

Number of extra element integers Assembly tracked.

Definition at line 364 of file Assembly.h.

364{ return _extra_elem_ids.size() - 1; }

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

◆ phi() [1/6]

const VariablePhiValue & Assembly::phi ( ) const
inline

Definition at line 1311 of file Assembly.h.

1311{ return _phi; }
VariablePhiValue _phi
Definition Assembly.h:2695

Referenced by copyShapes().

◆ phi() [2/6]

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

Definition at line 1456 of file Assembly.h.

1456{ return _phi; }

◆ phi() [3/6]

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

Definition at line 1317 of file Assembly.h.

1317{ return _phi; }

◆ phi() [4/6]

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

Definition at line 1569 of file Assembly.h.

1569{ return _phi; }

◆ phi() [5/6]

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

Definition at line 1488 of file Assembly.h.

1488{ return _vector_phi; }
VectorVariablePhiValue _vector_phi
Definition Assembly.h:2712

◆ phi() [6/6]

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

Definition at line 1364 of file Assembly.h.

1365 {
1366 return _vector_phi;
1367 }

◆ phiFace() [1/6]

const VariablePhiValue & Assembly::phiFace ( ) const
inline

Definition at line 1326 of file Assembly.h.

1326{ return _phi_face; }
VariablePhiValue _phi_face
Definition Assembly.h:2699

Referenced by copyFaceShapes().

◆ phiFace() [2/6]

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

Definition at line 1460 of file Assembly.h.

1460{ return _phi_face; }

◆ phiFace() [3/6]

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

Definition at line 1327 of file Assembly.h.

1327{ return _phi_face; }

◆ phiFace() [4/6]

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

Definition at line 1573 of file Assembly.h.

1573{ return _phi_face; }

◆ phiFace() [5/6]

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

Definition at line 1506 of file Assembly.h.

1507 {
1508 return _vector_phi_face;
1509 }
VectorVariablePhiValue _vector_phi_face
Definition Assembly.h:2718

◆ phiFace() [6/6]

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

Definition at line 1385 of file Assembly.h.

1386 {
1387 return _vector_phi_face;
1388 }

◆ phiFaceNeighbor() [1/5]

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

Definition at line 1474 of file Assembly.h.

1475 {
1476 return _phi_face_neighbor;
1477 }
VariablePhiValue _phi_face_neighbor
Definition Assembly.h:2707

◆ phiFaceNeighbor() [2/5]

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

Definition at line 1351 of file Assembly.h.

1352 {
1353 return _phi_face_neighbor;
1354 }

Referenced by copyNeighborShapes().

◆ phiFaceNeighbor() [3/5]

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

Definition at line 1596 of file Assembly.h.

1597 {
1598 return _phi_face_neighbor;
1599 }

◆ phiFaceNeighbor() [4/5]

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

Definition at line 1547 of file Assembly.h.

1548 {
1550 }
VectorVariablePhiValue _vector_phi_face_neighbor
Definition Assembly.h:2730

◆ phiFaceNeighbor() [5/5]

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

Definition at line 1430 of file Assembly.h.

1431 {
1433 }

◆ phiNeighbor() [1/5]

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

Definition at line 1464 of file Assembly.h.

1464{ return _phi_neighbor; }
VariablePhiValue _phi_neighbor
Definition Assembly.h:2703

◆ phiNeighbor() [2/5]

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

Definition at line 1338 of file Assembly.h.

1339 {
1340 return _phi_neighbor;
1341 }

Referenced by copyNeighborShapes().

◆ phiNeighbor() [3/5]

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

Definition at line 1583 of file Assembly.h.

1584 {
1585 return _phi_neighbor;
1586 }

◆ phiNeighbor() [4/5]

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

Definition at line 1527 of file Assembly.h.

1528 {
1529 return _vector_phi_neighbor;
1530 }
VectorVariablePhiValue _vector_phi_neighbor
Definition Assembly.h:2724

◆ phiNeighbor() [5/5]

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

Definition at line 1406 of file Assembly.h.

1407 {
1408 return _vector_phi_neighbor;
1409 }

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

261{ return _current_physical_points; }

◆ prepare()

void Assembly::prepare ( )

Definition at line 2717 of file Assembly.C.

2718{
2721}
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
Definition Assembly.C:2684
void prepareResidual()
Sizes and zeroes the residual for the current element.
Definition Assembly.C:2708

◆ prepareBlock()

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

Definition at line 2900 of file Assembly.C.

2903{
2904 const auto & iv = _sys.getVariable(_tid, ivar);
2905 const auto & jv = _sys.getVariable(_tid, jvar);
2906 const unsigned int ivn = iv.number();
2907 const unsigned int jvn = jv.number();
2908 const unsigned int icount = iv.count();
2909 unsigned int jcount = jv.count();
2910 if (ivn == jvn && _component_block_diagonal[ivn])
2911 jcount = 1;
2912
2913 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2914 {
2915 jacobianBlock(ivn, jvn, LocalDataKey{}, tag)
2916 .resize(dof_indices.size() * icount, dof_indices.size() * jcount);
2917 jacobianBlockUsed(tag, ivn, jvn, false);
2918 }
2919
2920 for (auto & tag_Re : _sub_Re)
2921 tag_Re[ivn].resize(dof_indices.size() * icount);
2922}

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

2929{
2930 const auto & iv = _sys.getVariable(_tid, ivar);
2931 const auto & jv = _sys.getVariable(_tid, jvar);
2932 const unsigned int ivn = iv.number();
2933 const unsigned int jvn = jv.number();
2934 const unsigned int icount = iv.count();
2935 unsigned int jcount = jv.count();
2936 if (ivn == jvn && _component_block_diagonal[ivn])
2937 jcount = 1;
2938
2939 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2940 tag < _jacobian_block_nonlocal_used.size();
2941 tag++)
2942 {
2943 jacobianBlockNonlocal(ivn, jvn, LocalDataKey{}, tag)
2944 .resize(idof_indices.size() * icount, jdof_indices.size() * jcount);
2945
2946 jacobianBlockNonlocalUsed(tag, ivn, jvn, false);
2947 }
2948}

◆ prepareJacobianBlock()

void Assembly::prepareJacobianBlock ( )

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

Definition at line 2684 of file Assembly.C.

2685{
2686 for (const auto & it : _cm_ff_entry)
2687 {
2688 MooseVariableFEBase & ivar = *(it.first);
2689 MooseVariableFEBase & jvar = *(it.second);
2690
2691 unsigned int vi = ivar.number();
2692 unsigned int vj = jvar.number();
2693
2694 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2695 auto num_cols = jvar.dofIndices().size();
2696 if (array_block_diagonal_purely_diagonal)
2697 num_cols /= jvar.count();
2698
2699 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2700 {
2701 jacobianBlock(vi, vj, LocalDataKey{}, tag).resize(ivar.dofIndices().size(), num_cols);
2702 jacobianBlockUsed(tag, vi, vj, false);
2703 }
2704 }
2705}
This class provides an interface for common operations on field variables of both FE and FV types wit...

Referenced by prepare(), and reinitFVFace().

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

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

Referenced by SubProblem::reinitLowerDElem().

◆ prepareNeighbor()

void Assembly::prepareNeighbor ( )

Definition at line 2810 of file Assembly.C.

2811{
2812 for (const auto & it : _cm_ff_entry)
2813 {
2814 MooseVariableFEBase & ivar = *(it.first);
2815 MooseVariableFEBase & jvar = *(it.second);
2816
2817 unsigned int vi = ivar.number();
2818 unsigned int vj = jvar.number();
2819
2820 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2821 const auto dofs_divisor = array_block_diagonal_purely_diagonal ? jvar.count() : 1;
2822
2823 for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
2824 tag < _jacobian_block_neighbor_used.size();
2825 tag++)
2826 {
2827 jacobianBlockNeighbor(Moose::ElementNeighbor, vi, vj, LocalDataKey{}, tag)
2828 .resize(ivar.dofIndices().size(), jvar.dofIndicesNeighbor().size() / dofs_divisor);
2829
2830 jacobianBlockNeighbor(Moose::NeighborElement, vi, vj, LocalDataKey{}, tag)
2831 .resize(ivar.dofIndicesNeighbor().size(), jvar.dofIndices().size() / dofs_divisor);
2832
2833 jacobianBlockNeighbor(Moose::NeighborNeighbor, vi, vj, LocalDataKey{}, tag)
2834 .resize(ivar.dofIndicesNeighbor().size(),
2835 jvar.dofIndicesNeighbor().size() / dofs_divisor);
2836
2837 jacobianBlockNeighborUsed(tag, vi, vj, false);
2838 }
2839 }
2840
2841 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2842 for (const auto & var : vars)
2843 for (auto & tag_Rn : _sub_Rn)
2844 tag_Rn[var->number()].resize(var->dofIndicesNeighbor().size());
2845}

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

◆ prepareNonlocal()

void Assembly::prepareNonlocal ( )

Definition at line 2724 of file Assembly.C.

2725{
2726 for (const auto & it : _cm_nonlocal_entry)
2727 {
2728 MooseVariableFEBase & ivar = *(it.first);
2729 MooseVariableFEBase & jvar = *(it.second);
2730
2731 unsigned int vi = ivar.number();
2732 unsigned int vj = jvar.number();
2733
2734 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2735 auto num_cols = jvar.allDofIndices().size();
2736 if (array_block_diagonal_purely_diagonal)
2737 num_cols /= jvar.count();
2738
2739 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2740 tag < _jacobian_block_nonlocal_used.size();
2741 tag++)
2742 {
2743 jacobianBlockNonlocal(vi, vj, LocalDataKey{}, tag).resize(ivar.dofIndices().size(), num_cols);
2744 jacobianBlockNonlocalUsed(tag, vi, vj, false);
2745 }
2746 }
2747}
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.

◆ prepareOffDiagScalar()

void Assembly::prepareOffDiagScalar ( )

Definition at line 2975 of file Assembly.C.

2976{
2977 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2978 const std::vector<MooseVariableScalar *> & scalar_vars = _sys.getScalarVariables(_tid);
2979
2980 for (const auto & ivar : scalar_vars)
2981 {
2982 auto idofs = ivar->dofIndices().size();
2983
2984 for (const auto & jvar : vars)
2985 {
2986 auto jdofs = jvar->dofIndices().size() * jvar->count();
2987 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2988 {
2989 jacobianBlock(ivar->number(), jvar->number(), LocalDataKey{}, tag).resize(idofs, jdofs);
2990 jacobianBlockUsed(tag, ivar->number(), jvar->number(), false);
2991
2992 jacobianBlock(jvar->number(), ivar->number(), LocalDataKey{}, tag).resize(jdofs, idofs);
2993 jacobianBlockUsed(tag, jvar->number(), ivar->number(), false);
2994 }
2995 }
2996 }
2997}

Referenced by NodalScalarKernel::reinit().

◆ prepareResidual()

void Assembly::prepareResidual ( )

Sizes and zeroes the residual for the current element.

Definition at line 2708 of file Assembly.C.

2709{
2710 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2711 for (const auto & var : vars)
2712 for (auto & tag_Re : _sub_Re)
2713 tag_Re[var->number()].resize(var->dofIndices().size());
2714}

Referenced by prepare(), and reinitFVFace().

◆ prepareScalar()

void Assembly::prepareScalar ( )

Definition at line 2951 of file Assembly.C.

2952{
2953 const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
2954 for (const auto & ivar : vars)
2955 {
2956 auto idofs = ivar->dofIndices().size();
2957
2958 for (auto & tag_Re : _sub_Re)
2959 tag_Re[ivar->number()].resize(idofs);
2960
2961 for (const auto & jvar : vars)
2962 {
2963 auto jdofs = jvar->dofIndices().size();
2964
2965 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2966 {
2967 jacobianBlock(ivar->number(), jvar->number(), LocalDataKey{}, tag).resize(idofs, jdofs);
2968 jacobianBlockUsed(tag, ivar->number(), jvar->number(), false);
2969 }
2970 }
2971 }
2972}

Referenced by FEProblemBase::reinitScalars().

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

2751{
2752 for (const auto & it : _cm_ff_entry)
2753 {
2754 MooseVariableFEBase & ivar = *(it.first);
2755 MooseVariableFEBase & jvar = *(it.second);
2756
2757 unsigned int vi = ivar.number();
2758 unsigned int vj = jvar.number();
2759
2760 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2761 auto num_cols = jvar.dofIndices().size();
2762 if (array_block_diagonal_purely_diagonal)
2763 num_cols /= jvar.count();
2764
2765 if (vi == var->number() || vj == var->number())
2766 {
2767 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2768 {
2769 jacobianBlock(vi, vj, LocalDataKey{}, tag).resize(ivar.dofIndices().size(), num_cols);
2770 jacobianBlockUsed(tag, vi, vj, false);
2771 }
2772 }
2773 }
2774
2775 for (auto & tag_Re : _sub_Re)
2776 tag_Re[var->number()].resize(var->dofIndices().size());
2777}

◆ prepareVariableNonlocal()

void Assembly::prepareVariableNonlocal ( MooseVariableFieldBase var)

Definition at line 2780 of file Assembly.C.

2781{
2782 for (const auto & it : _cm_nonlocal_entry)
2783 {
2784 MooseVariableFEBase & ivar = *(it.first);
2785 MooseVariableFEBase & jvar = *(it.second);
2786
2787 unsigned int vi = ivar.number();
2788 unsigned int vj = jvar.number();
2789
2790 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2791 auto num_cols = jvar.dofIndices().size();
2792 if (array_block_diagonal_purely_diagonal)
2793 num_cols /= jvar.count();
2794
2795 if (vi == var->number() || vj == var->number())
2796 {
2797 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2798 tag < _jacobian_block_nonlocal_used.size();
2799 tag++)
2800 {
2801 jacobianBlockNonlocal(vi, vj, LocalDataKey{}, tag)
2802 .resize(ivar.dofIndices().size(), num_cols);
2803 jacobianBlockNonlocalUsed(tag, vi, vj);
2804 }
2805 }
2806 }
2807}

◆ processLocalResidual()

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

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

Definition at line 3219 of file Assembly.C.

3222{
3223 mooseAssert(res_block.size() == dof_indices.size(),
3224 "The size of residual and degree of freedom container must be the same");
3225
3226 // For an array variable, ndof is the number of dofs of the zero-th component and
3227 // ntdof is the number of dofs of all components.
3228 // For standard or vector variables, ndof will be the same as ntdof.
3229 const auto ntdof = res_block.size();
3230 const auto count = scaling_factor.size();
3231 const auto ndof = ntdof / count;
3232 if (count > 1)
3233 {
3234 unsigned int p = 0;
3235 for (MooseIndex(count) j = 0; j < count; ++j)
3236 for (MooseIndex(ndof) i = 0; i < ndof; ++i)
3237 res_block(p++) *= scaling_factor[j];
3238 }
3239 else
3240 {
3241 if (scaling_factor[0] != 1.0)
3242 res_block *= scaling_factor[0];
3243 }
3244
3245 _dof_map.constrain_element_vector(res_block, dof_indices, false);
3246}

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

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

249{ return _current_q_points; }

Referenced by genericQPoints().

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

336{ return _current_q_points_face; }

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

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

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

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

255{ return _fe_msm->get_xyz(); }

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

226{ return constify_ref(_current_qrule); }

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

◆ qruleArbitraryFace()

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

Definition at line 1923 of file Assembly.C.

1924{
1925 return qruleFaceHelper<ArbitraryQuadrature>(
1926 elem, side, [](QRules & q) { return q.arbitrary_face.get(); });
1927}

Referenced by reinit(), and reinitElemFaceRef().

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

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

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

1918{
1919 return qruleFaceHelper<QBase>(elem, side, [](QRules & q) { return q.face.get(); });
1920}

Referenced by reinitElemFaceRef(), and setFaceQRule().

◆ qruleFaceHelper()

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

Definition at line 2463 of file Assembly.h.

2464 {
2465 auto dim = elem->dim();
2466 auto neighbor = elem->neighbor_ptr(side);
2467 auto q = rule_fn(qrules(dim, elem->subdomain_id()));
2468 if (!neighbor)
2469 return q;
2470
2471 // find the maximum face quadrature order for all blocks the face is in
2472 auto neighbor_block = neighbor->subdomain_id();
2473 if (neighbor_block == elem->subdomain_id())
2474 return q;
2475
2476 auto q_neighbor = rule_fn(qrules(dim, neighbor_block));
2477 if (q->get_order() > q_neighbor->get_order())
2478 return q;
2479 return q_neighbor;
2480 }
const Elem *const & neighbor() const
Return the neighbor element.
Definition Assembly.h:461

◆ qRuleMortar()

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

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

Definition at line 703 of file Assembly.h.

703{ return constify_ref(_qrule_msm); }

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

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

510 {
512 }

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

◆ qrules() [1/2]

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

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

2488 {
2489 if (_qrules.find(block) == _qrules.end())
2490 {
2491 mooseAssert(_qrules.find(Moose::ANY_BLOCK_ID) != _qrules.end(),
2492 "missing quadrature rules for specified block");
2493 mooseAssert(_qrules[Moose::ANY_BLOCK_ID].size() > dim,
2494 "quadrature rules not sized property for dimension");
2496 }
2497 mooseAssert(_qrules.find(block) != _qrules.end(),
2498 "missing quadrature rules for specified block");
2499 mooseAssert(_qrules[block].size() > dim, "quadrature rules not sized property for dimension");
2500 return _qrules[block][dim];
2501 }

◆ reinit() [1/5]

void Assembly::reinit ( const Elem *  elem)

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

Parameters
elemThe element we want to reinitialize on

Definition at line 1819 of file Assembly.C.

1820{
1822 _current_neighbor_elem = nullptr;
1823 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1824 "current subdomain has been set incorrectly");
1827 reinitFE(elem);
1828
1830}
void reinitFE(const Elem *elem)
Just an internal helper function to reinit the volume FE objects.
Definition Assembly.C:760
void setVolumeQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for volume integration.
void computeCurrentElemVolume()
Definition Assembly.C:1754

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

◆ reinit() [2/5]

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

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

Definition at line 1833 of file Assembly.C.

1834{
1836 _current_neighbor_elem = nullptr;
1837 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1838 "current subdomain has been set incorrectly");
1840
1841 unsigned int elem_dimension = _current_elem->dim();
1842
1843 _current_qrule_arbitrary = qrules(elem_dimension).arbitrary_vol.get();
1844
1845 // Make sure the qrule is the right one
1848
1849 _current_qrule_arbitrary->setPoints(reference_points);
1850
1851 reinitFE(elem);
1852
1854}
void setPoints(const std::vector< libMesh::Point > &points)
Set the quadrature points.
std::unique_ptr< ArbitraryQuadrature > arbitrary_vol
volume/elem (meshdim) custom points quadrature rule
Definition Assembly.h:2440

◆ reinit() [3/5]

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

Reinitialize the assembly data on an side of an element.

Definition at line 1940 of file Assembly.C.

1941{
1943 _current_neighbor_elem = nullptr;
1944 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1945 "current subdomain has been set incorrectly");
1949
1951
1954
1956}
void computeCurrentFaceVolume()
Definition Assembly.C:1773
void setFaceQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
libMesh::ElemSideBuilder _current_side_elem_builder
In place side element builder for _current_side_elem.
Definition Assembly.h:2869
void reinitFEFace(const Elem *elem, unsigned int side)
Just an internal helper function to reinit the face FE objects.
Definition Assembly.C:1268

◆ reinit() [4/5]

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

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

Definition at line 1959 of file Assembly.C.

1960{
1962 _current_neighbor_elem = nullptr;
1963 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1964 "current subdomain has been set incorrectly");
1968
1969 unsigned int elem_dimension = _current_elem->dim();
1970
1972
1973 // Make sure the qrule is the right one
1976
1977 _current_qrule_arbitrary->setPoints(reference_points);
1978
1980
1982
1984}
ArbitraryQuadrature * qruleArbitraryFace(const Elem *elem, unsigned int side)
Definition Assembly.C:1923
ArbitraryQuadrature * _current_qrule_arbitrary_face
The current arbitrary quadrature rule used on the element face.
Definition Assembly.h:2408

◆ reinit() [5/5]

void Assembly::reinit ( const Node *  node)

Reinitialize assembly data for a node.

Definition at line 1987 of file Assembly.C.

1988{
1991}

◆ 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{
1795 _current_neighbor_elem = nullptr;
1796 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
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}
std::vector< Point > _temp_reference_points
Temporary work data for reinitAtPhysical()
Definition Assembly.h:2816
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition Assembly.C:1819

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

2275{
2276 const unsigned int elem_dim = elem->dim();
2277 mooseAssert(elem_dim == _mesh_dimension - 1,
2278 "Dual shape functions should only be computed on lower dimensional face elements");
2279
2280 for (const auto & it : _fe_lower[elem_dim])
2281 {
2282 FEBase & fe_lower = *it.second;
2283 // We use customized quadrature rule for integration along the mortar segment elements
2284 fe_lower.set_calculate_default_dual_coeff(false);
2285 fe_lower.reinit_dual_shape_coeffs(elem, pts, JxW);
2286 }
2287}

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

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

1999{
2000 _current_neighbor_side = neighbor_side;
2001
2002 reinit(elem, side);
2003
2004 unsigned int neighbor_dim = neighbor->dim();
2005
2006 if (neighbor_reference_points)
2007 _current_neighbor_ref_points = *neighbor_reference_points;
2008 else
2009 FEMap::inverse_map(
2011
2013
2016}
void reinitFEFaceNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition Assembly.C:1573
libMesh::ElemSideBuilder _current_neighbor_side_elem_builder
In place side element builder for _current_neighbor_side_elem.
Definition Assembly.h:2871
void reinitNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Reinitializes the neighbor side using reference coordinates.
Definition Assembly.C:1687
std::vector< Point > _current_neighbor_ref_points
The current reference points on the neighbor element.
Definition Assembly.h:2896
std::vector< T > stdVector() const
Extremely inefficient way to produce a std::vector from a MooseArray!
Definition MooseArray.h:344

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

2024{
2026
2027 unsigned int elem_dim = elem->dim();
2028
2029 // Attach the quadrature rules
2030 if (pts)
2031 {
2032 auto face_rule = qruleArbitraryFace(elem, elem_side);
2033 face_rule->setPoints(*pts);
2034 setFaceQRule(face_rule, elem_dim);
2035 }
2036 else
2037 {
2038 auto rule = qruleFace(elem, elem_side);
2039 if (_current_qrule_face != rule)
2040 setFaceQRule(rule, elem_dim);
2041 }
2042
2043 // reinit face
2044 for (const auto & it : _fe_face[elem_dim])
2045 {
2046 FEBase & fe_face = *it.second;
2047 FEType fe_type = it.first;
2048 FEShapeData & fesd = *_fe_shape_data_face[fe_type];
2049
2050 fe_face.reinit(elem, elem_side, tolerance, pts, weights);
2051
2052 _current_fe_face[fe_type] = &fe_face;
2053
2054 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face.get_phi()));
2055 fesd._grad_phi.shallowCopy(
2056 const_cast<std::vector<std::vector<RealGradient>> &>(fe_face.get_dphi()));
2057 if (_need_second_derivative_neighbor.count(fe_type))
2058 fesd._second_phi.shallowCopy(
2059 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_d2phi()));
2060 }
2061 for (const auto & it : _vector_fe_face[elem_dim])
2062 {
2063 FEVectorBase & fe_face = *it.second;
2064 const FEType & fe_type = it.first;
2065
2066 _current_vector_fe_face[fe_type] = &fe_face;
2067
2068 VectorFEShapeData & fesd = *_vector_fe_shape_data_face[fe_type];
2069
2070 fe_face.reinit(elem, elem_side, tolerance, pts, weights);
2071
2072 fesd._phi.shallowCopy(
2073 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_phi()));
2074 fesd._grad_phi.shallowCopy(
2075 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_dphi()));
2076 if (_need_second_derivative.count(fe_type))
2077 fesd._second_phi.shallowCopy(
2078 const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_face.get_d2phi()));
2079 if (_need_curl.count(fe_type))
2080 fesd._curl_phi.shallowCopy(
2081 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_curl_phi()));
2082 if (_need_face_div.count(fe_type))
2083 fesd._div_phi.shallowCopy(
2084 const_cast<std::vector<std::vector<Real>> &>(fe_face.get_div_phi()));
2085 }
2086 if (!_unique_fe_face_helper.empty())
2087 {
2088 mooseAssert(elem_dim < _unique_fe_face_helper.size(), "We should be in bounds here");
2089 _unique_fe_face_helper[elem_dim]->reinit(elem, elem_side, tolerance, pts, weights);
2090 }
2091
2092 // During that last loop the helper objects will have been reinitialized
2094 const_cast<std::vector<Point> &>(_holder_fe_face_helper[elem_dim]->get_xyz()));
2096 const_cast<std::vector<Point> &>(_holder_fe_face_helper[elem_dim]->get_normals()));
2097 _current_tangents.shallowCopy(const_cast<std::vector<std::vector<Point>> &>(
2098 _holder_fe_face_helper[elem_dim]->get_tangents()));
2099 // Note that if the user did pass in points and not weights to this method, JxW will be garbage
2100 // and should not be used
2102 const_cast<std::vector<Real> &>(_holder_fe_face_helper[elem_dim]->get_JxW()));
2105 const_cast<std::vector<Real> &>(_holder_fe_face_helper[elem_dim]->get_curvatures()));
2106
2107 computeADFace(*elem, elem_side);
2108}
MooseArray< std::vector< Point > > _current_tangents
The current tangent vectors at the quadrature points.
Definition Assembly.h:2526
void computeADFace(const Elem &elem, const unsigned int side)
compute AD things on an element face
Definition Assembly.C:2111
libMesh::QBase * qruleFace(const Elem *elem, unsigned int side)
This is an abstraction over the internal qrules function.
Definition Assembly.C:1917
std::map< FEType, FEBase * > _current_fe_face
The "face" fe object that matches the current elem.
Definition Assembly.h:2376
std::map< FEType, FEVectorBase * > _current_vector_fe_face
The "face" vector fe object that matches the current elem.
Definition Assembly.h:2385
void shallowCopy(const MooseArray &rhs)
Doesn't actually make a copy of the data.
Definition MooseArray.h:296

Referenced by SubProblem::reinitElemFaceRef().

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

761{
762 unsigned int dim = elem->dim();
763
764 for (const auto & it : _fe[dim])
765 {
766 FEBase & fe = *it.second;
767 const FEType & fe_type = it.first;
768
769 _current_fe[fe_type] = &fe;
770
771 FEShapeData & fesd = *_fe_shape_data[fe_type];
772
773 fe.reinit(elem);
774
775 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe.get_phi()));
776 fesd._grad_phi.shallowCopy(
777 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_dphi()));
778 if (_need_second_derivative.count(fe_type))
779 fesd._second_phi.shallowCopy(
780 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe.get_d2phi()));
781 }
782 for (const auto & it : _vector_fe[dim])
783 {
784 FEVectorBase & fe = *it.second;
785 const FEType & fe_type = it.first;
786
787 _current_vector_fe[fe_type] = &fe;
788
789 VectorFEShapeData & fesd = *_vector_fe_shape_data[fe_type];
790
791 fe.reinit(elem);
792
793 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_phi()));
794 fesd._grad_phi.shallowCopy(
795 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe.get_dphi()));
796 if (_need_second_derivative.count(fe_type))
797 fesd._second_phi.shallowCopy(
798 const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe.get_d2phi()));
799 if (_need_curl.count(fe_type))
800 fesd._curl_phi.shallowCopy(
801 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_curl_phi()));
802 if (_need_div.count(fe_type))
803 fesd._div_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe.get_div_phi()));
804 }
805 if (!_unique_fe_helper.empty())
806 {
807 mooseAssert(dim < _unique_fe_helper.size(), "We should be in bounds here");
808 _unique_fe_helper[dim]->reinit(elem);
809 }
810
811 // During that last loop the helper objects will have been reinitialized as well
812 // We need to dig out the q_points and JxW from it.
814 const_cast<std::vector<Point> &>(_holder_fe_helper[dim]->get_xyz()));
815 _current_JxW.shallowCopy(const_cast<std::vector<Real> &>(_holder_fe_helper[dim]->get_JxW()));
816
818 {
819 auto n_qp = _current_qrule->n_points();
820 resizeADMappingObjects(n_qp, dim);
821 if (_displaced)
822 {
823 const auto & qw = _current_qrule->get_weights();
824 for (unsigned int qp = 0; qp != n_qp; qp++)
826 }
827 else
828 {
829 for (unsigned qp = 0; qp < n_qp; ++qp)
830 _ad_JxW[qp] = _current_JxW[qp];
831 if (_calculate_xyz)
832 for (unsigned qp = 0; qp < n_qp; ++qp)
834 }
835
836 for (const auto & it : _fe[dim])
837 {
838 FEBase & fe = *it.second;
839 auto fe_type = it.first;
840 auto num_shapes = FEInterface::n_shape_functions(fe_type, elem);
841 auto & grad_phi = _ad_grad_phi_data[fe_type];
842
843 grad_phi.resize(num_shapes);
844 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
845 grad_phi[i].resize(n_qp);
846
847 if (_displaced)
848 computeGradPhiAD(elem, n_qp, grad_phi, &fe);
849 else
850 {
851 const auto & regular_grad_phi = _fe_shape_data[fe_type]->_grad_phi;
852 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
853 for (unsigned qp = 0; qp < n_qp; ++qp)
854 grad_phi[i][qp] = regular_grad_phi[i][qp];
855 }
856 }
857 for (const auto & it : _vector_fe[dim])
858 {
859 FEVectorBase & fe = *it.second;
860 auto fe_type = it.first;
861 auto num_shapes = FEInterface::n_shape_functions(fe_type, elem);
862 auto & grad_phi = _ad_vector_grad_phi_data[fe_type];
863
864 grad_phi.resize(num_shapes);
865 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
866 grad_phi[i].resize(n_qp);
867
868 if (_displaced)
869 computeGradPhiAD(elem, n_qp, grad_phi, &fe);
870 else
871 {
872 const auto & regular_grad_phi = _vector_fe_shape_data[fe_type]->_grad_phi;
873 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
874 for (unsigned qp = 0; qp < n_qp; ++qp)
875 grad_phi[i][qp] = regular_grad_phi[i][qp];
876 }
877 }
878 }
879
880 auto n = numExtraElemIntegers();
881 for (auto i : make_range(n))
882 _extra_elem_ids[i] = _current_elem->get_extra_integer(i);
883 _extra_elem_ids[n] = _current_elem->subdomain_id();
884
885 if (_xfem != nullptr)
887}
void modifyWeightsDueToXFEM(const Elem *elem)
Update the integration weights for XFEM partial elements.
Definition Assembly.C:4516
std::map< FEType, FEVectorBase * > _current_vector_fe
The "volume" vector fe object that matches the current elem.
Definition Assembly.h:2383
std::map< FEType, FEBase * > _current_fe
The "volume" fe object that matches the current elem.
Definition Assembly.h:2374
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition Assembly.h:364

Referenced by reinit(), and reinit().

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

1269{
1270 unsigned int dim = elem->dim();
1271
1272 for (const auto & it : _fe_face[dim])
1273 {
1274 FEBase & fe_face = *it.second;
1275 const FEType & fe_type = it.first;
1276 FEShapeData & fesd = *_fe_shape_data_face[fe_type];
1277 fe_face.reinit(elem, side);
1278 _current_fe_face[fe_type] = &fe_face;
1279
1280 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face.get_phi()));
1281 fesd._grad_phi.shallowCopy(
1282 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_dphi()));
1283 if (_need_second_derivative.count(fe_type))
1284 fesd._second_phi.shallowCopy(
1285 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_d2phi()));
1286 }
1287 for (const auto & it : _vector_fe_face[dim])
1288 {
1289 FEVectorBase & fe_face = *it.second;
1290 const FEType & fe_type = it.first;
1291
1292 _current_vector_fe_face[fe_type] = &fe_face;
1293
1294 VectorFEShapeData & fesd = *_vector_fe_shape_data_face[fe_type];
1295
1296 fe_face.reinit(elem, side);
1297
1298 fesd._phi.shallowCopy(
1299 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_phi()));
1300 fesd._grad_phi.shallowCopy(
1301 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_dphi()));
1302 if (_need_second_derivative.count(fe_type))
1303 fesd._second_phi.shallowCopy(
1304 const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_face.get_d2phi()));
1305 if (_need_curl.count(fe_type))
1306 fesd._curl_phi.shallowCopy(
1307 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_curl_phi()));
1308 if (_need_face_div.count(fe_type))
1309 fesd._div_phi.shallowCopy(
1310 const_cast<std::vector<std::vector<Real>> &>(fe_face.get_div_phi()));
1311 }
1312 if (!_unique_fe_face_helper.empty())
1313 {
1314 mooseAssert(dim < _unique_fe_face_helper.size(), "We should be in bounds here");
1316 }
1317
1318 // During that last loop the helper objects will have been reinitialized as well
1319 // We need to dig out the q_points and JxW from it.
1321 const_cast<std::vector<Point> &>(_holder_fe_face_helper[dim]->get_xyz()));
1323 const_cast<std::vector<Real> &>(_holder_fe_face_helper[dim]->get_JxW()));
1325 const_cast<std::vector<Point> &>(_holder_fe_face_helper[dim]->get_normals()));
1326
1327 _mapped_normals.resize(_current_normals.size(), Eigen::Map<RealDIMValue>(nullptr));
1328 for (unsigned int i = 0; i < _current_normals.size(); i++)
1329 // Note: this does NOT do any allocation. It is "reconstructing" the object in place
1330 new (&_mapped_normals[i]) Eigen::Map<RealDIMValue>(const_cast<Real *>(&_current_normals[i](0)));
1331
1334 const_cast<std::vector<Real> &>(_holder_fe_face_helper[dim]->get_curvatures()));
1335
1337
1338 if (_xfem != nullptr)
1340
1341 auto n = numExtraElemIntegers();
1342 for (auto i : make_range(n))
1343 _extra_elem_ids[i] = _current_elem->get_extra_integer(i);
1344 _extra_elem_ids[n] = _current_elem->subdomain_id();
1345}
void modifyFaceWeightsDueToXFEM(const Elem *elem, unsigned int side=0)
Update the face integration weights for XFEM partial elements.
Definition Assembly.C:4536

Referenced by reinit(), and reinit().

◆ reinitFEFaceNeighbor()

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

Definition at line 1573 of file Assembly.C.

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 }
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}
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
The "neighbor face" vector fe object that matches the current elem.
Definition Assembly.h:2389
std::map< FEType, FEBase * > _current_fe_face_neighbor
The "neighbor face" fe object that matches the current elem.
Definition Assembly.h:2380

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

◆ 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}
std::map< FEType, FEBase * > _current_fe_neighbor
The "neighbor" fe object that matches the current elem.
Definition Assembly.h:2378
std::map< FEType, FEVectorBase * > _current_vector_fe_neighbor
The "neighbor" vector fe object that matches the current elem.
Definition Assembly.h:2387

Referenced by reinitNeighborAtPhysical().

◆ reinitFVFace()

void Assembly::reinitFVFace ( const FaceInfo fi)

Definition at line 1857 of file Assembly.C.

1858{
1859 _current_elem = &fi.elem();
1863 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1864 "current subdomain has been set incorrectly");
1865
1868
1872
1873 unsigned int dim = _current_elem->dim();
1874 if (_current_qrule_face != qrules(dim).fv_face.get())
1875 {
1876 setFaceQRule(qrules(dim).fv_face.get(), dim);
1877 // The order of the element that is used for initing here doesn't matter since this will just
1878 // be used for constant monomials (which only need a single integration point)
1879 if (dim == 3)
1880 _current_qrule_face->init(QUAD4, /* p_level = */ 0, /* simple_type_only = */ true);
1881 else
1882 _current_qrule_face->init(EDGE2, /* p_level = */ 0, /* simple_type_only = */ true);
1883 }
1884
1886
1887 mooseAssert(_current_qrule_face->n_points() == 1,
1888 "Our finite volume quadrature rule should always yield a single point");
1889
1890 // We've initialized the reference points. Now we need to compute the physical location of the
1891 // quadrature points. We do not do any FE initialization so we cannot simply copy over FE
1892 // results like we do in reinitFEFace. Instead we handle the computation of the physical
1893 // locations manually
1895 const auto & ref_points = _current_qrule_face->get_points();
1896 const auto & ref_point = ref_points[0];
1897 auto physical_point = FEMap::map(_current_side_elem->dim(), _current_side_elem, ref_point);
1898 _current_q_points_face[0] = physical_point;
1899
1901 {
1902 mooseAssert(_current_neighbor_subdomain_id == _current_neighbor_elem->subdomain_id(),
1903 "current neighbor subdomain has been set incorrectly");
1904 // Now handle the neighbor qrule/qpoints
1905 ArbitraryQuadrature * const neighbor_rule =
1907 // Here we are setting a reference point that is correct for the neighbor *side* element. It
1908 // would be wrong if this reference point is used for a volumetric FE reinit with the neighbor
1909 neighbor_rule->setPoints(ref_points);
1910 setNeighborQRule(neighbor_rule, _current_neighbor_elem->dim());
1912 _current_q_points_face_neighbor[0] = std::move(physical_point);
1913 }
1914}
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
void prepareNeighbor()
Definition Assembly.C:2810
void setNeighborQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition Assembly.C:709
unsigned int neighborSideID() const
Definition FaceInfo.h:114
const Elem & elem() const
Definition FaceInfo.h:85
const Elem * neighborPtr() const
Definition FaceInfo.h:88
unsigned int elemSideID() const
Definition FaceInfo.h:113
const std::vector< Point > & get_points() const
virtual void init(const Elem &e, unsigned int p_level=invalid_uint)
std::unique_ptr< ArbitraryQuadrature > neighbor
area/face (meshdim-1) custom points quadrature rule for DG
Definition Assembly.h:2444

Referenced by SubProblem::reinitFVFace().

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

2293{
2295
2296 const unsigned int elem_dim = elem->dim();
2297 mooseAssert(elem_dim < _mesh_dimension,
2298 "The lower dimensional element should truly be a lower dimensional element");
2299
2300 if (pts)
2301 {
2302 // Lower rule matches the face rule for the higher dimensional element
2303 ArbitraryQuadrature * lower_rule = qrules(elem_dim + 1).arbitrary_face.get();
2304
2305 // This also sets the quadrature weights to unity
2306 lower_rule->setPoints(*pts);
2307
2308 if (weights)
2309 lower_rule->setWeights(*weights);
2310
2311 setLowerQRule(lower_rule, elem_dim);
2312 }
2313 else if (_current_qrule_lower != qrules(elem_dim + 1).face.get())
2314 setLowerQRule(qrules(elem_dim + 1).face.get(), elem_dim);
2315
2316 for (const auto & it : _fe_lower[elem_dim])
2317 {
2318 FEBase & fe_lower = *it.second;
2319 FEType fe_type = it.first;
2320
2321 fe_lower.reinit(elem);
2322
2323 if (FEShapeData * fesd = _fe_shape_data_lower[fe_type].get())
2324 {
2325 fesd->_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_lower.get_phi()));
2326 fesd->_grad_phi.shallowCopy(
2327 const_cast<std::vector<std::vector<RealGradient>> &>(fe_lower.get_dphi()));
2328 if (_need_second_derivative_neighbor.count(fe_type))
2329 fesd->_second_phi.shallowCopy(
2330 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_lower.get_d2phi()));
2331 }
2332
2333 // Dual shape functions need to be computed after primal basis being initialized
2334 if (FEShapeData * fesd = _fe_shape_data_dual_lower[fe_type].get())
2335 {
2336 fesd->_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_lower.get_dual_phi()));
2337 fesd->_grad_phi.shallowCopy(
2338 const_cast<std::vector<std::vector<RealGradient>> &>(fe_lower.get_dual_dphi()));
2339 if (_need_second_derivative_neighbor.count(fe_type))
2340 fesd->_second_phi.shallowCopy(
2341 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_lower.get_dual_d2phi()));
2342 }
2343 }
2344 if (!_unique_fe_lower_helper.empty())
2345 {
2346 mooseAssert(elem_dim < _unique_fe_lower_helper.size(), "We should be in bounds here");
2347 _unique_fe_lower_helper[elem_dim]->reinit(elem);
2348 }
2349
2351 return;
2352
2353 if (pts && !weights)
2354 {
2355 // We only have dummy weights so the JxWs computed during our FE reinits are meaningless and
2356 // we cannot use them
2357
2359 // We are in a Cartesian coordinate system and we can just use the element volume method
2360 // which has fast computation for certain element types
2362 else
2363 // We manually compute the volume taking the curvilinear coordinate transformations into
2364 // account
2366 }
2367 else
2368 {
2369 // During that last loop the helper objects will have been reinitialized as well
2370 FEBase & helper_fe = *_holder_fe_lower_helper[elem_dim];
2371 const auto & physical_q_points = helper_fe.get_xyz();
2372 const auto & JxW = helper_fe.get_JxW();
2373 MooseArray<Real> coord;
2375 _current_qrule_lower, physical_q_points, coord, elem->subdomain_id());
2377 for (const auto qp : make_range(_current_qrule_lower->n_points()))
2378 _current_lower_d_elem_volume += JxW[qp] * coord[qp];
2379 }
2380}
void setWeights(const std::vector< libMesh::Real > &weights)
Set the quadrature weights.
void setLowerQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for lower dimensional integration.
Definition Assembly.C:690
Real elementVolume(const Elem *elem) const
On-demand computation of volume element accounting for RZ/RSpherical.
Definition Assembly.C:3755
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
const Elem & get(const ElemType type_in)
std::unique_ptr< ArbitraryQuadrature > arbitrary_face
area/face (meshdim-1) custom points quadrature rule
Definition Assembly.h:2442

Referenced by SubProblem::reinitLowerDElem().

◆ reinitMortarElem()

void Assembly::reinitMortarElem ( const Elem *  elem)

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

Definition at line 2404 of file Assembly.C.

2405{
2406 mooseAssert(elem->dim() == _mesh_dimension - 1,
2407 "You should be calling reinitMortarElem on a lower dimensional element");
2408
2409 _fe_msm->reinit(elem);
2410 _msm_elem = elem;
2411
2412 MooseArray<Point> array_q_points;
2413 array_q_points.shallowCopy(const_cast<std::vector<Point> &>(_fe_msm->get_xyz()));
2414 setCoordinateTransformation(_qrule_msm, array_q_points, _coord_msm, elem->subdomain_id());
2415}

Referenced by SubProblem::reinitMortarElem().

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

1688{
1689 unsigned int neighbor_dim = neighbor->dim();
1690 mooseAssert(_current_neighbor_subdomain_id == neighbor->subdomain_id(),
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
1699 mooseAssert(_current_neighbor_subdomain_id == _current_neighbor_elem->subdomain_id(),
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))
1725 _neighbor_extra_elem_ids[i] = _current_neighbor_elem->get_extra_integer(i);
1727}

Referenced by reinitElemAndNeighbor(), reinitNeighborAtPhysical(), and reinitNeighborAtPhysical().

◆ reinitNeighborAtPhysical() [1/2]

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

Reinitializes the neighbor at the physical coordinates within element given.

Definition at line 2454 of file Assembly.C.

2456{
2457 unsigned int neighbor_dim = neighbor->dim();
2458 FEMap::inverse_map(neighbor_dim, neighbor, physical_points, _current_neighbor_ref_points);
2459
2462 // Save off the physical points
2463 _current_physical_points = physical_points;
2464}
void reinitFENeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition Assembly.C:1632

◆ reinitNeighborAtPhysical() [2/2]

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

Reinitializes the neighbor at the physical coordinates on neighbor side given.

Definition at line 2418 of file Assembly.C.

2421{
2422 unsigned int neighbor_dim = neighbor->dim();
2423 FEMap::inverse_map(neighbor_dim, neighbor, physical_points, _current_neighbor_ref_points);
2424
2426 {
2427 mooseAssert(
2428 physical_points.size() == 1,
2429 "If reinitializing with more than one point, then I am dubious of your use case. Perhaps "
2430 "you are performing a DG type method and you are reinitializing using points from the "
2431 "element face. In such a case your neighbor JxW must have its index order 'match' the "
2432 "element JxW index order, e.g. imagining a vertical 1D face with two quadrature points, "
2433 "if "
2434 "index 0 for elem JxW corresponds to the 'top' quadrature point, then index 0 for "
2435 "neighbor "
2436 "JxW must also correspond to the 'top' quadrature point. And libMesh/MOOSE has no way to "
2437 "guarantee that with multiple quadrature points.");
2438
2440
2441 // With a single point our size-1 JxW should just be the element volume
2444 }
2445
2448
2449 // Save off the physical points
2450 _current_physical_points = physical_points;
2451}

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

2199{
2201
2202 unsigned int neighbor_dim = neighbor->dim();
2203
2204 ArbitraryQuadrature * neighbor_rule =
2205 qrules(neighbor_dim, neighbor->subdomain_id()).neighbor.get();
2206 neighbor_rule->setPoints(*pts);
2207
2208 // Attach this quadrature rule to all the _fe_face_neighbor FE objects. This
2209 // has to have garbage quadrature weights but that's ok because we never
2210 // actually use the JxW coming from these FE reinit'd objects, e.g. we use the
2211 // JxW coming from the element face reinit for DGKernels or we use the JxW
2212 // coming from reinit of the mortar segment element in the case of mortar
2213 setNeighborQRule(neighbor_rule, neighbor_dim);
2214
2215 // reinit neighbor face
2216 for (const auto & it : _fe_face_neighbor[neighbor_dim])
2217 {
2218 FEBase & fe_face_neighbor = *it.second;
2219 FEType fe_type = it.first;
2220 FEShapeData & fesd = *_fe_shape_data_face_neighbor[fe_type];
2221
2222 fe_face_neighbor.reinit(neighbor, neighbor_side, tolerance, pts, weights);
2223
2224 _current_fe_face_neighbor[fe_type] = &fe_face_neighbor;
2225
2226 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_phi()));
2227 fesd._grad_phi.shallowCopy(
2228 const_cast<std::vector<std::vector<RealGradient>> &>(fe_face_neighbor.get_dphi()));
2229 if (_need_second_derivative_neighbor.count(fe_type))
2230 fesd._second_phi.shallowCopy(
2231 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_d2phi()));
2232 }
2233 for (const auto & it : _vector_fe_face_neighbor[neighbor_dim])
2234 {
2235 FEVectorBase & fe_face_neighbor = *it.second;
2236 const FEType & fe_type = it.first;
2237
2238 _current_vector_fe_face_neighbor[fe_type] = &fe_face_neighbor;
2239
2240 VectorFEShapeData & fesd = *_vector_fe_shape_data_face_neighbor[fe_type];
2241
2242 fe_face_neighbor.reinit(neighbor, neighbor_side, tolerance, pts, weights);
2243
2244 fesd._phi.shallowCopy(
2245 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face_neighbor.get_phi()));
2246 fesd._grad_phi.shallowCopy(
2247 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_dphi()));
2248 if (_need_second_derivative.count(fe_type))
2249 fesd._second_phi.shallowCopy(const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(
2250 fe_face_neighbor.get_d2phi()));
2251 if (_need_curl.count(fe_type))
2252 fesd._curl_phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(
2253 fe_face_neighbor.get_curl_phi()));
2254 if (_need_face_neighbor_div.count(fe_type))
2255 fesd._div_phi.shallowCopy(
2256 const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_div_phi()));
2257 }
2259 {
2260 mooseAssert(neighbor_dim < _unique_fe_face_neighbor_helper.size(),
2261 "We should be in bounds here");
2262 _unique_fe_face_neighbor_helper[neighbor_dim]->reinit(
2263 neighbor, neighbor_side, tolerance, pts, weights);
2264 }
2265 // During that last loop the helper objects will have been reinitialized as well
2266 // We need to dig out the q_points from it
2268 const_cast<std::vector<Point> &>(_holder_fe_face_neighbor_helper[neighbor_dim]->get_xyz()));
2269}

Referenced by SubProblem::reinitNeighborFaceRef().

◆ reinitNeighborLowerDElem()

void Assembly::reinitNeighborLowerDElem ( const Elem *  elem)

reinitialize a neighboring lower dimensional element

Definition at line 2383 of file Assembly.C.

2384{
2385 mooseAssert(elem->dim() < _mesh_dimension,
2386 "You should be calling reinitNeighborLowerDElem on a lower dimensional element");
2387
2389
2391 return;
2392
2394 // We are in a Cartesian coordinate system and we can just use the element volume method which
2395 // has fast computation for certain element types
2397 else
2398 // We manually compute the volume taking the curvilinear coordinate transformations into
2399 // account
2401}

Referenced by SubProblem::reinitNeighborLowerDElem().

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

1107 {
1108 return _sub_Re[tag_id][var_num];
1109 }

Referenced by TaggingInterface::prepareVectorTagInternal().

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

1125 {
1126 return _sub_Rl[tag_id][var_num];
1127 }

Referenced by TaggingInterface::prepareVectorTagLower().

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

1116 {
1117 return _sub_Rn[tag_id][var_num];
1118 }

Referenced by TaggingInterface::prepareVectorTagNeighbor().

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

972{
973 _ad_dxyzdxi_map.resize(n_qp);
974 _ad_dxidx_map.resize(n_qp);
975 _ad_dxidy_map.resize(n_qp); // 1D element may live in 2D ...
976 _ad_dxidz_map.resize(n_qp); // ... or 3D
977
978 if (dim > 1)
979 {
980 _ad_dxyzdeta_map.resize(n_qp);
981 _ad_detadx_map.resize(n_qp);
982 _ad_detady_map.resize(n_qp);
983 _ad_detadz_map.resize(n_qp);
984
985 if (dim > 2)
986 {
987 _ad_dxyzdzeta_map.resize(n_qp);
988 _ad_dzetadx_map.resize(n_qp);
989 _ad_dzetady_map.resize(n_qp);
990 _ad_dzetadz_map.resize(n_qp);
991 }
992 }
993
994 _ad_jac.resize(n_qp);
995 _ad_JxW.resize(n_qp);
996 if (_calculate_xyz)
997 _ad_q_points.resize(n_qp);
998}

Referenced by computeADFace(), and reinitFE().

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

1839 {
1840 unsigned int pace = (_component_block_diagonal[ivar] ? 0 : nphi);
1841 for (unsigned int k = 0; k < v.size(); ++k, i += ntest, j += pace)
1842 ke(i, j) += v(k);
1843 }

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

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

1865 {
1866 if (ivar == jvar && _component_block_diagonal[ivar])
1867 {
1868 for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1869 ke(i, j) += v(k, k);
1870 }
1871 else
1872 {
1873 const unsigned int saved_j = j;
1874 for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1875 {
1876 j = saved_j;
1877 for (unsigned int l = 0; l < v.cols(); ++l, j += nphi)
1878 ke(i, j) += v(k, l);
1879 }
1880 }
1881 }

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

◆ saveLocalADArray()

void Assembly::saveLocalADArray ( std::vector< ADReal > &  re,
unsigned int  i,
unsigned int  ntest,
const ADRealEigenVector &  v 
) const

Definition at line 3788 of file Assembly.C.

3792{
3793 for (unsigned int j = 0; j < v.size(); ++j, i += ntest)
3794 re[i] += v(j);
3795}

Referenced by ADArrayKernel::computeJacobian().

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

1812 {
1813 for (unsigned int j = 0; j < v.size(); ++j, i += ntest)
1814 re(i) += v(j);
1815 }

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

◆ scalarFieldCouplingEntries()

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

Definition at line 1305 of file Assembly.h.

1306 {
1307 return _cm_sf_entry;
1308 }

Referenced by MortarScalarBase::computeScalarOffDiagJacobian().

◆ secondPhi() [1/6]

const VariablePhiSecond & Assembly::secondPhi ( ) const
inline

Definition at line 1320 of file Assembly.h.

1320{ return _second_phi; }
VariablePhiSecond _second_phi
Definition Assembly.h:2697

Referenced by copyShapes().

◆ secondPhi() [2/6]

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

Definition at line 1458 of file Assembly.h.

1458{ return _second_phi; }

◆ secondPhi() [3/6]

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

Definition at line 1321 of file Assembly.h.

1322 {
1323 return _second_phi;
1324 }

◆ secondPhi() [4/6]

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

Definition at line 1571 of file Assembly.h.

1571{ return _second_phi; }

◆ secondPhi() [5/6]

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

Definition at line 1493 of file Assembly.h.

1494 {
1495 return _vector_second_phi;
1496 }
VectorVariablePhiSecond _vector_second_phi
Definition Assembly.h:2714

◆ secondPhi() [6/6]

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

Definition at line 1372 of file Assembly.h.

1373 {
1374 return _vector_second_phi;
1375 }

◆ secondPhiFace() [1/5]

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

Definition at line 1462 of file Assembly.h.

1462{ return _second_phi_face; }
VariablePhiSecond _second_phi_face
Definition Assembly.h:2701

◆ secondPhiFace() [2/5]

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

Definition at line 1333 of file Assembly.h.

1334 {
1335 return _second_phi_face;
1336 }

Referenced by copyFaceShapes().

◆ secondPhiFace() [3/5]

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

Definition at line 1578 of file Assembly.h.

1579 {
1580 return _second_phi_face;
1581 }

◆ secondPhiFace() [4/5]

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

Definition at line 1514 of file Assembly.h.

1515 {
1517 }
VectorVariablePhiSecond _vector_second_phi_face
Definition Assembly.h:2720

◆ secondPhiFace() [5/5]

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

Definition at line 1393 of file Assembly.h.

1394 {
1396 }

◆ secondPhiFaceNeighbor() [1/5]

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

Definition at line 1482 of file Assembly.h.

1483 {
1485 }
VariablePhiSecond _second_phi_face_neighbor
Definition Assembly.h:2709

◆ secondPhiFaceNeighbor() [2/5]

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

Definition at line 1359 of file Assembly.h.

1360 {
1362 }

Referenced by copyNeighborShapes().

◆ secondPhiFaceNeighbor() [3/5]

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

Definition at line 1604 of file Assembly.h.

1605 {
1607 }

◆ secondPhiFaceNeighbor() [4/5]

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

Definition at line 1555 of file Assembly.h.

1556 {
1558 }
VectorVariablePhiSecond _vector_second_phi_face_neighbor
Definition Assembly.h:2732

◆ secondPhiFaceNeighbor() [5/5]

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

Definition at line 1440 of file Assembly.h.

1441 {
1443 }

◆ secondPhiNeighbor() [1/5]

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

Definition at line 1469 of file Assembly.h.

1470 {
1471 return _second_phi_neighbor;
1472 }
VariablePhiSecond _second_phi_neighbor
Definition Assembly.h:2705

◆ secondPhiNeighbor() [2/5]

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

Definition at line 1346 of file Assembly.h.

1347 {
1348 return _second_phi_neighbor;
1349 }

Referenced by copyNeighborShapes().

◆ secondPhiNeighbor() [3/5]

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

Definition at line 1591 of file Assembly.h.

1592 {
1593 return _second_phi_neighbor;
1594 }

◆ secondPhiNeighbor() [4/5]

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

Definition at line 1535 of file Assembly.h.

1536 {
1538 }
VectorVariablePhiSecond _vector_second_phi_neighbor
Definition Assembly.h:2726

◆ secondPhiNeighbor() [5/5]

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

Definition at line 1416 of file Assembly.h.

1417 {
1419 }

◆ setCachedJacobian()

void Assembly::setCachedJacobian ( GlobalDataKey  )

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

Definition at line 4475 of file Assembly.C.

4476{
4477 for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4478 if (_sys.hasMatrix(tag))
4479 {
4480 // First zero the rows (including the diagonals) to prepare for
4481 // setting the cached values.
4483
4484 // TODO: Use SparseMatrix::set_values() for efficiency
4485 for (MooseIndex(_cached_jacobian_values) i = 0; i < _cached_jacobian_values[tag].size(); ++i)
4487 _cached_jacobian_cols[tag][i],
4488 _cached_jacobian_values[tag][i]);
4489 }
4490
4492}
void clearCachedJacobian()
Clear any currently cached jacobians.
Definition Assembly.C:4505
virtual void zero_rows(std::vector< numeric_index_type > &rows, T diag_value=0.0)
virtual void set(const numeric_index_type i, const numeric_index_type j, const T value)=0

◆ setCoordinateTransformation() [1/2]

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

◆ setCoordinateTransformation() [2/2]

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

Definition at line 1731 of file Assembly.C.

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}

◆ setCurrentBoundaryID()

void Assembly::setCurrentBoundaryID ( BoundaryID  i)
inline

set the current boundary ID

Definition at line 425 of file Assembly.h.

Referenced by SubProblem::setCurrentBoundaryID().

◆ setCurrentLowerDElem()

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

Set the current lower dimensional element.

This may be null

Definition at line 3219 of file Assembly.h.

3220{
3221 _current_lower_d_elem = lower_d_elem;
3222}

Referenced by SubProblem::setCurrentLowerDElem().

◆ setCurrentNeighborSubdomainID()

void Assembly::setCurrentNeighborSubdomainID ( SubdomainID  i)
inline

set the current subdomain ID

Definition at line 493 of file Assembly.h.

Referenced by DisplacedProblem::setNeighborSubdomainID().

◆ setCurrentSubdomainID()

void Assembly::setCurrentSubdomainID ( SubdomainID  i)
inline

◆ setFaceQRule() [1/2]

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

Set the face quadrature rule based on the provided element and side.

Definition at line 1930 of file Assembly.C.

1931{
1932 const auto elem_dimension = elem->dim();
1934 auto rule = qruleFace(elem, side);
1935 if (_current_qrule_face != rule)
1936 setFaceQRule(rule, elem_dimension);
1937}

◆ setFaceQRule() [2/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

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

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

691{
692 // The lower-dimensional quadrature rule matches the face quadrature rule
693 setFaceQRule(qrule, dim);
694
695 _current_qrule_lower = qrule;
696
697 for (auto & it : _fe_lower[dim])
698 it.second->attach_quadrature_rule(qrule);
699 for (auto & it : _vector_fe_lower[dim])
700 it.second->attach_quadrature_rule(qrule);
701 if (!_unique_fe_lower_helper.empty())
702 {
703 mooseAssert(dim < _unique_fe_lower_helper.size(), "We should not be indexing out of bounds");
704 _unique_fe_lower_helper[dim]->attach_quadrature_rule(qrule);
705 }
706}

Referenced by reinitLowerDElem().

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

736{
737 if (order != _qrule_msm->get_order())
738 {
739 // If custom mortar qrule has not yet been specified
741 {
743 const unsigned int dim = _qrule_msm->get_dim();
744 const QuadratureType type = _qrule_msm->type();
745 delete _qrule_msm;
746
747 _qrule_msm = QBase::build(type, dim, order).release();
748 _fe_msm->attach_quadrature_rule(_qrule_msm);
749 }
750 else
751 mooseError("Mortar quadrature_order: ",
752 order,
753 " does not match previously specified quadrature_order: ",
755 ". Quadrature_order (when specified) must match for all mortar constraints.");
756 }
757}
Order get_order() const
virtual QuadratureType type() const=0
unsigned int get_dim() const

Referenced by MortarConstraintBase::MortarConstraintBase().

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

710{
712
713 for (auto & it : _fe_face_neighbor[dim])
714 it.second->attach_quadrature_rule(qrule);
715 for (auto & it : _vector_fe_face_neighbor[dim])
716 it.second->attach_quadrature_rule(qrule);
718 {
719 mooseAssert(dim < _unique_fe_face_neighbor_helper.size(),
720 "We should not be indexing out of bounds");
721 _unique_fe_face_neighbor_helper[dim]->attach_quadrature_rule(qrule);
722 }
723}

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

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

3532{
3533 auto & tag_Re = _sub_Re[vector_tag._type_id];
3534 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3535 for (const auto & var : vars)
3536 setResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3537}
void setResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
Set a local residual block to a global residual vector with proper scaling.
Definition Assembly.C:3287

◆ 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 
)
private

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

Definition at line 3287 of file Assembly.C.

3291{
3292 if (dof_indices.size() > 0)
3293 {
3294 std::vector<dof_id_type> di(dof_indices);
3295 _tmp_Re = res_block;
3296 processLocalResidual(_tmp_Re, di, scaling_factor);
3297 residual.insert(_tmp_Re, di);
3298 }
3299}
virtual void insert(const T *v, const std::vector< numeric_index_type > &dof_indices)

Referenced by setResidual(), and setResidualNeighbor().

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

3543{
3544 auto & tag_Rn = _sub_Rn[vector_tag._type_id];
3545 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3546 for (const auto & var : vars)
3548 residual, tag_Rn[var->number()], var->dofIndicesNeighbor(), var->arrayScalingFactor());
3549}

◆ setVolumeQRule() [1/2]

void Assembly::setVolumeQRule ( const Elem *  elem)

Set the volumetric quadrature rule based on the provided element.

Definition at line 1809 of file Assembly.C.

1810{
1811 unsigned int elem_dimension = elem->dim();
1812 _current_qrule_volume = qrules(elem_dimension).vol.get();
1813 // Make sure the qrule is the right one
1815 setVolumeQRule(_current_qrule_volume, elem_dimension);
1816}

◆ setVolumeQRule() [2/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

Referenced by reinit(), reinit(), and setVolumeQRule().

◆ setXFEM()

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

Set the pointer to the XFEM controller object.

Definition at line 1792 of file Assembly.h.

1792{ _xfem = xfem; }

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

437{ return _current_side; }

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

◆ sideElem()

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

Returns the side element.

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

Definition at line 449 of file Assembly.h.

449{ return _current_side_elem; }

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

455{ return _current_side_volume; }

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

359{ return _current_tangents; }

◆ writeableQRule() [1/2]

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

232{ return _current_qrule; }

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

◆ writeableQRule() [2/2]

libMesh::QBase * Assembly::writeableQRule ( unsigned int  dim,
SubdomainID  block,
InternalDataKey   
)
inline

Returns the pointer to the quadrature of specified block and dimension.

Returns
A pointer.

Definition at line 239 of file Assembly.h.

240 {
241 return qrules(dim, block).vol.get();
242 }

◆ writeableQRuleFace() [1/2]

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

319{ return _current_qrule_face; }

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

◆ writeableQRuleFace() [2/2]

libMesh::QBase * Assembly::writeableQRuleFace ( unsigned int  dim,
SubdomainID  block,
InternalDataKey   
)
inline

Returns the pointer to the quadrature used on a face of specified block and dimension.

Returns
A pointer.

Definition at line 326 of file Assembly.h.

327 {
328 return qrules(dim, block).face.get();
329 }

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

518{ return _current_qrule_neighbor; }

◆ zeroCachedJacobian()

void Assembly::zeroCachedJacobian ( GlobalDataKey  )

Zero out previously-cached Jacobian rows.

Definition at line 4495 of file Assembly.C.

4496{
4497 for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4498 if (_sys.hasMatrix(tag))
4500
4502}

Member Data Documentation

◆ _ad_coord

MooseArray<ADReal> Assembly::_ad_coord
private

The AD version of the current coordinate transformation coefficients.

Definition at line 2418 of file Assembly.h.

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

◆ _ad_curvatures

MooseArray<ADReal> Assembly::_ad_curvatures
protected

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

Referenced by computeFaceMap().

◆ _ad_d2xyzdxi2_map

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

Definition at line 2822 of file Assembly.h.

Referenced by computeFaceMap().

◆ _ad_d2xyzdxideta_map

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

Definition at line 2823 of file Assembly.h.

Referenced by computeFaceMap().

◆ _ad_detadx_map

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

Definition at line 2831 of file Assembly.h.

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

◆ _ad_detady_map

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

Definition at line 2832 of file Assembly.h.

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

◆ _ad_detadz_map

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

Definition at line 2833 of file Assembly.h.

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

◆ _ad_dxidx_map

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

Definition at line 2828 of file Assembly.h.

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

◆ _ad_dxidy_map

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

Definition at line 2829 of file Assembly.h.

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

◆ _ad_dxidz_map

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

Definition at line 2830 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 2820 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 2819 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 2821 of file Assembly.h.

Referenced by computeSinglePointMapAD(), and resizeADMappingObjects().

◆ _ad_dzetadx_map

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

Definition at line 2834 of file Assembly.h.

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

◆ _ad_dzetady_map

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

Definition at line 2835 of file Assembly.h.

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

◆ _ad_dzetadz_map

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

Definition at line 2836 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 2772 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 2774 of file Assembly.h.

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

◆ _ad_jac

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

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

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

◆ _ad_normals

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

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

Referenced by adGradPhi(), feADGradPhi(), 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 2776 of file Assembly.h.

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

◆ _block_diagonal_matrix

bool Assembly::_block_diagonal_matrix
protected

◆ _building_helpers

bool Assembly::_building_helpers
private

Whether we are currently building the FE classes for the helpers.

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

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

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

Referenced by addCachedResidualDirectly(), addCachedResiduals(), cacheResidual(), cacheResidual(), cacheResidualLower(), cacheResidualNeighbor(), cacheResidualNodes(), and clearCachedResiduals().

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

Referenced by addCachedResidualDirectly(), addCachedResiduals(), cacheResidual(), cacheResidual(), cacheResidualLower(), cacheResidualNeighbor(), cacheResidualNodes(), and clearCachedResiduals().

◆ _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 2855 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 2850 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 2310 of file Assembly.h.

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

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

Referenced by addJacobian(), cacheJacobian(), and fieldScalarCouplingEntries().

◆ _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 2331 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 2327 of file Assembly.h.

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

Referenced by addJacobianScalar().

◆ _column_indices

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

Definition at line 2890 of file Assembly.h.

Referenced by cacheJacobian(), and cacheJacobianBlock().

◆ _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 2873 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 2317 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 2314 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 2320 of file Assembly.h.

Referenced by computingResidualAndJacobian().

◆ _coord

MooseArray<Real> Assembly::_coord
private

The current coordinate transformation coefficients.

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

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

◆ _coord_type

Moose::CoordinateSystemType Assembly::_coord_type
private

The coordinate system.

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

Referenced by currentBoundaryID(), and setCurrentBoundaryID().

◆ _current_elem

const Elem* Assembly::_current_elem
protected

◆ _current_elem_volume

Real Assembly::_current_elem_volume
protected

Volume of the current element.

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

Referenced by computeCurrentElemVolume(), reinit(), reinit(), reinit(), reinit(), reinitAtPhysical(), and reinitFVFace().

◆ _current_fe

std::map<FEType, FEBase *> Assembly::_current_fe
private

The "volume" fe object that matches the current elem.

Definition at line 2374 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 2376 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 2512 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 2380 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 2400 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 2378 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 2412 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 2520 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 2561 of file Assembly.h.

Referenced by JxWNeighbor(), and reinitNeighborAtPhysical().

◆ _current_lower_d_elem

const Elem* Assembly::_current_lower_d_elem
protected

The current lower dimensional element.

Definition at line 2623 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 2629 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 2602 of file Assembly.h.

Referenced by neighbor(), reinit(), reinit(), reinit(), reinit(), reinitAtPhysical(), reinitFVFace(), reinitNeighbor(), and reinitNeighborFaceRef().

◆ _current_neighbor_lower_d_elem

const Elem* Assembly::_current_neighbor_lower_d_elem
protected

The current neighboring lower dimensional element.

Definition at line 2625 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 2633 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 2616 of file Assembly.h.

Referenced by nodeNeighbor(), and reinit().

◆ _current_neighbor_ref_points

std::vector<Point> Assembly::_current_neighbor_ref_points
protected

The current reference points on the neighbor element.

Definition at line 2896 of file Assembly.h.

Referenced by reinitElemAndNeighbor(), reinitNeighborAtPhysical(), and reinitNeighborAtPhysical().

◆ _current_neighbor_side

unsigned int Assembly::_current_neighbor_side
protected

The current side of the selected neighboring element (valid only when working with sides)

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

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

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

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

◆ _current_neighbor_subdomain_id

SubdomainID Assembly::_current_neighbor_subdomain_id
protected

The current neighbor subdomain ID.

Definition at line 2604 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 2612 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 2614 of file Assembly.h.

Referenced by node(), and reinit().

◆ _current_normals

MooseArray<Point> Assembly::_current_normals
private

The current Normal vectors at the quadrature points.

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

Referenced by modifyArbitraryWeights(), physicalPoints(), reinitAtPhysical(), reinitNeighborAtPhysical(), reinitNeighborAtPhysical(), and ~Assembly().

◆ _current_q_points

MooseArray<Point> Assembly::_current_q_points
private

The current list of quadrature points.

Definition at line 2410 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 2557 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 2516 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 2402 of file Assembly.h.

Referenced by clearCachedQRules(), computeCurrentElemVolume(), modifyArbitraryWeights(), modifyWeightsDueToXFEM(), qRule(), reinit(), reinitFE(), setVolumeQRule(), and writeableQRule().

◆ _current_qrule_arbitrary

ArbitraryQuadrature* Assembly::_current_qrule_arbitrary
private

The current arbitrary quadrature rule used within the element interior.

Definition at line 2406 of file Assembly.h.

Referenced by modifyArbitraryWeights(), modifyFaceWeightsDueToXFEM(), modifyWeightsDueToXFEM(), reinit(), and reinit().

◆ _current_qrule_arbitrary_face

ArbitraryQuadrature* Assembly::_current_qrule_arbitrary_face
private

The current arbitrary quadrature rule used on the element face.

Definition at line 2408 of file Assembly.h.

Referenced by reinit().

◆ _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 2584 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 2555 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 2404 of file Assembly.h.

Referenced by setVolumeQRule().

◆ _current_side

unsigned int Assembly::_current_side
protected

The current side of the selected element (valid only when working with sides)

Definition at line 2596 of file Assembly.h.

Referenced by reinit(), reinit(), reinitFVFace(), and side().

◆ _current_side_elem

const Elem* Assembly::_current_side_elem
protected

The current "element" making up the side we are currently on.

Definition at line 2598 of file Assembly.h.

Referenced by reinit(), reinit(), 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 2869 of file Assembly.h.

Referenced by reinit(), reinit(), and reinitFVFace().

◆ _current_side_volume

Real Assembly::_current_side_volume
protected

Volume of the current side element.

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

Referenced by computeCurrentFaceVolume(), reinit(), reinit(), and reinitFVFace().

◆ _current_subdomain_id

SubdomainID Assembly::_current_subdomain_id
protected

The current subdomain ID.

Definition at line 2590 of file Assembly.h.

Referenced by currentSubdomainID(), qrules(), reinit(), reinit(), reinit(), reinit(), reinitAtPhysical(), reinitFVFace(), and setCurrentSubdomainID().

◆ _current_tangents

MooseArray<std::vector<Point> > Assembly::_current_tangents
private

The current tangent vectors at the quadrature points.

Definition at line 2526 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 2383 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 2385 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 2389 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 2387 of file Assembly.h.

Referenced by reinitFENeighbor().

◆ _curvatures

MooseArray<Real> Assembly::_curvatures
protected

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

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

◆ _displaced

const bool Assembly::_displaced
private

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

Referenced by cacheJacobian(), and cacheJacobianBlock().

◆ _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 2880 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 2529 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 2394 of file Assembly.h.

Referenced by Assembly(), buildFE(), getFE(), havePRefinement(), reinitFE(), and ~Assembly().

◆ _fe_face

std::map<unsigned int, std::map<FEType, FEBase *> > Assembly::_fe_face
mutableprivate

types of finite elements

Definition at line 2506 of file Assembly.h.

Referenced by Assembly(), buildFaceFE(), computeADFace(), getFEFace(), havePRefinement(), reinitElemFaceRef(), reinitFEFace(), 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 2548 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 2573 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 2538 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 2757 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 2761 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 2696 of file Assembly.h.

Referenced by gradPhi(), gradPhi(), gradPhi(), and gradPhi().

◆ _grad_phi_face

VariablePhiGradient Assembly::_grad_phi_face
protected

Definition at line 2700 of file Assembly.h.

Referenced by gradPhiFace(), gradPhiFace(), gradPhiFace(), and gradPhiFace().

◆ _grad_phi_face_neighbor

VariablePhiGradient Assembly::_grad_phi_face_neighbor
protected

Definition at line 2708 of file Assembly.h.

Referenced by gradPhiFaceNeighbor(), gradPhiFaceNeighbor(), and gradPhiFaceNeighbor().

◆ _grad_phi_neighbor

VariablePhiGradient Assembly::_grad_phi_neighbor
protected

Definition at line 2704 of file Assembly.h.

Referenced by gradPhiNeighbor(), gradPhiNeighbor(), and gradPhiNeighbor().

◆ _have_p_refinement

bool Assembly::_have_p_refinement
protected

Whether we have ever conducted p-refinement.

Definition at line 2893 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 2350 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 2510 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 2398 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 2552 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 2544 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 2533 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 2338 of file Assembly.h.

Referenced by addJacobianLowerD(), addJacobianNeighborLowerD(), cacheJacobianMortar(), jacobianBlockLowerUsed(), 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 2336 of file Assembly.h.

Referenced by addJacobianNeighbor(), addJacobianNeighborLowerD(), cacheJacobianNeighbor(), jacobianBlockNeighborUsed(), 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 2571 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 2524 of file Assembly.h.

Referenced by mappedNormals(), and reinitFEFace().

◆ _max_cached_jacobians

unsigned int Assembly::_max_cached_jacobians
protected

Definition at line 2804 of file Assembly.h.

Referenced by addCachedJacobian().

◆ _max_cached_residuals

unsigned int Assembly::_max_cached_residuals
protected

Definition at line 2795 of file Assembly.h.

Referenced by clearCachedResiduals().

◆ _mesh

MooseMesh& Assembly::_mesh
private

Definition at line 2344 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 2875 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 2860 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 2635 of file Assembly.h.

Referenced by activateDual(), and needDual().

◆ _need_face_div

std::set<FEType> Assembly::_need_face_div
mutableprotected

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

Referenced by JxWNeighbor(), and reinitNeighborAtPhysical().

◆ _need_lower_d_elem_volume

bool Assembly::_need_lower_d_elem_volume
mutableprotected

Whether we need to compute the lower dimensional element volume.

Definition at line 2627 of file Assembly.h.

Referenced by lowerDElemVolume(), and reinitLowerDElem().

◆ _need_neighbor_div

std::set<FEType> Assembly::_need_neighbor_div
mutableprotected

Definition at line 2862 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 2610 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 2631 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 2531 of file Assembly.h.

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

◆ _nonlocal_cm

const libMesh::CouplingMatrix& Assembly::_nonlocal_cm
private

Definition at line 2311 of file Assembly.h.

Referenced by initNonlocalCoupling().

◆ _phi

VariablePhiValue Assembly::_phi
protected

Definition at line 2695 of file Assembly.h.

Referenced by phi(), phi(), phi(), and phi().

◆ _phi_face

VariablePhiValue Assembly::_phi_face
protected

Definition at line 2699 of file Assembly.h.

Referenced by phiFace(), phiFace(), phiFace(), and phiFace().

◆ _phi_face_neighbor

VariablePhiValue Assembly::_phi_face_neighbor
protected

Definition at line 2707 of file Assembly.h.

Referenced by phiFaceNeighbor(), phiFaceNeighbor(), and phiFaceNeighbor().

◆ _phi_neighbor

VariablePhiValue Assembly::_phi_neighbor
protected

Definition at line 2703 of file Assembly.h.

Referenced by phiNeighbor(), phiNeighbor(), and 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 2578 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 2451 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 2787 of file Assembly.h.

Referenced by clearCachedResiduals().

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

Referenced by cacheJacobian(), cacheJacobianBlock(), and cacheResiduals().

◆ _scaling_vector

const NumericVector<Real>* Assembly::_scaling_vector = nullptr
protected

The map from global index to variable scaling factor.

Definition at line 2866 of file Assembly.h.

Referenced by hasScalingVector().

◆ _second_phi

VariablePhiSecond Assembly::_second_phi
protected

Definition at line 2697 of file Assembly.h.

Referenced by secondPhi(), secondPhi(), secondPhi(), and secondPhi().

◆ _second_phi_face

VariablePhiSecond Assembly::_second_phi_face
protected

Definition at line 2701 of file Assembly.h.

Referenced by secondPhiFace(), secondPhiFace(), and secondPhiFace().

◆ _second_phi_face_neighbor

VariablePhiSecond Assembly::_second_phi_face_neighbor
protected

◆ _second_phi_neighbor

VariablePhiSecond Assembly::_second_phi_neighbor
protected

Definition at line 2705 of file Assembly.h.

Referenced by secondPhiNeighbor(), secondPhiNeighbor(), and secondPhiNeighbor().

◆ _sub_Kee

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kee
protected

Definition at line 2671 of file Assembly.h.

Referenced by jacobianBlock(), jacobianBlockMortar(), and jacobianBlockNeighbor().

◆ _sub_Keg

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Keg
protected

Definition at line 2672 of file Assembly.h.

Referenced by jacobianBlockNonlocal().

◆ _sub_Kel

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kel
protected

dsecondary/dlower (or delement/dlower)

Definition at line 2687 of file Assembly.h.

Referenced by 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 2675 of file Assembly.h.

Referenced by 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 2683 of file Assembly.h.

Referenced by jacobianBlockMortar().

◆ _sub_Kll

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kll
protected

dlower/dlower

Definition at line 2681 of file Assembly.h.

Referenced by jacobianBlockMortar().

◆ _sub_Kln

std::vector<std::vector<std::vector<DenseMatrix<Number> > > > Assembly::_sub_Kln
protected

dlower/dprimary (or dlower/dneighbor)

Definition at line 2685 of file Assembly.h.

Referenced by 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 2677 of file Assembly.h.

Referenced by 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 2689 of file Assembly.h.

Referenced by 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 2679 of file Assembly.h.

Referenced by 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 2655 of file Assembly.h.

Referenced by addResidualLower(), cacheResidualLower(), 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 2813 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 2816 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 2692 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 2658 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 2362 of file Assembly.h.

Referenced by havePRefinement(), reinitElemFaceRef(), and reinitFEFace().

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

Referenced by havePRefinement(), and reinitFE().

◆ _unique_fe_lower_helper

std::vector<std::unique_ptr<FEBase> > Assembly::_unique_fe_lower_helper
private

Definition at line 2365 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 2364 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 2355 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 2354 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 2357 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 2356 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 2353 of file Assembly.h.

Referenced by buildFE(), and havePRefinement().

◆ _vector_curl_phi

VectorVariablePhiCurl Assembly::_vector_curl_phi
protected

Definition at line 2715 of file Assembly.h.

Referenced by curlPhi(), and curlPhi().

◆ _vector_curl_phi_face

VectorVariablePhiCurl Assembly::_vector_curl_phi_face
protected

Definition at line 2721 of file Assembly.h.

Referenced by copyFaceShapes(), curlPhiFace(), and curlPhiFace().

◆ _vector_curl_phi_face_neighbor

VectorVariablePhiCurl Assembly::_vector_curl_phi_face_neighbor
protected

Definition at line 2733 of file Assembly.h.

Referenced by curlPhiFaceNeighbor(), and curlPhiFaceNeighbor().

◆ _vector_curl_phi_neighbor

VectorVariablePhiCurl Assembly::_vector_curl_phi_neighbor
protected

Definition at line 2727 of file Assembly.h.

Referenced by curlPhiNeighbor(), and curlPhiNeighbor().

◆ _vector_div_phi

VectorVariablePhiDivergence Assembly::_vector_div_phi
protected

Definition at line 2716 of file Assembly.h.

Referenced by divPhi(), and divPhi().

◆ _vector_div_phi_face

VectorVariablePhiDivergence Assembly::_vector_div_phi_face
protected

Definition at line 2722 of file Assembly.h.

Referenced by copyFaceShapes(), divPhiFace(), and divPhiFace().

◆ _vector_div_phi_face_neighbor

VectorVariablePhiDivergence Assembly::_vector_div_phi_face_neighbor
protected

Definition at line 2734 of file Assembly.h.

Referenced by divPhiFaceNeighbor(), and divPhiFaceNeighbor().

◆ _vector_div_phi_neighbor

VectorVariablePhiDivergence Assembly::_vector_div_phi_neighbor
protected

Definition at line 2728 of file Assembly.h.

Referenced by divPhiNeighbor(), and 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 2396 of file Assembly.h.

Referenced by buildVectorFE(), getVectorFE(), havePRefinement(), reinitFE(), 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 2508 of file Assembly.h.

Referenced by buildVectorFaceFE(), computeADFace(), getVectorFEFace(), havePRefinement(), reinitElemFaceRef(), reinitFEFace(), 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 2550 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 2765 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 2770 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 2766 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 2769 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 2767 of file Assembly.h.

Referenced by buildVectorNeighborFE(), and reinitFENeighbor().

◆ _vector_grad_phi

VectorVariablePhiGradient Assembly::_vector_grad_phi
protected

Definition at line 2713 of file Assembly.h.

Referenced by gradPhi(), and gradPhi().

◆ _vector_grad_phi_face

VectorVariablePhiGradient Assembly::_vector_grad_phi_face
protected

Definition at line 2719 of file Assembly.h.

Referenced by gradPhiFace(), and gradPhiFace().

◆ _vector_grad_phi_face_neighbor

VectorVariablePhiGradient Assembly::_vector_grad_phi_face_neighbor
protected

Definition at line 2731 of file Assembly.h.

Referenced by gradPhiFaceNeighbor(), and gradPhiFaceNeighbor().

◆ _vector_grad_phi_neighbor

VectorVariablePhiGradient Assembly::_vector_grad_phi_neighbor
protected

Definition at line 2725 of file Assembly.h.

Referenced by gradPhiNeighbor(), and gradPhiNeighbor().

◆ _vector_phi

VectorVariablePhiValue Assembly::_vector_phi
protected

Definition at line 2712 of file Assembly.h.

Referenced by phi(), and phi().

◆ _vector_phi_face

VectorVariablePhiValue Assembly::_vector_phi_face
protected

Definition at line 2718 of file Assembly.h.

Referenced by phiFace(), and phiFace().

◆ _vector_phi_face_neighbor

VectorVariablePhiValue Assembly::_vector_phi_face_neighbor
protected

Definition at line 2730 of file Assembly.h.

Referenced by phiFaceNeighbor(), and phiFaceNeighbor().

◆ _vector_phi_neighbor

VectorVariablePhiValue Assembly::_vector_phi_neighbor
protected

Definition at line 2724 of file Assembly.h.

Referenced by phiNeighbor(), and phiNeighbor().

◆ _vector_second_phi

VectorVariablePhiSecond Assembly::_vector_second_phi
protected

Definition at line 2714 of file Assembly.h.

Referenced by secondPhi(), and secondPhi().

◆ _vector_second_phi_face

VectorVariablePhiSecond Assembly::_vector_second_phi_face
protected

Definition at line 2720 of file Assembly.h.

Referenced by secondPhiFace(), and secondPhiFace().

◆ _vector_second_phi_face_neighbor

VectorVariablePhiSecond Assembly::_vector_second_phi_face_neighbor
protected

Definition at line 2732 of file Assembly.h.

Referenced by secondPhiFaceNeighbor(), and secondPhiFaceNeighbor().

◆ _vector_second_phi_neighbor

VectorVariablePhiSecond Assembly::_vector_second_phi_neighbor
protected

Definition at line 2726 of file Assembly.h.

Referenced by secondPhiNeighbor(), and secondPhiNeighbor().

◆ _xfem

std::shared_ptr<XFEMInterface> Assembly::_xfem
private

The XFEM controller.

Definition at line 2371 of file Assembly.h.

Referenced by modifyFaceWeightsDueToXFEM(), modifyWeightsDueToXFEM(), reinitFE(), reinitFEFace(), and setXFEM().


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