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::QBase * writeableQRule (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::CoordinateSystemType & coordSystem () 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::QBase * writeableQRuleFace (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 SubdomainID & currentSubdomainID () const
 Return the current subdomain ID.
 
void setCurrentSubdomainID (SubdomainID i)
 set the current subdomain ID
 
const BoundaryID & currentBoundaryID () 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 int & side () const
 Returns the current side.
 
const unsigned int & neighborSide () 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 SubdomainID & currentNeighborSubdomainID () 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 VariablePhiValue & phi () const
 
template<typename T >
const ADTemplateVariablePhiGradient< T > & adGradPhi (const MooseVariableFE< T > &v) const
 
const VariablePhiValue & phi (const MooseVariableField< Real > &) const
 
const VariablePhiGradient & gradPhi () const
 
const VariablePhiGradient & gradPhi (const MooseVariableField< Real > &) const
 
const VariablePhiSecond & secondPhi () const
 
const VariablePhiSecond & secondPhi (const MooseVariableField< Real > &) const
 
const VariablePhiValue & phiFace () const
 
const VariablePhiValue & phiFace (const MooseVariableField< Real > &) const
 
const VariablePhiGradient & gradPhiFace () const
 
const VariablePhiGradient & gradPhiFace (const MooseVariableField< Real > &) const
 
const VariablePhiSecond & secondPhiFace (const MooseVariableField< Real > &) const
 
const VariablePhiValue & phiNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiGradient & gradPhiNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiSecond & secondPhiNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiValue & phiFaceNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiGradient & gradPhiFaceNeighbor (const MooseVariableField< Real > &) const
 
const VariablePhiSecond & secondPhiFaceNeighbor (const MooseVariableField< Real > &) const
 
const VectorVariablePhiValue & phi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiGradient & gradPhi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiSecond & secondPhi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiCurl & curlPhi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiDivergence & divPhi (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiValue & phiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiGradient & gradPhiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiSecond & secondPhiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiCurl & curlPhiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiDivergence & divPhiFace (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiValue & phiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiGradient & gradPhiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiSecond & secondPhiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiCurl & curlPhiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiDivergence & divPhiNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiValue & phiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiGradient & gradPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiSecond & secondPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiCurl & curlPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
const VectorVariablePhiDivergence & divPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &) const
 
VariablePhiValue & phi (const MooseVariableField< Real > &)
 
VariablePhiGradient & gradPhi (const MooseVariableField< Real > &)
 
VariablePhiSecond & secondPhi (const MooseVariableField< Real > &)
 
VariablePhiValue & phiFace (const MooseVariableField< Real > &)
 
VariablePhiGradient & gradPhiFace (const MooseVariableField< Real > &)
 
VariablePhiSecond & secondPhiFace (const MooseVariableField< Real > &)
 
VariablePhiValue & phiNeighbor (const MooseVariableField< Real > &)
 
VariablePhiGradient & gradPhiNeighbor (const MooseVariableField< Real > &)
 
VariablePhiSecond & secondPhiNeighbor (const MooseVariableField< Real > &)
 
VariablePhiValue & phiFaceNeighbor (const MooseVariableField< Real > &)
 
VariablePhiGradient & gradPhiFaceNeighbor (const MooseVariableField< Real > &)
 
VariablePhiSecond & secondPhiFaceNeighbor (const MooseVariableField< Real > &)
 
VectorVariablePhiValue & phi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiGradient & gradPhi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiSecond & secondPhi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiCurl & curlPhi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiDivergence & divPhi (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiValue & phiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiGradient & gradPhiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiSecond & secondPhiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiCurl & curlPhiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiDivergence & divPhiFace (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiValue & phiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiGradient & gradPhiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiSecond & secondPhiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiCurl & curlPhiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiDivergence & divPhiNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiValue & phiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiGradient & gradPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiSecond & secondPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiCurl & curlPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VectorVariablePhiDivergence & divPhiFaceNeighbor (const MooseVariableField< RealVectorValue > &)
 
VariablePhiValue & phi (const MooseVariableField< RealEigenVector > &)
 
VariablePhiGradient & gradPhi (const MooseVariableField< RealEigenVector > &)
 
VariablePhiSecond & secondPhi (const MooseVariableField< RealEigenVector > &)
 
VariablePhiValue & phiFace (const MooseVariableField< RealEigenVector > &)
 
VariablePhiGradient & gradPhiFace (const MooseVariableField< RealEigenVector > &)
 
VariablePhiSecond & secondPhiFace (const MooseVariableField< RealEigenVector > &)
 
VariablePhiValue & phiNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiGradient & gradPhiNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiSecond & secondPhiNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiValue & phiFaceNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiGradient & gradPhiFaceNeighbor (const MooseVariableField< RealEigenVector > &)
 
VariablePhiSecond & secondPhiFaceNeighbor (const MooseVariableField< RealEigenVector > &)
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValue & fePhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradient & feGradPhi (FEType type) const
 
template<typename OutputType >
const ADTemplateVariablePhiGradient< OutputType > & feADGradPhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecond & feSecondPhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValue & fePhiLower (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValue & feDualPhiLower (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiLower (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradient & feGradDualPhiLower (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValue & fePhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiFace (FEType type) const
 
template<typename OutputType >
const ADTemplateVariablePhiGradient< OutputType > & feADGradPhiFace (FEType type) const
 
void needADGradPhiFace () const
 Request that face reinitialization compute the AD shape function gradients.
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecond & feSecondPhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValue & fePhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecond & feSecondPhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiValue & fePhiFaceNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiFaceNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiSecond & feSecondPhiFaceNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiFaceNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiDivergence & feDivPhi (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiDivergence & feDivPhiFace (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiDivergence & feDivPhiNeighbor (FEType type) const
 
template<typename OutputType >
const OutputTools< OutputType >::VariablePhiDivergence & feDivPhiFaceNeighbor (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::QBase * attachQRuleElem (unsigned int dim, FEBase &fe)
 Attaches the current elem/volume quadrature rule to the given fe.
 
const libMesh::QBase * attachQRuleFace (unsigned int dim, FEBase &fe)
 Attaches the current face/area quadrature rule to the given fe.
 
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 preparePRefinement ()
 Prepare helper FEs for 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 > >::VariablePhiValue & fePhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecond & feSecondPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & fePhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & feDualPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradDualPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & fePhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecond & feSecondPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & fePhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecond & feSecondPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & fePhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecond & feSecondPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurl & feCurlPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurl & feCurlPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurl & feCurlPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurl & feCurlPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergence & feDivPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergence & feDivPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergence & feDivPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergence & feDivPhiFaceNeighbor (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 > >::VariablePhiValue & fePhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecond & feSecondPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & fePhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & feDualPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradDualPhiLower (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & fePhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecond & feSecondPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & fePhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecond & feSecondPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiValue & fePhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiGradient & feGradPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiSecond & feSecondPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurl & feCurlPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurl & feCurlPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurl & feCurlPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiCurl & feCurlPhiFaceNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergence & feDivPhi (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergence & feDivPhiFace (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergence & feDivPhiNeighbor (FEType type) const
 
template<>
const OutputTools< VectorValue< Real > >::VariablePhiDivergence & feDivPhiFaceNeighbor (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
 
bool _need_ad_grad_phi_face = false
 Whether any object needs the AD face shape function gradients.
 
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
 
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 _prepared_for_p_refinement
 Whether helper FEs have been prepared for 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::QBase * qruleFace (const Elem *elem, unsigned int side)
 This is an abstraction over the internal qrules function.
 
ArbitraryQuadrature * qruleArbitraryFace (const Elem *elem, unsigned int side)
 
template<typename T >
T * qruleFaceHelper (const Elem *elem, unsigned int side, std::function< T *(QRules &)> rule_fn)
 
QRules & qrules (unsigned int dim)
 
QRules & qrules (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 101 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 220 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()),
92 FEType(_mesh.hasSecondOrderElements() ? SECOND : FIRST, LAGRANGE).set_p_refinement(false)),
98 _building_helpers(false),
99 _current_qrule(nullptr),
100 _current_qrule_volume(nullptr),
103 _current_qrule_face(nullptr),
106 _need_JxW_neighbor(false),
107 _qrule_msm(nullptr),
109 _current_qrule_lower(nullptr),
110
111 _current_elem(nullptr),
113 _current_side(0),
114 _current_side_elem(nullptr),
116 _current_neighbor_elem(nullptr),
121 _current_node(nullptr),
122 _current_neighbor_node(nullptr),
125
126 _current_lower_d_elem(nullptr),
130 _need_dual(false),
131
133 _cached_residual_values(2), // The 2 is for TIME and NONTIME
134 _cached_residual_rows(2), // The 2 is for TIME and NONTIME
137
139 _calculate_xyz(false),
140 _calculate_face_xyz(false),
142 _calculate_ad_coord(false),
144{
145 const Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
146 _building_helpers = true;
147 // Build fe's for the helpers
153 _building_helpers = false;
154
155 // Build an FE helper object for this type for each dimension up to the dimension of the current
156 // mesh
157 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
158 {
163 }
164
165 for (unsigned int dim = 0; dim < _mesh_dimension; dim++)
167
168 // request phi, dphi, xyz, JxW, etc. data
170
171 // For 3D mortar, mortar segments are always TRI3 elements so we want FIRST LAGRANGE regardless
172 // of discretization
173 const auto mortar_helper_type =
174 FEType(_mesh_dimension == 2 ? helper_order : FIRST, LAGRANGE).set_p_refinement(false);
175 _fe_msm = FEGenericBase<Real>::build(_mesh_dimension - 1, mortar_helper_type);
176 // This FE object should not take part in p-refinement
177 _fe_msm->add_p_level_in_reinit(false);
178 _JxW_msm = &_fe_msm->get_JxW();
179 // Prerequest xyz so that it is computed for _fe_msm so that it can be used for calculating
180 // _coord_msm
181 _fe_msm->get_xyz();
182
183 _extra_elem_ids.resize(_mesh.getMesh().n_elem_integers() + 1);
184 _neighbor_extra_elem_ids.resize(_mesh.getMesh().n_elem_integers() + 1);
185}
unsigned int dim
SystemBase & _sys
Definition Assembly.h:2300
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points
Definition Assembly.h:2548
const bool & _computing_jacobian
Whether we are currently computing the Jacobian.
Definition Assembly.h:2313
const std::vector< Real > * _JxW_msm
A JxW for working on mortar segement elements.
Definition Assembly.h:2567
const bool _displaced
Definition Assembly.h:2303
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition Assembly.h:2510
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:2616
const FEType _helper_type
The finite element type of the FE helper classes.
Definition Assembly.h:2346
Real _current_elem_volume
Volume of the current element.
Definition Assembly.h:2590
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition Assembly.h:2364
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition Assembly.h:2398
const bool & _computing_residual
Whether we are currently computing the residual.
Definition Assembly.h:2310
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
Definition Assembly.h:2555
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
Definition Assembly.h:2349
bool _calculate_xyz
Definition Assembly.h:2849
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition Assembly.C:346
const libMesh::CouplingMatrix & _nonlocal_cm
Definition Assembly.h:2307
Real _current_neighbor_volume
Volume of the current neighbor.
Definition Assembly.h:2608
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition Assembly.h:2627
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition Assembly.h:2410
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition Assembly.h:2544
const libMesh::DofMap & _dof_map
DOF map.
Definition Assembly.h:2336
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition Assembly.h:2535
bool _prepared_for_p_refinement
Whether helper FEs have been prepared for p-refinement.
Definition Assembly.h:2890
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition Assembly.h:2619
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition Assembly.h:2592
const bool & _computing_residual_and_jacobian
Whether we are currently computing the residual and Jacobian.
Definition Assembly.h:2316
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition Assembly.C:321
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition Assembly.h:2569
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition Assembly.h:2612
void buildFE(FEType type) const
Build FEs with a type.
Definition Assembly.C:267
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition Assembly.h:2604
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:4854
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition Assembly.h:2551
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition Assembly.C:371
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition Assembly.h:2534
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension's actual fe objects indexed on type.
Definition Assembly.h:2390
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition Assembly.h:2614
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition Assembly.h:2502
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:2598
bool _user_added_fe_face_neighbor_of_helper_type
Definition Assembly.h:2351
MooseMesh & _mesh
Definition Assembly.h:2340
ArbitraryQuadrature * _current_qface_arbitrary
The current arbitrary quadrature rule used on element faces.
Definition Assembly.h:2512
const Node * _current_node
The current node we are working with.
Definition Assembly.h:2610
THREAD_ID _tid
Thread number (id)
Definition Assembly.h:2338
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:2402
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition Assembly.h:2527
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:296
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition Assembly.h:2541
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh.
Definition Assembly.h:2576
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition Assembly.h:2623
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition Assembly.h:2606
SubProblem & _subproblem
Definition Assembly.h:2301
Real _current_side_volume
Volume of the current side element.
Definition Assembly.h:2596
bool _user_added_fe_neighbor_of_helper_type
Definition Assembly.h:2352
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension's helper objects.
Definition Assembly.h:2540
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition Assembly.h:2574
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:2594
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:2394
const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
Definition Assembly.h:2621
libMesh::QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition Assembly.h:2580
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides)
Definition Assembly.h:2602
const Elem * _current_elem
The current "element" we are currently on.
Definition Assembly.h:2584
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension's helper objects.
Definition Assembly.h:2506
libMesh::QBase * _current_qrule_volume
The current volumetric quadrature for the element.
Definition Assembly.h:2400
bool _user_added_fe_face_of_helper_type
Definition Assembly.h:2350
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition Assembly.h:2525
bool _user_added_fe_lower_of_helper_type
Definition Assembly.h:2353
unsigned int _mesh_dimension
Definition Assembly.h:2342
bool _need_dual
Whether dual shape functions need to be computed for mortar constraints.
Definition Assembly.h:2631
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition MooseMesh.C:3512
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition MooseMesh.C:3779
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

◆ ~Assembly()

Assembly::~Assembly ( )
virtual

Definition at line 187 of file Assembly.C.

188{
189 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
190 for (auto & it : _fe[dim])
191 delete it.second;
192
193 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
194 for (auto & it : _fe_face[dim])
195 delete it.second;
196
197 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
198 for (auto & it : _fe_neighbor[dim])
199 delete it.second;
200
201 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
202 for (auto & it : _fe_face_neighbor[dim])
203 delete it.second;
204
205 for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
206 for (auto & it : _fe_lower[dim])
207 delete it.second;
208
209 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
210 for (auto & it : _vector_fe[dim])
211 delete it.second;
212
213 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
214 for (auto & it : _vector_fe_face[dim])
215 delete it.second;
216
217 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
218 for (auto & it : _vector_fe_neighbor[dim])
219 delete it.second;
220
221 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
222 for (auto & it : _vector_fe_face_neighbor[dim])
223 delete it.second;
224
225 for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
226 for (auto & it : _vector_fe_lower[dim])
227 delete it.second;
228
229 for (auto & it : _ad_grad_phi_data)
230 it.second.release();
231
232 for (auto & it : _ad_vector_grad_phi_data)
233 it.second.release();
234
235 for (auto & it : _ad_grad_phi_data_face)
236 it.second.release();
237
238 for (auto & it : _ad_vector_grad_phi_data_face)
239 it.second.release();
240
242
243 _coord.release();
246
255
256 delete _qrule_msm;
257}
MooseArray< Real > _curvatures
Definition Assembly.h:2841
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition Assembly.h:2559
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:2634
MooseArray< VectorValue< ADReal > > _ad_normals
Definition Assembly.h:2839
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition Assembly.h:2769
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension's actual vector fe objects indexed on type.
Definition Assembly.h:2392
MooseArray< ADReal > _ad_JxW_face
Definition Assembly.h:2838
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition Assembly.h:2536
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:2504
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition Assembly.h:2772
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition Assembly.h:2546
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition Assembly.h:2770
MooseArray< ADReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition Assembly.h:2414
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition Assembly.h:2412
MooseArray< ADReal > _ad_curvatures
Definition Assembly.h:2842
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition Assembly.h:2768
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:2537
MooseArray< Real > _coord_msm
The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment m...
Definition Assembly.h:2562
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 609 of file Assembly.h.

609{ _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 292 of file Assembly.h.

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

◆ adCurvatures()

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

Definition at line 4843 of file Assembly.C.

4844{
4845 _calculate_curvatures = true;
4846 // Must prerequest the second derivatives. Sadly because there is only one
4847 // _need_second_derivative map for both volumetric and face FE objects we must request both here
4848 feSecondPhi<Real>(_helper_type);
4849 feSecondPhiFace<Real>(_helper_type);
4850 return _ad_curvatures;
4851}

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

3853{
3854#ifndef NDEBUG
3856 {
3857 mooseAssert(_cached_jacobian_rows.size() == _cached_jacobian_cols.size(),
3858 "Error: Cached data sizes MUST be the same!");
3859 for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3860 mooseAssert(_cached_jacobian_rows[i].size() == _cached_jacobian_cols[i].size(),
3861 "Error: Cached data sizes MUST be the same for a given tag!");
3862 }
3863#endif
3864
3865 for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3866 if (_sys.hasMatrix(i))
3867 for (MooseIndex(_cached_jacobian_rows[i]) j = 0; j < _cached_jacobian_rows[i].size(); j++)
3871
3872 for (MooseIndex(_cached_jacobian_rows) i = 0; i < _cached_jacobian_rows.size(); i++)
3873 {
3874 if (!_sys.hasMatrix(i))
3875 continue;
3876
3879
3880 // Try to be more efficient from now on
3881 // The 2 is just a fudge factor to keep us from having to grow the vector during assembly
3882 _cached_jacobian_values[i].clear();
3884
3885 _cached_jacobian_rows[i].clear();
3887
3888 _cached_jacobian_cols[i].clear();
3890 }
3891}
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:391
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 3567 of file Assembly.C.

3570{
3571 const auto & values = _cached_residual_values[vector_tag._type_id];
3572 const auto & rows = _cached_residual_rows[vector_tag._type_id];
3573
3574 mooseAssert(values.size() == rows.size(),
3575 "Number of cached residuals and number of rows must match!");
3576
3577 if (!values.empty())
3578 {
3579 residual.add_vector(values, rows);
3580 clearCachedResiduals(vector_tag);
3581 }
3582}
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:3537
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 3522 of file Assembly.C.

3523{
3524 for (const auto & vector_tag : tags)
3525 {
3526 if (!_sys.hasVector(vector_tag._id))
3527 {
3528 _cached_residual_values[vector_tag._type_id].clear();
3529 _cached_residual_rows[vector_tag._type_id].clear();
3530 continue;
3531 }
3532 addCachedResidualDirectly(_sys.getVector(vector_tag._id), GlobalDataKey{}, vector_tag);
3533 }
3534}
void addCachedResidualDirectly(NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
Adds the values that have been cached by calling cacheResidual(), cacheResidualNeighbor(),...
Definition Assembly.C:3567
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition SystemBase.C:924
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition SystemBase.C:933

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

◆ addJacobian()

void Assembly::addJacobian ( GlobalDataKey  )

Adds all local Jacobian to the global Jacobian matrices.

Definition at line 3909 of file Assembly.C.

3910{
3911 for (const auto & it : _cm_ff_entry)
3912 addJacobianCoupledVarPair(*it.first, *it.second);
3913
3914 for (const auto & it : _cm_sf_entry)
3915 addJacobianCoupledVarPair(*it.first, *it.second);
3916
3917 for (const auto & it : _cm_fs_entry)
3918 addJacobianCoupledVarPair(*it.first, *it.second);
3919}
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition Assembly.h:2323
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition Assembly.h:2319
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:3894
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition Assembly.h:2321

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

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

4343{
4344 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
4345 return;
4346 if (jacobian.n() == 0 || jacobian.m() == 0)
4347 return;
4348 if (!(*_cm)(ivar, jvar))
4349 return;
4350
4351 auto & iv = _sys.getVariable(_tid, ivar);
4352 auto & jv = _sys.getVariable(_tid, jvar);
4353 auto & scaling_factor = iv.arrayScalingFactor();
4354
4355 const unsigned int ivn = iv.number();
4356 const unsigned int jvn = jv.number();
4357 auto & keg = jacobianBlockNonlocal(ivn, jvn, LocalDataKey{}, tag);
4358
4359 // It is guaranteed by design iv.number <= ivar since iv is obtained
4360 // through SystemBase::getVariable with ivar.
4361 // Most of times ivar will just be equal to iv.number except for array variables,
4362 // where ivar could be a number for a component of an array variable but calling
4363 // getVariable will return the array variable that has the number of the 0th component.
4364 // It is the same for jvar.
4365 const unsigned int i = ivar - ivn;
4366 const unsigned int j = jvar - jvn;
4367
4368 // DoF indices are independently given
4369 auto di = idof_indices;
4370 auto dj = jdof_indices;
4371
4372 auto indof = di.size();
4373 auto jndof = dj.size();
4374
4375 unsigned int jj = j;
4376 if (ivar == jvar && _component_block_diagonal[ivn])
4377 jj = 0;
4378
4379 auto sub = keg.sub_matrix(i * indof, indof, jj * jndof, jndof);
4380 // If we're computing the jacobian for automatically scaling variables we do not want to
4381 // constrain the element matrix because it introduces 1s on the diagonal for the constrained
4382 // dofs
4384 dof_map.constrain_element_matrix(sub, di, dj, false);
4385
4386 if (scaling_factor[i] != 1.0)
4387 sub *= scaling_factor[i];
4388
4389 jacobian.add_matrix(sub, di, dj);
4390}
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:1145
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
Definition SystemBase.C:92
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 4393 of file Assembly.C.

4401{
4402 for (auto tag : tags)
4404 jacobian, ivar, jvar, dof_map, idof_indices, jdof_indices, GlobalDataKey{}, tag);
4405}
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:4335

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

4274{
4275 for (auto tag : tags)
4276 addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices, GlobalDataKey{}, tag);
4277}
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 3894 of file Assembly.C.

3895{
3896 auto i = ivar.number();
3897 auto j = jvar.number();
3898 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
3899 if (jacobianBlockUsed(tag, i, j) && _sys.hasMatrix(tag))
3901 jacobianBlock(i, j, LocalDataKey{}, tag),
3902 ivar,
3903 jvar,
3904 ivar.dofIndices(),
3905 jvar.dofIndices());
3906}
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:2227
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:1134
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition Assembly.h:2329
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 4060 of file Assembly.C.

4061{
4062 for (const auto & it : _cm_ff_entry)
4063 {
4064 auto ivar = it.first;
4065 auto jvar = it.second;
4066 auto i = ivar->number();
4067 auto j = jvar->number();
4068 for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
4069 tag++)
4070 if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
4071 {
4073 jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
4074 *ivar,
4075 *jvar,
4076 ivar->dofIndicesLower(),
4077 jvar->dofIndicesLower());
4078
4080 jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
4081 *ivar,
4082 *jvar,
4083 ivar->dofIndicesLower(),
4084 jvar->dofIndices());
4085
4087 jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
4088 *ivar,
4089 *jvar,
4090 ivar->dofIndices(),
4091 jvar->dofIndicesLower());
4092 }
4093 }
4094}
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:2263
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:3213
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:2334
@ 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 3944 of file Assembly.C.

3945{
3946 for (const auto & it : _cm_ff_entry)
3947 {
3948 auto ivar = it.first;
3949 auto jvar = it.second;
3950 auto i = ivar->number();
3951 auto j = jvar->number();
3952 for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
3953 tag < _jacobian_block_neighbor_used.size();
3954 tag++)
3955 if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
3956 {
3958 jacobianBlockNeighbor(Moose::ElementNeighbor, i, j, LocalDataKey{}, tag),
3959 *ivar,
3960 *jvar,
3961 ivar->dofIndices(),
3962 jvar->dofIndicesNeighbor());
3963
3965 jacobianBlockNeighbor(Moose::NeighborElement, i, j, LocalDataKey{}, tag),
3966 *ivar,
3967 *jvar,
3968 ivar->dofIndicesNeighbor(),
3969 jvar->dofIndices());
3970
3972 jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
3973 *ivar,
3974 *jvar,
3975 ivar->dofIndicesNeighbor(),
3976 jvar->dofIndicesNeighbor());
3977 }
3978 }
3979}
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:2332
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:3172
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:2245
@ 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 3982 of file Assembly.C.

3983{
3984 for (const auto & it : _cm_ff_entry)
3985 {
3986 auto ivar = it.first;
3987 auto jvar = it.second;
3988 auto i = ivar->number();
3989 auto j = jvar->number();
3990 for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
3991 tag++)
3992 if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
3993 {
3995 jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
3996 *ivar,
3997 *jvar,
3998 ivar->dofIndicesLower(),
3999 jvar->dofIndicesLower());
4000
4002 jacobianBlockMortar(Moose::LowerSecondary, i, j, LocalDataKey{}, tag),
4003 *ivar,
4004 *jvar,
4005 ivar->dofIndicesLower(),
4006 jvar->dofIndicesNeighbor());
4007
4009 jacobianBlockMortar(Moose::LowerPrimary, i, j, LocalDataKey{}, tag),
4010 *ivar,
4011 *jvar,
4012 ivar->dofIndicesLower(),
4013 jvar->dofIndices());
4014
4016 jacobianBlockMortar(Moose::SecondaryLower, i, j, LocalDataKey{}, tag),
4017 *ivar,
4018 *jvar,
4019 ivar->dofIndicesNeighbor(),
4020 jvar->dofIndicesLower());
4021
4023 jacobianBlockMortar(Moose::PrimaryLower, i, j, LocalDataKey{}, tag),
4024 *ivar,
4025 *jvar,
4026 ivar->dofIndices(),
4027 jvar->dofIndicesLower());
4028 }
4029
4030 for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
4031 tag < _jacobian_block_neighbor_used.size();
4032 tag++)
4033 if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
4034 {
4036 jacobianBlockNeighbor(Moose::ElementNeighbor, i, j, LocalDataKey{}, tag),
4037 *ivar,
4038 *jvar,
4039 ivar->dofIndices(),
4040 jvar->dofIndicesNeighbor());
4041
4043 jacobianBlockNeighbor(Moose::NeighborElement, i, j, LocalDataKey{}, tag),
4044 *ivar,
4045 *jvar,
4046 ivar->dofIndicesNeighbor(),
4047 jvar->dofIndices());
4048
4050 jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
4051 *ivar,
4052 *jvar,
4053 ivar->dofIndicesNeighbor(),
4054 jvar->dofIndicesNeighbor());
4055 }
4056 }
4057}
@ 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 4477 of file Assembly.C.

4485{
4486 for (const auto tag : tags)
4488 jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices, GlobalDataKey{}, tag);
4489}
void addJacobianNeighbor(GlobalDataKey)
Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objec...
Definition Assembly.C:3944

◆ addJacobianNonlocal()

void Assembly::addJacobianNonlocal ( GlobalDataKey  )

Adds non-local Jacobian to the global Jacobian matrices.

Definition at line 3922 of file Assembly.C.

3923{
3924 for (const auto & it : _cm_nonlocal_entry)
3925 {
3926 auto ivar = it.first;
3927 auto jvar = it.second;
3928 auto i = ivar->number();
3929 auto j = jvar->number();
3930 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
3931 tag < _jacobian_block_nonlocal_used.size();
3932 tag++)
3933 if (jacobianBlockNonlocalUsed(tag, i, j) && _sys.hasMatrix(tag))
3935 jacobianBlockNonlocal(i, j, LocalDataKey{}, tag),
3936 *ivar,
3937 *jvar,
3938 ivar->dofIndices(),
3939 jvar->allDofIndices());
3940 }
3941}
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition Assembly.h:2327
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:2281
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition Assembly.h:2330

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

4500{
4501 for (const auto & it : _cm_sf_entry)
4502 if (it.first->number() == ivar)
4503 addJacobianCoupledVarPair(*it.first, *it.second);
4504}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD

◆ addJacobianScalar()

void Assembly::addJacobianScalar ( GlobalDataKey  )

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

Definition at line 4492 of file Assembly.C.

4493{
4494 for (const auto & it : _cm_ss_entry)
4495 addJacobianCoupledVarPair(*it.first, *it.second);
4496}
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition Assembly.h:2325

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

3357{
3358 mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3359 "Non-residual tag in Assembly::addResidual");
3360
3361 auto & tag_Re = _sub_Re[vector_tag._type_id];
3362 NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3363 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3364 for (const auto & var : vars)
3365 addResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3366}
char ** vars
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition Assembly.h:2648
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:3303
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition SystemBase.h:782
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 3369 of file Assembly.C.

3370{
3371 for (const auto & vector_tag : vector_tags)
3372 if (_sys.hasVector(vector_tag._id))
3373 addResidual(vector_tag);
3374}
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:3369

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

3307{
3308 if (dof_indices.size() > 0 && res_block.size())
3309 {
3310 _temp_dof_indices = dof_indices;
3311 _tmp_Re = res_block;
3314 }
3315}
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:3273
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction)
Definition Assembly.h:2654
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 3399 of file Assembly.C.

3400{
3401 mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3402 "Non-residual tag in Assembly::addResidualLower");
3403
3404 auto & tag_Rl = _sub_Rl[vector_tag._type_id];
3405 NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3406 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3407 for (const auto & var : vars)
3409 residual, tag_Rl[var->number()], var->dofIndicesLower(), var->arrayScalingFactor());
3410}
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition Assembly.h:2651

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

3414{
3415 for (const auto & vector_tag : vector_tags)
3416 if (_sys.hasVector(vector_tag._id))
3417 addResidualLower(vector_tag);
3418}
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:3413

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

3378{
3379 mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3380 "Non-residual tag in Assembly::addResidualNeighbor");
3381
3382 auto & tag_Rn = _sub_Rn[vector_tag._type_id];
3383 NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3384 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3385 for (const auto & var : vars)
3387 residual, tag_Rn[var->number()], var->dofIndicesNeighbor(), var->arrayScalingFactor());
3388}
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition Assembly.h:2649

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

3392{
3393 for (const auto & vector_tag : vector_tags)
3394 if (_sys.hasVector(vector_tag._id))
3395 addResidualNeighbor(vector_tag);
3396}
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:3391

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

3423{
3424 mooseAssert(vector_tag._type == Moose::VECTOR_TAG_RESIDUAL,
3425 "Non-residual tag in Assembly::addResidualScalar");
3426
3427 // add the scalar variables residuals
3428 auto & tag_Re = _sub_Re[vector_tag._type_id];
3429 NumericVector<Number> & residual = _sys.getVector(vector_tag._id);
3430 const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
3431 for (const auto & var : vars)
3432 addResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3433}
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition SystemBase.h:789

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

3437{
3438 for (const auto & vector_tag : vector_tags)
3439 if (_sys.hasVector(vector_tag._id))
3440 addResidualScalar(vector_tag);
3441}
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:3436

Referenced by addResidualScalar().

◆ adGradPhi() [1/2]

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

Definition at line 3039 of file Assembly.h.

3041{
3042 return _ad_vector_grad_phi_data.at(v.feType());
3043}
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 1314 of file Assembly.h.

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

◆ adJxW()

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

Definition at line 270 of file Assembly.h.

270{ return _ad_JxW; }

◆ adJxWFace()

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

Definition at line 272 of file Assembly.h.

272{ return _ad_JxW_face; }

◆ adNormals()

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

Definition at line 385 of file Assembly.h.

385{ return _ad_normals; }

◆ adQPoints()

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

Definition at line 387 of file Assembly.h.

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

Referenced by genericQPoints().

◆ adQPointsFace()

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

Definition at line 393 of file Assembly.h.

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

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

3220{
3221 _disp_numbers_and_directions = std::move(disp_numbers_and_directions);
3222}
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 1906 of file Assembly.h.

1907 {
1908 auto qrule = qrules(dim).vol.get();
1909 fe.attach_quadrature_rule(qrule);
1910 return qrule;
1911 }
QRules & qrules(unsigned int dim)
Definition Assembly.h:2478
std::unique_ptr< libMesh::QBase > vol
volume/elem (meshdim) quadrature rule
Definition Assembly.h:2430

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

1919 {
1920 auto qrule = qrules(dim).face.get();
1921 fe.attach_quadrature_rule(qrule);
1922 return qrule;
1923 }
std::unique_ptr< libMesh::QBase > face
area/face (meshdim-1) quadrature rule
Definition Assembly.h:2432

◆ buildFaceFE()

void Assembly::buildFaceFE ( FEType  type) const
private

Build FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 296 of file Assembly.C.

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

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

347{
348 if (!_building_helpers && type == _helper_type)
350
352 _fe_shape_data_face_neighbor[type] = std::make_unique<FEShapeData>();
353
354 // Build an FE object for this type for each dimension up to the dimension of the current mesh
355 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
356 {
357 if (!_fe_face_neighbor[dim][type])
358 {
359 _fe_face_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
360 _fe_face_neighbor[dim][type]->add_p_level_in_reinit(type.p_refinement);
361 }
362
363 _fe_face_neighbor[dim][type]->get_phi();
364 _fe_face_neighbor[dim][type]->get_dphi();
365 if (_need_second_derivative_neighbor.count(type))
366 _fe_face_neighbor[dim][type]->get_d2phi();
367 }
368}
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:2756

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

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

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

◆ buildLowerDDualFE()

void Assembly::buildLowerDDualFE ( FEType  type) const
private

Definition at line 398 of file Assembly.C.

399{
400 if (!_fe_shape_data_dual_lower[type])
401 _fe_shape_data_dual_lower[type] = std::make_unique<FEShapeData>();
402
403 // Build an FE object for this type for each dimension up to the dimension of
404 // the current mesh minus one (because this is for lower-dimensional
405 // elements!)
406 for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
407 {
408 if (!_fe_lower[dim][type])
409 {
410 _fe_lower[dim][type] = FEGenericBase<Real>::build(dim, type).release();
411 _fe_lower[dim][type]->add_p_level_in_reinit(type.p_refinement);
412 }
413
414 _fe_lower[dim][type]->get_dual_phi();
415 _fe_lower[dim][type]->get_dual_dphi();
416 if (_need_second_derivative.count(type))
417 _fe_lower[dim][type]->get_dual_d2phi();
418 }
419}
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition Assembly.h:2758

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

372{
373 if (!_building_helpers && type == _helper_type)
375
376 if (!_fe_shape_data_lower[type])
377 _fe_shape_data_lower[type] = std::make_unique<FEShapeData>();
378
379 // Build an FE object for this type for each dimension up to the dimension of
380 // the current mesh minus one (because this is for lower-dimensional
381 // elements!)
382 for (unsigned int dim = 0; dim <= _mesh_dimension - 1; dim++)
383 {
384 if (!_fe_lower[dim][type])
385 {
386 _fe_lower[dim][type] = FEGenericBase<Real>::build(dim, type).release();
387 _fe_lower[dim][type]->add_p_level_in_reinit(type.p_refinement);
388 }
389
390 _fe_lower[dim][type]->get_phi();
391 _fe_lower[dim][type]->get_dphi();
392 if (_need_second_derivative.count(type))
393 _fe_lower[dim][type]->get_d2phi();
394 }
395}
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition Assembly.h:2757

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

322{
323 if (!_building_helpers && type == _helper_type)
325
326 if (!_fe_shape_data_neighbor[type])
327 _fe_shape_data_neighbor[type] = std::make_unique<FEShapeData>();
328
329 // Build an FE object for this type for each dimension up to the dimension of the current mesh
330 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
331 {
332 if (!_fe_neighbor[dim][type])
333 {
334 _fe_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
335 _fe_neighbor[dim][type]->add_p_level_in_reinit(type.p_refinement);
336 }
337
338 _fe_neighbor[dim][type]->get_phi();
339 _fe_neighbor[dim][type]->get_dphi();
340 if (_need_second_derivative_neighbor.count(type))
341 _fe_neighbor[dim][type]->get_d2phi();
342 }
343}
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition Assembly.h:2755

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

◆ buildVectorDualLowerDFE()

void Assembly::buildVectorDualLowerDFE ( FEType  type) const
private

Definition at line 450 of file Assembly.C.

451{
453 _vector_fe_shape_data_dual_lower[type] = std::make_unique<VectorFEShapeData>();
454
455 // Build an FE object for this type for each dimension up to the dimension of
456 // the current mesh minus one (because this is for lower-dimensional
457 // elements!)
458 unsigned int dim = ((type.family == LAGRANGE_VEC) || (type.family == MONOMIAL_VEC)) ? 0 : 2;
459 const auto ending_dim = cast_int<unsigned int>(_mesh_dimension - 1);
460 if (ending_dim < dim)
461 return;
462 for (; dim <= ending_dim; dim++)
463 {
464 if (!_vector_fe_lower[dim][type])
465 {
466 _vector_fe_lower[dim][type] = FEVectorBase::build(dim, type).release();
467 _vector_fe_lower[dim][type]->add_p_level_in_reinit(type.p_refinement);
468 }
469
470 _vector_fe_lower[dim][type]->get_dual_phi();
471 _vector_fe_lower[dim][type]->get_dual_dphi();
472 if (_need_second_derivative.count(type))
473 _vector_fe_lower[dim][type]->get_dual_d2phi();
474 }
475}
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
Definition Assembly.h:2766

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

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

579{
581 _vector_fe_shape_data_face_neighbor[type] = std::make_unique<VectorFEShapeData>();
582
583 // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
584 unsigned int min_dim;
585 if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
586 type.family == L2_RAVIART_THOMAS)
587 min_dim = 2;
588 else
589 min_dim = 0;
590
591 // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
592 // current mesh
593 for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
594 {
595 if (!_vector_fe_face_neighbor[dim][type])
596 {
598 FEGenericBase<VectorValue<Real>>::build(dim, type).release();
599 _vector_fe_face_neighbor[dim][type]->add_p_level_in_reinit(type.p_refinement);
600 }
601
602 _vector_fe_face_neighbor[dim][type]->get_phi();
603 _vector_fe_face_neighbor[dim][type]->get_dphi();
604 if (_need_curl.count(type))
605 _vector_fe_face_neighbor[dim][type]->get_curl_phi();
606 if (_need_face_neighbor_div.count(type))
607 _vector_fe_face_neighbor[dim][type]->get_div_phi();
608 }
609}
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:2764

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

479{
480 if (!_vector_fe_shape_data[type])
481 _vector_fe_shape_data[type] = std::make_unique<VectorFEShapeData>();
482
483 // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
484 unsigned int min_dim;
485 if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
486 type.family == L2_RAVIART_THOMAS)
487 min_dim = 2;
488 else
489 min_dim = 0;
490
491 // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
492 // current mesh
493 for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
494 {
495 if (!_vector_fe[dim][type])
496 {
497 _vector_fe[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
498 _vector_fe[dim][type]->add_p_level_in_reinit(type.p_refinement);
499 }
500
501 _vector_fe[dim][type]->get_phi();
502 _vector_fe[dim][type]->get_dphi();
503 if (_need_curl.count(type))
504 _vector_fe[dim][type]->get_curl_phi();
505 if (_need_div.count(type))
506 _vector_fe[dim][type]->get_div_phi();
507 _vector_fe[dim][type]->get_xyz();
508 }
509}
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:2761
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 422 of file Assembly.C.

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

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

546{
548 _vector_fe_shape_data_neighbor[type] = std::make_unique<VectorFEShapeData>();
549
550 // Note that NEDELEC_ONE and RAVIART_THOMAS elements can only be built for dimension > 2
551 unsigned int min_dim;
552 if (type.family == NEDELEC_ONE || type.family == RAVIART_THOMAS ||
553 type.family == L2_RAVIART_THOMAS)
554 min_dim = 2;
555 else
556 min_dim = 0;
557
558 // Build an FE object for this type for each dimension from the min_dim up to the dimension of the
559 // current mesh
560 for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
561 {
562 if (!_vector_fe_neighbor[dim][type])
563 {
564 _vector_fe_neighbor[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
565 _vector_fe_neighbor[dim][type]->add_p_level_in_reinit(type.p_refinement);
566 }
567
568 _vector_fe_neighbor[dim][type]->get_phi();
569 _vector_fe_neighbor[dim][type]->get_dphi();
570 if (_need_curl.count(type))
571 _vector_fe_neighbor[dim][type]->get_curl_phi();
572 if (_need_neighbor_div.count(type))
573 _vector_fe_neighbor[dim][type]->get_div_phi();
574 }
575}
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition Assembly.h:2763
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 635 of file Assembly.C.

636{
637 auto & qdefault = _qrules[Moose::ANY_BLOCK_ID];
638 mooseAssert(qdefault.size() > 0, "default quadrature must be initialized before order bumps");
639
640 unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
641 auto & qvec = _qrules[block];
642 if (qvec.size() != ndims || !qvec[0].vol)
643 createQRules(qdefault[0].vol->type(), order, order, order, block);
644 else if (qvec[0].vol->get_order() < order || qvec[0].face->get_order() < order)
645 createQRules(qvec[0].vol->type(),
646 std::max(order, qvec[0].arbitrary_vol->get_order()),
647 std::max(order, qvec[0].vol->get_order()),
648 std::max(order, qvec[0].face->get_order()),
649 block);
650 // otherwise do nothing - quadrature order is already as high as requested
651}
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:654
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
Definition Assembly.h:2447
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 612 of file Assembly.C.

613{
614 auto & qdefault = _qrules[Moose::ANY_BLOCK_ID];
615 mooseAssert(qdefault.size() > 0, "default quadrature must be initialized before order bumps");
616
617 unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
618 auto & qvec = _qrules[block];
619 if (qvec.size() != ndims || !qvec[0].vol)
620 createQRules(qdefault[0].vol->type(),
621 qdefault[0].arbitrary_vol->get_order(),
622 volume_order,
623 qdefault[0].face->get_order(),
624 block);
625 else if (qvec[0].vol->get_order() < volume_order)
626 createQRules(qvec[0].vol->type(),
627 qvec[0].arbitrary_vol->get_order(),
628 volume_order,
629 qvec[0].face->get_order(),
630 block);
631 // otherwise do nothing - quadrature order is already as high as requested
632}

◆ 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 // A single row needs no constraining unless its dof or one of its column dofs is constrained, in
3118 // which case its entries must be distributed to the constraining rows and columns
3119 const auto & single_row_dofs = residuals[0].derivatives().nude_indices();
3120 if (residuals.size() == 1 && !_dof_map.is_constrained_dof(input_row_indices[0]) &&
3121 std::none_of(single_row_dofs.begin(),
3122 single_row_dofs.end(),
3123 [this](const auto dof) { return _dof_map.is_constrained_dof(dof); }))
3124 {
3125 // No constraining is required. (This is likely a finite volume computation if we only have a
3126 // single dof)
3128 residuals, input_row_indices, scaling_factor, LocalDataKey{}, matrix_tags);
3129 return;
3130 }
3131
3132 const auto & compare_dofs = residuals[0].derivatives().nude_indices();
3133#ifndef NDEBUG
3134 auto compare_dofs_set = std::set<dof_id_type>(compare_dofs.begin(), compare_dofs.end());
3135
3136 for (const auto i : make_range(decltype(residuals.size())(1), residuals.size()))
3137 {
3138 const auto & residual = residuals[i];
3139 auto current_dofs_set = std::set<dof_id_type>(residual.derivatives().nude_indices().begin(),
3140 residual.derivatives().nude_indices().end());
3141 mooseAssert(compare_dofs_set == current_dofs_set,
3142 "We're going to see whether the dof sets are the same. IIRC the degree of freedom "
3143 "dependence (as indicated by the dof index set held by the ADReal) has to be the "
3144 "same for every residual passed to this method otherwise constrain_element_matrix "
3145 "will not work.");
3146 }
3147#endif
3148 _column_indices.assign(compare_dofs.begin(), compare_dofs.end());
3149
3150 // If there's no derivatives then there is nothing to do. Moreover, if we pass zero size column
3151 // indices to constrain_element_matrix then we will potentially get errors out of BLAS
3152 if (!_column_indices.size())
3153 return;
3154
3155 // Need to make a copy because we might modify this in constrain_element_matrix
3156 _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3157
3159 for (const auto i : index_range(_row_indices))
3160 {
3161 const auto & sparse_derivatives = residuals[i].derivatives();
3162
3163 for (const auto j : index_range(_column_indices))
3164 _element_matrix(i, j) = sparse_derivatives[_column_indices[j]] * scaling_factor;
3165 }
3166
3168
3169 for (const auto i : index_range(_row_indices))
3170 for (const auto j : index_range(_column_indices))
3171 cacheJacobian(_row_indices[i], _column_indices[j], _element_matrix(i, j), {}, matrix_tags);
3172}
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:2882
std::vector< dof_id_type > _column_indices
Definition Assembly.h:2887
bool computingJacobian() const
Definition Assembly.h:1943
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition Assembly.C:4097
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:3176
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:2887
void resize(const unsigned int new_m, const unsigned int new_n)
bool is_constrained_dof(const dof_id_type dof) const
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 4097 of file Assembly.C.

4098{
4099 for (const auto & it : _cm_ff_entry)
4100 cacheJacobianCoupledVarPair(*it.first, *it.second);
4101
4102 for (const auto & it : _cm_fs_entry)
4103 cacheJacobianCoupledVarPair(*it.first, *it.second);
4104
4105 for (const auto & it : _cm_sf_entry)
4106 cacheJacobianCoupledVarPair(*it.first, *it.second);
4107}
void cacheJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Caches element matrix for ivar rows and jvar columns.
Definition Assembly.C:4111

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

4521{
4522 for (auto tag : tags)
4523 if (_sys.hasMatrix(tag))
4524 cacheJacobian(i, j, value, LocalDataKey{}, tag);
4525}
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 4507 of file Assembly.C.

4509{
4510 _cached_jacobian_rows[tag].push_back(i);
4511 _cached_jacobian_cols[tag].push_back(j);
4512 _cached_jacobian_values[tag].push_back(value);
4513}

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

3664{
3665 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3666 return;
3667 if (jac_block.n() == 0 || jac_block.m() == 0)
3668 return;
3669 if (!_sys.hasMatrix(tag))
3670 return;
3671
3672 auto & scaling_factors = ivar.arrayScalingFactor();
3673 const unsigned int iv = ivar.number();
3674 const unsigned int jv = jvar.number();
3675
3676 for (unsigned int i = 0; i < ivar.count(); ++i)
3677 {
3678 for (const auto & jt : libMesh::ConstCouplingRow(iv + i, *_cm))
3679 {
3680 if (jt < jv || jt >= jv + jvar.count())
3681 continue;
3682 unsigned int j = jt - jv;
3683
3684 auto di = ivar.componentDofIndices(idof_indices, i);
3685 auto dj = jvar.componentDofIndices(jdof_indices, j);
3686 auto indof = di.size();
3687 auto jndof = dj.size();
3688
3689 unsigned int jj = j;
3690 if (iv == jv && _component_block_diagonal[iv])
3691 // here i must be equal to j
3692 jj = 0;
3693
3694 auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3695 if (scaling_factors[i] != 1.0)
3696 sub *= scaling_factors[i];
3697
3698 // If we're computing the jacobian for automatically scaling variables we do not want
3699 // to constrain the element matrix because it introduces 1s on the diagonal for the
3700 // constrained dofs
3702 _dof_map.constrain_element_matrix(sub, di, dj, false);
3703
3704 for (MooseIndex(di) i = 0; i < di.size(); i++)
3705 for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3706 {
3707 _cached_jacobian_values[tag].push_back(sub(i, j));
3708 _cached_jacobian_rows[tag].push_back(di[i]);
3709 _cached_jacobian_cols[tag].push_back(dj[j]);
3710 }
3711 }
3712 }
3713}

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

3779{
3780 const auto has_matrix =
3781 std::any_of(tags.begin(), tags.end(), [this](const auto tag) { return _sys.hasMatrix(tag); });
3782
3783 // Work on a reusable Assembly-owned copy so callers retain their local matrix. This also lets us
3784 // apply constraints and scaling once before caching the same block to every requested matrix tag.
3785 if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m() &&
3786 has_matrix)
3787 {
3788 _row_indices.assign(idof_indices.begin(), idof_indices.end());
3789 _column_indices.assign(jdof_indices.begin(), jdof_indices.end());
3790 _element_matrix = jac_block;
3791
3792 // If we're computing the jacobian for automatically scaling variables we do not want to
3793 // constrain the element matrix because it introduces 1s on the diagonal for the constrained
3794 // dofs
3797
3798 if (scaling_factor != 1.0)
3799 _element_matrix *= scaling_factor;
3800
3801 for (const auto i : index_range(_row_indices))
3802 for (const auto j : index_range(_column_indices))
3804 _row_indices[i], _column_indices[j], _element_matrix(i, j), LocalDataKey{}, tags);
3805 }
3806}

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

3723{
3724 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3725 return;
3726 if (jac_block.n() == 0 || jac_block.m() == 0)
3727 return;
3728 if (!_sys.hasMatrix(tag))
3729 return;
3730
3731 auto & scaling_factor = ivar.arrayScalingFactor();
3732
3733 for (unsigned int i = 0; i < ivar.count(); ++i)
3734 {
3735 unsigned int iv = ivar.number();
3736 for (const auto & jt : libMesh::ConstCouplingRow(iv + i, *_cm))
3737 {
3738 unsigned int jv = jvar.number();
3739 if (jt < jv || jt >= jv + jvar.count())
3740 continue;
3741 unsigned int j = jt - jv;
3742
3743 auto di = ivar.componentDofIndices(idof_indices, i);
3744 auto dj = jvar.componentDofIndices(jdof_indices, j);
3745 auto indof = di.size();
3746 auto jndof = dj.size();
3747
3748 unsigned int jj = j;
3749 if (iv == jv && _component_block_diagonal[iv])
3750 // here i must be equal to j
3751 jj = 0;
3752
3753 auto sub = jac_block.sub_matrix(i * indof, indof, jj * jndof, jndof);
3754 if (scaling_factor[i] != 1.0)
3755 sub *= scaling_factor[i];
3756
3757 _dof_map.constrain_element_matrix(sub, di, dj, false);
3758
3759 for (MooseIndex(di) i = 0; i < di.size(); i++)
3760 for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3761 if (sub(i, j) != 0.0) // no storage allocated for unimplemented jacobian terms,
3762 // maintaining maximum sparsity possible
3763 {
3764 _cached_jacobian_values[tag].push_back(sub(i, j));
3765 _cached_jacobian_rows[tag].push_back(di[i]);
3766 _cached_jacobian_cols[tag].push_back(dj[j]);
3767 }
3768 }
3769 }
3770}

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

4113{
4114 auto i = ivar.number();
4115 auto j = jvar.number();
4116 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
4117 if (jacobianBlockUsed(tag, i, j) && _sys.hasMatrix(tag))
4118 cacheJacobianBlock(jacobianBlock(i, j, LocalDataKey{}, tag),
4119 ivar,
4120 jvar,
4121 ivar.dofIndices(),
4122 jvar.dofIndices(),
4123 tag);
4124}
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:3773

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

4188{
4189 for (const auto & it : _cm_ff_entry)
4190 {
4191 auto ivar = it.first;
4192 auto jvar = it.second;
4193 auto i = ivar->number();
4194 auto j = jvar->number();
4195 for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
4196 tag++)
4197 if (jacobianBlockLowerUsed(tag, i, j) && _sys.hasMatrix(tag))
4198 {
4199 cacheJacobianBlock(jacobianBlockMortar(Moose::LowerLower, i, j, LocalDataKey{}, tag),
4200 *ivar,
4201 *jvar,
4202 ivar->dofIndicesLower(),
4203 jvar->dofIndicesLower(),
4204 tag);
4205
4207 *ivar,
4208 *jvar,
4209 ivar->dofIndicesLower(),
4210 jvar->dofIndices(),
4211 tag);
4212
4214 *ivar,
4215 *jvar,
4216 ivar->dofIndicesLower(),
4217 jvar->dofIndicesNeighbor(),
4218 tag);
4219
4221 *ivar,
4222 *jvar,
4223 ivar->dofIndices(),
4224 jvar->dofIndicesLower(),
4225 tag);
4226
4228 jacobianBlockMortar(Moose::SecondarySecondary, i, j, LocalDataKey{}, tag),
4229 *ivar,
4230 *jvar,
4231 ivar->dofIndices(),
4232 jvar->dofIndices(),
4233 tag);
4234
4236 *ivar,
4237 *jvar,
4238 ivar->dofIndices(),
4239 jvar->dofIndicesNeighbor(),
4240 tag);
4241
4243 *ivar,
4244 *jvar,
4245 ivar->dofIndicesNeighbor(),
4246 jvar->dofIndicesLower(),
4247 tag);
4248
4250 *ivar,
4251 *jvar,
4252 ivar->dofIndicesNeighbor(),
4253 jvar->dofIndices(),
4254 tag);
4255
4257 *ivar,
4258 *jvar,
4259 ivar->dofIndicesNeighbor(),
4260 jvar->dofIndicesNeighbor(),
4261 tag);
4262 }
4263 }
4264}
@ 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 4149 of file Assembly.C.

4150{
4151 for (const auto & it : _cm_ff_entry)
4152 {
4153 auto ivar = it.first;
4154 auto jvar = it.second;
4155 auto i = ivar->number();
4156 auto j = jvar->number();
4157
4158 for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
4159 tag < _jacobian_block_neighbor_used.size();
4160 tag++)
4161 if (jacobianBlockNeighborUsed(tag, i, j) && _sys.hasMatrix(tag))
4162 {
4164 *ivar,
4165 *jvar,
4166 ivar->dofIndices(),
4167 jvar->dofIndicesNeighbor(),
4168 tag);
4170 *ivar,
4171 *jvar,
4172 ivar->dofIndicesNeighbor(),
4173 jvar->dofIndices(),
4174 tag);
4176 jacobianBlockNeighbor(Moose::NeighborNeighbor, i, j, LocalDataKey{}, tag),
4177 *ivar,
4178 *jvar,
4179 ivar->dofIndicesNeighbor(),
4180 jvar->dofIndicesNeighbor(),
4181 tag);
4182 }
4183 }
4184}

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

4128{
4129 for (const auto & it : _cm_nonlocal_entry)
4130 {
4131 auto ivar = it.first;
4132 auto jvar = it.second;
4133 auto i = ivar->number();
4134 auto j = jvar->number();
4135 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
4136 tag < _jacobian_block_nonlocal_used.size();
4137 tag++)
4138 if (jacobianBlockNonlocalUsed(tag, i, j) && _sys.hasMatrix(tag))
4139 cacheJacobianBlockNonzero(jacobianBlockNonlocal(i, j, LocalDataKey{}, tag),
4140 *ivar,
4141 *jvar,
4142 ivar->dofIndices(),
4143 jvar->allDofIndices(),
4144 tag);
4145 }
4146}
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:3717

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

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

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

3470{
3471 for (auto & tag : tags)
3472 cacheResidual(dof, value, tag);
3473}
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:3444

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

3460{
3461 const VectorTag & tag = _subproblem.getVectorTag(tag_id);
3462
3463 _cached_residual_values[tag._type_id].push_back(value);
3464 _cached_residual_rows[tag._type_id].push_back(dof);
3465}
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
Definition SubProblem.C:153
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 3444 of file Assembly.C.

3445{
3446 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3447 for (const auto & var : vars)
3448 for (const auto & vector_tag : tags)
3449 if (_sys.hasVector(vector_tag._id))
3450 cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3451 _cached_residual_rows[vector_tag._type_id],
3452 _sub_Re[vector_tag._type_id][var->number()],
3453 var->dofIndices(),
3454 var->arrayScalingFactor());
3455}
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:3318

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

3323{
3324 if (dof_indices.size() > 0 && res_block.size())
3325 {
3326 _temp_dof_indices = dof_indices;
3327 _tmp_Re = res_block;
3329
3330 for (MooseIndex(_tmp_Re) i = 0; i < _tmp_Re.size(); i++)
3331 {
3332 cached_residual_values.push_back(_tmp_Re(i));
3333 cached_residual_rows.push_back(_temp_dof_indices[i]);
3334 }
3335 }
3336
3337 res_block.zero();
3338}
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 3508 of file Assembly.C.

3509{
3510 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3511 for (const auto & var : vars)
3512 for (const auto & vector_tag : tags)
3513 if (_sys.hasVector(vector_tag._id))
3514 cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3515 _cached_residual_rows[vector_tag._type_id],
3516 _sub_Rl[vector_tag._type_id][var->number()],
3517 var->dofIndicesLower(),
3518 var->arrayScalingFactor());
3519}

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

3495{
3496 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3497 for (const auto & var : vars)
3498 for (const auto & vector_tag : tags)
3499 if (_sys.hasVector(vector_tag._id))
3500 cacheResidualBlock(_cached_residual_values[vector_tag._type_id],
3501 _cached_residual_rows[vector_tag._type_id],
3502 _sub_Rn[vector_tag._type_id][var->number()],
3503 var->dofIndicesNeighbor(),
3504 var->arrayScalingFactor());
3505}

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

3480{
3481 // Add the residual value and dof_index to cached_residual_values and cached_residual_rows
3482 // respectively.
3483 // This is used by NodalConstraint.C to cache the residual calculated for primary and secondary
3484 // node.
3485 const VectorTag & vector_tag = _subproblem.getVectorTag(tag);
3486 for (MooseIndex(dof_index) i = 0; i < dof_index.size(); ++i)
3487 {
3488 _cached_residual_values[vector_tag._type_id].push_back(res(i));
3489 _cached_residual_rows[vector_tag._type_id].push_back(dof_index[i]);
3490 }
3491}

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

3052{
3053 mooseAssert(residuals.size() == input_row_indices.size(),
3054 "The number of residuals should match the number of dof indices");
3055 mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3056
3057 if (!computingResidual() || vector_tags.empty())
3058 return;
3059
3060 // A single row needs no constraining unless its dof is constrained (e.g. by a periodic boundary,
3061 // a hanging node, or a user constraint), in which case its residual must be distributed to the
3062 // constraining dofs
3063 if (residuals.size() == 1 && !_dof_map.is_constrained_dof(input_row_indices[0]))
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:1938
DenseVector< Number > _element_vector
A working vector to avoid repeated heap allocations when caching residuals that must have libMesh-lev...
Definition Assembly.h:2877
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 4558 of file Assembly.C.

4559{
4560 for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4561 {
4562 _cached_jacobian_rows[tag].clear();
4563 _cached_jacobian_cols[tag].clear();
4564 _cached_jacobian_values[tag].clear();
4565 }
4566}

Referenced by setCachedJacobian(), and zeroCachedJacobian().

◆ clearCachedQRules()

void Assembly::clearCachedQRules ( )

Set the cached quadrature rules to nullptr.

Definition at line 763 of file Assembly.C.

764{
765 _current_qrule = nullptr;
766 _current_qrule_face = nullptr;
767 _current_qrule_lower = nullptr;
768 _current_qrule_neighbor = nullptr;
769}

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

3546{
3547 auto & values = _cached_residual_values[vector_tag._type_id];
3548 auto & rows = _cached_residual_rows[vector_tag._type_id];
3549
3550 mooseAssert(values.size() == rows.size(),
3551 "Number of cached residuals and number of rows must match!");
3552
3553 // Keep track of the largest size so we can use it to reserve and avoid
3554 // as much dynamic allocation as possible
3555 if (_max_cached_residuals < values.size())
3557
3558 // Clear both vectors (keeps the capacity the same)
3559 values.clear();
3560 rows.clear();
3561 // And then reserve: use 2 as a fudge factor to *really* avoid dynamic allocation!
3562 values.reserve(_max_cached_residuals * 2);
3563 rows.reserve(_max_cached_residuals * 2);
3564}

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

3538{
3539 for (const auto & vector_tag : _residual_vector_tags)
3540 clearCachedResiduals(vector_tag);
3541}

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

2160{
2161 const auto dim = elem.dim();
2162
2164 {
2165 auto n_qp = _current_qrule_face->n_points();
2166 resizeADMappingObjects(n_qp, dim);
2167 _ad_normals.resize(n_qp);
2168 _ad_JxW_face.resize(n_qp);
2172 _ad_curvatures.resize(n_qp);
2173
2174 if (_displaced)
2175 {
2176 const auto & qw = _current_qrule_face->get_weights();
2177 computeFaceMap(elem, side, qw);
2178 const std::vector<Real> dummy_qw(n_qp, 1.);
2179
2180 for (unsigned int qp = 0; qp != n_qp; qp++)
2182 }
2183 else
2184 {
2185 for (unsigned qp = 0; qp < n_qp; ++qp)
2186 {
2188 _ad_normals[qp] = _current_normals[qp];
2189 }
2191 for (unsigned qp = 0; qp < n_qp; ++qp)
2194 for (unsigned qp = 0; qp < n_qp; ++qp)
2195 _ad_curvatures[qp] = _curvatures[qp];
2196 }
2197
2199 {
2200 for (const auto & it : _fe_face[dim])
2201 {
2202 FEBase & fe = *it.second;
2203 auto fe_type = it.first;
2204 auto num_shapes = FEInterface::n_shape_functions(fe_type, &elem);
2205 auto & grad_phi = _ad_grad_phi_data_face[fe_type];
2206
2207 grad_phi.resize(num_shapes);
2208 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2209 grad_phi[i].resize(n_qp);
2210
2211 const auto & regular_grad_phi = _fe_shape_data_face[fe_type]->_grad_phi;
2212
2213 if (_displaced)
2214 computeGradPhiAD(&elem, n_qp, grad_phi, &fe);
2215 else
2216 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2217 for (unsigned qp = 0; qp < n_qp; ++qp)
2218 grad_phi[i][qp] = regular_grad_phi[i][qp];
2219 }
2220 for (const auto & it : _vector_fe_face[dim])
2221 {
2222 FEVectorBase & fe = *it.second;
2223 auto fe_type = it.first;
2224 auto num_shapes = FEInterface::n_shape_functions(fe_type, &elem);
2225 auto & grad_phi = _ad_vector_grad_phi_data_face[fe_type];
2226
2227 grad_phi.resize(num_shapes);
2228 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2229 grad_phi[i].resize(n_qp);
2230
2231 const auto & regular_grad_phi = _vector_fe_shape_data_face[fe_type]->_grad_phi;
2232
2233 if (_displaced)
2234 computeGradPhiAD(&elem, n_qp, grad_phi, &fe);
2235 else
2236 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2237 for (unsigned qp = 0; qp < n_qp; ++qp)
2238 grad_phi[i][qp] = regular_grad_phi[i][qp];
2239 }
2240 }
2241 }
2242}
bool _need_ad_grad_phi_face
Whether any object needs the AD face shape function gradients.
Definition Assembly.h:2776
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition Assembly.h:2516
const Elem *const & elem() const
Return the current element.
Definition Assembly.h:406
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition Assembly.h:2514
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:438
void resizeADMappingObjects(unsigned int n_qp, unsigned int dim)
resize any objects that contribute to automatic differentiation-related mapping calculations
Definition Assembly.C:1008
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition Assembly.h:2518
void computeFaceMap(const Elem &elem, const unsigned int side, const std::vector< Real > &qw)
Definition Assembly.C:1387
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:1038
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:778
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 1793 of file Assembly.C.

1794{
1796 return;
1797
1803
1805 for (unsigned int qp = 0; qp < _current_qrule->n_points(); qp++)
1807
1809}
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition Assembly.h:2406
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:2408

Referenced by reinit(), and reinit().

◆ computeCurrentFaceVolume()

void Assembly::computeCurrentFaceVolume ( )
private

Definition at line 1812 of file Assembly.C.

1813{
1815 return;
1816
1822
1824 for (unsigned int qp = 0; qp < _current_qrule_face->n_points(); qp++)
1826
1828}

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

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

1388{
1389 // Important quantities calculated by this method:
1390 // - _ad_JxW_face
1391 // - _ad_q_points_face
1392 // - _ad_normals
1393 // - _ad_curvatures
1394
1395 const Elem & side_elem = _compute_face_map_side_elem_builder(elem, side);
1396 const auto dim = elem.dim();
1397 const auto n_qp = qw.size();
1398 const auto & dpsidxi_map = _holder_fe_face_helper[dim]->get_fe_map().get_dpsidxi();
1399 const auto & dpsideta_map = _holder_fe_face_helper[dim]->get_fe_map().get_dpsideta();
1400 const auto & psi_map = _holder_fe_face_helper[dim]->get_fe_map().get_psi();
1401 std::vector<std::vector<Real>> const * d2psidxi2_map = nullptr;
1402 std::vector<std::vector<Real>> const * d2psidxideta_map = nullptr;
1403 std::vector<std::vector<Real>> const * d2psideta2_map = nullptr;
1404 const auto sys_num = _sys.number();
1405 const bool do_derivatives = ADReal::do_derivatives && sys_num == _subproblem.currentNlSysNum();
1406
1408 {
1409 d2psidxi2_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psidxi2();
1410 d2psidxideta_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psidxideta();
1411 d2psideta2_map = &_holder_fe_face_helper[dim]->get_fe_map().get_d2psideta2();
1412 }
1413
1414 switch (dim)
1415 {
1416 case 1:
1417 {
1418 if (!n_qp)
1419 break;
1420
1421 if (side_elem.node_id(0) == elem.node_id(0))
1422 _ad_normals[0] = Point(-1.);
1423 else
1424 _ad_normals[0] = Point(1.);
1425
1426 VectorValue<ADReal> side_point;
1428 {
1429 const Node & node = side_elem.node_ref(0);
1430 side_point = node;
1431
1432 if (do_derivatives)
1433 for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1435 side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1436 }
1437
1438 for (const auto p : make_range(n_qp))
1439 {
1441 {
1442 _ad_q_points_face[p].zero();
1443 _ad_q_points_face[p].add_scaled(side_point, psi_map[0][p]);
1444 }
1445
1446 _ad_normals[p] = _ad_normals[0];
1447 _ad_JxW_face[p] = 1.0 * qw[p];
1448 }
1449
1450 break;
1451 }
1452
1453 case 2:
1454 {
1455 _ad_dxyzdxi_map.resize(n_qp);
1457 _ad_d2xyzdxi2_map.resize(n_qp);
1458
1459 for (const auto p : make_range(n_qp))
1460 _ad_dxyzdxi_map[p].zero();
1462 for (const auto p : make_range(n_qp))
1465 for (const auto p : make_range(n_qp))
1467
1468 const auto n_mapping_shape_functions =
1469 libMesh::FE<2, LAGRANGE>::n_dofs(&side_elem, side_elem.default_order());
1470
1471 for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1472 {
1473 const Node & node = side_elem.node_ref(i);
1474 VectorValue<ADReal> side_point = node;
1475
1476 if (do_derivatives)
1477 for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1479 side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1480
1481 for (const auto p : make_range(n_qp))
1482 _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1484 for (const auto p : make_range(n_qp))
1485 _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1487 for (const auto p : make_range(n_qp))
1488 _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1489 }
1490
1491 for (const auto p : make_range(n_qp))
1492 {
1493 _ad_normals[p] =
1494 (VectorValue<ADReal>(_ad_dxyzdxi_map[p](1), -_ad_dxyzdxi_map[p](0), 0.)).unit();
1495 const auto the_jac = _ad_dxyzdxi_map[p].norm();
1496 _ad_JxW_face[p] = the_jac * qw[p];
1498 {
1499 const auto numerator = _ad_d2xyzdxi2_map[p] * _ad_normals[p];
1500 const auto denominator = _ad_dxyzdxi_map[p].norm_sq();
1501 libmesh_assert_not_equal_to(denominator, 0);
1502 _ad_curvatures[p] = numerator / denominator;
1503 }
1504 }
1505
1506 break;
1507 }
1508
1509 case 3:
1510 {
1511 _ad_dxyzdxi_map.resize(n_qp);
1512 _ad_dxyzdeta_map.resize(n_qp);
1514 {
1515 _ad_d2xyzdxi2_map.resize(n_qp);
1516 _ad_d2xyzdxideta_map.resize(n_qp);
1517 _ad_d2xyzdeta2_map.resize(n_qp);
1518 }
1519
1520 for (const auto p : make_range(n_qp))
1521 {
1522 _ad_dxyzdxi_map[p].zero();
1523 _ad_dxyzdeta_map[p].zero();
1524 }
1526 for (const auto p : make_range(n_qp))
1529 for (const auto p : make_range(n_qp))
1530 {
1531 _ad_d2xyzdxi2_map[p].zero();
1532 _ad_d2xyzdxideta_map[p].zero();
1533 _ad_d2xyzdeta2_map[p].zero();
1534 }
1535
1536 const unsigned int n_mapping_shape_functions =
1537 libMesh::FE<3, LAGRANGE>::n_dofs(&side_elem, side_elem.default_order());
1538
1539 for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1540 {
1541 const Node & node = side_elem.node_ref(i);
1542 VectorValue<ADReal> side_point = node;
1543
1544 if (do_derivatives)
1545 for (const auto & [disp_num, direction] : _disp_numbers_and_directions)
1547 side_point(direction).derivatives(), node.dof_number(sys_num, disp_num, 0), 1.);
1548
1549 for (const auto p : make_range(n_qp))
1550 {
1551 _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1552 _ad_dxyzdeta_map[p].add_scaled(side_point, dpsideta_map[i][p]);
1553 }
1555 for (const auto p : make_range(n_qp))
1556 _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1558 for (const auto p : make_range(n_qp))
1559 {
1560 _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1561 _ad_d2xyzdxideta_map[p].add_scaled(side_point, (*d2psidxideta_map)[i][p]);
1562 _ad_d2xyzdeta2_map[p].add_scaled(side_point, (*d2psideta2_map)[i][p]);
1563 }
1564 }
1565
1566 for (const auto p : make_range(n_qp))
1567 {
1568 _ad_normals[p] = _ad_dxyzdxi_map[p].cross(_ad_dxyzdeta_map[p]).unit();
1569
1570 const auto &dxdxi = _ad_dxyzdxi_map[p](0), &dxdeta = _ad_dxyzdeta_map[p](0),
1571 &dydxi = _ad_dxyzdxi_map[p](1), &dydeta = _ad_dxyzdeta_map[p](1),
1572 &dzdxi = _ad_dxyzdxi_map[p](2), &dzdeta = _ad_dxyzdeta_map[p](2);
1573
1574 const auto g11 = (dxdxi * dxdxi + dydxi * dydxi + dzdxi * dzdxi);
1575
1576 const auto g12 = (dxdxi * dxdeta + dydxi * dydeta + dzdxi * dzdeta);
1577
1578 const auto & g21 = g12;
1579
1580 const auto g22 = (dxdeta * dxdeta + dydeta * dydeta + dzdeta * dzdeta);
1581
1582 using std::sqrt;
1583 const auto the_jac = sqrt(g11 * g22 - g12 * g21);
1584
1585 _ad_JxW_face[p] = the_jac * qw[p];
1586
1588 {
1589 const auto L = -_ad_d2xyzdxi2_map[p] * _ad_normals[p];
1590 const auto M = -_ad_d2xyzdxideta_map[p] * _ad_normals[p];
1591 const auto N = -_ad_d2xyzdeta2_map[p] * _ad_normals[p];
1592 const auto E = _ad_dxyzdxi_map[p].norm_sq();
1593 const auto F = _ad_dxyzdxi_map[p] * _ad_dxyzdeta_map[p];
1594 const auto G = _ad_dxyzdeta_map[p].norm_sq();
1595
1596 const auto numerator = E * N - 2. * F * M + G * L;
1597 const auto denominator = E * G - F * F;
1598 libmesh_assert_not_equal_to(denominator, 0.);
1599 _ad_curvatures[p] = 0.5 * numerator / denominator;
1600 }
1601 }
1602
1603 break;
1604 }
1605
1606 default:
1607 mooseError("Invalid dimension dim = ", dim);
1608 }
1609}
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:537
libMesh::ElemSideBuilder _compute_face_map_side_elem_builder
In place side element builder for computeFaceMap()
Definition Assembly.h:2870
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 928 of file Assembly.C.

932{
933 // This function relies on the fact that FE::reinit has already been called. FE::reinit will
934 // importantly have already called FEMap::init_shape_functions which will have computed
935 // these quantities at the integration/quadrature points: dphidxi,
936 // dphideta, and dphidzeta (e.g. \nabla phi w.r.t. reference coordinates). These *phi* quantities
937 // are independent of mesh displacements when using a quadrature rule.
938 //
939 // Note that a user could have specified custom integration points (e.g. independent of a
940 // quadrature rule) which could very well depend on displacements. In that case even the *phi*
941 // quantities from the above paragraph would be a function of the displacements and we would be
942 // missing that derivative information in the calculations below
943
944 auto dim = elem->dim();
945 const auto & dphidxi = fe->get_dphidxi();
946 const auto & dphideta = fe->get_dphideta();
947 const auto & dphidzeta = fe->get_dphidzeta();
948 auto num_shapes = grad_phi.size();
949
950 switch (dim)
951 {
952 case 0:
953 {
954 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
955 for (unsigned qp = 0; qp < n_qp; ++qp)
956 grad_phi[i][qp] = 0;
957 break;
958 }
959
960 case 1:
961 {
962 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
963 for (unsigned qp = 0; qp < n_qp; ++qp)
964 {
965 grad_phi[i][qp].slice(0) = dphidxi[i][qp] * _ad_dxidx_map[qp];
966 grad_phi[i][qp].slice(1) = dphidxi[i][qp] * _ad_dxidy_map[qp];
967 grad_phi[i][qp].slice(2) = dphidxi[i][qp] * _ad_dxidz_map[qp];
968 }
969 break;
970 }
971
972 case 2:
973 {
974 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
975 for (unsigned qp = 0; qp < n_qp; ++qp)
976 {
977 grad_phi[i][qp].slice(0) =
978 dphidxi[i][qp] * _ad_dxidx_map[qp] + dphideta[i][qp] * _ad_detadx_map[qp];
979 grad_phi[i][qp].slice(1) =
980 dphidxi[i][qp] * _ad_dxidy_map[qp] + dphideta[i][qp] * _ad_detady_map[qp];
981 grad_phi[i][qp].slice(2) =
982 dphidxi[i][qp] * _ad_dxidz_map[qp] + dphideta[i][qp] * _ad_detadz_map[qp];
983 }
984 break;
985 }
986
987 case 3:
988 {
989 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
990 for (unsigned qp = 0; qp < n_qp; ++qp)
991 {
992 grad_phi[i][qp].slice(0) = dphidxi[i][qp] * _ad_dxidx_map[qp] +
993 dphideta[i][qp] * _ad_detadx_map[qp] +
994 dphidzeta[i][qp] * _ad_dzetadx_map[qp];
995 grad_phi[i][qp].slice(1) = dphidxi[i][qp] * _ad_dxidy_map[qp] +
996 dphideta[i][qp] * _ad_detady_map[qp] +
997 dphidzeta[i][qp] * _ad_dzetady_map[qp];
998 grad_phi[i][qp].slice(2) = dphidxi[i][qp] * _ad_dxidz_map[qp] +
999 dphideta[i][qp] * _ad_detadz_map[qp] +
1000 dphidzeta[i][qp] * _ad_dzetadz_map[qp];
1001 }
1002 break;
1003 }
1004 }
1005}
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 1038 of file Assembly.C.

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

1943{ 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 1938 of file Assembly.h.

1938{ 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 1948 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 112 of file Assembly.h.

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

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

308{ 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 280 of file Assembly.h.

280{ return _coord; }

◆ copyFaceShapes() [1/2]

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

Definition at line 3092 of file Assembly.C.

3093{
3094 phiFace(v).shallowCopy(v.phiFace());
3095 gradPhiFace(v).shallowCopy(v.gradPhiFace());
3096 if (v.computingSecond())
3097 secondPhiFace(v).shallowCopy(v.secondPhiFace());
3098}
const VariablePhiValue & phiFace() const
Definition Assembly.h:1327
const VariablePhiGradient & gradPhiFace() const
Definition Assembly.h:1329
const VariablePhiSecond & secondPhiFace(const MooseVariableField< Real > &) const
Definition Assembly.h:1334
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 3101 of file Assembly.C.

3102{
3103 auto & v = _sys.getVariable(_tid, var);
3104 if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3105 {
3106 auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3107 copyFaceShapes(v);
3108 }
3109 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3110 {
3112 copyFaceShapes(v);
3113 }
3114 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3115 {
3117 copyFaceShapes(v);
3118 if (v.computingCurl())
3119 _vector_curl_phi_face.shallowCopy(v.curlPhi());
3120 if (v.computingDiv())
3121 _vector_div_phi_face.shallowCopy(v.divPhi());
3122 }
3123 else
3124 mooseError("Unsupported variable field type!");
3125}
void copyFaceShapes(MooseVariableField< T > &v)
Definition Assembly.C:3092
VectorVariablePhiCurl _vector_curl_phi_face
Definition Assembly.h:2717
VectorVariablePhiDivergence _vector_div_phi_face
Definition Assembly.h:2718
MooseVariableField< T > & getActualFieldVariable(THREAD_ID tid, const std::string &var_name)
Returns a field variable pointer - this includes finite volume variables.
Definition SystemBase.C:120
@ 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
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ copyNeighborShapes() [1/2]

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

Definition at line 3129 of file Assembly.C.

3130{
3131 if (v.usesPhiNeighbor())
3132 {
3133 phiFaceNeighbor(v).shallowCopy(v.phiFaceNeighbor());
3134 phiNeighbor(v).shallowCopy(v.phiNeighbor());
3135 }
3136 if (v.usesGradPhiNeighbor())
3137 {
3138 gradPhiFaceNeighbor(v).shallowCopy(v.gradPhiFaceNeighbor());
3139 gradPhiNeighbor(v).shallowCopy(v.gradPhiNeighbor());
3140 }
3141 if (v.usesSecondPhiNeighbor())
3142 {
3143 secondPhiFaceNeighbor(v).shallowCopy(v.secondPhiFaceNeighbor());
3144 secondPhiNeighbor(v).shallowCopy(v.secondPhiNeighbor());
3145 }
3146}
const VariablePhiSecond & secondPhiNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1347
const VariablePhiGradient & gradPhiNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1343
const VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1356
const VariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1360
const VariablePhiValue & phiNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1339
const VariablePhiValue & phiFaceNeighbor(const MooseVariableField< Real > &) const
Definition Assembly.h:1352
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 3149 of file Assembly.C.

3150{
3151 auto & v = _sys.getVariable(_tid, var);
3152 if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3153 {
3154 auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3156 }
3157 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3158 {
3161 }
3162 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3163 {
3166 }
3167 else
3168 mooseError("Unsupported variable field type!");
3169}
void copyNeighborShapes(MooseVariableField< T > &v)
Definition Assembly.C:3129

◆ copyShapes() [1/2]

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

Definition at line 3055 of file Assembly.C.

3056{
3057 phi(v).shallowCopy(v.phi());
3058 gradPhi(v).shallowCopy(v.gradPhi());
3059 if (v.computingSecond())
3060 secondPhi(v).shallowCopy(v.secondPhi());
3061}
const VariablePhiGradient & gradPhi() const
Definition Assembly.h:1319
const VariablePhiValue & phi() const
Definition Assembly.h:1312
const VariablePhiSecond & secondPhi() const
Definition Assembly.h:1321
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 3064 of file Assembly.C.

3065{
3066 auto & v = _sys.getVariable(_tid, var);
3067 if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_STANDARD)
3068 {
3069 auto & v = _sys.getActualFieldVariable<Real>(_tid, var);
3070 copyShapes(v);
3071 }
3072 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_ARRAY)
3073 {
3075 copyShapes(v);
3076 }
3077 else if (v.fieldType() == Moose::VarFieldType::VAR_FIELD_VECTOR)
3078 {
3080 copyShapes(v);
3081 if (v.computingCurl())
3082 curlPhi(v).shallowCopy(v.curlPhi());
3083 if (v.computingDiv())
3084 divPhi(v).shallowCopy(v.divPhi());
3085 }
3086 else
3087 mooseError("Unsupported variable field type!");
3088}
const VectorVariablePhiDivergence & divPhi(const MooseVariableField< RealVectorValue > &) const
Definition Assembly.h:1381
const VectorVariablePhiCurl & curlPhi(const MooseVariableField< RealVectorValue > &) const
Definition Assembly.h:1377
void copyShapes(MooseVariableField< T > &v)
Definition Assembly.C:3055

◆ couplingEntries() [1/2]

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

Definition at line 1286 of file Assembly.h.

1287 {
1288 return _cm_ff_entry;
1289 }

Referenced by MortarConstraint::computeJacobian().

◆ couplingEntries() [2/2]

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

Definition at line 1291 of file Assembly.h.

1292 {
1293 return _cm_ff_entry;
1294 }

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

660{
661 auto & qvec = _qrules[block];
662 unsigned int ndims = _mesh_dimension + 1; // must account for 0-dimensional quadrature.
663 if (qvec.size() != ndims)
664 qvec.resize(ndims);
665
666 for (unsigned int i = 0; i < qvec.size(); i++)
667 {
668 int dim = i;
669 auto & q = qvec[dim];
670 q.vol = QBase::build(type, dim, volume_order);
671 q.vol->allow_rules_with_negative_weights = allow_negative_qweights;
672 q.face = QBase::build(type, dim - 1, face_order);
673 q.face->allow_rules_with_negative_weights = allow_negative_qweights;
674 q.fv_face = QBase::build(libMesh::QMONOMIAL, dim - 1, CONSTANT);
675 q.fv_face->allow_rules_with_negative_weights = allow_negative_qweights;
676 q.neighbor = std::make_unique<ArbitraryQuadrature>(dim - 1, face_order);
677 q.neighbor->allow_rules_with_negative_weights = allow_negative_qweights;
678 q.arbitrary_vol = std::make_unique<ArbitraryQuadrature>(dim, order);
679 q.arbitrary_vol->allow_rules_with_negative_weights = allow_negative_qweights;
680 q.arbitrary_face = std::make_unique<ArbitraryQuadrature>(dim - 1, face_order);
681 q.arbitrary_face->allow_rules_with_negative_weights = allow_negative_qweights;
682 }
683
684 delete _qrule_msm;
685 _custom_mortar_qrule = false;
686 _qrule_msm = QBase::build(type, _mesh_dimension - 1, face_order).release();
687 _qrule_msm->allow_rules_with_negative_weights = allow_negative_qweights;
688 _fe_msm->attach_quadrature_rule(_qrule_msm);
689}
bool allow_rules_with_negative_weights

Referenced by bumpAllQRuleOrder(), and bumpVolumeQRuleOrder().

◆ curlPhi() [1/2]

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

Definition at line 1498 of file Assembly.h.

1499 {
1500 return _vector_curl_phi;
1501 }
VectorVariablePhiCurl _vector_curl_phi
Definition Assembly.h:2711

◆ curlPhi() [2/2]

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

Definition at line 1377 of file Assembly.h.

1378 {
1379 return _vector_curl_phi;
1380 }

Referenced by copyShapes().

◆ curlPhiFace() [1/2]

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

Definition at line 1519 of file Assembly.h.

1520 {
1521 return _vector_curl_phi_face;
1522 }

◆ curlPhiFace() [2/2]

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

Definition at line 1398 of file Assembly.h.

1399 {
1400 return _vector_curl_phi_face;
1401 }

◆ curlPhiFaceNeighbor() [1/2]

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

Definition at line 1560 of file Assembly.h.

1561 {
1563 }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition Assembly.h:2729

◆ curlPhiFaceNeighbor() [2/2]

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

Definition at line 1446 of file Assembly.h.

1447 {
1449 }

◆ curlPhiNeighbor() [1/2]

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

Definition at line 1540 of file Assembly.h.

1541 {
1543 }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition Assembly.h:2723

◆ curlPhiNeighbor() [2/2]

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

Definition at line 1421 of file Assembly.h.

1422 {
1424 }

◆ currentBoundaryID()

const BoundaryID & Assembly::currentBoundaryID ( ) const
inline

Return the current boundary ID.

Definition at line 421 of file Assembly.h.

421{ return _current_boundary_id; }
BoundaryID _current_boundary_id
The current boundary ID.
Definition Assembly.h:2588

◆ currentNeighborSubdomainID()

const SubdomainID & Assembly::currentNeighborSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 489 of file Assembly.h.

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

◆ currentSubdomainID()

const SubdomainID & Assembly::currentSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 411 of file Assembly.h.

411{ return _current_subdomain_id; }
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition Assembly.h:2586

◆ divPhi() [1/2]

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

Definition at line 1502 of file Assembly.h.

1503 {
1504 return _vector_div_phi;
1505 }
VectorVariablePhiDivergence _vector_div_phi
Definition Assembly.h:2712

◆ divPhi() [2/2]

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

Definition at line 1381 of file Assembly.h.

1382 {
1383 return _vector_div_phi;
1384 }

Referenced by copyShapes().

◆ divPhiFace() [1/2]

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

Definition at line 1523 of file Assembly.h.

1524 {
1525 return _vector_div_phi_face;
1526 }

◆ divPhiFace() [2/2]

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

Definition at line 1402 of file Assembly.h.

1403 {
1404 return _vector_div_phi_face;
1405 }

◆ divPhiFaceNeighbor() [1/2]

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

Definition at line 1564 of file Assembly.h.

1565 {
1567 }
VectorVariablePhiDivergence _vector_div_phi_face_neighbor
Definition Assembly.h:2730

◆ divPhiFaceNeighbor() [2/2]

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

Definition at line 1451 of file Assembly.h.

1452 {
1454 }

◆ divPhiNeighbor() [1/2]

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

Definition at line 1544 of file Assembly.h.

1545 {
1547 }
VectorVariablePhiDivergence _vector_div_phi_neighbor
Definition Assembly.h:2724

◆ divPhiNeighbor() [2/2]

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

Definition at line 1426 of file Assembly.h.

1427 {
1429 }

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

3810{
3811 FEType fe_type(elem->default_order(), LAGRANGE);
3812 std::unique_ptr<FEBase> fe(FEBase::build(elem->dim(), fe_type));
3813
3814 // references to the quadrature points and weights
3815 const std::vector<Real> & JxW = fe->get_JxW();
3816 const std::vector<Point> & q_points = fe->get_xyz();
3817
3818 // The default quadrature rule should integrate the mass matrix,
3819 // thus it should be plenty to compute the volume
3820 QGauss qrule(elem->dim(), fe_type.default_quadrature_order());
3821 fe->attach_quadrature_rule(&qrule);
3822 fe->reinit(elem);
3823
3824 // perform a sanity check to ensure that size of quad rule and size of q_points is
3825 // identical
3826 mooseAssert(qrule.n_points() == q_points.size(),
3827 "The number of points in the quadrature rule doesn't match the number of passed-in "
3828 "points in Assembly::setCoordinateTransformation");
3829
3830 // compute the coordinate transformation
3831 Real vol = 0;
3832 for (unsigned int qp = 0; qp < qrule.n_points(); ++qp)
3833 {
3834 Real coord;
3835 coordTransformFactor(_subproblem, elem->subdomain_id(), q_points[qp], coord);
3836 vol += JxW[qp] * coord;
3837 }
3838 return vol;
3839}
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:268

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

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

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

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

◆ feADGradPhi() [1/2]

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

Definition at line 1625 of file Assembly.h.

1626 {
1627 return _ad_grad_phi_data[type];
1628 }

◆ feADGradPhi() [2/2]

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

Definition at line 2929 of file Assembly.h.

2931{
2932 return _ad_vector_grad_phi_data[type];
2933}

◆ feADGradPhiFace() [1/2]

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

Definition at line 1666 of file Assembly.h.

1667 {
1668 return _ad_grad_phi_data_face[type];
1669 }

◆ feADGradPhiFace() [2/2]

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

Definition at line 2936 of file Assembly.h.

2938{
2939 return _ad_vector_grad_phi_data_face[type];
2940}

◆ feCurlPhi() [1/3]

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

Definition at line 1732 of file Assembly.h.

1733 {
1734 _need_curl.insert(type);
1735 buildFE(type);
1736 return _fe_shape_data[type]->_curl_phi;
1737 }

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

4760{
4761 _need_curl.insert(type);
4762 buildVectorFE(type);
4763 return _vector_fe_shape_data[type]->_curl_phi;
4764}
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition Assembly.C:478

◆ feCurlPhiFace() [1/3]

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

Definition at line 1740 of file Assembly.h.

1741 {
1742 _need_curl.insert(type);
1743 buildFaceFE(type);
1744 return _fe_shape_data_face[type]->_curl_phi;
1745 }

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

4769{
4770 _need_curl.insert(type);
4771 buildVectorFaceFE(type);
4772
4773 // If we're building for a face we probably need to build for a
4774 // neighbor while _need_curl is set;
4775 // onInterface/reinitNeighbor/etc don't distinguish
4777
4778 return _vector_fe_shape_data_face[type]->_curl_phi;
4779}
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition Assembly.C:578
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition Assembly.C:512

◆ feCurlPhiFaceNeighbor() [1/3]

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

Definition at line 1756 of file Assembly.h.

1757 {
1758 _need_curl.insert(type);
1759 buildFaceNeighborFE(type);
1760 return _fe_shape_data_face_neighbor[type]->_curl_phi;
1761 }

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

4793{
4794 _need_curl.insert(type);
4796
4797 return _vector_fe_shape_data_face_neighbor[type]->_curl_phi;
4798}

◆ feCurlPhiNeighbor() [1/3]

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

Definition at line 1748 of file Assembly.h.

1749 {
1750 _need_curl.insert(type);
1751 buildNeighborFE(type);
1752 return _fe_shape_data_neighbor[type]->_curl_phi;
1753 }

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

4784{
4785 _need_curl.insert(type);
4787 return _vector_fe_shape_data_neighbor[type]->_curl_phi;
4788}
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition Assembly.C:545

◆ feDivPhi() [1/3]

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

Definition at line 1764 of file Assembly.h.

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

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

4803{
4804 _need_div.insert(type);
4805 buildVectorFE(type);
4806 return _vector_fe_shape_data[type]->_div_phi;
4807}

◆ feDivPhiFace() [1/3]

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

Definition at line 1771 of file Assembly.h.

1772 {
1773 buildFaceFE(type);
1774 return _fe_shape_data_face[type]->_div_phi;
1775 }

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

4812{
4813 _need_face_div.insert(type);
4814 buildVectorFaceFE(type);
4815
4816 // If we're building for a face we probably need to build for a
4817 // neighbor while _need_face_div is set;
4818 // onInterface/reinitNeighbor/etc don't distinguish
4820
4821 return _vector_fe_shape_data_face[type]->_div_phi;
4822}

◆ feDivPhiFaceNeighbor() [1/3]

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

Definition at line 1787 of file Assembly.h.

1788 {
1789 buildFaceNeighborFE(type);
1790 return _fe_shape_data_face_neighbor[type]->_div_phi;
1791 }

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

4836{
4837 _need_face_neighbor_div.insert(type);
4839 return _vector_fe_shape_data_face_neighbor[type]->_div_phi;
4840}

◆ feDivPhiNeighbor() [1/3]

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

Definition at line 1779 of file Assembly.h.

1780 {
1781 buildNeighborFE(type);
1782 return _fe_shape_data_neighbor[type]->_div_phi;
1783 }

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

4827{
4828 _need_neighbor_div.insert(type);
4830 return _vector_fe_shape_data_neighbor[type]->_div_phi;
4831}

◆ feDualPhiLower() [1/3]

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

Definition at line 2906 of file Assembly.h.

2907{
2908 buildLowerDDualFE(type);
2909 return _fe_shape_data_dual_lower[type]->_phi;
2910}
void buildLowerDDualFE(FEType type) const
Definition Assembly.C:398

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

4655{
4657 return _vector_fe_shape_data_dual_lower[type]->_phi;
4658}
void buildVectorDualLowerDFE(FEType type) const
Definition Assembly.C:450

◆ feGradDualPhiLower() [1/3]

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

Definition at line 2922 of file Assembly.h.

2923{
2924 buildLowerDDualFE(type);
2925 return _fe_shape_data_dual_lower[type]->_grad_phi;
2926}

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

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

◆ feGradPhi() [1/3]

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

Definition at line 1618 of file Assembly.h.

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

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

4630{
4631 buildVectorFE(type);
4632 return _vector_fe_shape_data[type]->_grad_phi;
4633}

◆ feGradPhiFace() [1/3]

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

Definition at line 1659 of file Assembly.h.

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

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

4687{
4688 buildVectorFaceFE(type);
4689 return _vector_fe_shape_data_face[type]->_grad_phi;
4690}

◆ feGradPhiFaceNeighbor() [1/3]

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

Definition at line 1716 of file Assembly.h.

1717 {
1718 buildFaceNeighborFE(type);
1719 return _fe_shape_data_face_neighbor[type]->_grad_phi;
1720 }

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

4743{
4745 return _vector_fe_shape_data_face_neighbor[type]->_grad_phi;
4746}

◆ feGradPhiLower() [1/3]

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

Definition at line 2914 of file Assembly.h.

2915{
2916 buildLowerDFE(type);
2917 return _fe_shape_data_lower[type]->_grad_phi;
2918}

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

4663{
4664 buildVectorLowerDFE(type);
4665 return _vector_fe_shape_data_lower[type]->_grad_phi;
4666}
void buildVectorLowerDFE(FEType type) const
Build Vector FEs for a lower dimensional element with a type.
Definition Assembly.C:422

◆ feGradPhiNeighbor() [1/3]

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

Definition at line 1693 of file Assembly.h.

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

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

4718{
4720 return _vector_fe_shape_data_neighbor[type]->_grad_phi;
4721}

◆ fePhi() [1/3]

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

Definition at line 1611 of file Assembly.h.

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

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

4622{
4623 buildVectorFE(type);
4624 return _vector_fe_shape_data[type]->_phi;
4625}

◆ fePhiFace() [1/3]

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

Definition at line 1652 of file Assembly.h.

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

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

4679{
4680 buildVectorFaceFE(type);
4681 return _vector_fe_shape_data_face[type]->_phi;
4682}

◆ fePhiFaceNeighbor() [1/3]

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

Definition at line 1708 of file Assembly.h.

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

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

4735{
4737 return _vector_fe_shape_data_face_neighbor[type]->_phi;
4738}

◆ fePhiLower() [1/3]

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

Definition at line 2898 of file Assembly.h.

2899{
2900 buildLowerDFE(type);
2901 return _fe_shape_data_lower[type]->_phi;
2902}

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

4647{
4648 buildVectorLowerDFE(type);
4649 return _vector_fe_shape_data_lower[type]->_phi;
4650}

◆ fePhiNeighbor() [1/3]

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

Definition at line 1686 of file Assembly.h.

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

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

4710{
4712 return _vector_fe_shape_data_neighbor[type]->_phi;
4713}

◆ feSecondPhi() [1/3]

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

Definition at line 1631 of file Assembly.h.

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

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

4638{
4639 _need_second_derivative.insert(type);
4640 buildVectorFE(type);
4641 return _vector_fe_shape_data[type]->_second_phi;
4642}

◆ feSecondPhiFace() [1/3]

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

Definition at line 1678 of file Assembly.h.

1679 {
1680 _need_second_derivative.insert(type);
1681 buildFaceFE(type);
1682 return _fe_shape_data_face[type]->_second_phi;
1683 }

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

4695{
4696 _need_second_derivative.insert(type);
4697 buildVectorFaceFE(type);
4698
4699 // If we're building for a face we probably need to build for a
4700 // neighbor while _need_second_derivative is set;
4701 // onInterface/reinitNeighbor/etc don't distinguish
4703
4704 return _vector_fe_shape_data_face[type]->_second_phi;
4705}

◆ feSecondPhiFaceNeighbor() [1/3]

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

Definition at line 1724 of file Assembly.h.

1725 {
1727 buildFaceNeighborFE(type);
1728 return _fe_shape_data_face_neighbor[type]->_second_phi;
1729 }

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

4751{
4754 return _vector_fe_shape_data_face_neighbor[type]->_second_phi;
4755}

◆ feSecondPhiNeighbor() [1/3]

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

Definition at line 1700 of file Assembly.h.

1701 {
1703 buildNeighborFE(type);
1704 return _fe_shape_data_neighbor[type]->_second_phi;
1705 }

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

4726{
4729 return _vector_fe_shape_data_neighbor[type]->_second_phi;
4730}

◆ fieldScalarCouplingEntries()

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

Definition at line 1301 of file Assembly.h.

1302 {
1303 return _cm_fs_entry;
1304 }

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

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

◆ genericQPoints() [3/3]

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

Definition at line 4983 of file Assembly.C.

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

◆ getFE()

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

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

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

Definition at line 124 of file Assembly.h.

125 {
126 buildFE(type);
127 return constify_ref(_fe[dim][type]);
128 }
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:112

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

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

◆ getFEFaceNeighbor()

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

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

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

Definition at line 160 of file Assembly.h.

161 {
163 return constify_ref(_fe_face_neighbor[dim][type]);
164 }

◆ getFENeighbor()

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

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

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

Definition at line 136 of file Assembly.h.

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

◆ getJacobianDiagonal()

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

Definition at line 1890 of file Assembly.h.

1891 {
1892 unsigned int rows = ke.m();
1893 unsigned int cols = ke.n();
1894 DenseVector<Real> diag(rows);
1895 for (unsigned int i = 0; i < rows; i++)
1896 // % operation is needed to account for cases of no component coupling of array variables
1897 diag(i) = ke(i, i % cols);
1898 return diag;
1899 }

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

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

◆ getVectorFEFace()

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

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

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

Definition at line 196 of file Assembly.h.

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

◆ getVectorFEFaceNeighbor()

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

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

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

Definition at line 208 of file Assembly.h.

209 {
211 return constify_ref(_vector_fe_face_neighbor[dim][type]);
212 }

◆ getVectorFENeighbor()

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

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

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

Definition at line 184 of file Assembly.h.

185 {
187 return constify_ref(_vector_fe_neighbor[dim][type]);
188 }

◆ gradPhi() [1/6]

const VariablePhiGradient & Assembly::gradPhi ( ) const
inline

Definition at line 1319 of file Assembly.h.

1319{ return _grad_phi; }
VariablePhiGradient _grad_phi
Definition Assembly.h:2692

Referenced by copyShapes().

◆ gradPhi() [2/6]

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

Definition at line 1458 of file Assembly.h.

1458{ return _grad_phi; }

◆ gradPhi() [3/6]

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

Definition at line 1320 of file Assembly.h.

1320{ return _grad_phi; }

◆ gradPhi() [4/6]

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

Definition at line 1571 of file Assembly.h.

1571{ return _grad_phi; }

◆ gradPhi() [5/6]

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

Definition at line 1490 of file Assembly.h.

1491 {
1492 return _vector_grad_phi;
1493 }
VectorVariablePhiGradient _vector_grad_phi
Definition Assembly.h:2709

◆ gradPhi() [6/6]

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

Definition at line 1369 of file Assembly.h.

1370 {
1371 return _vector_grad_phi;
1372 }

◆ gradPhiFace() [1/6]

const VariablePhiGradient & Assembly::gradPhiFace ( ) const
inline

Definition at line 1329 of file Assembly.h.

1329{ return _grad_phi_face; }
VariablePhiGradient _grad_phi_face
Definition Assembly.h:2696

Referenced by copyFaceShapes().

◆ gradPhiFace() [2/6]

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

Definition at line 1462 of file Assembly.h.

1462{ return _grad_phi_face; }

◆ gradPhiFace() [3/6]

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

Definition at line 1330 of file Assembly.h.

1331 {
1332 return _grad_phi_face;
1333 }

◆ gradPhiFace() [4/6]

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

Definition at line 1575 of file Assembly.h.

1576 {
1577 return _grad_phi_face;
1578 }

◆ gradPhiFace() [5/6]

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

Definition at line 1511 of file Assembly.h.

1512 {
1513 return _vector_grad_phi_face;
1514 }
VectorVariablePhiGradient _vector_grad_phi_face
Definition Assembly.h:2715

◆ gradPhiFace() [6/6]

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

Definition at line 1390 of file Assembly.h.

1391 {
1392 return _vector_grad_phi_face;
1393 }

◆ gradPhiFaceNeighbor() [1/5]

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

Definition at line 1479 of file Assembly.h.

1480 {
1482 }
VariablePhiGradient _grad_phi_face_neighbor
Definition Assembly.h:2704

◆ gradPhiFaceNeighbor() [2/5]

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

Definition at line 1356 of file Assembly.h.

1357 {
1359 }

Referenced by copyNeighborShapes().

◆ gradPhiFaceNeighbor() [3/5]

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

Definition at line 1601 of file Assembly.h.

1602 {
1604 }

◆ gradPhiFaceNeighbor() [4/5]

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

Definition at line 1552 of file Assembly.h.

1553 {
1555 }
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition Assembly.h:2727

◆ gradPhiFaceNeighbor() [5/5]

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

Definition at line 1436 of file Assembly.h.

1437 {
1439 }

◆ gradPhiNeighbor() [1/5]

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

Definition at line 1466 of file Assembly.h.

1467 {
1468 return _grad_phi_neighbor;
1469 }
VariablePhiGradient _grad_phi_neighbor
Definition Assembly.h:2700

◆ gradPhiNeighbor() [2/5]

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

Definition at line 1343 of file Assembly.h.

1344 {
1345 return _grad_phi_neighbor;
1346 }

Referenced by copyNeighborShapes().

◆ gradPhiNeighbor() [3/5]

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

Definition at line 1588 of file Assembly.h.

1589 {
1590 return _grad_phi_neighbor;
1591 }

◆ gradPhiNeighbor() [4/5]

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

Definition at line 1532 of file Assembly.h.

1533 {
1535 }
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition Assembly.h:2721

◆ gradPhiNeighbor() [5/5]

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

Definition at line 1412 of file Assembly.h.

1413 {
1415 }

◆ helpersRequestData()

void Assembly::helpersRequestData ( )
private

request phi, dphi, xyz, JxW, etc.

data through the FE helper functions

Definition at line 4854 of file Assembly.C.

4855{
4856 for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
4857 {
4858 _holder_fe_helper[dim]->get_phi();
4859 _holder_fe_helper[dim]->get_dphi();
4860 _holder_fe_helper[dim]->get_xyz();
4861 _holder_fe_helper[dim]->get_JxW();
4862
4863 _holder_fe_face_helper[dim]->get_phi();
4864 _holder_fe_face_helper[dim]->get_dphi();
4865 _holder_fe_face_helper[dim]->get_xyz();
4866 _holder_fe_face_helper[dim]->get_JxW();
4867 _holder_fe_face_helper[dim]->get_normals();
4868
4871 _holder_fe_face_neighbor_helper[dim]->get_normals();
4872
4873 _holder_fe_neighbor_helper[dim]->get_xyz();
4874 _holder_fe_neighbor_helper[dim]->get_JxW();
4875 }
4876
4877 for (unsigned int dim = 0; dim < _mesh_dimension; dim++)
4878 {
4879 // We need these computations in order to compute correct lower-d element volumes in
4880 // curvilinear coordinates
4881 _holder_fe_lower_helper[dim]->get_xyz();
4882 _holder_fe_lower_helper[dim]->get_JxW();
4883 }
4884}

Referenced by Assembly(), and preparePRefinement().

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

2704{
2705 _cm_nonlocal_entry.clear();
2706
2707 auto & vars = _sys.getVariables(_tid);
2708
2709 for (auto & ivar : vars)
2710 {
2711 auto i = ivar->number();
2712 auto ivar_start = _cm_nonlocal_entry.size();
2713 for (unsigned int k = 0; k < ivar->count(); ++k)
2714 {
2715 unsigned int iv = i + k;
2716 for (const auto & j : libMesh::ConstCouplingRow(iv, _nonlocal_cm))
2717 if (!_sys.isScalarVariable(j))
2718 {
2719 auto & jvar = _sys.getVariable(_tid, j);
2720 auto pair = std::make_pair(ivar, &jvar);
2721 auto c = ivar_start;
2722 // check if the pair has been pushed or not
2723 bool has_pair = false;
2724 for (; c < _cm_nonlocal_entry.size(); ++c)
2725 if (_cm_nonlocal_entry[c] == pair)
2726 {
2727 has_pair = true;
2728 break;
2729 }
2730 if (!has_pair)
2731 _cm_nonlocal_entry.push_back(pair);
2732 }
2733 }
2734 }
2735}

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

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

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

2273 {
2274 return _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2275 }

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

2264 {
2265 _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2266 }

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

3218{
3219 jacobianBlockLowerUsed(tag, ivar, jvar, true);
3221 {
3222 switch (type)
3223 {
3224 default:
3225 case Moose::LowerLower:
3226 return _sub_Kll[tag][ivar][0];
3228 return _sub_Kle[tag][ivar][0];
3230 return _sub_Kln[tag][ivar][0];
3232 return _sub_Kel[tag][ivar][0];
3234 return _sub_Kee[tag][ivar][0];
3236 return _sub_Ken[tag][ivar][0];
3238 return _sub_Knl[tag][ivar][0];
3240 return _sub_Kne[tag][ivar][0];
3242 return _sub_Knn[tag][ivar][0];
3243 }
3244 }
3245 else
3246 {
3247 switch (type)
3248 {
3249 default:
3250 case Moose::LowerLower:
3251 return _sub_Kll[tag][ivar][jvar];
3253 return _sub_Kle[tag][ivar][jvar];
3255 return _sub_Kln[tag][ivar][jvar];
3257 return _sub_Kel[tag][ivar][jvar];
3259 return _sub_Kee[tag][ivar][jvar];
3261 return _sub_Ken[tag][ivar][jvar];
3263 return _sub_Knl[tag][ivar][jvar];
3265 return _sub_Kne[tag][ivar][jvar];
3267 return _sub_Knn[tag][ivar][jvar];
3268 }
3269 }
3270}
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
dlower/dlower
Definition Assembly.h:2677
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition Assembly.h:2671
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
dlower/dsecondary (or dlower/delement)
Definition Assembly.h:2679
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition Assembly.h:2675
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
dlower/dprimary (or dlower/dneighbor)
Definition Assembly.h:2681
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
dsecondary/dlower (or delement/dlower)
Definition Assembly.h:2683
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition Assembly.h:2673
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
dprimary/dlower (or dneighbor/dlower)
Definition Assembly.h:2685

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

3174{
3175 if (type == Moose::ElementElement)
3176 jacobianBlockUsed(tag, ivar, jvar, true);
3177 else
3178 jacobianBlockNeighborUsed(tag, ivar, jvar, true);
3179
3181 {
3182 switch (type)
3183 {
3184 default:
3186 return _sub_Kee[tag][ivar][0];
3188 return _sub_Ken[tag][ivar][0];
3190 return _sub_Kne[tag][ivar][0];
3192 return _sub_Knn[tag][ivar][0];
3193 }
3194 }
3195 else
3196 {
3197 switch (type)
3198 {
3199 default:
3201 return _sub_Kee[tag][ivar][jvar];
3203 return _sub_Ken[tag][ivar][jvar];
3205 return _sub_Kne[tag][ivar][jvar];
3207 return _sub_Knn[tag][ivar][jvar];
3208 }
3209 }
3210}
@ 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 2254 of file Assembly.h.

2255 {
2256 return _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2257 }

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

2246 {
2247 _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2248 }

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

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

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

2291 {
2292 return _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2293 }

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

2282 {
2283 _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2284 }

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

2237 {
2238 return _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2239 }

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

2228 {
2229 _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2230 }

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

268{ 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 343 of file Assembly.h.

343{ return _current_JxW_face; }

Referenced by NonlinearThread::onInterfaceWithHRefinementMismatch().

◆ jxWMortar()

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

Returns a reference to JxW for mortar segment elements.

Definition at line 699 of file Assembly.h.

699{ 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 260 of file Assembly.C.

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

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

468{ return _current_lower_d_elem; }

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

◆ lowerDElemVolume()

const Real & Assembly::lowerDElemVolume ( ) const
inline

Definition at line 3204 of file Assembly.h.

3205{
3208}
Real _current_lower_d_elem_volume
The current lower dimensional element volume.
Definition Assembly.h:2625

◆ mappedNormals()

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

Definition at line 354 of file Assembly.h.

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

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

4611{
4612 mooseAssert(_current_qrule == _current_qrule_arbitrary, "Rule should be arbitrary");
4613 mooseAssert(weights.size() == _current_physical_points.size(), "Size mismatch");
4614
4615 for (MooseIndex(weights.size()) i = 0; i < weights.size(); ++i)
4616 _current_JxW[i] = weights[i];
4617}
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 4589 of file Assembly.C.

4590{
4591 mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
4592
4594 return;
4595
4596 MooseArray<Real> xfem_face_weight_multipliers;
4597 if (_xfem->getXFEMFaceWeights(
4598 xfem_face_weight_multipliers, elem, _current_qrule_face, _current_q_points_face, side))
4599 {
4600 mooseAssert(xfem_face_weight_multipliers.size() == _current_JxW_face.size(),
4601 "Size of weight multipliers in xfem doesn't match number of quadrature points");
4602 for (unsigned i = 0; i < xfem_face_weight_multipliers.size(); i++)
4603 _current_JxW_face[i] = _current_JxW_face[i] * xfem_face_weight_multipliers[i];
4604
4605 xfem_face_weight_multipliers.release();
4606 }
4607}
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition Assembly.h:2367
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 4569 of file Assembly.C.

4570{
4571 mooseAssert(_xfem != nullptr, "This function should not be called if xfem is inactive");
4572
4574 return;
4575
4576 MooseArray<Real> xfem_weight_multipliers;
4577 if (_xfem->getXFEMWeights(xfem_weight_multipliers, elem, _current_qrule, _current_q_points))
4578 {
4579 mooseAssert(xfem_weight_multipliers.size() == _current_JxW.size(),
4580 "Size of weight multipliers in xfem doesn't match number of quadrature points");
4581 for (unsigned i = 0; i < xfem_weight_multipliers.size(); i++)
4582 _current_JxW[i] = _current_JxW[i] * xfem_weight_multipliers[i];
4583
4584 xfem_weight_multipliers.release();
4585 }
4586}

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

286{ return _coord_msm; }

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

◆ msmElem()

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

Definition at line 1953 of file Assembly.h.

1953{ return _msm_elem; }
const Elem * _msm_elem
Definition Assembly.h:2872

◆ needADGradPhiFace()

void Assembly::needADGradPhiFace ( ) const
inline

Request that face reinitialization compute the AD shape function gradients.

Variables call this when an object needs their AD gradient or their AD face test function gradients.

Definition at line 1675 of file Assembly.h.

1675{ _need_ad_grad_phi_face = true; }

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

615{ 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 474 of file Assembly.h.

◆ neighborLowerDElemVolume()

const Real & Assembly::neighborLowerDElemVolume ( ) const
inline

Definition at line 3211 of file Assembly.h.

3212{
3215}
Real _current_neighbor_lower_d_elem_volume
The current neighboring lower dimensional element volume.
Definition Assembly.h:2629

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

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

501 {
504 }

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

537{ 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 543 of file Assembly.h.

543{ return _current_neighbor_node; }

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

◆ nonlocalCouplingEntries()

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

Definition at line 1296 of file Assembly.h.

1297 {
1298 return _cm_nonlocal_entry;
1299 }

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

349{ return _current_normals; }

◆ numExtraElemIntegers()

unsigned int Assembly::numExtraElemIntegers ( ) const
inline

Number of extra element integers Assembly tracked.

Definition at line 365 of file Assembly.h.

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

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

◆ phi() [1/6]

const VariablePhiValue & Assembly::phi ( ) const
inline

Definition at line 1312 of file Assembly.h.

1312{ return _phi; }
VariablePhiValue _phi
Definition Assembly.h:2691

Referenced by copyShapes().

◆ phi() [2/6]

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

Definition at line 1457 of file Assembly.h.

1457{ return _phi; }

◆ phi() [3/6]

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

Definition at line 1318 of file Assembly.h.

1318{ return _phi; }

◆ phi() [4/6]

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

Definition at line 1570 of file Assembly.h.

1570{ return _phi; }

◆ phi() [5/6]

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

Definition at line 1489 of file Assembly.h.

1489{ return _vector_phi; }
VectorVariablePhiValue _vector_phi
Definition Assembly.h:2708

◆ phi() [6/6]

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

Definition at line 1365 of file Assembly.h.

1366 {
1367 return _vector_phi;
1368 }

◆ phiFace() [1/6]

const VariablePhiValue & Assembly::phiFace ( ) const
inline

Definition at line 1327 of file Assembly.h.

1327{ return _phi_face; }
VariablePhiValue _phi_face
Definition Assembly.h:2695

Referenced by copyFaceShapes().

◆ phiFace() [2/6]

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

Definition at line 1461 of file Assembly.h.

1461{ return _phi_face; }

◆ phiFace() [3/6]

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

Definition at line 1328 of file Assembly.h.

1328{ return _phi_face; }

◆ phiFace() [4/6]

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

Definition at line 1574 of file Assembly.h.

1574{ return _phi_face; }

◆ phiFace() [5/6]

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

Definition at line 1507 of file Assembly.h.

1508 {
1509 return _vector_phi_face;
1510 }
VectorVariablePhiValue _vector_phi_face
Definition Assembly.h:2714

◆ phiFace() [6/6]

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

Definition at line 1386 of file Assembly.h.

1387 {
1388 return _vector_phi_face;
1389 }

◆ phiFaceNeighbor() [1/5]

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

Definition at line 1475 of file Assembly.h.

1476 {
1477 return _phi_face_neighbor;
1478 }
VariablePhiValue _phi_face_neighbor
Definition Assembly.h:2703

◆ phiFaceNeighbor() [2/5]

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

Definition at line 1352 of file Assembly.h.

1353 {
1354 return _phi_face_neighbor;
1355 }

Referenced by copyNeighborShapes().

◆ phiFaceNeighbor() [3/5]

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

Definition at line 1597 of file Assembly.h.

1598 {
1599 return _phi_face_neighbor;
1600 }

◆ phiFaceNeighbor() [4/5]

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

Definition at line 1548 of file Assembly.h.

1549 {
1551 }
VectorVariablePhiValue _vector_phi_face_neighbor
Definition Assembly.h:2726

◆ phiFaceNeighbor() [5/5]

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

Definition at line 1431 of file Assembly.h.

1432 {
1434 }

◆ phiNeighbor() [1/5]

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

Definition at line 1465 of file Assembly.h.

1465{ return _phi_neighbor; }
VariablePhiValue _phi_neighbor
Definition Assembly.h:2699

◆ phiNeighbor() [2/5]

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

Definition at line 1339 of file Assembly.h.

1340 {
1341 return _phi_neighbor;
1342 }

Referenced by copyNeighborShapes().

◆ phiNeighbor() [3/5]

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

Definition at line 1584 of file Assembly.h.

1585 {
1586 return _phi_neighbor;
1587 }

◆ phiNeighbor() [4/5]

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

Definition at line 1528 of file Assembly.h.

1529 {
1530 return _vector_phi_neighbor;
1531 }
VectorVariablePhiValue _vector_phi_neighbor
Definition Assembly.h:2720

◆ phiNeighbor() [5/5]

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

Definition at line 1407 of file Assembly.h.

1408 {
1409 return _vector_phi_neighbor;
1410 }

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

262{ return _current_physical_points; }

◆ prepare()

void Assembly::prepare ( )

Definition at line 2771 of file Assembly.C.

2772{
2775}
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
Definition Assembly.C:2738
void prepareResidual()
Sizes and zeroes the residual for the current element.
Definition Assembly.C:2762

◆ prepareBlock()

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

Definition at line 2954 of file Assembly.C.

2957{
2958 const auto & iv = _sys.getVariable(_tid, ivar);
2959 const auto & jv = _sys.getVariable(_tid, jvar);
2960 const unsigned int ivn = iv.number();
2961 const unsigned int jvn = jv.number();
2962 const unsigned int icount = iv.count();
2963 unsigned int jcount = jv.count();
2964 if (ivn == jvn && _component_block_diagonal[ivn])
2965 jcount = 1;
2966
2967 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2968 {
2969 jacobianBlock(ivn, jvn, LocalDataKey{}, tag)
2970 .resize(dof_indices.size() * icount, dof_indices.size() * jcount);
2971 jacobianBlockUsed(tag, ivn, jvn, false);
2972 }
2973
2974 for (auto & tag_Re : _sub_Re)
2975 tag_Re[ivn].resize(dof_indices.size() * icount);
2976}

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

2983{
2984 const auto & iv = _sys.getVariable(_tid, ivar);
2985 const auto & jv = _sys.getVariable(_tid, jvar);
2986 const unsigned int ivn = iv.number();
2987 const unsigned int jvn = jv.number();
2988 const unsigned int icount = iv.count();
2989 unsigned int jcount = jv.count();
2990 if (ivn == jvn && _component_block_diagonal[ivn])
2991 jcount = 1;
2992
2993 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2994 tag < _jacobian_block_nonlocal_used.size();
2995 tag++)
2996 {
2997 jacobianBlockNonlocal(ivn, jvn, LocalDataKey{}, tag)
2998 .resize(idof_indices.size() * icount, jdof_indices.size() * jcount);
2999
3000 jacobianBlockNonlocalUsed(tag, ivn, jvn, false);
3001 }
3002}

◆ prepareJacobianBlock()

void Assembly::prepareJacobianBlock ( )

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

Definition at line 2738 of file Assembly.C.

2739{
2740 for (const auto & it : _cm_ff_entry)
2741 {
2742 MooseVariableFEBase & ivar = *(it.first);
2743 MooseVariableFEBase & jvar = *(it.second);
2744
2745 unsigned int vi = ivar.number();
2746 unsigned int vj = jvar.number();
2747
2748 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2749 auto num_cols = jvar.dofIndices().size();
2750 if (array_block_diagonal_purely_diagonal)
2751 num_cols /= jvar.count();
2752
2753 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2754 {
2755 jacobianBlock(vi, vj, LocalDataKey{}, tag).resize(ivar.dofIndices().size(), num_cols);
2756 jacobianBlockUsed(tag, vi, vj, false);
2757 }
2758 }
2759}
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 2902 of file Assembly.C.

2903{
2904 for (const auto & it : _cm_ff_entry)
2905 {
2906 MooseVariableFEBase & ivar = *(it.first);
2907 MooseVariableFEBase & jvar = *(it.second);
2908
2909 unsigned int vi = ivar.number();
2910 unsigned int vj = jvar.number();
2911
2912 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2913 const auto dofs_divisor = array_block_diagonal_purely_diagonal ? jvar.count() : 1;
2914
2915 for (MooseIndex(_jacobian_block_lower_used) tag = 0; tag < _jacobian_block_lower_used.size();
2916 tag++)
2917 {
2918 // To cover all possible cases we should have 9 combinations below for every 2-permutation
2919 // of Lower,Secondary,Primary. However, 4 cases will in general be covered by calls to
2920 // prepare() and prepareNeighbor(). These calls will cover SecondarySecondary
2921 // (ElementElement), SecondaryPrimary (ElementNeighbor), PrimarySecondary (NeighborElement),
2922 // and PrimaryPrimary (NeighborNeighbor). With these covered we only need to prepare the 5
2923 // remaining below
2924
2925 // derivatives w.r.t. lower dimensional residuals
2926 jacobianBlockMortar(Moose::LowerLower, vi, vj, LocalDataKey{}, tag)
2927 .resize(ivar.dofIndicesLower().size(), jvar.dofIndicesLower().size() / dofs_divisor);
2928
2929 jacobianBlockMortar(Moose::LowerSecondary, vi, vj, LocalDataKey{}, tag)
2930 .resize(ivar.dofIndicesLower().size(), jvar.dofIndices().size() / dofs_divisor);
2931
2932 jacobianBlockMortar(Moose::LowerPrimary, vi, vj, LocalDataKey{}, tag)
2933 .resize(ivar.dofIndicesLower().size(), jvar.dofIndicesNeighbor().size() / dofs_divisor);
2934
2935 // derivatives w.r.t. interior secondary residuals
2936 jacobianBlockMortar(Moose::SecondaryLower, vi, vj, LocalDataKey{}, tag)
2937 .resize(ivar.dofIndices().size(), jvar.dofIndicesLower().size() / dofs_divisor);
2938
2939 // derivatives w.r.t. interior primary residuals
2940 jacobianBlockMortar(Moose::PrimaryLower, vi, vj, LocalDataKey{}, tag)
2941 .resize(ivar.dofIndicesNeighbor().size(), jvar.dofIndicesLower().size() / dofs_divisor);
2942
2943 jacobianBlockLowerUsed(tag, vi, vj, false);
2944 }
2945 }
2946
2947 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2948 for (const auto & var : vars)
2949 for (auto & tag_Rl : _sub_Rl)
2950 tag_Rl[var->number()].resize(var->dofIndicesLower().size());
2951}
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 2864 of file Assembly.C.

2865{
2866 for (const auto & it : _cm_ff_entry)
2867 {
2868 MooseVariableFEBase & ivar = *(it.first);
2869 MooseVariableFEBase & jvar = *(it.second);
2870
2871 unsigned int vi = ivar.number();
2872 unsigned int vj = jvar.number();
2873
2874 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2875 const auto dofs_divisor = array_block_diagonal_purely_diagonal ? jvar.count() : 1;
2876
2877 for (MooseIndex(_jacobian_block_neighbor_used) tag = 0;
2878 tag < _jacobian_block_neighbor_used.size();
2879 tag++)
2880 {
2881 jacobianBlockNeighbor(Moose::ElementNeighbor, vi, vj, LocalDataKey{}, tag)
2882 .resize(ivar.dofIndices().size(), jvar.dofIndicesNeighbor().size() / dofs_divisor);
2883
2884 jacobianBlockNeighbor(Moose::NeighborElement, vi, vj, LocalDataKey{}, tag)
2885 .resize(ivar.dofIndicesNeighbor().size(), jvar.dofIndices().size() / dofs_divisor);
2886
2887 jacobianBlockNeighbor(Moose::NeighborNeighbor, vi, vj, LocalDataKey{}, tag)
2888 .resize(ivar.dofIndicesNeighbor().size(),
2889 jvar.dofIndicesNeighbor().size() / dofs_divisor);
2890
2891 jacobianBlockNeighborUsed(tag, vi, vj, false);
2892 }
2893 }
2894
2895 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2896 for (const auto & var : vars)
2897 for (auto & tag_Rn : _sub_Rn)
2898 tag_Rn[var->number()].resize(var->dofIndicesNeighbor().size());
2899}

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

◆ prepareNonlocal()

void Assembly::prepareNonlocal ( )

Definition at line 2778 of file Assembly.C.

2779{
2780 for (const auto & it : _cm_nonlocal_entry)
2781 {
2782 MooseVariableFEBase & ivar = *(it.first);
2783 MooseVariableFEBase & jvar = *(it.second);
2784
2785 unsigned int vi = ivar.number();
2786 unsigned int vj = jvar.number();
2787
2788 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2789 auto num_cols = jvar.allDofIndices().size();
2790 if (array_block_diagonal_purely_diagonal)
2791 num_cols /= jvar.count();
2792
2793 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2794 tag < _jacobian_block_nonlocal_used.size();
2795 tag++)
2796 {
2797 jacobianBlockNonlocal(vi, vj, LocalDataKey{}, tag).resize(ivar.dofIndices().size(), num_cols);
2798 jacobianBlockNonlocalUsed(tag, vi, vj, false);
2799 }
2800 }
2801}
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.

◆ prepareOffDiagScalar()

void Assembly::prepareOffDiagScalar ( )

Definition at line 3029 of file Assembly.C.

3030{
3031 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3032 const std::vector<MooseVariableScalar *> & scalar_vars = _sys.getScalarVariables(_tid);
3033
3034 for (const auto & ivar : scalar_vars)
3035 {
3036 auto idofs = ivar->dofIndices().size();
3037
3038 for (const auto & jvar : vars)
3039 {
3040 auto jdofs = jvar->dofIndices().size() * jvar->count();
3041 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
3042 {
3043 jacobianBlock(ivar->number(), jvar->number(), LocalDataKey{}, tag).resize(idofs, jdofs);
3044 jacobianBlockUsed(tag, ivar->number(), jvar->number(), false);
3045
3046 jacobianBlock(jvar->number(), ivar->number(), LocalDataKey{}, tag).resize(jdofs, idofs);
3047 jacobianBlockUsed(tag, jvar->number(), ivar->number(), false);
3048 }
3049 }
3050 }
3051}

Referenced by NodalScalarKernel::reinit().

◆ preparePRefinement()

void Assembly::preparePRefinement ( )

Prepare helper FEs for p-refinement.

The helper FEs are used for physical locations of quadrature points and JxW, and should not apply element p-levels to their own basis.

Definition at line 4887 of file Assembly.C.

4888{
4890 // Already performed tasks for p-refinement
4891 return;
4892
4893 const auto helper_type = _helper_type;
4894 auto process_fe_and_helpers = [&helper_type](auto & unique_helper_container,
4895 auto & helper_container,
4896 const unsigned int num_dimensionalities,
4897 const bool user_added_helper_type,
4898 auto & fe_container)
4899 {
4900 unique_helper_container.resize(num_dimensionalities);
4901 for (const auto dim : make_range(num_dimensionalities))
4902 {
4903 auto & unique_helper = unique_helper_container[dim];
4904 unique_helper = FEGenericBase<Real>::build(dim, helper_type);
4905 // don't participate in p-refinement
4906 unique_helper->add_p_level_in_reinit(false);
4907 helper_container[dim] = unique_helper.get();
4908
4909 // If the user did not request the helper type then we should erase the original helper FE
4910 // from the ordinary FE container. The unique helper above replaces it for helper use.
4911 if (!user_added_helper_type)
4912 {
4913 auto & fe_container_dim = libmesh_map_find(fe_container, dim);
4914 auto fe_it = fe_container_dim.find(helper_type);
4915 mooseAssert(fe_it != fe_container_dim.end(), "We should have the helper type");
4916 delete fe_it->second;
4917 fe_container_dim.erase(fe_it);
4918 }
4919 }
4920 };
4921
4922 // Handle scalar field families
4923 process_fe_and_helpers(_unique_fe_helper,
4925 _mesh_dimension + 1,
4927 _fe);
4928 process_fe_and_helpers(_unique_fe_face_helper,
4930 _mesh_dimension + 1,
4932 _fe_face);
4933 process_fe_and_helpers(_unique_fe_face_neighbor_helper,
4935 _mesh_dimension + 1,
4938 process_fe_and_helpers(_unique_fe_neighbor_helper,
4940 _mesh_dimension + 1,
4942 _fe_neighbor);
4943 process_fe_and_helpers(_unique_fe_lower_helper,
4947 _fe_lower);
4948
4950
4952}
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition Assembly.h:2361
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition Assembly.h:2359
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition Assembly.h:2358
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:2357
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
Definition Assembly.h:2360

Referenced by SubProblem::preparePRefinement().

◆ prepareResidual()

void Assembly::prepareResidual ( )

Sizes and zeroes the residual for the current element.

Definition at line 2762 of file Assembly.C.

2763{
2764 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2765 for (const auto & var : vars)
2766 for (auto & tag_Re : _sub_Re)
2767 tag_Re[var->number()].resize(var->dofIndices().size());
2768}

Referenced by prepare(), and reinitFVFace().

◆ prepareScalar()

void Assembly::prepareScalar ( )

Definition at line 3005 of file Assembly.C.

3006{
3007 const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
3008 for (const auto & ivar : vars)
3009 {
3010 auto idofs = ivar->dofIndices().size();
3011
3012 for (auto & tag_Re : _sub_Re)
3013 tag_Re[ivar->number()].resize(idofs);
3014
3015 for (const auto & jvar : vars)
3016 {
3017 auto jdofs = jvar->dofIndices().size();
3018
3019 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
3020 {
3021 jacobianBlock(ivar->number(), jvar->number(), LocalDataKey{}, tag).resize(idofs, jdofs);
3022 jacobianBlockUsed(tag, ivar->number(), jvar->number(), false);
3023 }
3024 }
3025 }
3026}

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

2805{
2806 for (const auto & it : _cm_ff_entry)
2807 {
2808 MooseVariableFEBase & ivar = *(it.first);
2809 MooseVariableFEBase & jvar = *(it.second);
2810
2811 unsigned int vi = ivar.number();
2812 unsigned int vj = jvar.number();
2813
2814 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2815 auto num_cols = jvar.dofIndices().size();
2816 if (array_block_diagonal_purely_diagonal)
2817 num_cols /= jvar.count();
2818
2819 if (vi == var->number() || vj == var->number())
2820 {
2821 for (MooseIndex(_jacobian_block_used) tag = 0; tag < _jacobian_block_used.size(); tag++)
2822 {
2823 jacobianBlock(vi, vj, LocalDataKey{}, tag).resize(ivar.dofIndices().size(), num_cols);
2824 jacobianBlockUsed(tag, vi, vj, false);
2825 }
2826 }
2827 }
2828
2829 for (auto & tag_Re : _sub_Re)
2830 tag_Re[var->number()].resize(var->dofIndices().size());
2831}

◆ prepareVariableNonlocal()

void Assembly::prepareVariableNonlocal ( MooseVariableFieldBase *  var)

Definition at line 2834 of file Assembly.C.

2835{
2836 for (const auto & it : _cm_nonlocal_entry)
2837 {
2838 MooseVariableFEBase & ivar = *(it.first);
2839 MooseVariableFEBase & jvar = *(it.second);
2840
2841 unsigned int vi = ivar.number();
2842 unsigned int vj = jvar.number();
2843
2844 const bool array_block_diagonal_purely_diagonal = vi == vj && _component_block_diagonal[vi];
2845 auto num_cols = jvar.dofIndices().size();
2846 if (array_block_diagonal_purely_diagonal)
2847 num_cols /= jvar.count();
2848
2849 if (vi == var->number() || vj == var->number())
2850 {
2851 for (MooseIndex(_jacobian_block_nonlocal_used) tag = 0;
2852 tag < _jacobian_block_nonlocal_used.size();
2853 tag++)
2854 {
2855 jacobianBlockNonlocal(vi, vj, LocalDataKey{}, tag)
2856 .resize(ivar.dofIndices().size(), num_cols);
2857 jacobianBlockNonlocalUsed(tag, vi, vj);
2858 }
2859 }
2860 }
2861}

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

3276{
3277 mooseAssert(res_block.size() == dof_indices.size(),
3278 "The size of residual and degree of freedom container must be the same");
3279
3280 // For an array variable, ndof is the number of dofs of the zero-th component and
3281 // ntdof is the number of dofs of all components.
3282 // For standard or vector variables, ndof will be the same as ntdof.
3283 const auto ntdof = res_block.size();
3284 const auto count = scaling_factor.size();
3285 const auto ndof = ntdof / count;
3286 if (count > 1)
3287 {
3288 unsigned int p = 0;
3289 for (MooseIndex(count) j = 0; j < count; ++j)
3290 for (MooseIndex(ndof) i = 0; i < ndof; ++i)
3291 res_block(p++) *= scaling_factor[j];
3292 }
3293 else
3294 {
3295 if (scaling_factor[0] != 1.0)
3296 res_block *= scaling_factor[0];
3297 }
3298
3299 _dof_map.constrain_element_vector(res_block, dof_indices, false);
3300}
unsigned int count
Definition MortarUtils.C:53

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

250{ 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 337 of file Assembly.h.

337{ return _current_q_points_face; }

Referenced by GeometricSearchData::generateQuadratureNodes(), NonlinearThread::onInterfaceWithHRefinementMismatch(), 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 531 of file Assembly.h.

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

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

256{ 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 227 of file Assembly.h.

227{ return constify_ref(_current_qrule); }

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

◆ qruleArbitraryFace()

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

Definition at line 1962 of file Assembly.C.

1963{
1964 return qruleFaceHelper<ArbitraryQuadrature>(
1965 elem, side, [](QRules & q) { return q.arbitrary_face.get(); });
1966}

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

1957{
1958 return qruleFaceHelper<QBase>(elem, side, [](QRules & q) { return q.face.get(); });
1959}

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

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

◆ qRuleMortar()

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

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

Definition at line 704 of file Assembly.h.

704{ 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 510 of file Assembly.h.

511 {
513 }

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

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

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

1859{
1861 _current_neighbor_elem = nullptr;
1862 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1863 "current subdomain has been set incorrectly");
1866 reinitFE(elem);
1867
1869}
void reinitFE(const Elem *elem)
Just an internal helper function to reinit the volume FE objects.
Definition Assembly.C:797
void setVolumeQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for volume integration.
void computeCurrentElemVolume()
Definition Assembly.C:1793

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

1873{
1875 _current_neighbor_elem = nullptr;
1876 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1877 "current subdomain has been set incorrectly");
1879
1880 unsigned int elem_dimension = _current_elem->dim();
1881
1882 _current_qrule_arbitrary = qrules(elem_dimension).arbitrary_vol.get();
1883
1884 // Make sure the qrule is the right one
1887
1888 _current_qrule_arbitrary->setPoints(reference_points);
1889
1890 reinitFE(elem);
1891
1893}
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:2436

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

1980{
1982 _current_neighbor_elem = nullptr;
1983 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1984 "current subdomain has been set incorrectly");
1988
1990
1993
1995}
void computeCurrentFaceVolume()
Definition Assembly.C:1812
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:2866
void reinitFEFace(const Elem *elem, unsigned int side)
Just an internal helper function to reinit the face FE objects.
Definition Assembly.C:1307

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

1999{
2001 _current_neighbor_elem = nullptr;
2002 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
2003 "current subdomain has been set incorrectly");
2007
2008 unsigned int elem_dimension = _current_elem->dim();
2009
2011
2012 // Make sure the qrule is the right one
2015
2016 _current_qrule_arbitrary->setPoints(reference_points);
2017
2019
2021
2023}
ArbitraryQuadrature * qruleArbitraryFace(const Elem *elem, unsigned int side)
Definition Assembly.C:1962
ArbitraryQuadrature * _current_qrule_arbitrary_face
The current arbitrary quadrature rule used on the element face.
Definition Assembly.h:2404

◆ reinit() [5/5]

void Assembly::reinit ( const Node *  node)

Reinitialize assembly data for a node.

Definition at line 2026 of file Assembly.C.

2027{
2030}

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

1832{
1834 _current_neighbor_elem = nullptr;
1835 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1836 "current subdomain has been set incorrectly");
1838
1839 FEMap::inverse_map(elem->dim(), elem, physical_points, _temp_reference_points);
1840
1842
1843 // Save off the physical points
1844 _current_physical_points = physical_points;
1845}
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:1858

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

2326{
2327 const unsigned int elem_dim = elem->dim();
2328 mooseAssert(elem_dim == _mesh_dimension - 1,
2329 "Dual shape functions should only be computed on lower dimensional face elements");
2330
2331 for (const auto & [fe_type, fe_lower] : _fe_lower[elem_dim])
2332 {
2333 const auto dual_shape_data = _fe_shape_data_dual_lower.find(fe_type);
2334 if (dual_shape_data == _fe_shape_data_dual_lower.end() || !dual_shape_data->second)
2335 continue;
2336
2337 // We use customized quadrature rule for integration along the mortar segment elements
2338 fe_lower->set_calculate_default_dual_coeff(false);
2339 fe_lower->reinit_dual_shape_coeffs(elem, pts, JxW);
2340 }
2341}

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

2038{
2039 _current_neighbor_side = neighbor_side;
2040
2041 reinit(elem, side);
2042
2043 unsigned int neighbor_dim = neighbor->dim();
2044
2045 if (neighbor_reference_points)
2046 _current_neighbor_ref_points = *neighbor_reference_points;
2047 else
2048 FEMap::inverse_map(
2050
2052
2055}
void reinitFEFaceNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition Assembly.C:1612
libMesh::ElemSideBuilder _current_neighbor_side_elem_builder
In place side element builder for _current_neighbor_side_elem.
Definition Assembly.h:2868
void reinitNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Reinitializes the neighbor side using reference coordinates.
Definition Assembly.C:1726
std::vector< Point > _current_neighbor_ref_points
The current reference points on the neighbor element.
Definition Assembly.h:2893
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 2058 of file Assembly.C.

2063{
2065
2066 unsigned int elem_dim = elem->dim();
2067
2068 // Attach the quadrature rules
2069 if (pts)
2070 {
2071 auto face_rule = qruleArbitraryFace(elem, elem_side);
2072 face_rule->setPoints(*pts);
2073 setFaceQRule(face_rule, elem_dim);
2074 }
2075 else
2076 {
2077 auto rule = qruleFace(elem, elem_side);
2078 if (_current_qrule_face != rule)
2079 setFaceQRule(rule, elem_dim);
2080 }
2081
2082 // reinit face
2083 for (const auto & it : _fe_face[elem_dim])
2084 {
2085 FEBase & fe_face = *it.second;
2086 FEType fe_type = it.first;
2087 FEShapeData & fesd = *_fe_shape_data_face[fe_type];
2088
2089 fe_face.reinit(elem, elem_side, tolerance, pts, weights);
2090
2091 _current_fe_face[fe_type] = &fe_face;
2092
2093 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face.get_phi()));
2094 fesd._grad_phi.shallowCopy(
2095 const_cast<std::vector<std::vector<RealGradient>> &>(fe_face.get_dphi()));
2096 if (_need_second_derivative_neighbor.count(fe_type))
2097 fesd._second_phi.shallowCopy(
2098 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_d2phi()));
2099 }
2100 for (const auto & it : _vector_fe_face[elem_dim])
2101 {
2102 FEVectorBase & fe_face = *it.second;
2103 const FEType & fe_type = it.first;
2104
2105 _current_vector_fe_face[fe_type] = &fe_face;
2106
2107 VectorFEShapeData & fesd = *_vector_fe_shape_data_face[fe_type];
2108
2109 fe_face.reinit(elem, elem_side, tolerance, pts, weights);
2110
2111 fesd._phi.shallowCopy(
2112 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_phi()));
2113 fesd._grad_phi.shallowCopy(
2114 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_dphi()));
2115 if (_need_second_derivative.count(fe_type))
2116 fesd._second_phi.shallowCopy(
2117 const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_face.get_d2phi()));
2118 if (_need_curl.count(fe_type))
2119 fesd._curl_phi.shallowCopy(
2120 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_curl_phi()));
2121 if (_need_face_div.count(fe_type))
2122 fesd._div_phi.shallowCopy(
2123 const_cast<std::vector<std::vector<Real>> &>(fe_face.get_div_phi()));
2124 }
2125 if (!_unique_fe_face_helper.empty())
2126 {
2127 mooseAssert(elem_dim < _unique_fe_face_helper.size(), "We should be in bounds here");
2128 _unique_fe_face_helper[elem_dim]->reinit(elem, elem_side, tolerance, pts, weights);
2129 }
2130
2131 // During that last loop the helper objects will have been reinitialized
2133 const_cast<std::vector<Point> &>(_holder_fe_face_helper[elem_dim]->get_xyz()));
2135 const_cast<std::vector<Point> &>(_holder_fe_face_helper[elem_dim]->get_normals()));
2136 _current_tangents.shallowCopy(const_cast<std::vector<std::vector<Point>> &>(
2137 _holder_fe_face_helper[elem_dim]->get_tangents()));
2138 // Note that if the user did pass in points and not weights to this method, JxW will be garbage
2139 // and should not be used
2141 const_cast<std::vector<Real> &>(_holder_fe_face_helper[elem_dim]->get_JxW()));
2144 const_cast<std::vector<Real> &>(_holder_fe_face_helper[elem_dim]->get_curvatures()));
2145
2146 computeADFace(*elem, elem_side);
2147
2148 // Keep the current-side bookkeeping consistent with the other elem/side reinit overloads so
2149 // that consumers of _current_side, _current_side_elem, and _current_side_volume (e.g.
2150 // InterfaceKernelBase) see correct values rather than whatever was left over from a previous
2151 // reinit.
2152 _current_side = elem_side;
2156}
MooseArray< std::vector< Point > > _current_tangents
The current tangent vectors at the quadrature points.
Definition Assembly.h:2522
void computeADFace(const Elem &elem, const unsigned int side)
compute AD things on an element face
Definition Assembly.C:2159
libMesh::QBase * qruleFace(const Elem *elem, unsigned int side)
This is an abstraction over the internal qrules function.
Definition Assembly.C:1956
std::map< FEType, FEBase * > _current_fe_face
The "face" fe object that matches the current elem.
Definition Assembly.h:2372
std::map< FEType, FEVectorBase * > _current_vector_fe_face
The "face" vector fe object that matches the current elem.
Definition Assembly.h:2381
void shallowCopy(const MooseArray &rhs)
Doesn't actually make a copy of the data.
Definition MooseArray.h:296

Referenced by NonlinearThread::onInterfaceWithHRefinementMismatch(), and 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 797 of file Assembly.C.

798{
799 unsigned int dim = elem->dim();
800
801 for (const auto & it : _fe[dim])
802 {
803 FEBase & fe = *it.second;
804 const FEType & fe_type = it.first;
805
806 _current_fe[fe_type] = &fe;
807
808 FEShapeData & fesd = *_fe_shape_data[fe_type];
809
810 fe.reinit(elem);
811
812 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe.get_phi()));
813 fesd._grad_phi.shallowCopy(
814 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_dphi()));
815 if (_need_second_derivative.count(fe_type))
816 fesd._second_phi.shallowCopy(
817 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe.get_d2phi()));
818 }
819 for (const auto & it : _vector_fe[dim])
820 {
821 FEVectorBase & fe = *it.second;
822 const FEType & fe_type = it.first;
823
824 _current_vector_fe[fe_type] = &fe;
825
826 VectorFEShapeData & fesd = *_vector_fe_shape_data[fe_type];
827
828 fe.reinit(elem);
829
830 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_phi()));
831 fesd._grad_phi.shallowCopy(
832 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe.get_dphi()));
833 if (_need_second_derivative.count(fe_type))
834 fesd._second_phi.shallowCopy(
835 const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe.get_d2phi()));
836 if (_need_curl.count(fe_type))
837 fesd._curl_phi.shallowCopy(
838 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe.get_curl_phi()));
839 if (_need_div.count(fe_type))
840 fesd._div_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe.get_div_phi()));
841 }
842 if (!_unique_fe_helper.empty())
843 {
844 mooseAssert(dim < _unique_fe_helper.size(), "We should be in bounds here");
845 _unique_fe_helper[dim]->reinit(elem);
846 }
847
848 // During that last loop the helper objects will have been reinitialized as well
849 // We need to dig out the q_points and JxW from it.
851 const_cast<std::vector<Point> &>(_holder_fe_helper[dim]->get_xyz()));
852 _current_JxW.shallowCopy(const_cast<std::vector<Real> &>(_holder_fe_helper[dim]->get_JxW()));
853
855 {
856 auto n_qp = _current_qrule->n_points();
857 resizeADMappingObjects(n_qp, dim);
858 if (_displaced)
859 {
860 const auto & qw = _current_qrule->get_weights();
861 for (unsigned int qp = 0; qp != n_qp; qp++)
863 }
864 else
865 {
866 for (unsigned qp = 0; qp < n_qp; ++qp)
867 _ad_JxW[qp] = _current_JxW[qp];
868 if (_calculate_xyz)
869 for (unsigned qp = 0; qp < n_qp; ++qp)
871 }
872
873 for (const auto & it : _fe[dim])
874 {
875 FEBase & fe = *it.second;
876 auto fe_type = it.first;
877 auto num_shapes = FEInterface::n_shape_functions(fe_type, elem);
878 auto & grad_phi = _ad_grad_phi_data[fe_type];
879
880 grad_phi.resize(num_shapes);
881 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
882 grad_phi[i].resize(n_qp);
883
884 if (_displaced)
885 computeGradPhiAD(elem, n_qp, grad_phi, &fe);
886 else
887 {
888 const auto & regular_grad_phi = _fe_shape_data[fe_type]->_grad_phi;
889 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
890 for (unsigned qp = 0; qp < n_qp; ++qp)
891 grad_phi[i][qp] = regular_grad_phi[i][qp];
892 }
893 }
894 for (const auto & it : _vector_fe[dim])
895 {
896 FEVectorBase & fe = *it.second;
897 auto fe_type = it.first;
898 auto num_shapes = FEInterface::n_shape_functions(fe_type, elem);
899 auto & grad_phi = _ad_vector_grad_phi_data[fe_type];
900
901 grad_phi.resize(num_shapes);
902 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
903 grad_phi[i].resize(n_qp);
904
905 if (_displaced)
906 computeGradPhiAD(elem, n_qp, grad_phi, &fe);
907 else
908 {
909 const auto & regular_grad_phi = _vector_fe_shape_data[fe_type]->_grad_phi;
910 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
911 for (unsigned qp = 0; qp < n_qp; ++qp)
912 grad_phi[i][qp] = regular_grad_phi[i][qp];
913 }
914 }
915 }
916
917 auto n = numExtraElemIntegers();
918 for (auto i : make_range(n))
919 _extra_elem_ids[i] = _current_elem->get_extra_integer(i);
920 _extra_elem_ids[n] = _current_elem->subdomain_id();
921
922 if (_xfem != nullptr)
924}
void modifyWeightsDueToXFEM(const Elem *elem)
Update the integration weights for XFEM partial elements.
Definition Assembly.C:4569
std::map< FEType, FEVectorBase * > _current_vector_fe
The "volume" vector fe object that matches the current elem.
Definition Assembly.h:2379
std::map< FEType, FEBase * > _current_fe
The "volume" fe object that matches the current elem.
Definition Assembly.h:2370
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition Assembly.h:365

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

1308{
1309 unsigned int dim = elem->dim();
1310
1311 for (const auto & it : _fe_face[dim])
1312 {
1313 FEBase & fe_face = *it.second;
1314 const FEType & fe_type = it.first;
1315 FEShapeData & fesd = *_fe_shape_data_face[fe_type];
1316 fe_face.reinit(elem, side);
1317 _current_fe_face[fe_type] = &fe_face;
1318
1319 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face.get_phi()));
1320 fesd._grad_phi.shallowCopy(
1321 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_dphi()));
1322 if (_need_second_derivative.count(fe_type))
1323 fesd._second_phi.shallowCopy(
1324 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_d2phi()));
1325 }
1326 for (const auto & it : _vector_fe_face[dim])
1327 {
1328 FEVectorBase & fe_face = *it.second;
1329 const FEType & fe_type = it.first;
1330
1331 _current_vector_fe_face[fe_type] = &fe_face;
1332
1333 VectorFEShapeData & fesd = *_vector_fe_shape_data_face[fe_type];
1334
1335 fe_face.reinit(elem, side);
1336
1337 fesd._phi.shallowCopy(
1338 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_phi()));
1339 fesd._grad_phi.shallowCopy(
1340 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face.get_dphi()));
1341 if (_need_second_derivative.count(fe_type))
1342 fesd._second_phi.shallowCopy(
1343 const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_face.get_d2phi()));
1344 if (_need_curl.count(fe_type))
1345 fesd._curl_phi.shallowCopy(
1346 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face.get_curl_phi()));
1347 if (_need_face_div.count(fe_type))
1348 fesd._div_phi.shallowCopy(
1349 const_cast<std::vector<std::vector<Real>> &>(fe_face.get_div_phi()));
1350 }
1351 if (!_unique_fe_face_helper.empty())
1352 {
1353 mooseAssert(dim < _unique_fe_face_helper.size(), "We should be in bounds here");
1355 }
1356
1357 // During that last loop the helper objects will have been reinitialized as well
1358 // We need to dig out the q_points and JxW from it.
1360 const_cast<std::vector<Point> &>(_holder_fe_face_helper[dim]->get_xyz()));
1362 const_cast<std::vector<Real> &>(_holder_fe_face_helper[dim]->get_JxW()));
1364 const_cast<std::vector<Point> &>(_holder_fe_face_helper[dim]->get_normals()));
1365
1366 _mapped_normals.resize(_current_normals.size(), Eigen::Map<RealDIMValue>(nullptr));
1367 for (unsigned int i = 0; i < _current_normals.size(); i++)
1368 // Note: this does NOT do any allocation. It is "reconstructing" the object in place
1369 new (&_mapped_normals[i]) Eigen::Map<RealDIMValue>(const_cast<Real *>(&_current_normals[i](0)));
1370
1373 const_cast<std::vector<Real> &>(_holder_fe_face_helper[dim]->get_curvatures()));
1374
1376
1377 if (_xfem != nullptr)
1379
1380 auto n = numExtraElemIntegers();
1381 for (auto i : make_range(n))
1382 _extra_elem_ids[i] = _current_elem->get_extra_integer(i);
1383 _extra_elem_ids[n] = _current_elem->subdomain_id();
1384}
void modifyFaceWeightsDueToXFEM(const Elem *elem, unsigned int side=0)
Update the face integration weights for XFEM partial elements.
Definition Assembly.C:4589

Referenced by reinit(), and reinit().

◆ reinitFEFaceNeighbor()

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

Definition at line 1612 of file Assembly.C.

1613{
1614 unsigned int neighbor_dim = neighbor->dim();
1615
1616 // reinit neighbor face
1617 for (const auto & it : _fe_face_neighbor[neighbor_dim])
1618 {
1619 FEBase & fe_face_neighbor = *it.second;
1620 FEType fe_type = it.first;
1621 FEShapeData & fesd = *_fe_shape_data_face_neighbor[fe_type];
1622
1623 fe_face_neighbor.reinit(neighbor, &reference_points);
1624
1625 _current_fe_face_neighbor[fe_type] = &fe_face_neighbor;
1626
1627 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_phi()));
1628 fesd._grad_phi.shallowCopy(
1629 const_cast<std::vector<std::vector<RealGradient>> &>(fe_face_neighbor.get_dphi()));
1630 if (_need_second_derivative_neighbor.count(fe_type))
1631 fesd._second_phi.shallowCopy(
1632 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_d2phi()));
1633 }
1634 for (const auto & it : _vector_fe_face_neighbor[neighbor_dim])
1635 {
1636 FEVectorBase & fe_face_neighbor = *it.second;
1637 const FEType & fe_type = it.first;
1638
1639 _current_vector_fe_face_neighbor[fe_type] = &fe_face_neighbor;
1640
1641 VectorFEShapeData & fesd = *_vector_fe_shape_data_face_neighbor[fe_type];
1642
1643 fe_face_neighbor.reinit(neighbor, &reference_points);
1644
1645 fesd._phi.shallowCopy(
1646 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face_neighbor.get_phi()));
1647 fesd._grad_phi.shallowCopy(
1648 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_dphi()));
1649 if (_need_second_derivative.count(fe_type))
1650 fesd._second_phi.shallowCopy(const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(
1651 fe_face_neighbor.get_d2phi()));
1652 if (_need_curl.count(fe_type))
1653 fesd._curl_phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(
1654 fe_face_neighbor.get_curl_phi()));
1655 if (_need_face_neighbor_div.count(fe_type))
1656 fesd._div_phi.shallowCopy(
1657 const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_div_phi()));
1658 }
1660 {
1661 mooseAssert(neighbor_dim < _unique_fe_face_neighbor_helper.size(),
1662 "We should be in bounds here");
1663 _unique_fe_face_neighbor_helper[neighbor_dim]->reinit(neighbor, &reference_points);
1664 }
1665
1667 const_cast<std::vector<Point> &>(_holder_fe_face_neighbor_helper[neighbor_dim]->get_xyz()));
1668}
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
The "neighbor face" vector fe object that matches the current elem.
Definition Assembly.h:2385
std::map< FEType, FEBase * > _current_fe_face_neighbor
The "neighbor face" fe object that matches the current elem.
Definition Assembly.h:2376

Referenced by reinitElemAndNeighbor(), and reinitNeighborAtPhysical().

◆ reinitFENeighbor()

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

Definition at line 1671 of file Assembly.C.

1672{
1673 unsigned int neighbor_dim = neighbor->dim();
1674
1675 // reinit neighbor face
1676 for (const auto & it : _fe_neighbor[neighbor_dim])
1677 {
1678 FEBase & fe_neighbor = *it.second;
1679 FEType fe_type = it.first;
1680 FEShapeData & fesd = *_fe_shape_data_neighbor[fe_type];
1681
1682 fe_neighbor.reinit(neighbor, &reference_points);
1683
1684 _current_fe_neighbor[fe_type] = &fe_neighbor;
1685
1686 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_neighbor.get_phi()));
1687 fesd._grad_phi.shallowCopy(
1688 const_cast<std::vector<std::vector<RealGradient>> &>(fe_neighbor.get_dphi()));
1689 if (_need_second_derivative_neighbor.count(fe_type))
1690 fesd._second_phi.shallowCopy(
1691 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_neighbor.get_d2phi()));
1692 }
1693 for (const auto & it : _vector_fe_neighbor[neighbor_dim])
1694 {
1695 FEVectorBase & fe_neighbor = *it.second;
1696 const FEType & fe_type = it.first;
1697
1698 _current_vector_fe_neighbor[fe_type] = &fe_neighbor;
1699
1700 VectorFEShapeData & fesd = *_vector_fe_shape_data_neighbor[fe_type];
1701
1702 fe_neighbor.reinit(neighbor, &reference_points);
1703
1704 fesd._phi.shallowCopy(
1705 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_neighbor.get_phi()));
1706 fesd._grad_phi.shallowCopy(
1707 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_neighbor.get_dphi()));
1708 if (_need_second_derivative.count(fe_type))
1709 fesd._second_phi.shallowCopy(
1710 const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(fe_neighbor.get_d2phi()));
1711 if (_need_curl.count(fe_type))
1712 fesd._curl_phi.shallowCopy(
1713 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_neighbor.get_curl_phi()));
1714 if (_need_neighbor_div.count(fe_type))
1715 fesd._div_phi.shallowCopy(
1716 const_cast<std::vector<std::vector<Real>> &>(fe_neighbor.get_div_phi()));
1717 }
1718 if (!_unique_fe_neighbor_helper.empty())
1719 {
1720 mooseAssert(neighbor_dim < _unique_fe_neighbor_helper.size(), "We should be in bounds here");
1721 _unique_fe_neighbor_helper[neighbor_dim]->reinit(neighbor, &reference_points);
1722 }
1723}
std::map< FEType, FEBase * > _current_fe_neighbor
The "neighbor" fe object that matches the current elem.
Definition Assembly.h:2374
std::map< FEType, FEVectorBase * > _current_vector_fe_neighbor
The "neighbor" vector fe object that matches the current elem.
Definition Assembly.h:2383

Referenced by reinitNeighborAtPhysical().

◆ reinitFVFace()

void Assembly::reinitFVFace ( const FaceInfo &  fi)

Definition at line 1896 of file Assembly.C.

1897{
1898 _current_elem = &fi.elem();
1902 mooseAssert(_current_subdomain_id == _current_elem->subdomain_id(),
1903 "current subdomain has been set incorrectly");
1904
1907
1911
1912 unsigned int dim = _current_elem->dim();
1913 if (_current_qrule_face != qrules(dim).fv_face.get())
1914 {
1915 setFaceQRule(qrules(dim).fv_face.get(), dim);
1916 // The order of the element that is used for initing here doesn't matter since this will just
1917 // be used for constant monomials (which only need a single integration point)
1918 if (dim == 3)
1919 _current_qrule_face->init(QUAD4, /* p_level = */ 0, /* simple_type_only = */ true);
1920 else
1921 _current_qrule_face->init(EDGE2, /* p_level = */ 0, /* simple_type_only = */ true);
1922 }
1923
1925
1926 mooseAssert(_current_qrule_face->n_points() == 1,
1927 "Our finite volume quadrature rule should always yield a single point");
1928
1929 // We've initialized the reference points. Now we need to compute the physical location of the
1930 // quadrature points. We do not do any FE initialization so we cannot simply copy over FE
1931 // results like we do in reinitFEFace. Instead we handle the computation of the physical
1932 // locations manually
1934 const auto & ref_points = _current_qrule_face->get_points();
1935 const auto & ref_point = ref_points[0];
1936 auto physical_point = FEMap::map(_current_side_elem->dim(), _current_side_elem, ref_point);
1937 _current_q_points_face[0] = physical_point;
1938
1940 {
1941 mooseAssert(_current_neighbor_subdomain_id == _current_neighbor_elem->subdomain_id(),
1942 "current neighbor subdomain has been set incorrectly");
1943 // Now handle the neighbor qrule/qpoints
1944 ArbitraryQuadrature * const neighbor_rule =
1946 // Here we are setting a reference point that is correct for the neighbor *side* element. It
1947 // would be wrong if this reference point is used for a volumetric FE reinit with the neighbor
1948 neighbor_rule->setPoints(ref_points);
1949 setNeighborQRule(neighbor_rule, _current_neighbor_elem->dim());
1951 _current_q_points_face_neighbor[0] = std::move(physical_point);
1952 }
1953}
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
void prepareNeighbor()
Definition Assembly.C:2864
void setNeighborQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition Assembly.C:746
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:2440

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

2347{
2349
2350 const unsigned int elem_dim = elem->dim();
2351 mooseAssert(elem_dim < _mesh_dimension,
2352 "The lower dimensional element should truly be a lower dimensional element");
2353
2354 if (pts)
2355 {
2356 // Lower rule matches the face rule for the higher dimensional element
2357 ArbitraryQuadrature * lower_rule = qrules(elem_dim + 1).arbitrary_face.get();
2358
2359 // This also sets the quadrature weights to unity
2360 lower_rule->setPoints(*pts);
2361
2362 if (weights)
2363 lower_rule->setWeights(*weights);
2364
2365 setLowerQRule(lower_rule, elem_dim);
2366 }
2367 else if (_current_qrule_lower != qrules(elem_dim + 1).face.get())
2368 setLowerQRule(qrules(elem_dim + 1).face.get(), elem_dim);
2369
2370 for (const auto & it : _fe_lower[elem_dim])
2371 {
2372 FEBase & fe_lower = *it.second;
2373 FEType fe_type = it.first;
2374
2375 fe_lower.reinit(elem);
2376
2377 if (FEShapeData * fesd = _fe_shape_data_lower[fe_type].get())
2378 {
2379 fesd->_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_lower.get_phi()));
2380 fesd->_grad_phi.shallowCopy(
2381 const_cast<std::vector<std::vector<RealGradient>> &>(fe_lower.get_dphi()));
2382 if (_need_second_derivative_neighbor.count(fe_type))
2383 fesd->_second_phi.shallowCopy(
2384 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_lower.get_d2phi()));
2385 }
2386
2387 // Dual shape functions need to be computed after primal basis being initialized
2388 if (FEShapeData * fesd = _fe_shape_data_dual_lower[fe_type].get())
2389 {
2390 fesd->_phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_lower.get_dual_phi()));
2391 fesd->_grad_phi.shallowCopy(
2392 const_cast<std::vector<std::vector<RealGradient>> &>(fe_lower.get_dual_dphi()));
2393 if (_need_second_derivative_neighbor.count(fe_type))
2394 fesd->_second_phi.shallowCopy(
2395 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_lower.get_dual_d2phi()));
2396 }
2397 }
2398 if (!_unique_fe_lower_helper.empty())
2399 {
2400 mooseAssert(elem_dim < _unique_fe_lower_helper.size(), "We should be in bounds here");
2401 _unique_fe_lower_helper[elem_dim]->reinit(elem);
2402 }
2403
2405 return;
2406
2407 if (pts && !weights)
2408 {
2409 // We only have dummy weights so the JxWs computed during our FE reinits are meaningless and
2410 // we cannot use them
2411
2413 // We are in a Cartesian coordinate system and we can just use the element volume method
2414 // which has fast computation for certain element types
2416 else
2417 // We manually compute the volume taking the curvilinear coordinate transformations into
2418 // account
2420 }
2421 else
2422 {
2423 // During that last loop the helper objects will have been reinitialized as well
2424 FEBase & helper_fe = *_holder_fe_lower_helper[elem_dim];
2425 const auto & physical_q_points = helper_fe.get_xyz();
2426 const auto & JxW = helper_fe.get_JxW();
2427 MooseArray<Real> coord;
2429 _current_qrule_lower, physical_q_points, coord, elem->subdomain_id());
2431 for (const auto qp : make_range(_current_qrule_lower->n_points()))
2432 _current_lower_d_elem_volume += JxW[qp] * coord[qp];
2433 }
2434}
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:727
Real elementVolume(const Elem *elem) const
On-demand computation of volume element accounting for RZ/RSpherical.
Definition Assembly.C:3809
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:2438

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

2459{
2460 mooseAssert(elem->dim() == _mesh_dimension - 1,
2461 "You should be calling reinitMortarElem on a lower dimensional element");
2462
2463 _fe_msm->reinit(elem);
2464 _msm_elem = elem;
2465
2466 MooseArray<Point> array_q_points;
2467 array_q_points.shallowCopy(const_cast<std::vector<Point> &>(_fe_msm->get_xyz()));
2468 setCoordinateTransformation(_qrule_msm, array_q_points, _coord_msm, elem->subdomain_id());
2469}

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

1727{
1728 unsigned int neighbor_dim = neighbor->dim();
1729 mooseAssert(_current_neighbor_subdomain_id == neighbor->subdomain_id(),
1730 "Neighbor subdomain ID has not been correctly set");
1731
1732 ArbitraryQuadrature * neighbor_rule =
1733 qrules(neighbor_dim, _current_neighbor_subdomain_id).neighbor.get();
1734 neighbor_rule->setPoints(reference_points);
1735 setNeighborQRule(neighbor_rule, neighbor_dim);
1736
1738 mooseAssert(_current_neighbor_subdomain_id == _current_neighbor_elem->subdomain_id(),
1739 "current neighbor subdomain has been set incorrectly");
1740
1741 // Calculate the volume of the neighbor
1743 {
1744 unsigned int dim = neighbor->dim();
1746 QBase * qrule = qrules(dim).vol.get();
1747
1748 fe.attach_quadrature_rule(qrule);
1749 fe.reinit(neighbor);
1750
1751 const std::vector<Real> & JxW = fe.get_JxW();
1752 MooseArray<Point> q_points;
1753 q_points.shallowCopy(const_cast<std::vector<Point> &>(fe.get_xyz()));
1754
1756
1758 for (unsigned int qp = 0; qp < qrule->n_points(); qp++)
1760 }
1761
1762 auto n = numExtraElemIntegers();
1763 for (auto i : make_range(n))
1764 _neighbor_extra_elem_ids[i] = _current_neighbor_elem->get_extra_integer(i);
1766}

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

2510{
2511 unsigned int neighbor_dim = neighbor->dim();
2512 FEMap::inverse_map(neighbor_dim, neighbor, physical_points, _current_neighbor_ref_points);
2513
2516 // Save off the physical points
2517 _current_physical_points = physical_points;
2518}
void reinitFENeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition Assembly.C:1671

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

2475{
2476 unsigned int neighbor_dim = neighbor->dim();
2477 FEMap::inverse_map(neighbor_dim, neighbor, physical_points, _current_neighbor_ref_points);
2478
2480 {
2481 mooseAssert(
2482 physical_points.size() == 1,
2483 "If reinitializing with more than one point, then I am dubious of your use case. Perhaps "
2484 "you are performing a DG type method and you are reinitializing using points from the "
2485 "element face. In such a case your neighbor JxW must have its index order 'match' the "
2486 "element JxW index order, e.g. imagining a vertical 1D face with two quadrature points, "
2487 "if "
2488 "index 0 for elem JxW corresponds to the 'top' quadrature point, then index 0 for "
2489 "neighbor "
2490 "JxW must also correspond to the 'top' quadrature point. And libMesh/MOOSE has no way to "
2491 "guarantee that with multiple quadrature points.");
2492
2494
2495 // With a single point our size-1 JxW should just be the element volume
2498 }
2499
2502
2503 // Save off the physical points
2504 _current_physical_points = physical_points;
2505}

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

2250{
2252
2253 unsigned int neighbor_dim = neighbor->dim();
2254
2255 ArbitraryQuadrature * neighbor_rule =
2256 qrules(neighbor_dim, neighbor->subdomain_id()).neighbor.get();
2257 neighbor_rule->setPoints(*pts);
2258
2259 // Attach this quadrature rule to all the _fe_face_neighbor FE objects. This
2260 // has to have garbage quadrature weights but that's ok because we never
2261 // actually use the JxW coming from these FE reinit'd objects, e.g. we use the
2262 // JxW coming from the element face reinit for DGKernels or we use the JxW
2263 // coming from reinit of the mortar segment element in the case of mortar
2264 setNeighborQRule(neighbor_rule, neighbor_dim);
2265
2266 // reinit neighbor face
2267 for (const auto & it : _fe_face_neighbor[neighbor_dim])
2268 {
2269 FEBase & fe_face_neighbor = *it.second;
2270 FEType fe_type = it.first;
2271 FEShapeData & fesd = *_fe_shape_data_face_neighbor[fe_type];
2272
2273 fe_face_neighbor.reinit(neighbor, neighbor_side, tolerance, pts, weights);
2274
2275 _current_fe_face_neighbor[fe_type] = &fe_face_neighbor;
2276
2277 fesd._phi.shallowCopy(const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_phi()));
2278 fesd._grad_phi.shallowCopy(
2279 const_cast<std::vector<std::vector<RealGradient>> &>(fe_face_neighbor.get_dphi()));
2280 if (_need_second_derivative_neighbor.count(fe_type))
2281 fesd._second_phi.shallowCopy(
2282 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_d2phi()));
2283 }
2284 for (const auto & it : _vector_fe_face_neighbor[neighbor_dim])
2285 {
2286 FEVectorBase & fe_face_neighbor = *it.second;
2287 const FEType & fe_type = it.first;
2288
2289 _current_vector_fe_face_neighbor[fe_type] = &fe_face_neighbor;
2290
2291 VectorFEShapeData & fesd = *_vector_fe_shape_data_face_neighbor[fe_type];
2292
2293 fe_face_neighbor.reinit(neighbor, neighbor_side, tolerance, pts, weights);
2294
2295 fesd._phi.shallowCopy(
2296 const_cast<std::vector<std::vector<VectorValue<Real>>> &>(fe_face_neighbor.get_phi()));
2297 fesd._grad_phi.shallowCopy(
2298 const_cast<std::vector<std::vector<TensorValue<Real>>> &>(fe_face_neighbor.get_dphi()));
2299 if (_need_second_derivative.count(fe_type))
2300 fesd._second_phi.shallowCopy(const_cast<std::vector<std::vector<TypeNTensor<3, Real>>> &>(
2301 fe_face_neighbor.get_d2phi()));
2302 if (_need_curl.count(fe_type))
2303 fesd._curl_phi.shallowCopy(const_cast<std::vector<std::vector<VectorValue<Real>>> &>(
2304 fe_face_neighbor.get_curl_phi()));
2305 if (_need_face_neighbor_div.count(fe_type))
2306 fesd._div_phi.shallowCopy(
2307 const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.get_div_phi()));
2308 }
2310 {
2311 mooseAssert(neighbor_dim < _unique_fe_face_neighbor_helper.size(),
2312 "We should be in bounds here");
2313 _unique_fe_face_neighbor_helper[neighbor_dim]->reinit(
2314 neighbor, neighbor_side, tolerance, pts, weights);
2315 }
2316 // During that last loop the helper objects will have been reinitialized as well
2317 // We need to dig out the q_points from it
2319 const_cast<std::vector<Point> &>(_holder_fe_face_neighbor_helper[neighbor_dim]->get_xyz()));
2320}

Referenced by SubProblem::reinitNeighborFaceRef().

◆ reinitNeighborLowerDElem()

void Assembly::reinitNeighborLowerDElem ( const Elem *  elem)

reinitialize a neighboring lower dimensional element

Definition at line 2437 of file Assembly.C.

2438{
2439 mooseAssert(elem->dim() < _mesh_dimension,
2440 "You should be calling reinitNeighborLowerDElem on a lower dimensional element");
2441
2443
2445 return;
2446
2448 // We are in a Cartesian coordinate system and we can just use the element volume method which
2449 // has fast computation for certain element types
2451 else
2452 // We manually compute the volume taking the curvilinear coordinate transformations into
2453 // account
2455}

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

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

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

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

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

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

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

1009{
1010 _ad_dxyzdxi_map.resize(n_qp);
1011 _ad_dxidx_map.resize(n_qp);
1012 _ad_dxidy_map.resize(n_qp); // 1D element may live in 2D ...
1013 _ad_dxidz_map.resize(n_qp); // ... or 3D
1014
1015 if (dim > 1)
1016 {
1017 _ad_dxyzdeta_map.resize(n_qp);
1018 _ad_detadx_map.resize(n_qp);
1019 _ad_detady_map.resize(n_qp);
1020 _ad_detadz_map.resize(n_qp);
1021
1022 if (dim > 2)
1023 {
1024 _ad_dxyzdzeta_map.resize(n_qp);
1025 _ad_dzetadx_map.resize(n_qp);
1026 _ad_dzetady_map.resize(n_qp);
1027 _ad_dzetadz_map.resize(n_qp);
1028 }
1029 }
1030
1031 _ad_jac.resize(n_qp);
1032 _ad_JxW.resize(n_qp);
1033 if (_calculate_xyz)
1034 _ad_q_points.resize(n_qp);
1035}

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

1846 {
1847 unsigned int pace = (_component_block_diagonal[ivar] ? 0 : nphi);
1848 for (unsigned int k = 0; k < v.size(); ++k, i += ntest, j += pace)
1849 ke(i, j) += v(k);
1850 }

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

1872 {
1873 if (ivar == jvar && _component_block_diagonal[ivar])
1874 {
1875 for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1876 ke(i, j) += v(k, k);
1877 }
1878 else
1879 {
1880 const unsigned int saved_j = j;
1881 for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1882 {
1883 j = saved_j;
1884 for (unsigned int l = 0; l < v.cols(); ++l, j += nphi)
1885 ke(i, j) += v(k, l);
1886 }
1887 }
1888 }

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

3846{
3847 for (unsigned int j = 0; j < v.size(); ++j, i += ntest)
3848 re[i] += v(j);
3849}

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

1819 {
1820 for (unsigned int j = 0; j < v.size(); ++j, i += ntest)
1821 re(i) += v(j);
1822 }

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

1307 {
1308 return _cm_sf_entry;
1309 }

Referenced by MortarScalarBase::computeScalarOffDiagJacobian().

◆ secondPhi() [1/6]

const VariablePhiSecond & Assembly::secondPhi ( ) const
inline

Definition at line 1321 of file Assembly.h.

1321{ return _second_phi; }
VariablePhiSecond _second_phi
Definition Assembly.h:2693

Referenced by copyShapes().

◆ secondPhi() [2/6]

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

Definition at line 1459 of file Assembly.h.

1459{ return _second_phi; }

◆ secondPhi() [3/6]

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

Definition at line 1322 of file Assembly.h.

1323 {
1324 return _second_phi;
1325 }

◆ secondPhi() [4/6]

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

Definition at line 1572 of file Assembly.h.

1572{ return _second_phi; }

◆ secondPhi() [5/6]

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

Definition at line 1494 of file Assembly.h.

1495 {
1496 return _vector_second_phi;
1497 }
VectorVariablePhiSecond _vector_second_phi
Definition Assembly.h:2710

◆ secondPhi() [6/6]

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

Definition at line 1373 of file Assembly.h.

1374 {
1375 return _vector_second_phi;
1376 }

◆ secondPhiFace() [1/5]

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

Definition at line 1463 of file Assembly.h.

1463{ return _second_phi_face; }
VariablePhiSecond _second_phi_face
Definition Assembly.h:2697

◆ secondPhiFace() [2/5]

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

Definition at line 1334 of file Assembly.h.

1335 {
1336 return _second_phi_face;
1337 }

Referenced by copyFaceShapes().

◆ secondPhiFace() [3/5]

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

Definition at line 1579 of file Assembly.h.

1580 {
1581 return _second_phi_face;
1582 }

◆ secondPhiFace() [4/5]

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

Definition at line 1515 of file Assembly.h.

1516 {
1518 }
VectorVariablePhiSecond _vector_second_phi_face
Definition Assembly.h:2716

◆ secondPhiFace() [5/5]

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

Definition at line 1394 of file Assembly.h.

1395 {
1397 }

◆ secondPhiFaceNeighbor() [1/5]

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

Definition at line 1483 of file Assembly.h.

1484 {
1486 }
VariablePhiSecond _second_phi_face_neighbor
Definition Assembly.h:2705

◆ secondPhiFaceNeighbor() [2/5]

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

Definition at line 1360 of file Assembly.h.

1361 {
1363 }

Referenced by copyNeighborShapes().

◆ secondPhiFaceNeighbor() [3/5]

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

Definition at line 1605 of file Assembly.h.

1606 {
1608 }

◆ secondPhiFaceNeighbor() [4/5]

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

Definition at line 1556 of file Assembly.h.

1557 {
1559 }
VectorVariablePhiSecond _vector_second_phi_face_neighbor
Definition Assembly.h:2728

◆ secondPhiFaceNeighbor() [5/5]

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

Definition at line 1441 of file Assembly.h.

1442 {
1444 }

◆ secondPhiNeighbor() [1/5]

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

Definition at line 1470 of file Assembly.h.

1471 {
1472 return _second_phi_neighbor;
1473 }
VariablePhiSecond _second_phi_neighbor
Definition Assembly.h:2701

◆ secondPhiNeighbor() [2/5]

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

Definition at line 1347 of file Assembly.h.

1348 {
1349 return _second_phi_neighbor;
1350 }

Referenced by copyNeighborShapes().

◆ secondPhiNeighbor() [3/5]

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

Definition at line 1592 of file Assembly.h.

1593 {
1594 return _second_phi_neighbor;
1595 }

◆ secondPhiNeighbor() [4/5]

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

Definition at line 1536 of file Assembly.h.

1537 {
1539 }
VectorVariablePhiSecond _vector_second_phi_neighbor
Definition Assembly.h:2722

◆ secondPhiNeighbor() [5/5]

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

Definition at line 1417 of file Assembly.h.

1418 {
1420 }

◆ setCachedJacobian()

void Assembly::setCachedJacobian ( GlobalDataKey  )

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

Definition at line 4528 of file Assembly.C.

4529{
4530 for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4531 if (_sys.hasMatrix(tag))
4532 {
4533 // First zero the rows (including the diagonals) to prepare for
4534 // setting the cached values.
4536
4537 // TODO: Use SparseMatrix::set_values() for efficiency
4538 for (MooseIndex(_cached_jacobian_values) i = 0; i < _cached_jacobian_values[tag].size(); ++i)
4540 _cached_jacobian_cols[tag][i],
4541 _cached_jacobian_values[tag][i]);
4542 }
4543
4545}
void clearCachedJacobian()
Clear any currently cached jacobians.
Definition Assembly.C:4558
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 1770 of file Assembly.C.

1774{
1775
1776 mooseAssert(qrule, "The quadrature rule is null in Assembly::setCoordinateTransformation");
1777 auto n_points = qrule->n_points();
1778 mooseAssert(n_points == q_points.size(),
1779 "The number of points in the quadrature rule doesn't match the number of passed-in "
1780 "points in Assembly::setCoordinateTransformation");
1781
1782 // Make sure to honor the name of this method and set the _coord_type member because users may
1783 // make use of the const Moose::CoordinateSystem & coordTransformation() { return _coord_type; }
1784 // API. MaterialBase for example uses it
1786
1787 coord.resize(n_points);
1788 for (unsigned int qp = 0; qp < n_points; qp++)
1789 coordTransformFactor(_subproblem, sub_id, q_points[qp], coord[qp]);
1790}

◆ setCurrentBoundaryID()

void Assembly::setCurrentBoundaryID ( BoundaryID  i)
inline

set the current boundary ID

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

3226{
3227 _current_lower_d_elem = lower_d_elem;
3228}

Referenced by SubProblem::setCurrentLowerDElem().

◆ setCurrentNeighborSubdomainID()

void Assembly::setCurrentNeighborSubdomainID ( SubdomainID  i)
inline

set the current subdomain ID

Definition at line 494 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 1969 of file Assembly.C.

1970{
1971 const auto elem_dimension = elem->dim();
1973 auto rule = qruleFace(elem, side);
1974 if (_current_qrule_face != rule)
1975 setFaceQRule(rule, elem_dimension);
1976}

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

728{
729 // The lower-dimensional quadrature rule matches the face quadrature rule
730 setFaceQRule(qrule, dim);
731
732 _current_qrule_lower = qrule;
733
734 for (auto & it : _fe_lower[dim])
735 it.second->attach_quadrature_rule(qrule);
736 for (auto & it : _vector_fe_lower[dim])
737 it.second->attach_quadrature_rule(qrule);
738 if (!_unique_fe_lower_helper.empty())
739 {
740 mooseAssert(dim < _unique_fe_lower_helper.size(), "We should not be indexing out of bounds");
741 _unique_fe_lower_helper[dim]->attach_quadrature_rule(qrule);
742 }
743}

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

773{
774 if (order != _qrule_msm->get_order())
775 {
776 // If custom mortar qrule has not yet been specified
778 {
780 const unsigned int dim = _qrule_msm->get_dim();
781 const QuadratureType type = _qrule_msm->type();
782 delete _qrule_msm;
783
784 _qrule_msm = QBase::build(type, dim, order).release();
785 _fe_msm->attach_quadrature_rule(_qrule_msm);
786 }
787 else
788 mooseError("Mortar quadrature_order: ",
789 order,
790 " does not match previously specified quadrature_order: ",
792 ". Quadrature_order (when specified) must match for all mortar constraints.");
793 }
794}
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 746 of file Assembly.C.

747{
749
750 for (auto & it : _fe_face_neighbor[dim])
751 it.second->attach_quadrature_rule(qrule);
752 for (auto & it : _vector_fe_face_neighbor[dim])
753 it.second->attach_quadrature_rule(qrule);
755 {
756 mooseAssert(dim < _unique_fe_face_neighbor_helper.size(),
757 "We should not be indexing out of bounds");
758 _unique_fe_face_neighbor_helper[dim]->attach_quadrature_rule(qrule);
759 }
760}

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

3586{
3587 auto & tag_Re = _sub_Re[vector_tag._type_id];
3588 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3589 for (const auto & var : vars)
3590 setResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3591}
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:3341

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

3345{
3346 if (dof_indices.size() > 0)
3347 {
3348 std::vector<dof_id_type> di(dof_indices);
3349 _tmp_Re = res_block;
3350 processLocalResidual(_tmp_Re, di, scaling_factor);
3351 residual.insert(_tmp_Re, di);
3352 }
3353}
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 3594 of file Assembly.C.

3597{
3598 auto & tag_Rn = _sub_Rn[vector_tag._type_id];
3599 const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
3600 for (const auto & var : vars)
3602 residual, tag_Rn[var->number()], var->dofIndicesNeighbor(), var->arrayScalingFactor());
3603}

◆ setVolumeQRule() [1/2]

void Assembly::setVolumeQRule ( const Elem *  elem)

Set the volumetric quadrature rule based on the provided element.

Definition at line 1848 of file Assembly.C.

1849{
1850 unsigned int elem_dimension = elem->dim();
1851 _current_qrule_volume = qrules(elem_dimension).vol.get();
1852 // Make sure the qrule is the right one
1854 setVolumeQRule(_current_qrule_volume, elem_dimension);
1855}

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

1799{ _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 438 of file Assembly.h.

438{ 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 450 of file Assembly.h.

450{ 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 456 of file Assembly.h.

456{ 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 360 of file Assembly.h.

360{ 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 233 of file Assembly.h.

233{ 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 240 of file Assembly.h.

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

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

320{ 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 327 of file Assembly.h.

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

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

519{ return _current_qrule_neighbor; }

◆ zeroCachedJacobian()

void Assembly::zeroCachedJacobian ( GlobalDataKey  )

Zero out previously-cached Jacobian rows.

Definition at line 4548 of file Assembly.C.

4549{
4550 for (MooseIndex(_cached_jacobian_rows) tag = 0; tag < _cached_jacobian_rows.size(); tag++)
4551 if (_sys.hasMatrix(tag))
4553
4555}

Member Data Documentation

◆ _ad_coord

MooseArray<ADReal> Assembly::_ad_coord
private

The AD version of the current coordinate transformation coefficients.

Definition at line 2414 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 2768 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 2770 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 2769 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 2772 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 2364 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 2306 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 2321 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 2327 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 2323 of file Assembly.h.

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

Referenced by addJacobianScalar().

◆ _column_indices

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

Definition at line 2887 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 2870 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 2313 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 2310 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 2316 of file Assembly.h.

Referenced by computingResidualAndJacobian().

◆ _coord

MooseArray<Real> Assembly::_coord
private

The current coordinate transformation coefficients.

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

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

◆ _coord_type

Moose::CoordinateSystemType Assembly::_coord_type
private

The coordinate system.

Definition at line 2410 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 2588 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 2590 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 2614 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 2370 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 2372 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 2508 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 2376 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 2396 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 2374 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 2408 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 2516 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 2557 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 2619 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 2625 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 2598 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 2621 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 2629 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 2612 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 2893 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 2602 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 2604 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 2868 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 2600 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 2608 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 2610 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 2518 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 2634 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 2406 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 2553 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 2512 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 2398 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 2402 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 2404 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 2580 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 2551 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 2400 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 2592 of file Assembly.h.

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

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

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

◆ _current_side_volume

Real Assembly::_current_side_volume
protected

Volume of the current side element.

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

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

◆ _current_subdomain_id

SubdomainID Assembly::_current_subdomain_id
protected

The current subdomain ID.

Definition at line 2586 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 2522 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 2379 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 2381 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 2385 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 2383 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 2576 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 2303 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 2882 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 2877 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 2525 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 2390 of file Assembly.h.

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

◆ _fe_face

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

types of finite elements

Definition at line 2502 of file Assembly.h.

Referenced by Assembly(), buildFaceFE(), computeADFace(), getFEFace(), preparePRefinement(), 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 2544 of file Assembly.h.

Referenced by Assembly(), buildLowerDDualFE(), buildLowerDFE(), preparePRefinement(), 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 2569 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 2534 of file Assembly.h.

Referenced by Assembly(), buildNeighborFE(), getFENeighbor(), preparePRefinement(), 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 2753 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 2757 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 2692 of file Assembly.h.

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

◆ _grad_phi_face

VariablePhiGradient Assembly::_grad_phi_face
protected

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

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

◆ _grad_phi_neighbor

VariablePhiGradient Assembly::_grad_phi_neighbor
protected

Definition at line 2700 of file Assembly.h.

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

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

Referenced by adCurvatures(), Assembly(), buildFaceFE(), buildFaceNeighborFE(), buildFE(), buildLowerDFE(), buildNeighborFE(), and preparePRefinement().

◆ _holder_fe_face_helper

std::map<unsigned int, FEBase *> Assembly::_holder_fe_face_helper
private

Each dimension's helper objects.

Definition at line 2506 of file Assembly.h.

Referenced by Assembly(), computeADFace(), computeFaceMap(), helpersRequestData(), preparePRefinement(), 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 2394 of file Assembly.h.

Referenced by Assembly(), helpersRequestData(), preparePRefinement(), 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 2548 of file Assembly.h.

Referenced by Assembly(), helpersRequestData(), preparePRefinement(), 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 2540 of file Assembly.h.

Referenced by Assembly(), helpersRequestData(), preparePRefinement(), 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 2529 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 2334 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 2332 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 2567 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 2520 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 2340 of file Assembly.h.

Referenced by Assembly().

◆ _mesh_dimension

unsigned int Assembly::_mesh_dimension
private

◆ _msm_elem

const Elem* Assembly::_msm_elem = nullptr
protected

Definition at line 2872 of file Assembly.h.

Referenced by msmElem(), and reinitMortarElem().

◆ _need_ad_grad_phi_face

bool Assembly::_need_ad_grad_phi_face = false
mutableprotected

Whether any object needs the AD face shape function gradients.

Computing them on a displaced mesh propagates the displacement derivatives of the face map into every shape function gradient, which is expensive and unnecessary when only values and normals are used.

Definition at line 2776 of file Assembly.h.

Referenced by computeADFace(), and needADGradPhiFace().

◆ _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 2631 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 2555 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 2623 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 2606 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 2627 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 2527 of file Assembly.h.

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

◆ _nonlocal_cm

const libMesh::CouplingMatrix& Assembly::_nonlocal_cm
private

Definition at line 2307 of file Assembly.h.

Referenced by initNonlocalCoupling().

◆ _phi

VariablePhiValue Assembly::_phi
protected

Definition at line 2691 of file Assembly.h.

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

◆ _phi_face

VariablePhiValue Assembly::_phi_face
protected

Definition at line 2695 of file Assembly.h.

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

◆ _phi_face_neighbor

VariablePhiValue Assembly::_phi_face_neighbor
protected

Definition at line 2703 of file Assembly.h.

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

◆ _phi_neighbor

VariablePhiValue Assembly::_phi_neighbor
protected

Definition at line 2699 of file Assembly.h.

Referenced by phiNeighbor(), phiNeighbor(), and phiNeighbor().

◆ _prepared_for_p_refinement

bool Assembly::_prepared_for_p_refinement
protected

Whether helper FEs have been prepared for p-refinement.

Definition at line 2890 of file Assembly.h.

Referenced by preparePRefinement().

◆ _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 2574 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 2447 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 2887 of file Assembly.h.

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

◆ _second_phi

VariablePhiSecond Assembly::_second_phi
protected

Definition at line 2693 of file Assembly.h.

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

◆ _second_phi_face

VariablePhiSecond Assembly::_second_phi_face
protected

Definition at line 2697 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 2701 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 2667 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 2668 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 2683 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 2671 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 2679 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 2677 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 2681 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 2673 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 2685 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 2675 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 2651 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 2688 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 2654 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 2358 of file Assembly.h.

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

Referenced by preparePRefinement(), and reinitFE().

◆ _unique_fe_lower_helper

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

Definition at line 2361 of file Assembly.h.

Referenced by preparePRefinement(), reinitLowerDElem(), and setLowerQRule().

◆ _unique_fe_neighbor_helper

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

Definition at line 2360 of file Assembly.h.

Referenced by preparePRefinement(), and reinitFENeighbor().

◆ _user_added_fe_face_neighbor_of_helper_type

bool Assembly::_user_added_fe_face_neighbor_of_helper_type
mutableprivate

Definition at line 2351 of file Assembly.h.

Referenced by buildFaceNeighborFE(), and preparePRefinement().

◆ _user_added_fe_face_of_helper_type

bool Assembly::_user_added_fe_face_of_helper_type
mutableprivate

Definition at line 2350 of file Assembly.h.

Referenced by buildFaceFE(), and preparePRefinement().

◆ _user_added_fe_lower_of_helper_type

bool Assembly::_user_added_fe_lower_of_helper_type
mutableprivate

Definition at line 2353 of file Assembly.h.

Referenced by buildLowerDFE(), and preparePRefinement().

◆ _user_added_fe_neighbor_of_helper_type

bool Assembly::_user_added_fe_neighbor_of_helper_type
mutableprivate

Definition at line 2352 of file Assembly.h.

Referenced by buildNeighborFE(), and preparePRefinement().

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

Referenced by buildFE(), and preparePRefinement().

◆ _vector_curl_phi

VectorVariablePhiCurl Assembly::_vector_curl_phi
protected

Definition at line 2711 of file Assembly.h.

Referenced by curlPhi(), and curlPhi().

◆ _vector_curl_phi_face

VectorVariablePhiCurl Assembly::_vector_curl_phi_face
protected

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

Referenced by curlPhiFaceNeighbor(), and curlPhiFaceNeighbor().

◆ _vector_curl_phi_neighbor

VectorVariablePhiCurl Assembly::_vector_curl_phi_neighbor
protected

Definition at line 2723 of file Assembly.h.

Referenced by curlPhiNeighbor(), and curlPhiNeighbor().

◆ _vector_div_phi

VectorVariablePhiDivergence Assembly::_vector_div_phi
protected

Definition at line 2712 of file Assembly.h.

Referenced by divPhi(), and divPhi().

◆ _vector_div_phi_face

VectorVariablePhiDivergence Assembly::_vector_div_phi_face
protected

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

Referenced by divPhiFaceNeighbor(), and divPhiFaceNeighbor().

◆ _vector_div_phi_neighbor

VectorVariablePhiDivergence Assembly::_vector_div_phi_neighbor
protected

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

Referenced by buildVectorFE(), getVectorFE(), 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 2504 of file Assembly.h.

Referenced by buildVectorFaceFE(), computeADFace(), getVectorFEFace(), 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 2546 of file Assembly.h.

Referenced by buildVectorDualLowerDFE(), buildVectorLowerDFE(), 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 2761 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 2766 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 2762 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 2765 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 2763 of file Assembly.h.

Referenced by buildVectorNeighborFE(), and reinitFENeighbor().

◆ _vector_grad_phi

VectorVariablePhiGradient Assembly::_vector_grad_phi
protected

Definition at line 2709 of file Assembly.h.

Referenced by gradPhi(), and gradPhi().

◆ _vector_grad_phi_face

VectorVariablePhiGradient Assembly::_vector_grad_phi_face
protected

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

Referenced by gradPhiFaceNeighbor(), and gradPhiFaceNeighbor().

◆ _vector_grad_phi_neighbor

VectorVariablePhiGradient Assembly::_vector_grad_phi_neighbor
protected

Definition at line 2721 of file Assembly.h.

Referenced by gradPhiNeighbor(), and gradPhiNeighbor().

◆ _vector_phi

VectorVariablePhiValue Assembly::_vector_phi
protected

Definition at line 2708 of file Assembly.h.

Referenced by phi(), and phi().

◆ _vector_phi_face

VectorVariablePhiValue Assembly::_vector_phi_face
protected

Definition at line 2714 of file Assembly.h.

Referenced by phiFace(), and phiFace().

◆ _vector_phi_face_neighbor

VectorVariablePhiValue Assembly::_vector_phi_face_neighbor
protected

Definition at line 2726 of file Assembly.h.

Referenced by phiFaceNeighbor(), and phiFaceNeighbor().

◆ _vector_phi_neighbor

VectorVariablePhiValue Assembly::_vector_phi_neighbor
protected

Definition at line 2720 of file Assembly.h.

Referenced by phiNeighbor(), and phiNeighbor().

◆ _vector_second_phi

VectorVariablePhiSecond Assembly::_vector_second_phi
protected

Definition at line 2710 of file Assembly.h.

Referenced by secondPhi(), and secondPhi().

◆ _vector_second_phi_face

VectorVariablePhiSecond Assembly::_vector_second_phi_face
protected

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

Referenced by secondPhiFaceNeighbor(), and secondPhiFaceNeighbor().

◆ _vector_second_phi_neighbor

VectorVariablePhiSecond Assembly::_vector_second_phi_neighbor
protected

Definition at line 2722 of file Assembly.h.

Referenced by secondPhiNeighbor(), and secondPhiNeighbor().

◆ _xfem

std::shared_ptr<XFEMInterface> Assembly::_xfem
private

The XFEM controller.

Definition at line 2367 of file Assembly.h.

Referenced by modifyFaceWeightsDueToXFEM(), modifyWeightsDueToXFEM(), reinitFE(), reinitFEFace(), and setXFEM().


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