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

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

#include <Assembly.h>

Classes

class  FEShapeData
 
class  VectorFEShapeData
 

Public Member Functions

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

Public Attributes

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

Protected Member Functions

void reinitFE (const Elem *elem)
 Just an internal helper function to reinit the volume FE objects. More...
 
void reinitFEFace (const Elem *elem, unsigned int side)
 Just an internal helper function to reinit the face FE objects. More...
 
void computeFaceMap (unsigned dim, const std::vector< Real > &qw, const Elem *side)
 
void reinitFEFaceNeighbor (const Elem *neighbor, const std::vector< Point > &reference_points)
 
void reinitFENeighbor (const Elem *neighbor, const std::vector< Point > &reference_points)
 
template<ComputeStage compute_stage>
void setCoordinateTransformation (const QBase *qrule, const ADPoint &q_points, MooseArray< ADReal > &coord)
 
void computeCurrentElemVolume ()
 
void computeCurrentFaceVolume ()
 
void computeCurrentNeighborVolume ()
 
void addResidualBlock (NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, Real scaling_factor)
 
void cacheResidualBlock (std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, Real scaling_factor)
 
void setResidualBlock (NumericVector< Number > &residual, DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, Real scaling_factor)
 
void addJacobianBlock (SparseMatrix< Number > &jacobian, DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor)
 
void clearCachedJacobianContributions ()
 Clear any currently cached jacobian contributions. More...
 
void modifyWeightsDueToXFEM (const Elem *elem)
 Update the integration weights for XFEM partial elements. More...
 
void modifyFaceWeightsDueToXFEM (const Elem *elem, unsigned int side=0)
 Update the face integration weights for XFEM partial elements. More...
 
template<typename OutputType >
void computeGradPhiAD (const Elem *elem, unsigned int n_qp, typename VariableTestGradientType< OutputType, ComputeStage::JACOBIAN >::type &grad_phi, FEGenericBase< OutputType > *fe)
 
void resizeMappingObjects (unsigned int n_qp, unsigned int dim)
 
void computeAffineMapAD (const Elem *elem, const std::vector< Real > &qw, unsigned int n_qp, FEBase *fe)
 
void computeSinglePointMapAD (const Elem *elem, const std::vector< Real > &qw, unsigned p, FEBase *fe)
 
template<>
void computeGradPhiAD (const Elem *, unsigned int, typename VariableTestGradientType< RealVectorValue, ComputeStage::JACOBIAN >::type &, FEGenericBase< RealVectorValue > *)
 

Protected Attributes

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

Detailed Description

Keeps track of stuff related to assembling.

Definition at line 63 of file Assembly.h.

Constructor & Destructor Documentation

◆ Assembly()

Assembly::Assembly ( SystemBase sys,
THREAD_ID  tid 
)

Definition at line 36 of file Assembly.C.

37  : _sys(sys),
39  _displaced(dynamic_cast<DisplacedSystem *>(&sys) ? true : false),
42  _dof_map(_sys.dofMap()),
43  _tid(tid),
44  _mesh(sys.mesh()),
46  _current_qrule(NULL),
50  _current_qrule_face(NULL),
53 
54  _current_elem(NULL),
56  _current_side(0),
57  _current_side_elem(NULL),
64  _current_node(NULL),
68 
69  _cached_residual_values(2), // The 2 is for TIME and NONTIME
70  _cached_residual_rows(2), // The 2 is for TIME and NONTIME
71 
75  _calculate_xyz(false),
76  _calculate_face_xyz(false),
78 {
79  Order helper_order = _mesh.hasSecondOrderElements() ? SECOND : FIRST;
80  // Build fe's for the helpers
81  buildFE(FEType(helper_order, LAGRANGE));
82  buildFaceFE(FEType(helper_order, LAGRANGE));
83  buildNeighborFE(FEType(helper_order, LAGRANGE));
84  buildFaceNeighborFE(FEType(helper_order, LAGRANGE));
85 
86  // Build an FE helper object for this type for each dimension up to the dimension of the current
87  // mesh
88  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
89  {
90  _holder_fe_helper[dim] = &_fe[dim][FEType(helper_order, LAGRANGE)];
91  (*_holder_fe_helper[dim])->get_phi();
92  (*_holder_fe_helper[dim])->get_dphi();
93  (*_holder_fe_helper[dim])->get_xyz();
94  (*_holder_fe_helper[dim])->get_JxW();
95 
96  _holder_fe_face_helper[dim] = &_fe_face[dim][FEType(helper_order, LAGRANGE)];
97  (*_holder_fe_face_helper[dim])->get_phi();
98  (*_holder_fe_face_helper[dim])->get_dphi();
99  (*_holder_fe_face_helper[dim])->get_xyz();
100  (*_holder_fe_face_helper[dim])->get_JxW();
101  (*_holder_fe_face_helper[dim])->get_normals();
102 
103  _holder_fe_face_neighbor_helper[dim] = &_fe_face_neighbor[dim][FEType(helper_order, LAGRANGE)];
104  (*_holder_fe_face_neighbor_helper[dim])->get_xyz();
105  (*_holder_fe_face_neighbor_helper[dim])->get_JxW();
106  (*_holder_fe_face_neighbor_helper[dim])->get_normals();
107 
108  _holder_fe_neighbor_helper[dim] = &_fe_neighbor[dim][FEType(helper_order, LAGRANGE)];
109  (*_holder_fe_neighbor_helper[dim])->get_xyz();
110  (*_holder_fe_neighbor_helper[dim])->get_JxW();
111  }
112 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:1238
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:1307
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:1214
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:260
std::map< unsigned int, FEBase ** > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:1206
SystemBase & _sys
Definition: Assembly.h:1143
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:1424
unsigned int _max_cached_residuals
Definition: Assembly.h:1426
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:1210
std::map< unsigned int, FEBase ** > _holder_fe_face_neighbor_helper
Definition: Assembly.h:1275
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:508
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:1315
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:1309
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:1299
MooseMesh & _mesh
Definition: Assembly.h:1174
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:1287
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:1291
const CouplingMatrix & nonlocalCouplingMatrix() const
Definition: SubProblem.h:503
unsigned int _block_diagonal_matrix
Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take s...
Definition: Assembly.h:1438
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:241
unsigned int _mesh_dimension
Definition: Assembly.h:1176
QBase * _current_qrule_volume
The current volumetric quadrature for the element.
Definition: Assembly.h:1212
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1170
unsigned int _max_cached_jacobians
Definition: Assembly.h:1435
const CouplingMatrix & _nonlocal_cm
Definition: Assembly.h:1150
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:1303
virtual DofMap & dofMap()
Gets the dof map.
Definition: SystemBase.C:900
QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:1278
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2128
std::map< unsigned int, FEBase ** > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:1274
SubProblem & _subproblem
Definition: Assembly.h:1144
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:1269
bool _calculate_xyz
Definition: Assembly.h:1481
bool _calculate_curvatures
Definition: Assembly.h:1483
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:279
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:218
virtual SubProblem & subproblem()
Definition: SystemBase.h:105
ArbitraryQuadrature * _current_qface_arbitrary
The current arbitrary quadrature rule used on element faces.
Definition: Assembly.h:1248
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:2725
std::map< unsigned int, FEBase ** > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:1242
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:1202
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:1297
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1421
const bool _displaced
Definition: Assembly.h:1146
const Node * _current_node
The current node we are working with.
Definition: Assembly.h:1311
bool _calculate_face_xyz
Definition: Assembly.h:1482
const bool & _computing_jacobian
Definition: Assembly.h:1152
virtual MooseMesh & mesh()
Definition: SystemBase.h:104
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:1293
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:1305
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:1317
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:1270
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:1220
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:1295
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:1246
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition: Assembly.h:1313

◆ ~Assembly()

Assembly::~Assembly ( )
virtual

Definition at line 114 of file Assembly.C.

115 {
116  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
117  for (auto & it : _fe[dim])
118  delete it.second;
119 
120  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
121  for (auto & it : _fe_face[dim])
122  delete it.second;
123 
124  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
125  for (auto & it : _fe_neighbor[dim])
126  delete it.second;
127 
128  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
129  for (auto & it : _fe_face_neighbor[dim])
130  delete it.second;
131 
132  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
133  for (auto & it : _vector_fe[dim])
134  delete it.second;
135 
136  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
137  for (auto & it : _vector_fe_face[dim])
138  delete it.second;
139 
140  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
141  for (auto & it : _vector_fe_neighbor[dim])
142  delete it.second;
143 
144  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
145  for (auto & it : _vector_fe_face_neighbor[dim])
146  delete it.second;
147 
148  for (auto & it : _holder_qrule_volume)
149  delete it.second;
150 
151  for (auto & it : _holder_qrule_arbitrary)
152  delete it.second;
153 
154  for (auto & it : _holder_qface_arbitrary)
155  delete it.second;
156 
157  for (auto & it : _holder_qrule_face)
158  delete it.second;
159 
160  for (auto & it : _holder_qrule_neighbor)
161  delete it.second;
162 
163  for (auto & it : _fe_shape_data)
164  delete it.second;
165 
166  for (auto & it : _fe_shape_data_face)
167  delete it.second;
168 
169  for (auto & it : _fe_shape_data_neighbor)
170  delete it.second;
171 
172  for (auto & it : _fe_shape_data_face_neighbor)
173  delete it.second;
174 
175  for (auto & it : _vector_fe_shape_data)
176  delete it.second;
177 
178  for (auto & it : _vector_fe_shape_data_face)
179  delete it.second;
180 
181  for (auto & it : _vector_fe_shape_data_neighbor)
182  delete it.second;
183 
184  for (auto & it : _vector_fe_shape_data_face_neighbor)
185  delete it.second;
186 
187  for (auto & it : _ad_grad_phi_data)
188  it.second.release();
189 
190  for (auto & it : _ad_vector_grad_phi_data)
191  it.second.release();
192 
193  for (auto & it : _ad_grad_phi_data_face)
194  it.second.release();
195 
196  for (auto & it : _ad_vector_grad_phi_data_face)
197  it.second.release();
198 
199  delete _current_side_elem;
201 
203 
204  _coord.release();
206 
207  _ad_JxW.release();
214  _ad_coord.release();
215 }
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:1461
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:1238
MooseArray< Real > _curvatures
Definition: Assembly.h:1476
MooseArray< VectorValue< DualReal > > _ad_q_points_face
Definition: Assembly.h:1475
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:1320
MooseArray< VectorValue< DualReal > > _ad_normals
Definition: Assembly.h:1474
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:1204
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition: Assembly.h:1284
MooseArray< DualReal > _ad_JxW_face
Definition: Assembly.h:1473
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:1222
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:1462
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1408
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_neighbor
Holds arbitrary qrules for each dimension.
Definition: Assembly.h:1280
std::map< FEType, typename VariableTestGradientType< Real, ComputeStage::JACOBIAN >::type > _ad_grad_phi_data
Definition: Assembly.h:1412
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:1272
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1403
unsigned int _mesh_dimension
Definition: Assembly.h:1176
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1409
std::map< unsigned int, QBase * > _holder_qrule_face
Holds face qrules for each dimension.
Definition: Assembly.h:1256
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1402
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:1269
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_arbitrary
Holds arbitrary qrules for each dimension.
Definition: Assembly.h:1229
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:1240
std::map< FEType, typename VariableTestGradientType< RealVectorValue, ComputeStage::JACOBIAN >::type > _ad_vector_grad_phi_data_face
Definition: Assembly.h:1418
std::map< FEType, typename VariableTestGradientType< RealVectorValue, ComputeStage::JACOBIAN >::type > _ad_vector_grad_phi_data
Definition: Assembly.h:1414
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:1202
std::map< unsigned int, ArbitraryQuadrature * > _holder_qface_arbitrary
Holds arbitrary face qrules for each dimension.
Definition: Assembly.h:1258
MooseArray< DualReal > _ad_curvatures
Definition: Assembly.h:1477
std::map< FEType, typename VariableTestGradientType< Real, ComputeStage::JACOBIAN >::type > _ad_grad_phi_data_face
Definition: Assembly.h:1416
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1406
void release()
Manually deallocates the data pointer.
Definition: MooseArray.h:51
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:1271
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:1305
std::map< unsigned int, QBase * > _holder_qrule_volume
Holds volume qrules for each dimension.
Definition: Assembly.h:1227
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:1270
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1400
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1401
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1407
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:1295
MooseArray< DualReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:1224

Member Function Documentation

◆ adCoordTransformation()

template<ComputeStage compute_stage>
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 263 of file Assembly.h.

264  {
265  return _coord;
266  }
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:1222

◆ adCurvatures()

template<ComputeStage compute_stage>
template const MooseArray< typename Moose::RealType< RESIDUAL >::type > & Assembly::adCurvatures< RESIDUAL > ( ) const

Definition at line 3225 of file Assembly.C.

3226 {
3227  _calculate_curvatures = true;
3228  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
3229  (*_holder_fe_face_helper.at(dim))->get_curvatures();
3230  return _curvatures;
3231 }
MooseArray< Real > _curvatures
Definition: Assembly.h:1476
unsigned int _mesh_dimension
Definition: Assembly.h:1176
bool _calculate_curvatures
Definition: Assembly.h:1483
std::map< unsigned int, FEBase ** > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:1242

◆ addCachedJacobian() [1/2]

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

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

Note that this will also clear the cache.

Definition at line 2601 of file Assembly.C.

2602 {
2603  mooseDeprecated(" Please use addCachedJacobian() ");
2604 
2606 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
void addCachedJacobian()
Definition: Assembly.C:2609

◆ addCachedJacobian() [2/2]

void Assembly::addCachedJacobian ( )

Definition at line 2609 of file Assembly.C.

Referenced by addCachedJacobian().

2610 {
2612  {
2613  mooseAssert(_cached_jacobian_rows.size() == _cached_jacobian_cols.size(),
2614  "Error: Cached data sizes MUST be the same!");
2615  for (unsigned int i = 0; i < _cached_jacobian_rows.size(); i++)
2616  mooseAssert(_cached_jacobian_rows[i].size() == _cached_jacobian_cols[i].size(),
2617  "Error: Cached data sizes MUST be the same for a given tag!");
2618  }
2619 
2620  for (unsigned int i = 0; i < _cached_jacobian_rows.size(); i++)
2621  if (_sys.hasMatrix(i))
2622  for (unsigned int j = 0; j < _cached_jacobian_rows[i].size(); j++)
2623  _sys.getMatrix(i).add(_cached_jacobian_rows[i][j],
2624  _cached_jacobian_cols[i][j],
2625  _cached_jacobian_values[i][j]);
2626 
2627  for (unsigned int i = 0; i < _cached_jacobian_rows.size(); i++)
2628  {
2629  if (!_sys.hasMatrix(i))
2630  continue;
2631 
2634 
2635  // Try to be more efficient from now on
2636  // The 2 is just a fudge factor to keep us from having to grow the vector during assembly
2637  _cached_jacobian_values[i].clear();
2639 
2640  _cached_jacobian_rows[i].clear();
2642 
2643  _cached_jacobian_cols[i].clear();
2645  }
2646 }
SystemBase & _sys
Definition: Assembly.h:1143
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:1431
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:1429
unsigned int _max_cached_jacobians
Definition: Assembly.h:1435
SubProblem & _subproblem
Definition: Assembly.h:1144
virtual bool checkNonlocalCouplingRequirement()
Definition: SubProblem.h:69
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:787
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:1433

◆ addCachedJacobianContributions()

void Assembly::addCachedJacobianContributions ( )

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

Definition at line 2981 of file Assembly.C.

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

2982 {
2983  for (auto tag = beginIndex(_cached_jacobian_contribution_rows);
2985  tag++)
2986  if (_sys.hasMatrix(tag))
2987  {
2988  // TODO: Use SparseMatrix::set_values() for efficiency
2989  for (unsigned int i = 0; i < _cached_jacobian_contribution_vals[tag].size(); ++i)
2993  }
2994 
2996 }
SystemBase & _sys
Definition: Assembly.h:1143
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
std::vector< std::vector< Real > > _cached_jacobian_contribution_vals
Storage for cached Jacobian entries.
Definition: Assembly.h:1449
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_cols
Definition: Assembly.h:1451
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:787
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_rows
Definition: Assembly.h:1450
void clearCachedJacobianContributions()
Clear any currently cached jacobian contributions.
Definition: Assembly.C:2999

◆ addCachedResidual()

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

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

Note that this will also clear the cache.

Definition at line 2444 of file Assembly.C.

Referenced by addCachedResiduals().

2445 {
2446  if (!_sys.hasVector(tag_id))
2447  {
2448  // Only clean up things when tag exists
2449  if (_subproblem.vectorTagExists(tag_id))
2450  {
2451  _cached_residual_values[tag_id].clear();
2452  _cached_residual_rows[tag_id].clear();
2453  }
2454  return;
2455  }
2456 
2457  std::vector<Real> & cached_residual_values = _cached_residual_values[tag_id];
2458  std::vector<dof_id_type> & cached_residual_rows = _cached_residual_rows[tag_id];
2459 
2460  mooseAssert(cached_residual_values.size() == cached_residual_rows.size(),
2461  "Number of cached residuals and number of rows must match!");
2462  if (cached_residual_values.size())
2463  residual.add_vector(cached_residual_values, cached_residual_rows);
2464 
2465  if (_max_cached_residuals < cached_residual_values.size())
2466  _max_cached_residuals = cached_residual_values.size();
2467 
2468  // Try to be more efficient from now on
2469  // The 2 is just a fudge factor to keep us from having to grow the vector during assembly
2470  cached_residual_values.clear();
2471  cached_residual_values.reserve(_max_cached_residuals * 2);
2472 
2473  cached_residual_rows.clear();
2474  cached_residual_rows.reserve(_max_cached_residuals * 2);
2475 }
SystemBase & _sys
Definition: Assembly.h:1143
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:1424
unsigned int _max_cached_residuals
Definition: Assembly.h:1426
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
SubProblem & _subproblem
Definition: Assembly.h:1144
virtual bool vectorTagExists(TagID tag)
Check to see if a particular Tag exists.
Definition: SubProblem.h:107
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1421

◆ addCachedResiduals()

void Assembly::addCachedResiduals ( )

Definition at line 2429 of file Assembly.C.

2430 {
2431  for (auto tag = beginIndex(_cached_residual_values); tag < _cached_residual_values.size(); tag++)
2432  {
2433  if (!_sys.hasVector(tag))
2434  {
2435  _cached_residual_values[tag].clear();
2436  _cached_residual_rows[tag].clear();
2437  continue;
2438  }
2439  addCachedResidual(_sys.getVector(tag), tag);
2440  }
2441 }
SystemBase & _sys
Definition: Assembly.h:1143
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:1424
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
void addCachedResidual(NumericVector< Number > &residual, TagID tag_id)
Adds the values that have been cached by calling cacheResidual() and or cacheResidualNeighbor() to th...
Definition: Assembly.C:2444
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1421
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:735

◆ addJacobian()

void Assembly::addJacobian ( )

Definition at line 2664 of file Assembly.C.

2665 {
2666  for (const auto & it : _cm_ff_entry)
2667  addJacobianCoupledVarPair(it.first, it.second);
2668 
2669  for (const auto & it : _cm_sf_entry)
2670  addJacobianCoupledVarPair(it.first, it.second);
2671 
2672  for (const auto & it : _cm_fs_entry)
2673  addJacobianCoupledVarPair(it.first, it.second);
2674 }
std::vector< std::pair< MooseVariableFEBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:1157
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1155
void addJacobianCoupledVarPair(MooseVariableBase *ivar, MooseVariableBase *jvar)
Adds element matrix for ivar rows and jvar columns.
Definition: Assembly.C:2649
std::vector< std::pair< MooseVariableScalar *, MooseVariableFEBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:1159

◆ addJacobianBlock() [1/2]

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

Definition at line 2816 of file Assembly.C.

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

2821 {
2822  DenseMatrix<Number> & ke = jacobianBlock(ivar, jvar);
2823 
2824  // stick it into the matrix
2825  std::vector<dof_id_type> di(dof_indices);
2826  dof_map.constrain_element_matrix(ke, di, false);
2827 
2828  Real scaling_factor = _sys.getVariable(_tid, ivar).scalingFactor();
2829  if (scaling_factor != 1.0)
2830  {
2831  _tmp_Ke = ke;
2832  _tmp_Ke *= scaling_factor;
2833  jacobian.add_matrix(_tmp_Ke, di);
2834  }
2835  else
2836  jacobian.add_matrix(ke, di);
2837 }
SystemBase & _sys
Definition: Assembly.h:1143
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1714
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1341
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:105
DofMap & dof_map
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ addJacobianBlock() [2/2]

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

Definition at line 2518 of file Assembly.C.

2523 {
2524  if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m())
2525  {
2526  std::vector<dof_id_type> di(idof_indices);
2527  std::vector<dof_id_type> dj(jdof_indices);
2528  _dof_map.constrain_element_matrix(jac_block, di, dj, false);
2529 
2530  if (scaling_factor != 1.0)
2531  {
2532  _tmp_Ke = jac_block;
2533  _tmp_Ke *= scaling_factor;
2534  jacobian.add_matrix(_tmp_Ke, di, dj);
2535  }
2536  else
2537  jacobian.add_matrix(jac_block, di, dj);
2538  }
2539 }
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1341
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1170

◆ addJacobianBlockNonlocal()

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

Definition at line 2840 of file Assembly.C.

2846 {
2847  DenseMatrix<Number> & keg = jacobianBlockNonlocal(ivar, jvar);
2848 
2849  std::vector<dof_id_type> di(idof_indices);
2850  std::vector<dof_id_type> dg(jdof_indices);
2851  dof_map.constrain_element_matrix(keg, di, dg, false);
2852 
2853  Real scaling_factor = _sys.getVariable(_tid, ivar).scalingFactor();
2854  if (scaling_factor != 1.0)
2855  {
2856  _tmp_Ke = keg;
2857  _tmp_Ke *= scaling_factor;
2858  jacobian.add_matrix(_tmp_Ke, di, dg);
2859  }
2860  else
2861  jacobian.add_matrix(keg, di, dg);
2862 }
SystemBase & _sys
Definition: Assembly.h:1143
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1341
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:105
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1721
DofMap & dof_map
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ addJacobianCoupledVarPair()

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

Adds element matrix for ivar rows and jvar columns.

Definition at line 2649 of file Assembly.C.

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

2650 {
2651  auto i = ivar->number();
2652  auto j = jvar->number();
2653  for (unsigned int tag = beginIndex(_jacobian_block_used); tag < _jacobian_block_used.size();
2654  tag++)
2655  if (_jacobian_block_used[tag][i][j] && _sys.hasMatrix(tag))
2657  jacobianBlock(i, j, tag),
2658  ivar->dofIndices(),
2659  jvar->dofIndices(),
2660  ivar->scalingFactor());
2661 }
SystemBase & _sys
Definition: Assembly.h:1143
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices)
Definition: Assembly.C:2816
unsigned int number() const
Get variable number coming from libMesh.
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1714
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:1165
std::vector< dof_id_type > & dofIndices()
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:787
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ addJacobianNeighbor() [1/2]

void Assembly::addJacobianNeighbor ( )

Definition at line 2698 of file Assembly.C.

2699 {
2700  for (const auto & it : _cm_ff_entry)
2701  {
2702  auto ivar = it.first;
2703  auto jvar = it.second;
2704  auto i = ivar->number();
2705  auto j = jvar->number();
2706  for (auto tag = beginIndex(_jacobian_block_neighbor_used);
2707  tag < _jacobian_block_neighbor_used.size();
2708  tag++)
2709  if (_jacobian_block_neighbor_used[tag][i][j] && _sys.hasMatrix(tag))
2710  {
2713  ivar->dofIndices(),
2714  jvar->dofIndicesNeighbor(),
2715  ivar->scalingFactor());
2716 
2719  ivar->dofIndicesNeighbor(),
2720  jvar->dofIndices(),
2721  ivar->scalingFactor());
2722 
2725  ivar->dofIndicesNeighbor(),
2726  jvar->dofIndicesNeighbor(),
2727  ivar->scalingFactor());
2728  }
2729  }
2730 }
SystemBase & _sys
Definition: Assembly.h:1143
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices)
Definition: Assembly.C:2816
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1155
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:787
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1728
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:1168

◆ addJacobianNeighbor() [2/2]

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

Definition at line 2865 of file Assembly.C.

2871 {
2872  DenseMatrix<Number> & kee = jacobianBlock(ivar, jvar);
2873  DenseMatrix<Number> & ken = jacobianBlockNeighbor(Moose::ElementNeighbor, ivar, jvar);
2874  DenseMatrix<Number> & kne = jacobianBlockNeighbor(Moose::NeighborElement, ivar, jvar);
2875  DenseMatrix<Number> & knn = jacobianBlockNeighbor(Moose::NeighborNeighbor, ivar, jvar);
2876 
2877  std::vector<dof_id_type> di(dof_indices);
2878  std::vector<dof_id_type> dn(neighbor_dof_indices);
2879  // stick it into the matrix
2880  dof_map.constrain_element_matrix(kee, di, false);
2881  dof_map.constrain_element_matrix(ken, di, dn, false);
2882  dof_map.constrain_element_matrix(kne, dn, di, false);
2883  dof_map.constrain_element_matrix(knn, dn, false);
2884 
2885  Real scaling_factor = _sys.getVariable(_tid, ivar).scalingFactor();
2886  if (scaling_factor != 1.0)
2887  {
2888  _tmp_Ke = ken;
2889  _tmp_Ke *= scaling_factor;
2890  jacobian.add_matrix(_tmp_Ke, di, dn);
2891 
2892  _tmp_Ke = kne;
2893  _tmp_Ke *= scaling_factor;
2894  jacobian.add_matrix(_tmp_Ke, dn, di);
2895 
2896  _tmp_Ke = knn;
2897  _tmp_Ke *= scaling_factor;
2898  jacobian.add_matrix(_tmp_Ke, dn);
2899  }
2900  else
2901  {
2902  jacobian.add_matrix(ken, di, dn);
2903  jacobian.add_matrix(kne, dn, di);
2904  jacobian.add_matrix(knn, dn);
2905  }
2906 }
SystemBase & _sys
Definition: Assembly.h:1143
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1714
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1341
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:105
DofMap & dof_map
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1728
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ addJacobianNonlocal()

void Assembly::addJacobianNonlocal ( )

Definition at line 2677 of file Assembly.C.

2678 {
2679  for (const auto & it : _cm_nonlocal_entry)
2680  {
2681  auto ivar = it.first;
2682  auto jvar = it.second;
2683  auto i = ivar->number();
2684  auto j = jvar->number();
2685  for (auto tag = beginIndex(_jacobian_block_nonlocal_used);
2686  tag < _jacobian_block_nonlocal_used.size();
2687  tag++)
2688  if (_jacobian_block_nonlocal_used[tag][i][j] && _sys.hasMatrix(tag))
2690  jacobianBlockNonlocal(i, j, tag),
2691  ivar->dofIndices(),
2692  jvar->allDofIndices(),
2693  ivar->scalingFactor());
2694  }
2695 }
SystemBase & _sys
Definition: Assembly.h:1143
void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices)
Definition: Assembly.C:2816
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:1166
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1721
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:1163
virtual SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
Definition: SystemBase.C:787

◆ addJacobianOffDiagScalar()

void Assembly::addJacobianOffDiagScalar ( unsigned int  ivar)

Definition at line 2916 of file Assembly.C.

2917 {
2918  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2920  for (const auto & var_j : vars)
2921  addJacobianCoupledVarPair(&var_i, var_j);
2922 }
SystemBase & _sys
Definition: Assembly.h:1143
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:569
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
void addJacobianCoupledVarPair(MooseVariableBase *ivar, MooseVariableBase *jvar)
Adds element matrix for ivar rows and jvar columns.
Definition: Assembly.C:2649
Class for scalar variables (they are different).
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a scalar variable with specified number.
Definition: SystemBase.C:149

◆ addJacobianScalar()

void Assembly::addJacobianScalar ( )

Definition at line 2909 of file Assembly.C.

2910 {
2911  for (const auto & it : _cm_ss_entry)
2912  addJacobianCoupledVarPair(it.first, it.second);
2913 }
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition: Assembly.h:1161
void addJacobianCoupledVarPair(MooseVariableBase *ivar, MooseVariableBase *jvar)
Adds element matrix for ivar rows and jvar columns.
Definition: Assembly.C:2649

◆ addResidual() [1/2]

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

Definition at line 2310 of file Assembly.C.

Referenced by addResidual().

2311 {
2312  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2313  for (const auto & var : vars)
2315  residual, _sub_Re[tag_id][var->number()], var->dofIndices(), var->scalingFactor());
2316 }
SystemBase & _sys
Definition: Assembly.h:1143
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:569
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
std::vector< std::vector< DenseVector< Number > > > _sub_Re
residual contributions for each variable from the element
Definition: Assembly.h:1323
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:2250

◆ addResidual() [2/2]

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

Definition at line 2319 of file Assembly.C.

2320 {
2321  for (auto & tag : tags)
2322  if (_sys.hasVector(tag.second))
2323  addResidual(_sys.getVector(tag.second), tag.second);
2324 }
SystemBase & _sys
Definition: Assembly.h:1143
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
void addResidual(NumericVector< Number > &residual, TagID tag_id=0)
Definition: Assembly.C:2310
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:735

◆ addResidualBlock()

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

Definition at line 2250 of file Assembly.C.

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

2254 {
2255  if (dof_indices.size() > 0 && res_block.size())
2256  {
2257  _temp_dof_indices = dof_indices;
2258  _dof_map.constrain_element_vector(res_block, _temp_dof_indices, false);
2259 
2260  if (scaling_factor != 1.0)
2261  {
2262  _tmp_Re = res_block;
2263  _tmp_Re *= scaling_factor;
2264  residual.add_vector(_tmp_Re, _temp_dof_indices);
2265  }
2266  else
2267  {
2268  residual.add_vector(res_block, _temp_dof_indices);
2269  }
2270  }
2271 }
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1327
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1170
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:1441

◆ addResidualNeighbor() [1/2]

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

Definition at line 2327 of file Assembly.C.

Referenced by addResidualNeighbor().

2328 {
2329  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2330  for (const auto & var : vars)
2332  residual, _sub_Rn[tag_id][var->number()], var->dofIndicesNeighbor(), var->scalingFactor());
2333 }
SystemBase & _sys
Definition: Assembly.h:1143
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
residual contributions for each variable from the neighbor
Definition: Assembly.h:1325
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:569
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:2250

◆ addResidualNeighbor() [2/2]

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

Definition at line 2336 of file Assembly.C.

2337 {
2338  for (auto & tag : tags)
2339  if (_sys.hasVector(tag.second))
2340  addResidualNeighbor(_sys.getVector(tag.second), tag.second);
2341 }
SystemBase & _sys
Definition: Assembly.h:1143
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
void addResidualNeighbor(NumericVector< Number > &residual, TagID tag_id=0)
Definition: Assembly.C:2327
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:735

◆ addResidualScalar() [1/2]

void Assembly::addResidualScalar ( TagID  tag_id)

Definition at line 2344 of file Assembly.C.

Referenced by addResidualScalar().

2345 {
2346  // add the scalar variables residuals
2347  const std::vector<MooseVariableScalar *> & vars = _sys.getScalarVariables(_tid);
2348  for (const auto & var : vars)
2349  if (_sys.hasVector(tag_id))
2351  _sub_Re[tag_id][var->number()],
2352  var->dofIndices(),
2353  var->scalingFactor());
2354 }
SystemBase & _sys
Definition: Assembly.h:1143
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
Definition: SystemBase.h:574
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
std::vector< std::vector< DenseVector< Number > > > _sub_Re
residual contributions for each variable from the element
Definition: Assembly.h:1323
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:735
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:2250

◆ addResidualScalar() [2/2]

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

Definition at line 2357 of file Assembly.C.

2358 {
2359  for (auto & tag : tags)
2360  addResidualScalar(tag.second);
2361 }
void addResidualScalar(TagID tag_id)
Definition: Assembly.C:2344

◆ adGradPhi()

template<typename T , ComputeStage compute_stage>
const VariableTestGradientType<T, compute_stage>::type& Assembly::adGradPhi ( const MooseVariableFE< T > &  v) const
inline

Definition at line 701 of file Assembly.h.

702  {
703  return gradPhi(v);
704  }
const VariablePhiGradient & gradPhi() const
Definition: Assembly.h:706

◆ adJxW() [1/3]

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

Definition at line 238 of file Assembly.h.

239  {
240  return _ad_JxW;
241  }
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:1461

◆ adJxW() [2/3]

template<>
const MooseArray<typename Moose::RealType<RESIDUAL>::type>& Assembly::adJxW ( ) const

◆ adJxW() [3/3]

template<>
const MooseArray<typename Moose::RealType<RESIDUAL>::type>& Assembly::adJxW ( ) const

Definition at line 3218 of file Assembly.C.

3219 {
3220  return _current_JxW;
3221 }
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:1218

◆ adJxWFace()

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

Definition at line 244 of file Assembly.h.

245  {
246  return _current_JxW_face;
247  }
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:1252

◆ adNormals()

template<ComputeStage compute_stage>
const ADPoint& Assembly::adNormals ( ) const
inline

Definition at line 299 of file Assembly.h.

300  {
301  return _current_normals;
302  }
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:1254

◆ adQPoints()

template<ComputeStage compute_stage>
const ADPoint& Assembly::adQPoints ( ) const
inline

Definition at line 305 of file Assembly.h.

306  {
307  return _current_q_points;
308  }
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:1216

◆ adQPointsFace()

template<ComputeStage compute_stage>
const ADPoint& Assembly::adQPointsFace ( ) const
inline

Definition at line 311 of file Assembly.h.

312  {
313  return _current_q_points_face;
314  }
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:1250

◆ assignDisplacements()

void Assembly::assignDisplacements ( std::vector< unsigned > &&  disp_numbers)
inline

Definition at line 1049 of file Assembly.h.

1049 { _displacements = disp_numbers; }
std::vector< unsigned > _displacements
Definition: Assembly.h:1479

◆ buildFaceFE()

void Assembly::buildFaceFE ( FEType  type)

Build FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 241 of file Assembly.C.

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

242 {
244  _fe_shape_data_face[type] = new FEShapeData;
245 
246  // Build an FE object for this type for each dimension up to the dimension of the current mesh
247  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
248  {
249  if (!_fe_face[dim][type])
250  _fe_face[dim][type] = FEGenericBase<Real>::build(dim, type).release();
251 
252  _fe_face[dim][type]->get_phi();
253  _fe_face[dim][type]->get_dphi();
255  _fe_face[dim][type]->get_d2phi();
256  }
257 }
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:1238
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:1009
unsigned int _mesh_dimension
Definition: Assembly.h:1176
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1401

◆ buildFaceNeighborFE()

void Assembly::buildFaceNeighborFE ( FEType  type)

Build FEs for a neighbor face with a type.

Parameters
typeThe type of FE

Definition at line 279 of file Assembly.C.

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

280 {
282  _fe_shape_data_face_neighbor[type] = new FEShapeData;
283 
284  // Build an FE object for this type for each dimension up to the dimension of the current mesh
285  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
286  {
287  if (!_fe_face_neighbor[dim][type])
288  _fe_face_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
289 
290  _fe_face_neighbor[dim][type]->get_phi();
291  _fe_face_neighbor[dim][type]->get_dphi();
293  _fe_face_neighbor[dim][type]->get_d2phi();
294  }
295 }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1403
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:1010
unsigned int _mesh_dimension
Definition: Assembly.h:1176
MatType type
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:1270

◆ buildFE()

void Assembly::buildFE ( FEType  type)

Build FEs with a type.

Parameters
typeThe type of FE

Definition at line 218 of file Assembly.C.

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

219 {
220  if (!_fe_shape_data[type])
221  _fe_shape_data[type] = new FEShapeData;
222 
223  // Build an FE object for this type for each dimension up to the dimension of the current mesh
224  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
225  {
226  if (!_fe[dim][type])
227  _fe[dim][type] = FEGenericBase<Real>::build(dim, type).release();
228 
229  _fe[dim][type]->get_phi();
230  _fe[dim][type]->get_dphi();
231  // Pre-request xyz. We have always computed xyz, but due to
232  // recent optimizations in libmesh, we now need to explicity
233  // request it, since apps (Yak) may rely on it being computed.
234  _fe[dim][type]->get_xyz();
236  _fe[dim][type]->get_d2phi();
237  }
238 }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:1009
unsigned int _mesh_dimension
Definition: Assembly.h:1176
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:1202
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1400

◆ buildNeighborFE()

void Assembly::buildNeighborFE ( FEType  type)

Build FEs for a neighbor with a type.

Parameters
typeThe type of FE

Definition at line 260 of file Assembly.C.

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

261 {
263  _fe_shape_data_neighbor[type] = new FEShapeData;
264 
265  // Build an FE object for this type for each dimension up to the dimension of the current mesh
266  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
267  {
268  if (!_fe_neighbor[dim][type])
269  _fe_neighbor[dim][type] = FEGenericBase<Real>::build(dim, type).release();
270 
271  _fe_neighbor[dim][type]->get_phi();
272  _fe_neighbor[dim][type]->get_dphi();
274  _fe_neighbor[dim][type]->get_d2phi();
275  }
276 }
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:1010
unsigned int _mesh_dimension
Definition: Assembly.h:1176
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1402
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:1269
MatType type

◆ buildVectorFaceFE()

void Assembly::buildVectorFaceFE ( FEType  type)

Build Vector FEs for a face with a type.

Parameters
typeThe type of FE

Definition at line 329 of file Assembly.C.

Referenced by getVectorFEFace().

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

◆ buildVectorFaceNeighborFE()

void Assembly::buildVectorFaceNeighborFE ( FEType  type)

Build Vector FEs for a neighbor face with a type.

Parameters
typeThe type of FE

Definition at line 385 of file Assembly.C.

Referenced by getVectorFEFaceNeighbor().

386 {
388  _vector_fe_shape_data_face_neighbor[type] = new VectorFEShapeData;
389 
390  unsigned int min_dim;
391  if (type.family == LAGRANGE_VEC)
392  min_dim = 0;
393  else
394  min_dim = 2;
395 
396  // Build an VectorFE object for this type for each dimension up to the dimension of the current
397  // mesh
398  // Note that NEDELEC_ONE elements can only be built for dimension > 2. The for loop logic should
399  // be modified for LAGRANGE_VEC
400  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
401  {
402  if (!_vector_fe_face_neighbor[dim][type])
404  FEGenericBase<VectorValue<Real>>::build(dim, type).release();
405 
406  _vector_fe_face_neighbor[dim][type]->get_phi();
407  _vector_fe_face_neighbor[dim][type]->get_dphi();
408  if (type.family == NEDELEC_ONE)
409  _vector_fe_face_neighbor[dim][type]->get_curl_phi();
410  }
411 }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:1272
unsigned int _mesh_dimension
Definition: Assembly.h:1176
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1409
MatType type

◆ buildVectorFE()

void Assembly::buildVectorFE ( FEType  type)

Build Vector FEs with a type.

Parameters
typeThe type of FE

Definition at line 298 of file Assembly.C.

Referenced by getVectorFE().

299 {
301  _vector_fe_shape_data[type] = new VectorFEShapeData;
302 
303  unsigned int min_dim;
304  if (type.family == LAGRANGE_VEC)
305  min_dim = 0;
306  else
307  min_dim = 2;
308 
309  // Build an FE object for this type for each dimension up to the dimension of the current mesh
310  // Note that NEDELEC_ONE elements can only be built for dimension > 2. The for loop logic should
311  // be modified for LAGRANGE_VEC
312  for (unsigned int dim = min_dim; dim <= _mesh_dimension; dim++)
313  {
314  if (!_vector_fe[dim][type])
315  _vector_fe[dim][type] = FEGenericBase<VectorValue<Real>>::build(dim, type).release();
316 
317  _vector_fe[dim][type]->get_phi();
318  _vector_fe[dim][type]->get_dphi();
319  if (type.family == NEDELEC_ONE)
320  _vector_fe[dim][type]->get_curl_phi();
321  // Pre-request xyz. We have always computed xyz, but due to
322  // recent optimizations in libmesh, we now need to explicity
323  // request it, since apps (Yak) may rely on it being computed.
324  _vector_fe[dim][type]->get_xyz();
325  }
326 }
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:1204
unsigned int _mesh_dimension
Definition: Assembly.h:1176
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1406

◆ buildVectorNeighborFE()

void Assembly::buildVectorNeighborFE ( FEType  type)

Build Vector FEs for a neighbor with a type.

Parameters
typeThe type of FE

Definition at line 357 of file Assembly.C.

Referenced by getVectorFENeighbor().

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

◆ cacheJacobian()

void Assembly::cacheJacobian ( )

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

Definition at line 2748 of file Assembly.C.

2749 {
2750  for (const auto & it : _cm_ff_entry)
2751  cacheJacobianCoupledVarPair(it.first, it.second);
2752 
2753  for (const auto & it : _cm_fs_entry)
2754  cacheJacobianCoupledVarPair(it.first, it.second);
2755 
2756  for (const auto & it : _cm_sf_entry)
2757  cacheJacobianCoupledVarPair(it.first, it.second);
2758 }
std::vector< std::pair< MooseVariableFEBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:1157
void cacheJacobianCoupledVarPair(MooseVariableBase *ivar, MooseVariableBase *jvar)
Caches element matrix for ivar rows and jvar columns.
Definition: Assembly.C:2733
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1155
std::vector< std::pair< MooseVariableScalar *, MooseVariableFEBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:1159

◆ cacheJacobianBlock()

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

Definition at line 2542 of file Assembly.C.

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

2547 {
2548  // Only cache data when the matrix exists
2549  if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m() &&
2550  _sys.hasMatrix(tag))
2551  {
2552  std::vector<dof_id_type> di(idof_indices);
2553  std::vector<dof_id_type> dj(jdof_indices);
2554  _dof_map.constrain_element_matrix(jac_block, di, dj, false);
2555 
2556  if (scaling_factor != 1.0)
2557  jac_block *= scaling_factor;
2558 
2559  for (unsigned int i = 0; i < di.size(); i++)
2560  for (unsigned int j = 0; j < dj.size(); j++)
2561  {
2562  _cached_jacobian_values[tag].push_back(jac_block(i, j));
2563  _cached_jacobian_rows[tag].push_back(di[i]);
2564  _cached_jacobian_cols[tag].push_back(dj[j]);
2565  }
2566  }
2567  jac_block.zero();
2568 }
SystemBase & _sys
Definition: Assembly.h:1143
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:1431
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:1429
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1170
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:1433

◆ cacheJacobianBlockNonlocal()

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

Definition at line 2571 of file Assembly.C.

Referenced by cacheJacobianNonlocal().

2576 {
2577  if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.n() && jac_block.m() &&
2578  _sys.hasMatrix(tag))
2579  {
2580  std::vector<dof_id_type> di(idof_indices);
2581  std::vector<dof_id_type> dj(jdof_indices);
2582  _dof_map.constrain_element_matrix(jac_block, di, dj, false);
2583 
2584  if (scaling_factor != 1.0)
2585  jac_block *= scaling_factor;
2586 
2587  for (unsigned int i = 0; i < di.size(); i++)
2588  for (unsigned int j = 0; j < dj.size(); j++)
2589  if (jac_block(i, j) != 0.0) // no storage allocated for unimplemented jacobian terms,
2590  // maintaining maximum sparsity possible
2591  {
2592  _cached_jacobian_values[tag].push_back(jac_block(i, j));
2593  _cached_jacobian_rows[tag].push_back(di[i]);
2594  _cached_jacobian_cols[tag].push_back(dj[j]);
2595  }
2596  }
2597  jac_block.zero();
2598 }
SystemBase & _sys
Definition: Assembly.h:1143
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:1431
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:1429
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1170
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:1433

◆ cacheJacobianContribution() [1/2]

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

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

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

Definition at line 2925 of file Assembly.C.

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

2929 {
2930  _cached_jacobian_contribution_rows[tag].push_back(i);
2931  _cached_jacobian_contribution_cols[tag].push_back(j);
2932  _cached_jacobian_contribution_vals[tag].push_back(value);
2933 }
std::vector< std::vector< Real > > _cached_jacobian_contribution_vals
Storage for cached Jacobian entries.
Definition: Assembly.h:1449
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_cols
Definition: Assembly.h:1451
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_rows
Definition: Assembly.h:1450

◆ cacheJacobianContribution() [2/2]

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

Definition at line 2936 of file Assembly.C.

2940 {
2941  for (auto tag : tags)
2942  if (_sys.hasMatrix(tag))
2943  cacheJacobianContribution(i, j, value, tag);
2944 }
SystemBase & _sys
Definition: Assembly.h:1143
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
void cacheJacobianContribution(numeric_index_type i, numeric_index_type j, Real value, TagID tag=0)
Caches the Jacobian entry &#39;value&#39;, to eventually be added/set in the (i,j) location of the matrix...
Definition: Assembly.C:2925

◆ cacheJacobianCoupledVarPair()

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

Caches element matrix for ivar rows and jvar columns.

Definition at line 2733 of file Assembly.C.

Referenced by cacheJacobian().

2734 {
2735  auto i = ivar->number();
2736  auto j = jvar->number();
2737  for (unsigned int tag = beginIndex(_jacobian_block_used); tag < _jacobian_block_used.size();
2738  tag++)
2739  if (_jacobian_block_used[tag][i][j] && _sys.hasMatrix(tag))
2740  cacheJacobianBlock(jacobianBlock(i, j, tag),
2741  ivar->dofIndices(),
2742  jvar->dofIndices(),
2743  ivar->scalingFactor(),
2744  tag);
2745 }
SystemBase & _sys
Definition: Assembly.h:1143
unsigned int number() const
Get variable number coming from libMesh.
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1714
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:1165
void cacheJacobianBlock(DenseMatrix< Number > &jac_block, std::vector< dof_id_type > &idof_indices, std::vector< dof_id_type > &jdof_indices, Real scaling_factor, TagID tag=0)
Definition: Assembly.C:2542
std::vector< dof_id_type > & dofIndices()
void scalingFactor(Real factor)
Set the scaling factor for this variable.

◆ cacheJacobianNeighbor()

void Assembly::cacheJacobianNeighbor ( )

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

Definition at line 2782 of file Assembly.C.

2783 {
2784  for (const auto & it : _cm_ff_entry)
2785  {
2786  auto ivar = it.first;
2787  auto jvar = it.second;
2788  auto i = ivar->number();
2789  auto j = jvar->number();
2790 
2791  for (auto tag = beginIndex(_jacobian_block_neighbor_used);
2792  tag < _jacobian_block_neighbor_used.size();
2793  tag++)
2794  if (_jacobian_block_neighbor_used[tag][i][j] && _sys.hasMatrix(tag))
2795  {
2797  ivar->dofIndices(),
2798  jvar->dofIndicesNeighbor(),
2799  ivar->scalingFactor(),
2800  tag);
2802  ivar->dofIndicesNeighbor(),
2803  jvar->dofIndices(),
2804  ivar->scalingFactor(),
2805  tag);
2807  ivar->dofIndicesNeighbor(),
2808  jvar->dofIndicesNeighbor(),
2809  ivar->scalingFactor(),
2810  tag);
2811  }
2812  }
2813 }
SystemBase & _sys
Definition: Assembly.h:1143
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1155
void cacheJacobianBlock(DenseMatrix< Number > &jac_block, std::vector< dof_id_type > &idof_indices, std::vector< dof_id_type > &jdof_indices, Real scaling_factor, TagID tag=0)
Definition: Assembly.C:2542
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1728
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:1168

◆ cacheJacobianNonlocal()

void Assembly::cacheJacobianNonlocal ( )

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

Definition at line 2761 of file Assembly.C.

2762 {
2763  for (const auto & it : _cm_nonlocal_entry)
2764  {
2765  auto ivar = it.first;
2766  auto jvar = it.second;
2767  auto i = ivar->number();
2768  auto j = jvar->number();
2769  for (auto tag = beginIndex(_jacobian_block_nonlocal_used);
2770  tag < _jacobian_block_nonlocal_used.size();
2771  tag++)
2772  if (_jacobian_block_nonlocal_used[tag][i][j] && _sys.hasMatrix(tag))
2774  ivar->dofIndices(),
2775  jvar->allDofIndices(),
2776  ivar->scalingFactor(),
2777  tag);
2778  }
2779 }
SystemBase & _sys
Definition: Assembly.h:1143
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:1166
virtual bool hasMatrix(TagID tag)
Check if the tagged matrix exists in the system.
Definition: SystemBase.C:781
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, TagID tag=0)
Definition: Assembly.C:1721
void cacheJacobianBlockNonlocal(DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, TagID tag=0)
Definition: Assembly.C:2571
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:1163

◆ cacheResidual()

void Assembly::cacheResidual ( )

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

Definition at line 2364 of file Assembly.C.

2365 {
2366  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2367  for (const auto & var : vars)
2368  {
2369  for (auto tag = beginIndex(_cached_residual_values); tag < _cached_residual_values.size();
2370  tag++)
2371  if (_sys.hasVector(tag))
2373  _cached_residual_rows[tag],
2374  _sub_Re[tag][var->number()],
2375  var->dofIndices(),
2376  var->scalingFactor());
2377  }
2378 }
SystemBase & _sys
Definition: Assembly.h:1143
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:1424
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
void cacheResidualBlock(std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:2274
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:569
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
std::vector< std::vector< DenseVector< Number > > > _sub_Re
residual contributions for each variable from the element
Definition: Assembly.h:1323
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1421

◆ cacheResidualBlock()

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

Definition at line 2274 of file Assembly.C.

Referenced by cacheResidual(), and cacheResidualNeighbor().

2279 {
2280  if (dof_indices.size() > 0 && res_block.size())
2281  {
2282  _temp_dof_indices = dof_indices;
2283  _dof_map.constrain_element_vector(res_block, _temp_dof_indices, false);
2284 
2285  if (scaling_factor != 1.0)
2286  {
2287  _tmp_Re = res_block;
2288  _tmp_Re *= scaling_factor;
2289 
2290  for (unsigned int i = 0; i < _tmp_Re.size(); i++)
2291  {
2292  cached_residual_values.push_back(_tmp_Re(i));
2293  cached_residual_rows.push_back(_temp_dof_indices[i]);
2294  }
2295  }
2296  else
2297  {
2298  for (unsigned int i = 0; i < res_block.size(); i++)
2299  {
2300  cached_residual_values.push_back(res_block(i));
2301  cached_residual_rows.push_back(_temp_dof_indices[i]);
2302  }
2303  }
2304  }
2305 
2306  res_block.zero();
2307 }
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:1327
const DofMap & _dof_map
DOF map.
Definition: Assembly.h:1170
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:1441

◆ cacheResidualContribution() [1/2]

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

Cache individual residual contributions.

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

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

Definition at line 2381 of file Assembly.C.

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

2382 {
2383  _cached_residual_values[tag_id].push_back(value);
2384  _cached_residual_rows[tag_id].push_back(dof);
2385 }
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:1424
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1421

◆ cacheResidualContribution() [2/2]

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

Cache individual residual contributions.

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

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

Definition at line 2388 of file Assembly.C.

2389 {
2390  for (auto & tag : tags)
2391  cacheResidualContribution(dof, value, tag);
2392 }
void cacheResidualContribution(dof_id_type dof, Real value, TagID tag_id)
Cache individual residual contributions.
Definition: Assembly.C:2381

◆ cacheResidualNeighbor()

void Assembly::cacheResidualNeighbor ( )

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

Definition at line 2395 of file Assembly.C.

2396 {
2397  const std::vector<MooseVariableFEBase *> & vars = _sys.getVariables(_tid);
2398  for (const auto & var : vars)
2399  {
2400  for (auto tag = beginIndex(_cached_residual_values); tag < _cached_residual_values.size();
2401  tag++)
2402  {
2403  if (_sys.hasVector(tag))
2405  _cached_residual_rows[tag],
2406  _sub_Rn[tag][var->number()],
2407  var->dofIndicesNeighbor(),
2408  var->scalingFactor());
2409  }
2410  }
2411 }
SystemBase & _sys
Definition: Assembly.h:1143
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:1424
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
Definition: SystemBase.C:685
void cacheResidualBlock(std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, Real scaling_factor)
Definition: Assembly.C:2274
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
residual contributions for each variable from the neighbor
Definition: Assembly.h:1325
const std::vector< MooseVariableFEBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:569
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1421

◆ cacheResidualNodes()

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

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

Definition at line 2414 of file Assembly.C.

Referenced by NodalConstraint::computeResidual().

2417 {
2418  // Add the residual value and dof_index to cached_residual_values and cached_residual_rows
2419  // respectively.
2420  // This is used by NodalConstraint.C to cache the residual calculated for master and slave node.
2421  for (unsigned int i = 0; i < dof_index.size(); ++i)
2422  {
2423  _cached_residual_values[tag].push_back(res(i));
2424  _cached_residual_rows[tag].push_back(dof_index[i]);
2425  }
2426 }
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:1424
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:1421

◆ clearCachedJacobianContributions()

void Assembly::clearCachedJacobianContributions ( )
protected

Clear any currently cached jacobian contributions.

This is automatically called by setCachedJacobianContributions and addCachedJacobianContributions

Definition at line 2999 of file Assembly.C.

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

3000 {
3001  for (auto tag = beginIndex(_cached_jacobian_contribution_rows);
3003  tag++)
3004  {
3005  unsigned int orig_size = _cached_jacobian_contribution_rows[tag].size();
3006 
3010 
3011  // It's possible (though massively unlikely) that clear() will
3012  // change the capacity of the vectors, so let's be paranoid and
3013  // explicitly reserve() the same amount of memory to avoid multiple
3014  // push_back() induced allocations. We reserve 20% more than the
3015  // original size that was cached to account for variations in the
3016  // number of BCs assigned to each thread (for when the Jacobian
3017  // contributions are computed threaded).
3018  _cached_jacobian_contribution_rows[tag].reserve(1.2 * orig_size);
3019  _cached_jacobian_contribution_cols[tag].reserve(1.2 * orig_size);
3020  _cached_jacobian_contribution_vals[tag].reserve(1.2 * orig_size);
3021  }
3022 }
std::vector< std::vector< Real > > _cached_jacobian_contribution_vals
Storage for cached Jacobian entries.
Definition: Assembly.h:1449
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_cols
Definition: Assembly.h:1451
std::vector< std::vector< numeric_index_type > > _cached_jacobian_contribution_rows
Definition: Assembly.h:1450

◆ computeAffineMapAD()

void Assembly::computeAffineMapAD ( const Elem *  elem,
const std::vector< Real > &  qw,
unsigned int  n_qp,
FEBase *  fe 
)
protected

Definition at line 699 of file Assembly.C.

Referenced by reinitFE(), and reinitFEFace().

703 {
704  computeSinglePointMapAD(elem, qw, 0, fe);
705 
706  for (unsigned int p = 1; p < n_qp; p++)
707  {
708  // Compute xyz at all other quadrature points. Note that this map method call is only really
709  // referring to the volumetric element...face quadrature points are calculated in computeFaceMap
710  if (_calculate_xyz)
711  {
712  auto num_shapes = fe->n_shape_functions();
713  const auto & elem_nodes = elem->get_nodes();
714  const auto & phi_map = fe->get_fe_map().get_phi_map();
715  _ad_q_points[p].zero();
716  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
717  {
718  mooseAssert(elem_nodes[i], "The node is null!");
719  VectorValue<DualReal> elem_point = *elem_nodes[i];
720  unsigned dimension = 0;
721  for (const auto & disp_num : _displacements)
722  elem_point(dimension++).derivatives()[disp_num * _sys.getMaxVarNDofsPerElem() + i] = 1.;
723 
724  _ad_q_points[p].add_scaled(elem_point, phi_map[i][p]);
725  }
726  }
727 
728  // Now copy over other map data for each extra quadrature point
729 
734 
735  if (elem->dim() > 1)
736  {
741 
742  if (elem->dim() > 2)
743  {
748  }
749  }
750  _ad_jac[p] = _ad_jac[0];
751  _ad_JxW[p] = _ad_JxW[0] / qw[0] * qw[p];
752  }
753 }
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:1461
SystemBase & _sys
Definition: Assembly.h:1143
std::vector< DualReal > _ad_detadz_map
Definition: Assembly.h:1468
std::vector< DualReal > _ad_dxidy_map
Definition: Assembly.h:1464
std::vector< DualReal > _ad_dzetady_map
Definition: Assembly.h:1470
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:1462
std::vector< DualReal > _ad_dzetadz_map
Definition: Assembly.h:1471
std::vector< DualReal > _ad_dzetadx_map
Definition: Assembly.h:1469
size_t getMaxVarNDofsPerElem()
Gets the maximum number of dofs used by any one variable on any one element.
Definition: SystemBase.h:413
std::vector< DualReal > _ad_dxidx_map
Definition: Assembly.h:1463
std::vector< unsigned > _displacements
Definition: Assembly.h:1479
std::vector< DualReal > _ad_dxidz_map
Definition: Assembly.h:1465
std::vector< DualReal > _ad_jac
Definition: Assembly.h:1460
bool _calculate_xyz
Definition: Assembly.h:1481
std::vector< VectorValue< DualReal > > _ad_dxyzdeta_map
Definition: Assembly.h:1455
const Elem *& elem()
Return the current element.
Definition: Assembly.h:320
std::vector< VectorValue< DualReal > > _ad_dxyzdzeta_map
Definition: Assembly.h:1456
void computeSinglePointMapAD(const Elem *elem, const std::vector< Real > &qw, unsigned p, FEBase *fe)
Definition: Assembly.C:756
std::vector< DualReal > _ad_detadx_map
Definition: Assembly.h:1466
std::vector< DualReal > _ad_detady_map
Definition: Assembly.h:1467
std::vector< VectorValue< DualReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:1454

◆ computeCurrentElemVolume()

void Assembly::computeCurrentElemVolume ( )
protected

Definition at line 1535 of file Assembly.C.

Referenced by reinit().

1536 {
1538  return;
1539 
1540  setCoordinateTransformation<ComputeStage::RESIDUAL>(_current_qrule, _current_q_points, _coord);
1542  setCoordinateTransformation<ComputeStage::JACOBIAN>(_current_qrule, _ad_q_points, _ad_coord);
1543 
1544  _current_elem_volume = 0.;
1545  for (unsigned int qp = 0; qp < _current_qrule->n_points(); qp++)
1547 
1549 }
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:1210
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:1222
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:1462
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:1315
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:1291
bool _calculate_xyz
Definition: Assembly.h:1481
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:1218
const bool & _computing_jacobian
Definition: Assembly.h:1152
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:1216
MooseArray< DualReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:1224

◆ computeCurrentFaceVolume()

void Assembly::computeCurrentFaceVolume ( )
protected

Definition at line 1552 of file Assembly.C.

Referenced by reinit().

1553 {
1555  return;
1556 
1557  setCoordinateTransformation<ComputeStage::RESIDUAL>(
1560  setCoordinateTransformation<ComputeStage::JACOBIAN>(
1562 
1563  _current_side_volume = 0.;
1564  for (unsigned int qp = 0; qp < _current_qrule_face->n_points(); qp++)
1566 
1568 }
MooseArray< VectorValue< DualReal > > _ad_q_points_face
Definition: Assembly.h:1475
QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:1210
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:1222
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:1252
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:1297
bool _calculate_face_xyz
Definition: Assembly.h:1482
const bool & _computing_jacobian
Definition: Assembly.h:1152
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:1317
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:1250
MooseArray< DualReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:1224
QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:1246

◆ computeCurrentNeighborVolume()

void Assembly::computeCurrentNeighborVolume ( )
protected

◆ computeFaceMap()

void Assembly::computeFaceMap ( unsigned  dim,
const std::vector< Real > &  qw,
const Elem *  side 
)
protected

Definition at line 1110 of file Assembly.C.

Referenced by reinitFEFace().

1111 {
1112  const auto n_qp = qw.size();
1113  const Elem * elem = side->parent();
1114  auto side_number = elem->which_side_am_i(side);
1115  const auto & dpsidxi_map = (*_holder_fe_face_helper[dim])->get_fe_map().get_dpsidxi();
1116  const auto & dpsideta_map = (*_holder_fe_face_helper[dim])->get_fe_map().get_dpsideta();
1117  const auto & psi_map = (*_holder_fe_face_helper[dim])->get_fe_map().get_psi();
1118  std::vector<std::vector<Real>> const * d2psidxi2_map = nullptr;
1119  std::vector<std::vector<Real>> const * d2psidxideta_map = nullptr;
1120  std::vector<std::vector<Real>> const * d2psideta2_map = nullptr;
1122  {
1123  d2psidxi2_map = &(*_holder_fe_face_helper[dim])->get_fe_map().get_d2psidxi2();
1124  d2psidxideta_map = &(*_holder_fe_face_helper[dim])->get_fe_map().get_d2psidxideta();
1125  d2psideta2_map = &(*_holder_fe_face_helper[dim])->get_fe_map().get_d2psideta2();
1126  }
1127 
1128  switch (dim)
1129  {
1130  case 1:
1131  {
1132  if (!n_qp)
1133  break;
1134 
1135  if (side->node_id(0) == elem->node_id(0))
1136  _ad_normals[0] = Point(-1.);
1137  else
1138  _ad_normals[0] = Point(1.);
1139 
1140  VectorValue<DualReal> side_point;
1141  if (_calculate_face_xyz)
1142  {
1143  side_point = side->point(0);
1144  auto element_node_number = elem->which_node_am_i(side_number, 0);
1145 
1146  unsigned dimension = 0;
1147  for (const auto & disp_num : _displacements)
1148  side_point(dimension++)
1149  .derivatives()[disp_num * _sys.getMaxVarNDofsPerElem() + element_node_number] = 1.;
1150  }
1151 
1152  for (unsigned int p = 0; p < n_qp; p++)
1153  {
1154  if (_calculate_face_xyz)
1155  {
1156  _ad_q_points_face[p].zero();
1157  _ad_q_points_face[p].add_scaled(side_point, psi_map[0][p]);
1158  }
1159 
1160  _ad_normals[p] = _ad_normals[0];
1161  _ad_JxW_face[p] = 1.0 * qw[p];
1162  }
1163 
1164  break;
1165  }
1166 
1167  case 2:
1168  {
1169  _ad_dxyzdxi_map.resize(n_qp);
1171  _ad_d2xyzdxi2_map.resize(n_qp);
1172 
1173  for (unsigned int p = 0; p < n_qp; p++)
1174  {
1175  _ad_dxyzdxi_map[p].zero();
1176  if (_calculate_face_xyz)
1177  _ad_q_points_face[p].zero();
1179  _ad_d2xyzdxi2_map[p].zero();
1180  }
1181 
1182  const auto n_mapping_shape_functions =
1183  FE<2, LAGRANGE>::n_shape_functions(side->type(), side->default_order());
1184 
1185  for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1186  {
1187  VectorValue<DualReal> side_point = side->point(i);
1188  auto element_node_number = elem->which_node_am_i(side_number, i);
1189 
1190  unsigned dimension = 0;
1191  for (const auto & disp_num : _displacements)
1192  side_point(dimension++)
1193  .derivatives()[disp_num * _sys.getMaxVarNDofsPerElem() + element_node_number] = 1.;
1194 
1195  for (unsigned int p = 0; p < n_qp; p++)
1196  {
1197  _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1198  if (_calculate_face_xyz)
1199  _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1201  _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1202  }
1203  }
1204 
1205  for (unsigned int p = 0; p < n_qp; p++)
1206  {
1207  _ad_normals[p] =
1208  (VectorValue<DualReal>(_ad_dxyzdxi_map[p](1), -_ad_dxyzdxi_map[p](0), 0.)).unit();
1209  const auto the_jac = _ad_dxyzdxi_map[p].norm();
1210  _ad_JxW_face[p] = the_jac * qw[p];
1212  {
1213  const auto numerator = _ad_d2xyzdxi2_map[p] * _ad_normals[p];
1214  const auto denominator = _ad_dxyzdxi_map[p].norm_sq();
1215  libmesh_assert_not_equal_to(denominator, 0);
1216  _ad_curvatures[p] = numerator / denominator;
1217  }
1218  }
1219 
1220  break;
1221  }
1222 
1223  case 3:
1224  {
1225  _ad_dxyzdxi_map.resize(n_qp);
1226  _ad_dxyzdeta_map.resize(n_qp);
1228  {
1229  _ad_d2xyzdxi2_map.resize(n_qp);
1230  _ad_d2xyzdxideta_map.resize(n_qp);
1231  _ad_d2xyzdeta2_map.resize(n_qp);
1232  }
1233 
1234  for (unsigned int p = 0; p < n_qp; p++)
1235  {
1236  _ad_dxyzdxi_map[p].zero();
1237  _ad_dxyzdeta_map[p].zero();
1238  if (_calculate_face_xyz)
1239  _ad_q_points_face[p].zero();
1241  {
1242  _ad_d2xyzdxi2_map[p].zero();
1243  _ad_d2xyzdxideta_map[p].zero();
1244  _ad_d2xyzdeta2_map[p].zero();
1245  }
1246  }
1247 
1248  const unsigned int n_mapping_shape_functions =
1249  FE<3, LAGRANGE>::n_shape_functions(side->type(), side->default_order());
1250 
1251  for (unsigned int i = 0; i < n_mapping_shape_functions; i++)
1252  {
1253  VectorValue<DualReal> side_point = side->point(i);
1254  auto element_node_number = elem->which_node_am_i(side_number, i);
1255 
1256  unsigned dimension = 0;
1257  for (const auto & disp_num : _displacements)
1258  side_point(dimension++)
1259  .derivatives()[disp_num * _sys.getMaxVarNDofsPerElem() + element_node_number] = 1.;
1260 
1261  for (unsigned int p = 0; p < n_qp; p++)
1262  {
1263  _ad_dxyzdxi_map[p].add_scaled(side_point, dpsidxi_map[i][p]);
1264  _ad_dxyzdeta_map[p].add_scaled(side_point, dpsideta_map[i][p]);
1265  if (_calculate_face_xyz)
1266  _ad_q_points_face[p].add_scaled(side_point, psi_map[i][p]);
1268  {
1269  _ad_d2xyzdxi2_map[p].add_scaled(side_point, (*d2psidxi2_map)[i][p]);
1270  _ad_d2xyzdxideta_map[p].add_scaled(side_point, (*d2psidxideta_map)[i][p]);
1271  _ad_d2xyzdeta2_map[p].add_scaled(side_point, (*d2psideta2_map)[i][p]);
1272  }
1273  }
1274  }
1275 
1276  for (unsigned int p = 0; p < n_qp; p++)
1277  {
1278  _ad_normals[p] = _ad_dxyzdxi_map[p].cross(_ad_dxyzdeta_map[p]).unit();
1279 
1280  const auto &dxdxi = _ad_dxyzdxi_map[p](0), dxdeta = _ad_dxyzdeta_map[p](0),
1281  dydxi = _ad_dxyzdxi_map[p](1), dydeta = _ad_dxyzdeta_map[p](1),
1282  dzdxi = _ad_dxyzdxi_map[p](2), dzdeta = _ad_dxyzdeta_map[p](2);
1283 
1284  const auto g11 = (dxdxi * dxdxi + dydxi * dydxi + dzdxi * dzdxi);
1285 
1286  const auto g12 = (dxdxi * dxdeta + dydxi * dydeta + dzdxi * dzdeta);
1287 
1288  const auto g21 = g12;
1289 
1290  const auto g22 = (dxdeta * dxdeta + dydeta * dydeta + dzdeta * dzdeta);
1291 
1292  const auto the_jac = std::sqrt(g11 * g22 - g12 * g21);
1293 
1294  _ad_JxW_face[p] = the_jac * qw[p];
1295 
1297  {
1298  const auto L = -_ad_d2xyzdxi2_map[p] * _ad_normals[p];
1299  const auto M = -_ad_d2xyzdxideta_map[p] * _ad_normals[p];
1300  const auto N = -_ad_d2xyzdeta2_map[p] * _ad_normals[p];
1301  const auto E = _ad_dxyzdxi_map[p].norm_sq();
1302  const auto F = _ad_dxyzdxi_map[p] * _ad_dxyzdeta_map[p];
1303  const auto G = _ad_dxyzdeta_map[p].norm_sq();
1304 
1305  const auto numerator = E * N - 2. * F * M + G * L;
1306  const auto denominator = E * G - F * F;
1307  libmesh_assert_not_equal_to(denominator, 0.);
1308  _ad_curvatures[p] = 0.5 * numerator / denominator;
1309  }
1310  }
1311 
1312  break;
1313  }
1314 
1315  default:
1316  mooseError("Invalid dimension dim = ", dim);
1317  }
1318 }
SystemBase & _sys
Definition: Assembly.h:1143
MooseArray< VectorValue< DualReal > > _ad_q_points_face
Definition: Assembly.h:1475
MooseArray< VectorValue< DualReal > > _ad_normals
Definition: Assembly.h:1474
std::vector< VectorValue< DualReal > > _ad_d2xyzdxi2_map
Definition: Assembly.h:1457
MooseArray< DualReal > _ad_JxW_face
Definition: Assembly.h:1473
PetscInt N
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
size_t getMaxVarNDofsPerElem()
Gets the maximum number of dofs used by any one variable on any one element.
Definition: SystemBase.h:413
unsigned int & side()
Returns the current side.
Definition: Assembly.h:342
std::vector< unsigned > _displacements
Definition: Assembly.h:1479
bool _calculate_curvatures
Definition: Assembly.h:1483
std::vector< VectorValue< DualReal > > _ad_dxyzdeta_map
Definition: Assembly.h:1455
std::map< unsigned int, FEBase ** > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:1242
MooseArray< DualReal > _ad_curvatures
Definition: Assembly.h:1477
std::vector< VectorValue< DualReal > > _ad_d2xyzdxideta_map
Definition: Assembly.h:1458
bool _calculate_face_xyz
Definition: Assembly.h:1482
const Elem *& elem()
Return the current element.
Definition: Assembly.h:320
PetscInt M
std::vector< VectorValue< DualReal > > _ad_d2xyzdeta2_map
Definition: Assembly.h:1459
std::vector< VectorValue< DualReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:1454

◆ computeGradPhiAD() [1/2]

template<typename OutputType >
void Assembly::computeGradPhiAD ( const Elem *  elem,
unsigned int  n_qp,
typename VariableTestGradientType< OutputType, ComputeStage::JACOBIAN >::type grad_phi,
FEGenericBase< OutputType > *  fe 
)
protected

Definition at line 602 of file Assembly.C.

Referenced by reinitFE(), and reinitFEFace().

607 {
608  auto dim = elem->dim();
609  const auto & dphidxi = fe->get_dphidxi();
610  const auto & dphideta = fe->get_dphideta();
611  const auto & dphidzeta = fe->get_dphidzeta();
612  auto num_shapes = grad_phi.size();
613 
614  switch (dim)
615  {
616  case 0:
617  {
618  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
619  for (unsigned qp = 0; qp < n_qp; ++qp)
620  grad_phi[i][qp] = 0;
621  break;
622  }
623 
624  case 1:
625  {
626  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
627  for (unsigned qp = 0; qp < n_qp; ++qp)
628  {
629  grad_phi[i][qp](0) = dphidxi[i][qp] * _ad_dxidx_map[qp];
630  grad_phi[i][qp](1) = dphidxi[i][qp] * _ad_dxidy_map[qp];
631  grad_phi[i][qp](2) = dphidxi[i][qp] * _ad_dxidz_map[qp];
632  }
633  break;
634  }
635 
636  case 2:
637  {
638  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
639  for (unsigned qp = 0; qp < n_qp; ++qp)
640  {
641  grad_phi[i][qp](0) =
642  dphidxi[i][qp] * _ad_dxidx_map[qp] + dphideta[i][qp] * _ad_detadx_map[qp];
643  grad_phi[i][qp](1) =
644  dphidxi[i][qp] * _ad_dxidy_map[qp] + dphideta[i][qp] * _ad_detady_map[qp];
645  grad_phi[i][qp](2) =
646  dphidxi[i][qp] * _ad_dxidz_map[qp] + dphideta[i][qp] * _ad_detadz_map[qp];
647  }
648  break;
649  }
650 
651  case 3:
652  {
653  for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
654  for (unsigned qp = 0; qp < n_qp; ++qp)
655  {
656  grad_phi[i][qp](0) = dphidxi[i][qp] * _ad_dxidx_map[qp] +
657  dphideta[i][qp] * _ad_detadx_map[qp] +
658  dphidzeta[i][qp] * _ad_dzetadx_map[qp];
659  grad_phi[i][qp](1) = dphidxi[i][qp] * _ad_dxidy_map[qp] +
660  dphideta[i][qp] * _ad_detady_map[qp] +
661  dphidzeta[i][qp] * _ad_dzetady_map[qp];
662  grad_phi[i][qp](2) = dphidxi[i][qp] * _ad_dxidz_map[qp] +
663  dphideta[i][qp] * _ad_detadz_map[qp] +
664  dphidzeta[i][qp] * _ad_dzetadz_map[qp];
665  }
666  break;
667  }
668  }
669 }
std::vector< DualReal > _ad_detadz_map
Definition: Assembly.h:1468
std::vector< DualReal > _ad_dxidy_map
Definition: Assembly.h:1464
std::vector< DualReal > _ad_dzetady_map
Definition: Assembly.h:1470
std::vector< DualReal > _ad_dzetadz_map
Definition: Assembly.h:1471
std::vector< DualReal > _ad_dzetadx_map
Definition: Assembly.h:1469
std::vector< DualReal > _ad_dxidx_map
Definition: Assembly.h:1463
std::vector< DualReal > _ad_dxidz_map
Definition: Assembly.h:1465
const Elem *& elem()
Return the current element.
Definition: Assembly.h:320
std::vector< DualReal > _ad_detadx_map
Definition: Assembly.h:1466
std::vector< DualReal > _ad_detady_map
Definition: Assembly.h:1467

◆ computeGradPhiAD() [2/2]

template<>
void Assembly::computeGradPhiAD ( const Elem *  ,
unsigned int  ,
typename VariableTestGradientType< RealVectorValue, ComputeStage::JACOBIAN >::type ,
FEGenericBase< RealVectorValue > *   
)
inlineprotected

Definition at line 1502 of file Assembly.h.

1507 {
1508  mooseError("Not implemented");
1509 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ computeSinglePointMapAD()

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

Definition at line 756 of file Assembly.C.

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

760 {
761  auto dim = elem->dim();
762  const auto & elem_nodes = elem->get_nodes();
763  auto num_shapes = fe->n_shape_functions();
764  const auto & phi_map = fe->get_fe_map().get_phi_map();
765  const auto & dphidxi_map = fe->get_fe_map().get_dphidxi_map();
766  const auto & dphideta_map = fe->get_fe_map().get_dphideta_map();
767  const auto & dphidzeta_map = fe->get_fe_map().get_dphidzeta_map();
768 
769  switch (dim)
770  {
771  case 0:
772  {
773  _ad_jac[p] = 1.0;
774  _ad_JxW[p] = qw[p];
775  if (_calculate_xyz)
776  _ad_q_points[p] = *elem_nodes[0];
777  break;
778  }
779 
780  case 1:
781  {
782  if (_calculate_xyz)
783  _ad_q_points[p].zero();
784 
785  _ad_dxyzdxi_map[p].zero();
786 
787  for (std::size_t i = 0; i < num_shapes; i++)
788  {
789  libmesh_assert(elem_nodes[i]);
790  libMesh::VectorValue<DualReal> elem_point = *elem_nodes[i];
791  unsigned dimension = 0;
792  for (const auto & disp_num : _displacements)
793  elem_point(dimension++).derivatives()[disp_num * _sys.getMaxVarNDofsPerElem() + i] = 1.;
794 
795  _ad_dxyzdxi_map[p].add_scaled(elem_point, dphidxi_map[i][p]);
796 
797  if (_calculate_xyz)
798  _ad_q_points[p].add_scaled(elem_point, phi_map[i][p]);
799  }
800 
801  _ad_jac[p] = _ad_dxyzdxi_map[p].norm();
802 
803  if (_ad_jac[p].value() <= -TOLERANCE * TOLERANCE)
804  {
805  static bool failing = false;
806  if (!failing)
807  {
808  failing = true;
809  elem->print_info(libMesh::err);
810  libmesh_error_msg("ERROR: negative Jacobian " << _ad_jac[p].value() << " at point index "
811  << p << " in element " << elem->id());
812  }
813  else
814  return;
815  }
816 
817  const auto jacm2 = 1. / _ad_jac[p] / _ad_jac[p];
818  _ad_dxidx_map[p] = jacm2 * _ad_dxyzdxi_map[p](0);
819  _ad_dxidy_map[p] = jacm2 * _ad_dxyzdxi_map[p](1);
820  _ad_dxidz_map[p] = jacm2 * _ad_dxyzdxi_map[p](2);
821 
822  _ad_JxW[p] = _ad_jac[p] * qw[p];
823 
824  break;
825  }
826 
827  case 2:
828  {
829  if (_calculate_xyz)
830  _ad_q_points[p].zero();
831  _ad_dxyzdxi_map[p].zero();
832  _ad_dxyzdeta_map[p].zero();
833 
834  for (std::size_t i = 0; i < num_shapes; i++)
835  {
836  libmesh_assert(elem_nodes[i]);
837  libMesh::VectorValue<DualReal> elem_point = *elem_nodes[i];
838  unsigned dimension = 0;
839  for (const auto & disp_num : _displacements)
840  elem_point(dimension++).derivatives()[disp_num * _sys.getMaxVarNDofsPerElem() + i] = 1.;
841 
842  _ad_dxyzdxi_map[p].add_scaled(elem_point, dphidxi_map[i][p]);
843  _ad_dxyzdeta_map[p].add_scaled(elem_point, dphideta_map[i][p]);
844 
845  if (_calculate_xyz)
846  _ad_q_points[p].add_scaled(elem_point, phi_map[i][p]);
847  }
848 
849  const auto &dx_dxi = _ad_dxyzdxi_map[p](0), dx_deta = _ad_dxyzdeta_map[p](0),
850  dy_dxi = _ad_dxyzdxi_map[p](1), dy_deta = _ad_dxyzdeta_map[p](1),
851  dz_dxi = _ad_dxyzdxi_map[p](2), dz_deta = _ad_dxyzdeta_map[p](2);
852 
853  const auto g11 = (dx_dxi * dx_dxi + dy_dxi * dy_dxi + dz_dxi * dz_dxi);
854 
855  const auto g12 = (dx_dxi * dx_deta + dy_dxi * dy_deta + dz_dxi * dz_deta);
856 
857  const auto g21 = g12;
858 
859  const auto g22 = (dx_deta * dx_deta + dy_deta * dy_deta + dz_deta * dz_deta);
860 
861  auto det = (g11 * g22 - g12 * g21);
862 
863  if (det.value() <= -TOLERANCE * TOLERANCE)
864  {
865  static bool failing = false;
866  if (!failing)
867  {
868  failing = true;
869  elem->print_info(libMesh::err);
870  libmesh_error_msg("ERROR: negative Jacobian " << det << " at point index " << p
871  << " in element " << elem->id());
872  }
873  else
874  return;
875  }
876  else if (det.value() <= 0.)
877  det.value() = TOLERANCE * TOLERANCE;
878 
879  const auto inv_det = 1. / det;
880  _ad_jac[p] = std::sqrt(det);
881 
882  _ad_JxW[p] = _ad_jac[p] * qw[p];
883 
884  const auto g11inv = g22 * inv_det;
885  const auto g12inv = -g12 * inv_det;
886  const auto g21inv = -g21 * inv_det;
887  const auto g22inv = g11 * inv_det;
888 
889  _ad_dxidx_map[p] = g11inv * dx_dxi + g12inv * dx_deta;
890  _ad_dxidy_map[p] = g11inv * dy_dxi + g12inv * dy_deta;
891  _ad_dxidz_map[p] = g11inv * dz_dxi + g12inv * dz_deta;
892 
893  _ad_detadx_map[p] = g21inv * dx_dxi + g22inv * dx_deta;
894  _ad_detady_map[p] = g21inv * dy_dxi + g22inv * dy_deta;
895  _ad_detadz_map[p] = g21inv * dz_dxi + g22inv * dz_deta;
896 
897  break;
898  }
899 
900  case 3:
901  {
902  if (_calculate_xyz)
903  _ad_q_points[p].zero();
904  _ad_dxyzdxi_map[p].zero();
905  _ad_dxyzdeta_map[p].zero();
906  _ad_dxyzdzeta_map[p].zero();
907 
908  for (std::size_t i = 0; i < num_shapes; i++)
909  {
910  libmesh_assert(elem_nodes[i]);
911  libMesh::VectorValue<DualReal> elem_point = *elem_nodes[i];
912  unsigned dimension = 0;
913  for (const auto & disp_num : _displacements)
914  elem_point(dimension++).derivatives()[disp_num * _sys.getMaxVarNDofsPerElem() + i] = 1.;
915 
916  _ad_dxyzdxi_map[p].add_scaled(elem_point, dphidxi_map[i][p]);
917  _ad_dxyzdeta_map[p].add_scaled(elem_point, dphideta_map[i][p]);
918  _ad_dxyzdzeta_map[p].add_scaled(elem_point, dphidzeta_map[i][p]);
919 
920  if (_calculate_xyz)
921  _ad_q_points[p].add_scaled(elem_point, phi_map[i][p]);
922  }
923 
924  const auto dx_dxi = _ad_dxyzdxi_map[p](0), dy_dxi = _ad_dxyzdxi_map[p](1),
925  dz_dxi = _ad_dxyzdxi_map[p](2), dx_deta = _ad_dxyzdeta_map[p](0),
926  dy_deta = _ad_dxyzdeta_map[p](1), dz_deta = _ad_dxyzdeta_map[p](2),
927  dx_dzeta = _ad_dxyzdzeta_map[p](0), dy_dzeta = _ad_dxyzdzeta_map[p](1),
928  dz_dzeta = _ad_dxyzdzeta_map[p](2);
929 
930  _ad_jac[p] = (dx_dxi * (dy_deta * dz_dzeta - dz_deta * dy_dzeta) +
931  dy_dxi * (dz_deta * dx_dzeta - dx_deta * dz_dzeta) +
932  dz_dxi * (dx_deta * dy_dzeta - dy_deta * dx_dzeta));
933 
934  if (_ad_jac[p].value() <= -TOLERANCE * TOLERANCE)
935  {
936  static bool failing = false;
937  if (!failing)
938  {
939  failing = true;
940  elem->print_info(libMesh::err);
941  libmesh_error_msg("ERROR: negative Jacobian " << _ad_jac[p].value() << " at point index "
942  << p << " in element " << elem->id());
943  }
944  else
945  return;
946  }
947 
948  _ad_JxW[p] = _ad_jac[p] * qw[p];
949 
950  const auto inv_jac = 1. / _ad_jac[p];
951 
952  _ad_dxidx_map[p] = (dy_deta * dz_dzeta - dz_deta * dy_dzeta) * inv_jac;
953  _ad_dxidy_map[p] = (dz_deta * dx_dzeta - dx_deta * dz_dzeta) * inv_jac;
954  _ad_dxidz_map[p] = (dx_deta * dy_dzeta - dy_deta * dx_dzeta) * inv_jac;
955 
956  _ad_detadx_map[p] = (dz_dxi * dy_dzeta - dy_dxi * dz_dzeta) * inv_jac;
957  _ad_detady_map[p] = (dx_dxi * dz_dzeta - dz_dxi * dx_dzeta) * inv_jac;
958  _ad_detadz_map[p] = (dy_dxi * dx_dzeta - dx_dxi * dy_dzeta) * inv_jac;
959 
960  _ad_dzetadx_map[p] = (dy_dxi * dz_deta - dz_dxi * dy_deta) * inv_jac;
961  _ad_dzetady_map[p] = (dz_dxi * dx_deta - dx_dxi * dz_deta) * inv_jac;
962  _ad_dzetadz_map[p] = (dx_dxi * dy_deta - dy_dxi * dx_deta) * inv_jac;
963 
964  break;
965  }
966 
967  default:
968  libmesh_error_msg("Invalid dim = " << dim);
969  }
970 }
MooseArray< DualReal > _ad_JxW
Definition: Assembly.h:1461
SystemBase & _sys
Definition: Assembly.h:1143
std::vector< DualReal > _ad_detadz_map
Definition: Assembly.h:1468
std::vector< DualReal > _ad_dxidy_map
Definition: Assembly.h:1464
std::vector< DualReal > _ad_dzetady_map
Definition: Assembly.h:1470
MooseArray< VectorValue< DualReal > > _ad_q_points
Definition: Assembly.h:1462
std::vector< DualReal > _ad_dzetadz_map
Definition: Assembly.h:1471
std::vector< DualReal > _ad_dzetadx_map
Definition: Assembly.h:1469
size_t getMaxVarNDofsPerElem()
Gets the maximum number of dofs used by any one variable on any one element.
Definition: SystemBase.h:413
std::vector< DualReal > _ad_dxidx_map
Definition: Assembly.h:1463
std::vector< unsigned > _displacements
Definition: Assembly.h:1479
std::vector< DualReal > _ad_dxidz_map
Definition: Assembly.h:1465
std::vector< DualReal > _ad_jac
Definition: Assembly.h:1460
bool _calculate_xyz
Definition: Assembly.h:1481
std::vector< VectorValue< DualReal > > _ad_dxyzdeta_map
Definition: Assembly.h:1455
const Elem *& elem()
Return the current element.
Definition: Assembly.h:320
std::vector< VectorValue< DualReal > > _ad_dxyzdzeta_map
Definition: Assembly.h:1456
std::vector< DualReal > _ad_detadx_map
Definition: Assembly.h:1466
std::vector< DualReal > _ad_detady_map
Definition: Assembly.h:1467
std::vector< VectorValue< DualReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:1454

◆ coordSystem()

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

Get the coordinate system type.

Returns
A reference to the coordinate system type

Definition at line 272 of file Assembly.h.

272 { return _coord_type; }
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:1220

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

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

◆ copyFaceShapes() [1/2]

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

Definition at line 2188 of file Assembly.C.

Referenced by copyFaceShapes().

2189 {
2190  phiFace(v).shallowCopy(v.phiFace());
2192  if (v.computingSecond())
2194 }
const VariablePhiSecond & secondPhiFace(const MooseVariable &) const
Definition: Assembly.h:715
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:284
const FieldVariablePhiGradient & gradPhiFace()
const FieldVariablePhiSecond & secondPhiFace()
const VariablePhiValue & phiFace() const
Definition: Assembly.h:711
const FieldVariablePhiValue & phiFace()
bool computingSecond()
Whether or not this variable is computing any second derivatives.
const VariablePhiGradient & gradPhiFace() const
Definition: Assembly.h:713

◆ copyFaceShapes() [2/2]

void Assembly::copyFaceShapes ( unsigned int  var)

Definition at line 2197 of file Assembly.C.

2198 {
2199  try
2200  {
2201  MooseVariable & v = _sys.getFieldVariable<Real>(_tid, var);
2202  copyFaceShapes(v);
2203  }
2204  catch (std::out_of_range & e)
2205  {
2207  copyFaceShapes(v);
2208  if (v.computingCurl())
2210  }
2211 }
SystemBase & _sys
Definition: Assembly.h:1143
VectorValue< Real > RealVectorValue
Definition: Assembly.h:32
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:284
const FieldVariablePhiCurl & curlPhi()
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:136
bool computingCurl()
Whether or not this variable is computing the curl.
void copyFaceShapes(MooseVariableFE< T > &v)
Definition: Assembly.C:2188
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:1369

◆ copyNeighborShapes() [1/2]

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

Definition at line 2215 of file Assembly.C.

Referenced by copyNeighborShapes().

2216 {
2217  if (v.usesPhiNeighbor())
2218  {
2221  }
2222  if (v.usesGradPhiNeighbor())
2223  {
2226  }
2227  if (v.usesSecondPhiNeighbor())
2228  {
2231  }
2232 }
const VariablePhiSecond & secondPhiFaceNeighbor(const MooseVariable &) const
Definition: Assembly.h:735
bool usesSecondPhiNeighbor()
Whether or not this variable is actually using the shape function second derivative on a neighbor...
const FieldVariablePhiSecond & secondPhiFaceNeighbor()
const VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariable &) const
Definition: Assembly.h:731
bool usesPhiNeighbor()
Whether or not this variable is actually using the shape function value.
const FieldVariablePhiSecond & secondPhiNeighbor()
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:284
bool usesGradPhiNeighbor()
Whether or not this variable is actually using the shape function gradient.
const FieldVariablePhiValue & phiNeighbor()
const VariablePhiValue & phiFaceNeighbor(const MooseVariable &) const
Definition: Assembly.h:727
const FieldVariablePhiValue & phiFaceNeighbor()
const VariablePhiSecond & secondPhiNeighbor(const MooseVariable &) const
Definition: Assembly.h:722
const FieldVariablePhiGradient & gradPhiFaceNeighbor()
const FieldVariablePhiGradient & gradPhiNeighbor()
const VariablePhiValue & phiNeighbor(const MooseVariable &) const
Definition: Assembly.h:717
const VariablePhiGradient & gradPhiNeighbor(const MooseVariable &) const
Definition: Assembly.h:718

◆ copyNeighborShapes() [2/2]

void Assembly::copyNeighborShapes ( unsigned int  var)

Definition at line 2235 of file Assembly.C.

2236 {
2237  try
2238  {
2239  MooseVariable & v = _sys.getFieldVariable<Real>(_tid, var);
2240  copyNeighborShapes(v);
2241  }
2242  catch (std::out_of_range & e)
2243  {
2245  copyNeighborShapes(v);
2246  }
2247 }
SystemBase & _sys
Definition: Assembly.h:1143
VectorValue< Real > RealVectorValue
Definition: Assembly.h:32
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
void copyNeighborShapes(MooseVariableFE< T > &v)
Definition: Assembly.C:2215
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:136

◆ copyShapes() [1/2]

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

Definition at line 2161 of file Assembly.C.

Referenced by copyShapes().

2162 {
2163  phi(v).shallowCopy(v.phi());
2164  gradPhi(v).shallowCopy(v.gradPhi());
2165  if (v.computingSecond())
2167 }
const VariablePhiSecond & secondPhi() const
Definition: Assembly.h:708
const FieldVariablePhiSecond & secondPhi()
const VariablePhiValue & phi() const
Definition: Assembly.h:698
const VariablePhiGradient & gradPhi() const
Definition: Assembly.h:706
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:284
const FieldVariablePhiGradient & gradPhi()
const FieldVariablePhiValue & phi()
bool computingSecond()
Whether or not this variable is computing any second derivatives.

◆ copyShapes() [2/2]

void Assembly::copyShapes ( unsigned int  var)

Definition at line 2170 of file Assembly.C.

2171 {
2172  try
2173  {
2174  MooseVariable & v = _sys.getFieldVariable<Real>(_tid, var);
2175  copyShapes(v);
2176  }
2177  catch (std::out_of_range & e)
2178  {
2180  copyShapes(v);
2181  if (v.computingCurl())
2182  curlPhi(v).shallowCopy(v.curlPhi());
2183  }
2184 }
SystemBase & _sys
Definition: Assembly.h:1143
VectorValue< Real > RealVectorValue
Definition: Assembly.h:32
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:1172
void shallowCopy(const MooseArray &rhs)
Doesn&#39;t actually make a copy of the data.
Definition: MooseArray.h:284
const FieldVariablePhiCurl & curlPhi()
void copyShapes(MooseVariableFE< T > &v)
Definition: Assembly.C:2161
const VectorVariablePhiCurl & curlPhi(const VectorMooseVariable &) const
Definition: Assembly.h:749
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:136
bool computingCurl()
Whether or not this variable is computing the curl.

◆ couplingEntries()

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

Definition at line 688 of file Assembly.h.

689  {
690  return _cm_ff_entry;
691  }
std::vector< std::pair< MooseVariableFEBase *, MooseVariableFEBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:1155

◆ createQRules()

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

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

Definition at line 421 of file Assembly.C.

422 {
423  _holder_qrule_volume.clear();
424  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
425  _holder_qrule_volume[dim] = QBase::build(type, dim, volume_order).release();
426 
427  _holder_qrule_face.clear();
428  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
429  _holder_qrule_face[dim] = QBase::build(type, dim - 1, face_order).release();
430 
431  _holder_qrule_neighbor.clear();
432  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
433  _holder_qrule_neighbor[dim] = new ArbitraryQuadrature(dim, face_order);
434 
435  _holder_qrule_arbitrary.clear();
436  for (unsigned int dim = 0; dim <= _mesh_dimension; dim++)
437  _holder_qrule_arbitrary[dim] = new ArbitraryQuadrature(dim, order);
438 }
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_neighbor
Holds arbitrary qrules for each dimension.
Definition: Assembly.h:1280
unsigned int _mesh_dimension
Definition: Assembly.h:1176
std::map< unsigned int, QBase * > _holder_qrule_face
Holds face qrules for each dimension.
Definition: Assembly.h:1256
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
std::map< unsigned int, ArbitraryQuadrature * > _holder_qrule_arbitrary
Holds arbitrary qrules for each dimension.
Definition: Assembly.h:1229
MatType type
std::map< unsigned int, QBase * > _holder_qrule_volume
Holds volume qrules for each dimension.
Definition: Assembly.h:1227

◆ curlPhi() [1/2]

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

Definition at line 749 of file Assembly.h.

Referenced by copyShapes().

750  {
751  return _vector_curl_phi;
752  }
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:1364

◆ curlPhi() [2/2]

VectorVariablePhiCurl& Assembly::curlPhi ( const VectorMooseVariable )
inline

Definition at line 831 of file Assembly.h.

831 { return _vector_curl_phi; }
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:1364

◆ curlPhiFace() [1/2]

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

Definition at line 766 of file Assembly.h.

767  {
768  return _vector_curl_phi_face;
769  }
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:1369

◆ curlPhiFace() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiFace ( const VectorMooseVariable )
inline

Definition at line 842 of file Assembly.h.

842 { return _vector_curl_phi_face; }
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:1369

◆ curlPhiFaceNeighbor() [1/2]

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

Definition at line 800 of file Assembly.h.

801  {
803  }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:1379

◆ curlPhiFaceNeighbor() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiFaceNeighbor ( const VectorMooseVariable )
inline

Definition at line 870 of file Assembly.h.

871  {
873  }
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:1379

◆ curlPhiNeighbor() [1/2]

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

Definition at line 783 of file Assembly.h.

784  {
786  }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:1374

◆ curlPhiNeighbor() [2/2]

VectorVariablePhiCurl& Assembly::curlPhiNeighbor ( const VectorMooseVariable )
inline

Definition at line 853 of file Assembly.h.

854  {
856  }
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:1374

◆ currentNeighborSubdomainID()

const SubdomainID& Assembly::currentNeighborSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 371 of file Assembly.h.

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

◆ currentSubdomainID()

const SubdomainID& Assembly::currentSubdomainID ( ) const
inline

Return the current subdomain ID.

Definition at line 325 of file Assembly.h.

325 { return _current_subdomain_id; }
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:1289

◆ elem()

const Elem*& Assembly::elem ( )
inline

Return the current element.

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

Definition at line 320 of file Assembly.h.

Referenced by computeAffineMapAD(), computeFaceMap(), computeGradPhiAD(), computeSinglePointMapAD(), modifyFaceWeightsDueToXFEM(), modifyWeightsDueToXFEM(), reinit(), reinitAtPhysical(), reinitElemAndNeighbor(), reinitFE(), and reinitFEFace().

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

◆ elemVolume()

const Real& Assembly::elemVolume ( )
inline

Returns the reference to the current element volume.

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

Definition at line 336 of file Assembly.h.

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

◆ feADGradPhi() [1/2]

template<typename OutputType >
const VariableTestGradientType<OutputType, ComputeStage::JACOBIAN>::type& Assembly::feADGradPhi ( FEType  type)
inline

Definition at line 891 of file Assembly.h.

892  {
893  return _ad_grad_phi_data[type];
894  }
std::map< FEType, typename VariableTestGradientType< Real, ComputeStage::JACOBIAN >::type > _ad_grad_phi_data
Definition: Assembly.h:1412
MatType type

◆ feADGradPhi() [2/2]

template<>
const VariableTestGradientType<RealVectorValue, ComputeStage::JACOBIAN>::type& Assembly::feADGradPhi ( FEType  type)
inline

Definition at line 1488 of file Assembly.h.

1489 {
1491 }
std::map< FEType, typename VariableTestGradientType< RealVectorValue, ComputeStage::JACOBIAN >::type > _ad_vector_grad_phi_data
Definition: Assembly.h:1414
MatType type

◆ feADGradPhiFace() [1/2]

template<typename OutputType >
const VariableTestGradientType<OutputType, ComputeStage::JACOBIAN>::type& Assembly::feADGradPhiFace ( FEType  type)
inline

Definition at line 920 of file Assembly.h.

921  {
923  }
std::map< FEType, typename VariableTestGradientType< Real, ComputeStage::JACOBIAN >::type > _ad_grad_phi_data_face
Definition: Assembly.h:1416
MatType type

◆ feADGradPhiFace() [2/2]

template<>
const VariableTestGradientType<RealVectorValue, ComputeStage::JACOBIAN>::type& Assembly::feADGradPhiFace ( FEType  type)
inline

Definition at line 1495 of file Assembly.h.

1496 {
1498 }
std::map< FEType, typename VariableTestGradientType< RealVectorValue, ComputeStage::JACOBIAN >::type > _ad_vector_grad_phi_data_face
Definition: Assembly.h:1418
MatType type

◆ feCurlPhi() [1/3]

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

Definition at line 978 of file Assembly.h.

979  {
980  _need_curl[type] = true;
981  buildFE(type);
982  return _fe_shape_data[type]->_curl_phi;
983  }
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:218
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1400
std::map< FEType, bool > _need_curl
Definition: Assembly.h:1011

◆ feCurlPhi() [2/3]

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

◆ feCurlPhi() [3/3]

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

Definition at line 3167 of file Assembly.C.

3168 {
3169  _need_curl[type] = true;
3171  return _vector_fe_shape_data[type]->_curl_phi;
3172 }
void buildVectorFE(FEType type)
Build Vector FEs with a type.
Definition: Assembly.C:298
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1406
std::map< FEType, bool > _need_curl
Definition: Assembly.h:1011

◆ feCurlPhiFace() [1/3]

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

Definition at line 986 of file Assembly.h.

987  {
988  _need_curl[type] = true;
989  buildFaceFE(type);
990  return _fe_shape_data_face[type]->_curl_phi;
991  }
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:241
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1401
std::map< FEType, bool > _need_curl
Definition: Assembly.h:1011

◆ feCurlPhiFace() [2/3]

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

◆ feCurlPhiFace() [3/3]

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

Definition at line 3176 of file Assembly.C.

3177 {
3178  _need_curl[type] = true;
3180  return _vector_fe_shape_data_face[type]->_curl_phi;
3181 }
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:329
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1407
std::map< FEType, bool > _need_curl
Definition: Assembly.h:1011

◆ feCurlPhiFaceNeighbor() [1/3]

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

Definition at line 1002 of file Assembly.h.

1003  {
1004  _need_curl[type] = true;
1006  return _fe_shape_data_face_neighbor[type]->_curl_phi;
1007  }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1403
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:279
MatType type
std::map< FEType, bool > _need_curl
Definition: Assembly.h:1011

◆ feCurlPhiFaceNeighbor() [2/3]

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

◆ feCurlPhiFaceNeighbor() [3/3]

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

Definition at line 3194 of file Assembly.C.

3195 {
3196  _need_curl[type] = true;
3198  return _vector_fe_shape_data_face_neighbor[type]->_curl_phi;
3199 }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:385
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1409
MatType type
std::map< FEType, bool > _need_curl
Definition: Assembly.h:1011

◆ feCurlPhiNeighbor() [1/3]

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

Definition at line 994 of file Assembly.h.

995  {
996  _need_curl[type] = true;
998  return _fe_shape_data_neighbor[type]->_curl_phi;
999  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:260
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1402
MatType type
std::map< FEType, bool > _need_curl
Definition: Assembly.h:1011

◆ feCurlPhiNeighbor() [2/3]

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

◆ feCurlPhiNeighbor() [3/3]

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

Definition at line 3185 of file Assembly.C.

3186 {
3187  _need_curl[type] = true;
3189  return _vector_fe_shape_data_neighbor[type]->_curl_phi;
3190 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1408
MatType type
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:357
std::map< FEType, bool > _need_curl
Definition: Assembly.h:1011

◆ feGradPhi() [1/3]

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

Definition at line 883 of file Assembly.h.

884  {
885  buildFE(type);
886  return _fe_shape_data[type]->_grad_phi;
887  }
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:218
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1400

◆ feGradPhi() [2/3]

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

◆ feGradPhi() [3/3]

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

Definition at line 3075 of file Assembly.C.

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

◆ feGradPhiFace() [1/3]

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

Definition at line 912 of file Assembly.h.

913  {
914  buildFaceFE(type);
915  return _fe_shape_data_face[type]->_grad_phi;
916  }
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:241
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1401

◆ feGradPhiFace() [2/3]

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

◆ feGradPhiFace() [3/3]

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

Definition at line 3100 of file Assembly.C.

3101 {
3103  return _vector_fe_shape_data_face[type]->_grad_phi;
3104 }
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:329
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1407

◆ feGradPhiFaceNeighbor() [1/3]

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

Definition at line 963 of file Assembly.h.

964  {
966  return _fe_shape_data_face_neighbor[type]->_grad_phi;
967  }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1403
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:279
MatType type

◆ feGradPhiFaceNeighbor() [2/3]

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

◆ feGradPhiFaceNeighbor() [3/3]

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

Definition at line 3150 of file Assembly.C.

3151 {
3153  return _vector_fe_shape_data_face_neighbor[type]->_grad_phi;
3154 }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:385
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1409
MatType type

◆ feGradPhiNeighbor() [1/3]

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

Definition at line 941 of file Assembly.h.

942  {
944  return _fe_shape_data_neighbor[type]->_grad_phi;
945  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:260
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1402
MatType type

◆ feGradPhiNeighbor() [2/3]

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

◆ feGradPhiNeighbor() [3/3]

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

Definition at line 3125 of file Assembly.C.

3126 {
3128  return _vector_fe_shape_data_neighbor[type]->_grad_phi;
3129 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1408
MatType type
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:357

◆ fePhi() [1/3]

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

Definition at line 876 of file Assembly.h.

877  {
878  buildFE(type);
879  return _fe_shape_data[type]->_phi;
880  }
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:218
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1400

◆ fePhi() [2/3]

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

◆ fePhi() [3/3]

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

Definition at line 3067 of file Assembly.C.

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

◆ fePhiFace() [1/3]

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

Definition at line 905 of file Assembly.h.

906  {
907  buildFaceFE(type);
908  return _fe_shape_data_face[type]->_phi;
909  }
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:241
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1401

◆ fePhiFace() [2/3]

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

◆ fePhiFace() [3/3]

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

Definition at line 3092 of file Assembly.C.

3093 {
3095  return _vector_fe_shape_data_face[type]->_phi;
3096 }
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:329
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1407

◆ fePhiFaceNeighbor() [1/3]

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

Definition at line 956 of file Assembly.h.

957  {
959  return _fe_shape_data_face_neighbor[type]->_phi;
960  }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1403
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:279
MatType type

◆ fePhiFaceNeighbor() [2/3]

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

◆ fePhiFaceNeighbor() [3/3]

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

Definition at line 3142 of file Assembly.C.

3143 {
3146 }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:385
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1409
MatType type

◆ fePhiNeighbor() [1/3]

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

Definition at line 934 of file Assembly.h.

935  {
937  return _fe_shape_data_neighbor[type]->_phi;
938  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:260
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1402
MatType type

◆ fePhiNeighbor() [2/3]

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

◆ fePhiNeighbor() [3/3]

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

Definition at line 3117 of file Assembly.C.

3118 {
3120  return _vector_fe_shape_data_neighbor[type]->_phi;
3121 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1408
MatType type
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:357

◆ feSecondPhi() [1/3]

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

Definition at line 897 of file Assembly.h.

898  {
900  buildFE(type);
901  return _fe_shape_data[type]->_second_phi;
902  }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:1009
void buildFE(FEType type)
Build FEs with a type.
Definition: Assembly.C:218
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:1400

◆ feSecondPhi() [2/3]

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

◆ feSecondPhi() [3/3]

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

Definition at line 3083 of file Assembly.C.

3084 {
3085  _need_second_derivative[type] = true;
3087  return _vector_fe_shape_data[type]->_second_phi;
3088 }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:1009
void buildVectorFE(FEType type)
Build Vector FEs with a type.
Definition: Assembly.C:298
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:1406

◆ feSecondPhiFace() [1/3]

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

Definition at line 926 of file Assembly.h.

927  {
929  buildFaceFE(type);
930  return _fe_shape_data_face[type]->_second_phi;
931  }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:1009
void buildFaceFE(FEType type)
Build FEs for a face with a type.
Definition: Assembly.C:241
MatType type
std::map< FEType, FEShapeData * > _fe_shape_data_face
Definition: Assembly.h:1401

◆ feSecondPhiFace() [2/3]

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

◆ feSecondPhiFace() [3/3]

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

Definition at line 3108 of file Assembly.C.

3109 {
3110  _need_second_derivative[type] = true;
3112  return _vector_fe_shape_data_face[type]->_second_phi;
3113 }
std::map< FEType, bool > _need_second_derivative
Definition: Assembly.h:1009
void buildVectorFaceFE(FEType type)
Build Vector FEs for a face with a type.
Definition: Assembly.C:329
MatType type
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face
Definition: Assembly.h:1407

◆ feSecondPhiFaceNeighbor() [1/3]

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

Definition at line 970 of file Assembly.h.

971  {
974  return _fe_shape_data_face_neighbor[type]->_second_phi;
975  }
std::map< FEType, FEShapeData * > _fe_shape_data_face_neighbor
Definition: Assembly.h:1403
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:1010
void buildFaceNeighborFE(FEType type)
Build FEs for a neighbor face with a type.
Definition: Assembly.C:279
MatType type

◆ feSecondPhiFaceNeighbor() [2/3]

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

◆ feSecondPhiFaceNeighbor() [3/3]

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

Definition at line 3158 of file Assembly.C.

3159 {
3162  return _vector_fe_shape_data_face_neighbor[type]->_second_phi;
3163 }
void buildVectorFaceNeighborFE(FEType type)
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:385
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:1010
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:1409
MatType type

◆ feSecondPhiNeighbor() [1/3]

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

Definition at line 948 of file Assembly.h.

949  {
952  return _fe_shape_data_neighbor[type]->_second_phi;
953  }
void buildNeighborFE(FEType type)
Build FEs for a neighbor with a type.
Definition: Assembly.C:260
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:1010
std::map< FEType, FEShapeData * > _fe_shape_data_neighbor
Definition: Assembly.h:1402
MatType type

◆ feSecondPhiNeighbor() [2/3]

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

◆ feSecondPhiNeighbor() [3/3]

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

Definition at line 3133 of file Assembly.C.

3134 {
3137  return _vector_fe_shape_data_neighbor[type]->_second_phi;
3138 }
std::map< FEType, VectorFEShapeData * > _vector_fe_shape_data_neighbor
Definition: Assembly.h:1408
std::map< FEType, bool > _need_second_derivative_neighbor
Definition: Assembly.h:1010
MatType type
void buildVectorNeighborFE(FEType type)
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:357

◆ getFE()

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

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

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

Definition at line 123 of file Assembly.h.

Referenced by MortarConstraint::compute