https://mooseframework.inl.gov
Assembly.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "DenseMatrix.h"
13 #include "MooseArray.h"
14 #include "MooseTypes.h"
15 #include "MooseVariableFE.h"
16 #include "MoosePassKey.h"
17 #include "ArbitraryQuadrature.h"
18 
19 #include "libmesh/dense_vector.h"
20 #include "libmesh/enum_quadrature_type.h"
21 #include "libmesh/fe_type.h"
22 #include "libmesh/point.h"
23 #include "libmesh/fe_base.h"
24 #include "libmesh/numeric_vector.h"
25 #include "libmesh/elem_side_builder.h"
26 
27 #include <unordered_map>
28 
29 // libMesh forward declarations
30 namespace libMesh
31 {
32 class DofMap;
33 class CouplingMatrix;
34 class Elem;
35 template <typename>
38 template <typename T>
42 class Node;
43 template <typename T>
44 class NumericVector;
45 template <typename T>
46 class SparseMatrix;
47 class StaticCondensation;
48 }
49 
50 // MOOSE Forward Declares
51 class FaceInfo;
52 class MooseMesh;
54 class SystemBase;
56 class MooseVariableBase;
57 template <typename>
58 class MooseVariableFE;
63 class XFEMInterface;
64 class SubProblem;
65 class NodeFaceConstraint;
66 
67 #ifdef MOOSE_KOKKOS_ENABLED
68 namespace Moose::Kokkos
69 {
70 class Assembly;
71 }
72 #endif
73 
74 // Assembly.h does not import Moose.h nor libMeshReducedNamespace.h
75 using libMesh::FEBase;
76 using libMesh::FEFamily;
77 using libMesh::FEType;
80 using libMesh::Order;
82 
91 template <typename P, typename C>
92 void coordTransformFactor(const SubProblem & s,
93  SubdomainID sub_id,
94  const P & point,
95  C & factor,
97 
98 template <typename P, typename C>
99 void coordTransformFactor(const MooseMesh & mesh,
100  SubdomainID sub_id,
101  const P & point,
102  C & factor,
104 
109 class Assembly
110 {
111 public:
112  Assembly(SystemBase & sys, THREAD_ID tid);
113  virtual ~Assembly();
114 
119  template <typename T>
120  static const T * const & constify_ref(T * const & inref)
121  {
122  const T * const * ptr = &inref;
123  return *ptr;
124  }
125 
132  const FEBase * const & getFE(FEType type, unsigned int dim) const
133  {
134  buildFE(type);
135  return constify_ref(_fe[dim][type]);
136  }
137 
144  const FEBase * const & getFENeighbor(FEType type, unsigned int dim) const
145  {
146  buildNeighborFE(type);
147  return constify_ref(_fe_neighbor[dim][type]);
148  }
149 
156  const FEBase * const & getFEFace(FEType type, unsigned int dim) const
157  {
158  buildFaceFE(type);
159  return constify_ref(_fe_face[dim][type]);
160  }
161 
168  const FEBase * const & getFEFaceNeighbor(FEType type, unsigned int dim) const
169  {
170  buildFaceNeighborFE(type);
171  return constify_ref(_fe_face_neighbor[dim][type]);
172  }
173 
180  const FEVectorBase * const & getVectorFE(FEType type, unsigned int dim) const
181  {
182  buildVectorFE(type);
183  return constify_ref(_vector_fe[dim][type]);
184  }
185 
192  const FEVectorBase * const & getVectorFENeighbor(FEType type, unsigned int dim) const
193  {
194  buildVectorNeighborFE(type);
195  return constify_ref(_vector_fe_neighbor[dim][type]);
196  }
197 
204  const FEVectorBase * const & getVectorFEFace(FEType type, unsigned int dim) const
205  {
206  buildVectorFaceFE(type);
207  return constify_ref(_vector_fe_face[dim][type]);
208  }
209 
216  const FEVectorBase * const & getVectorFEFaceNeighbor(FEType type, unsigned int dim) const
217  {
220  }
221 
222 #ifdef MOOSE_KOKKOS_ENABLED
223 
229 #endif
230 
235  const libMesh::QBase * const & qRule() const { return constify_ref(_current_qrule); }
236 
242 
243 #ifdef MOOSE_KOKKOS_ENABLED
244 
249  {
250  return qrules(dim, block).vol.get();
251  }
252 #endif
253 
258  const MooseArray<Point> & qPoints() const { return _current_q_points; }
259 
264  const std::vector<Point> & qPointsMortar() const { return _fe_msm->get_xyz(); }
265 
271 
276  const MooseArray<Real> & JxW() const { return _current_JxW; }
277 
278  const MooseArray<ADReal> & adJxW() const { return _ad_JxW; }
279 
280  const MooseArray<ADReal> & adJxWFace() const { return _ad_JxW_face; }
281 
282  const MooseArray<ADReal> & adCurvatures() const;
283 
288  const MooseArray<Real> & coordTransformation() const { return _coord; }
289 
295 
301  {
302  // Coord values for non-cartesian coordinate systems are functions of the locations of the
303  // quadrature points in physical space. We also have no way of knowing whether this was called
304  // from a volumetric or face object so we should set both volumetric and face xyz to true
305  _calculate_xyz = true;
306  _calculate_face_xyz = true;
307 
308  _calculate_ad_coord = true;
309  return _ad_coord;
310  }
311 
317 
322  const libMesh::QBase * const & qRuleFace() const { return constify_ref(_current_qrule_face); }
323 
329 
330 #ifdef MOOSE_KOKKOS_ENABLED
331 
336  {
337  return qrules(dim, block).face.get();
338  }
339 #endif
340 
346 
351  const MooseArray<Real> & JxWFace() const { return _current_JxW_face; }
352 
357  const MooseArray<Point> & normals() const { return _current_normals; }
358 
359  /***
360  * Returns the array of normals for quadrature points on a current side
361  */
362  const std::vector<Eigen::Map<RealDIMValue>> & mappedNormals() const { return _mapped_normals; }
363 
369 
373  unsigned int numExtraElemIntegers() const { return _extra_elem_ids.size() - 1; }
374 
378  const dof_id_type & extraElemID(unsigned int id) const
379  {
380  mooseAssert(id < _extra_elem_ids.size(), "An invalid extra element integer id");
381  return _extra_elem_ids[id];
382  }
383 
387  const dof_id_type & extraElemIDNeighbor(unsigned int id) const
388  {
389  mooseAssert(id < _neighbor_extra_elem_ids.size(), "An invalid extra element integer id");
390  return _neighbor_extra_elem_ids[id];
391  }
392 
393  const MooseArray<ADPoint> & adNormals() const { return _ad_normals; }
394 
396  {
397  _calculate_xyz = true;
398  return _ad_q_points;
399  }
400 
402  {
403  _calculate_face_xyz = true;
404  return _ad_q_points_face;
405  }
406 
407  template <bool is_ad>
409 
414  const Elem * const & elem() const { return _current_elem; }
415 
420 
425 
430 
435 
440  const Real & elemVolume() const { return _current_elem_volume; }
441 
446  const unsigned int & side() const { return _current_side; }
447 
452  const unsigned int & neighborSide() const { return _current_neighbor_side; }
453 
458  const Elem * const & sideElem() const { return _current_side_elem; }
459 
464  const Real & sideElemVolume() const { return _current_side_volume; }
465 
470  const Elem * const & neighbor() const { return _current_neighbor_elem; }
471 
476  const Elem * const & lowerDElem() const { return _current_lower_d_elem; }
477 
482  const Elem * const & neighborLowerDElem() const { return _current_neighbor_lower_d_elem; }
483 
484  /*
485  * @return The current lower-dimensional element volume
486  */
487  const Real & lowerDElemVolume() const;
488 
489  /*
490  * @return The current neighbor lower-dimensional element volume
491  */
492  const Real & neighborLowerDElemVolume() const;
493 
498 
503 
509  {
512  }
513 
518  const libMesh::QBase * const & qRuleNeighbor() const
519  {
521  }
522 
528 
533  const MooseArray<Real> & JxWNeighbor() const;
534 
540 
545  const Node * const & node() const { return _current_node; }
546 
551  const Node * const & nodeNeighbor() const { return _current_neighbor_node; }
552 
561  void createQRules(QuadratureType type,
562  Order order,
563  Order volume_order,
564  Order face_order,
565  SubdomainID block,
566  bool allow_negative_qweights = true);
567 
574  void bumpVolumeQRuleOrder(Order volume_order, SubdomainID block);
575 
583  void bumpAllQRuleOrder(Order order, SubdomainID block);
584 
593  void setVolumeQRule(libMesh::QBase * qrule, unsigned int dim);
594 
603  void setFaceQRule(libMesh::QBase * qrule, unsigned int dim);
604 
612  void setMortarQRule(Order order);
613 
617  void activateDual() { _need_dual = true; }
618 
623  bool needDual() const { return _need_dual; }
624 
628  void clearCachedQRules();
629 
630 private:
637  void setLowerQRule(libMesh::QBase * qrule, unsigned int dim);
638 
639 public:
648  void setNeighborQRule(libMesh::QBase * qrule, unsigned int dim);
649 
655  void reinit(const Elem * elem);
656 
660  void setVolumeQRule(const Elem * elem);
661 
666  void reinitElemFaceRef(const Elem * elem,
667  unsigned int elem_side,
668  Real tolerance,
669  const std::vector<Point> * const pts = nullptr,
670  const std::vector<Real> * const weights = nullptr);
671 
676  void reinitNeighborFaceRef(const Elem * neighbor_elem,
677  unsigned int neighbor_side,
678  Real tolerance,
679  const std::vector<Point> * const pts,
680  const std::vector<Real> * const weights = nullptr);
681 
685  void reinitDual(const Elem * elem, const std::vector<Point> & pts, const std::vector<Real> & JxW);
686 
690  void reinitLowerDElem(const Elem * elem,
691  const std::vector<Point> * const pts = nullptr,
692  const std::vector<Real> * const weights = nullptr);
693 
697  void reinitNeighborLowerDElem(const Elem * elem);
698 
702  void reinitMortarElem(const Elem * elem);
703 
707  const std::vector<Real> & jxWMortar() const { return *_JxW_msm; }
708 
712  const libMesh::QBase * const & qRuleMortar() const { return constify_ref(_qrule_msm); }
713 
714 private:
718  void computeADFace(const Elem & elem, const unsigned int side);
719 
720 public:
724  void reinitAtPhysical(const Elem * elem, const std::vector<Point> & physical_points);
725 
729  void reinit(const Elem * elem, const std::vector<Point> & reference_points);
730 
734  void setFaceQRule(const Elem * const elem, const unsigned int side);
735 
739  void reinit(const Elem * elem, unsigned int side);
740 
744  void reinit(const Elem * elem, unsigned int side, const std::vector<Point> & reference_points);
745 
746  void reinitFVFace(const FaceInfo & fi);
747 
759  void reinitElemAndNeighbor(const Elem * elem,
760  unsigned int side,
761  const Elem * neighbor,
762  unsigned int neighbor_side,
763  const std::vector<Point> * neighbor_reference_points = nullptr);
764 
768  void reinitNeighborAtPhysical(const Elem * neighbor,
769  unsigned int neighbor_side,
770  const std::vector<Point> & physical_points);
771 
775  void reinitNeighborAtPhysical(const Elem * neighbor, const std::vector<Point> & physical_points);
776 
780  void reinitNeighbor(const Elem * neighbor, const std::vector<Point> & reference_points);
781 
785  void reinit(const Node * node);
786 
790  void init(const libMesh::CouplingMatrix * cm);
791 
793  void initNonlocalCoupling();
794 
796  void prepareJacobianBlock();
797 
799  void prepareResidual();
800 
801  void prepare();
802  void prepareNonlocal();
803 
811  void prepareNeighbor();
812 
817  void prepareLowerD();
818 
819  void prepareBlock(unsigned int ivar, unsigned jvar, const std::vector<dof_id_type> & dof_indices);
820  void prepareBlockNonlocal(unsigned int ivar,
821  unsigned jvar,
822  const std::vector<dof_id_type> & idof_indices,
823  const std::vector<dof_id_type> & jdof_indices);
824  void prepareScalar();
825  void prepareOffDiagScalar();
826 
827  template <typename T>
829  void copyShapes(unsigned int var);
830 
831  template <typename T>
833  void copyFaceShapes(unsigned int var);
834 
835  template <typename T>
837  void copyNeighborShapes(unsigned int var);
838 
845  {
846  // Blessed classes
847  friend class Assembly;
848  friend class SubProblem;
849  friend class FEProblemBase;
850  friend class DisplacedProblem;
851  friend class ComputeMortarFunctor;
852  friend class NonlinearSystemBase;
855  };
856 
863  {
864  // Blessed classes
865  friend class Assembly;
866  friend class TaggingInterface;
869  };
870 
875  void addResidual(GlobalDataKey, const std::vector<VectorTag> & vector_tags);
880  void addResidualNeighbor(GlobalDataKey, const std::vector<VectorTag> & vector_tags);
885  void addResidualLower(GlobalDataKey, const std::vector<VectorTag> & vector_tags);
886 
891  void addResidualScalar(GlobalDataKey, const std::vector<VectorTag> & vector_tags);
892 
897  void cacheResidual(GlobalDataKey, const std::vector<VectorTag> & tags);
898 
903  void cacheResidualNeighbor(GlobalDataKey, const std::vector<VectorTag> & tags);
904 
908  void cacheResidualLower(GlobalDataKey, const std::vector<VectorTag> & tags);
909 
915  void addCachedResiduals(GlobalDataKey, const std::vector<VectorTag> & tags);
916 
925  void clearCachedResiduals(GlobalDataKey);
926 
935  GlobalDataKey,
936  const VectorTag & vector_tag);
937 
941  void setResidual(NumericVector<Number> & residual, GlobalDataKey, const VectorTag & vector_tag);
942 
947  GlobalDataKey,
948  const VectorTag & vector_tag);
949 
953  void addJacobian(GlobalDataKey);
954 
958  void addJacobianNonlocal(GlobalDataKey);
959 
964  void addJacobianNeighbor(GlobalDataKey);
965 
969  void addJacobianScalar(GlobalDataKey);
970 
975  void addJacobianOffDiagScalar(unsigned int ivar, GlobalDataKey);
976 
981  unsigned int ivar,
982  unsigned int jvar,
983  const libMesh::DofMap & dof_map,
984  std::vector<dof_id_type> & dof_indices,
985  GlobalDataKey,
986  TagID tag);
987 
993  unsigned int ivar,
994  unsigned int jvar,
995  const libMesh::DofMap & dof_map,
996  std::vector<dof_id_type> & dof_indices,
997  GlobalDataKey,
998  const std::set<TagID> & tags);
999 
1004  unsigned int ivar,
1005  unsigned int jvar,
1006  const libMesh::DofMap & dof_map,
1007  const std::vector<dof_id_type> & idof_indices,
1008  const std::vector<dof_id_type> & jdof_indices,
1009  GlobalDataKey,
1010  TagID tag);
1011 
1016  unsigned int ivar,
1017  unsigned int jvar,
1018  const libMesh::DofMap & dof_map,
1019  const std::vector<dof_id_type> & idof_indices,
1020  const std::vector<dof_id_type> & jdof_indices,
1021  GlobalDataKey,
1022  const std::set<TagID> & tags);
1023 
1032  void addJacobianNeighborLowerD(GlobalDataKey);
1033 
1039  void addJacobianLowerD(GlobalDataKey);
1040 
1049  void cacheJacobianMortar(GlobalDataKey);
1050 
1056  unsigned int ivar,
1057  unsigned int jvar,
1058  const libMesh::DofMap & dof_map,
1059  std::vector<dof_id_type> & dof_indices,
1060  std::vector<dof_id_type> & neighbor_dof_indices,
1061  GlobalDataKey,
1062  TagID tag);
1063 
1069  unsigned int ivar,
1070  unsigned int jvar,
1071  const libMesh::DofMap & dof_map,
1072  std::vector<dof_id_type> & dof_indices,
1073  std::vector<dof_id_type> & neighbor_dof_indices,
1074  GlobalDataKey,
1075  const std::set<TagID> & tags);
1076 
1080  void cacheJacobian(GlobalDataKey);
1081 
1085  void cacheJacobianNonlocal(GlobalDataKey);
1086 
1091  void cacheJacobianNeighbor(GlobalDataKey);
1092 
1099  void addCachedJacobian(GlobalDataKey);
1100 
1104  void setCachedJacobian(GlobalDataKey);
1105 
1109  void zeroCachedJacobian(GlobalDataKey);
1110 
1115  DenseVector<Number> & residualBlock(unsigned int var_num, LocalDataKey, TagID tag_id)
1116  {
1117  return _sub_Re[tag_id][var_num];
1118  }
1119 
1125  {
1126  return _sub_Rn[tag_id][var_num];
1127  }
1128 
1134  {
1135  return _sub_Rl[tag_id][var_num];
1136  }
1137 
1142  DenseMatrix<Number> & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
1143  {
1144  jacobianBlockUsed(tag, ivar, jvar, true);
1145  return _sub_Kee[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
1146  }
1147 
1153  jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
1154  {
1155  jacobianBlockNonlocalUsed(tag, ivar, jvar, true);
1156  return _sub_Keg[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
1157  }
1158 
1164  Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag);
1165 
1174  unsigned int ivar,
1175  unsigned int jvar,
1176  LocalDataKey,
1177  TagID tag);
1178 
1183  void cacheResidualNodes(const DenseVector<Number> & res,
1184  const std::vector<dof_id_type> & dof_index,
1185  LocalDataKey,
1186  TagID tag);
1187 
1199  void
1200  cacheJacobian(numeric_index_type i, numeric_index_type j, Real value, LocalDataKey, TagID tag);
1201 
1215  Real value,
1216  LocalDataKey,
1217  const std::set<TagID> & tags);
1218 
1226  void cacheJacobianBlock(const DenseMatrix<Number> & jac_block,
1227  const std::vector<dof_id_type> & idof_indices,
1228  const std::vector<dof_id_type> & jdof_indices,
1229  Real scaling_factor,
1230  LocalDataKey,
1231  const std::set<TagID> & tags);
1232 
1242  template <typename Residuals, typename Indices>
1243  void cacheResiduals(const Residuals & residuals,
1244  const Indices & row_indices,
1245  Real scaling_factor,
1246  LocalDataKey,
1247  const std::set<TagID> & vector_tags);
1248 
1256  template <typename Residuals, typename Indices>
1257  void cacheJacobian(const Residuals & residuals,
1258  const Indices & row_indices,
1259  Real scaling_factor,
1260  LocalDataKey,
1261  const std::set<TagID> & matrix_tags);
1262 
1273  template <typename Residuals, typename Indices>
1274  void cacheResidualsWithoutConstraints(const Residuals & residuals,
1275  const Indices & row_indices,
1276  Real scaling_factor,
1277  LocalDataKey,
1278  const std::set<TagID> & vector_tags);
1279 
1287  template <typename Residuals, typename Indices>
1288  void cacheJacobianWithoutConstraints(const Residuals & residuals,
1289  const Indices & row_indices,
1290  Real scaling_factor,
1291  LocalDataKey,
1292  const std::set<TagID> & matrix_tags);
1293 
1294  std::vector<std::pair<MooseVariableFieldBase *, MooseVariableFieldBase *>> & couplingEntries()
1295  {
1296  return _cm_ff_entry;
1297  }
1298  const std::vector<std::pair<MooseVariableFieldBase *, MooseVariableFieldBase *>> &
1300  {
1301  return _cm_ff_entry;
1302  }
1303  std::vector<std::pair<MooseVariableFieldBase *, MooseVariableFieldBase *>> &
1305  {
1306  return _cm_nonlocal_entry;
1307  }
1308  const std::vector<std::pair<MooseVariableFieldBase *, MooseVariableScalar *>> &
1310  {
1311  return _cm_fs_entry;
1312  }
1313  const std::vector<std::pair<MooseVariableScalar *, MooseVariableFieldBase *>> &
1315  {
1316  return _cm_sf_entry;
1317  }
1318 
1319  // Read-only references
1320  const VariablePhiValue & phi() const { return _phi; }
1321  template <typename T>
1323  {
1324  return _ad_grad_phi_data.at(v.feType());
1325  }
1326  const VariablePhiValue & phi(const MooseVariableField<Real> &) const { return _phi; }
1327  const VariablePhiGradient & gradPhi() const { return _grad_phi; }
1329  const VariablePhiSecond & secondPhi() const { return _second_phi; }
1331  {
1332  return _second_phi;
1333  }
1334 
1335  const VariablePhiValue & phiFace() const { return _phi_face; }
1336  const VariablePhiValue & phiFace(const MooseVariableField<Real> &) const { return _phi_face; }
1337  const VariablePhiGradient & gradPhiFace() const { return _grad_phi_face; }
1339  {
1340  return _grad_phi_face;
1341  }
1343  {
1344  return _second_phi_face;
1345  }
1346 
1348  {
1349  return _phi_neighbor;
1350  }
1352  {
1353  return _grad_phi_neighbor;
1354  }
1356  {
1357  return _second_phi_neighbor;
1358  }
1359 
1361  {
1362  return _phi_face_neighbor;
1363  }
1365  {
1366  return _grad_phi_face_neighbor;
1367  }
1369  {
1371  }
1372 
1374  {
1375  return _vector_phi;
1376  }
1378  {
1379  return _vector_grad_phi;
1380  }
1382  {
1383  return _vector_second_phi;
1384  }
1386  {
1387  return _vector_curl_phi;
1388  }
1390  {
1391  return _vector_div_phi;
1392  }
1393 
1395  {
1396  return _vector_phi_face;
1397  }
1399  {
1400  return _vector_grad_phi_face;
1401  }
1403  {
1404  return _vector_second_phi_face;
1405  }
1407  {
1408  return _vector_curl_phi_face;
1409  }
1411  {
1412  return _vector_div_phi_face;
1413  }
1414 
1416  {
1417  return _vector_phi_neighbor;
1418  }
1421  {
1423  }
1424  const VectorVariablePhiSecond &
1426  {
1428  }
1430  {
1432  }
1435  {
1436  return _vector_div_phi_neighbor;
1437  }
1438 
1440  {
1442  }
1445  {
1447  }
1448  const VectorVariablePhiSecond &
1450  {
1452  }
1453  const VectorVariablePhiCurl &
1455  {
1457  }
1460  {
1462  }
1463 
1464  // Writeable references
1468 
1472 
1475  {
1476  return _grad_phi_neighbor;
1477  }
1479  {
1480  return _second_phi_neighbor;
1481  }
1482 
1484  {
1485  return _phi_face_neighbor;
1486  }
1488  {
1489  return _grad_phi_face_neighbor;
1490  }
1492  {
1494  }
1495 
1496  // Writeable references with vector variable
1499  {
1500  return _vector_grad_phi;
1501  }
1503  {
1504  return _vector_second_phi;
1505  }
1507  {
1508  return _vector_curl_phi;
1509  }
1511  {
1512  return _vector_div_phi;
1513  }
1514 
1516  {
1517  return _vector_phi_face;
1518  }
1520  {
1521  return _vector_grad_phi_face;
1522  }
1524  {
1525  return _vector_second_phi_face;
1526  }
1528  {
1529  return _vector_curl_phi_face;
1530  }
1532  {
1533  return _vector_div_phi_face;
1534  }
1535 
1537  {
1538  return _vector_phi_neighbor;
1539  }
1541  {
1543  }
1545  {
1547  }
1549  {
1551  }
1553  {
1554  return _vector_div_phi_neighbor;
1555  }
1557  {
1559  }
1561  {
1563  }
1565  {
1567  }
1569  {
1571  }
1573  {
1575  }
1576 
1577  // Writeable references with array variable
1581 
1584  {
1585  return _grad_phi_face;
1586  }
1588  {
1589  return _second_phi_face;
1590  }
1591 
1593  {
1594  return _phi_neighbor;
1595  }
1597  {
1598  return _grad_phi_neighbor;
1599  }
1601  {
1602  return _second_phi_neighbor;
1603  }
1604 
1606  {
1607  return _phi_face_neighbor;
1608  }
1610  {
1611  return _grad_phi_face_neighbor;
1612  }
1614  {
1616  }
1617 
1618  template <typename OutputType>
1620  {
1621  buildFE(type);
1622  return _fe_shape_data[type]->_phi;
1623  }
1624 
1625  template <typename OutputType>
1627  {
1628  buildFE(type);
1629  return _fe_shape_data[type]->_grad_phi;
1630  }
1631 
1632  template <typename OutputType>
1634  {
1635  return _ad_grad_phi_data[type];
1636  }
1637 
1638  template <typename OutputType>
1640  {
1641  _need_second_derivative.insert(type);
1642  buildFE(type);
1643  return _fe_shape_data[type]->_second_phi;
1644  }
1645 
1646  template <typename OutputType>
1647  const typename OutputTools<OutputType>::VariablePhiValue & fePhiLower(FEType type) const;
1648 
1649  template <typename OutputType>
1651 
1652  template <typename OutputType>
1654 
1655  template <typename OutputType>
1657  feGradDualPhiLower(FEType type) const;
1658 
1659  template <typename OutputType>
1661  {
1662  buildFaceFE(type);
1663  return _fe_shape_data_face[type]->_phi;
1664  }
1665 
1666  template <typename OutputType>
1668  {
1669  buildFaceFE(type);
1670  return _fe_shape_data_face[type]->_grad_phi;
1671  }
1672 
1673  template <typename OutputType>
1675  {
1676  return _ad_grad_phi_data_face[type];
1677  }
1678 
1679  template <typename OutputType>
1681  {
1682  _need_second_derivative.insert(type);
1683  buildFaceFE(type);
1684  return _fe_shape_data_face[type]->_second_phi;
1685  }
1686 
1687  template <typename OutputType>
1689  {
1690  buildNeighborFE(type);
1691  return _fe_shape_data_neighbor[type]->_phi;
1692  }
1693 
1694  template <typename OutputType>
1696  {
1697  buildNeighborFE(type);
1698  return _fe_shape_data_neighbor[type]->_grad_phi;
1699  }
1700 
1701  template <typename OutputType>
1703  {
1704  _need_second_derivative_neighbor.insert(type);
1705  buildNeighborFE(type);
1706  return _fe_shape_data_neighbor[type]->_second_phi;
1707  }
1708 
1709  template <typename OutputType>
1711  {
1712  buildFaceNeighborFE(type);
1713  return _fe_shape_data_face_neighbor[type]->_phi;
1714  }
1715 
1716  template <typename OutputType>
1719  {
1720  buildFaceNeighborFE(type);
1721  return _fe_shape_data_face_neighbor[type]->_grad_phi;
1722  }
1723 
1724  template <typename OutputType>
1727  {
1728  _need_second_derivative_neighbor.insert(type);
1729  buildFaceNeighborFE(type);
1730  return _fe_shape_data_face_neighbor[type]->_second_phi;
1731  }
1732 
1733  template <typename OutputType>
1735  {
1736  _need_curl.insert(type);
1737  buildFE(type);
1738  return _fe_shape_data[type]->_curl_phi;
1739  }
1740 
1741  template <typename OutputType>
1743  {
1744  _need_curl.insert(type);
1745  buildFaceFE(type);
1746  return _fe_shape_data_face[type]->_curl_phi;
1747  }
1748 
1749  template <typename OutputType>
1751  {
1752  _need_curl.insert(type);
1753  buildNeighborFE(type);
1754  return _fe_shape_data_neighbor[type]->_curl_phi;
1755  }
1756 
1757  template <typename OutputType>
1759  {
1760  _need_curl.insert(type);
1761  buildFaceNeighborFE(type);
1762  return _fe_shape_data_face_neighbor[type]->_curl_phi;
1763  }
1764 
1765  template <typename OutputType>
1767  {
1768  buildFE(type);
1769  return _fe_shape_data[type]->_div_phi;
1770  }
1771 
1772  template <typename OutputType>
1774  {
1775  buildFaceFE(type);
1776  return _fe_shape_data_face[type]->_div_phi;
1777  }
1778 
1779  template <typename OutputType>
1782  {
1783  buildNeighborFE(type);
1784  return _fe_shape_data_neighbor[type]->_div_phi;
1785  }
1786 
1787  template <typename OutputType>
1790  {
1791  buildFaceNeighborFE(type);
1792  return _fe_shape_data_face_neighbor[type]->_div_phi;
1793  }
1794 
1796  Real elementVolume(const Elem * elem) const;
1797 
1801  void setXFEM(std::shared_ptr<XFEMInterface> xfem) { _xfem = xfem; }
1802 
1806  void assignDisplacements(
1807  std::vector<std::pair<unsigned int, unsigned short>> && disp_numbers_and_directions);
1808 
1818  unsigned int i,
1819  unsigned int ntest,
1820  const RealEigenVector & v) const
1821  {
1822  for (unsigned int j = 0; j < v.size(); ++j, i += ntest)
1823  re(i) += v(j);
1824  }
1825 
1826  void saveLocalADArray(std::vector<ADReal> & re,
1827  unsigned int i,
1828  unsigned int ntest,
1829  const ADRealEigenVector & v) const;
1830 
1842  unsigned int i,
1843  unsigned int ntest,
1844  unsigned int j,
1845  unsigned int nphi,
1846  unsigned int ivar,
1847  const RealEigenVector & v) const
1848  {
1849  unsigned int pace = (_component_block_diagonal[ivar] ? 0 : nphi);
1850  for (unsigned int k = 0; k < v.size(); ++k, i += ntest, j += pace)
1851  ke(i, j) += v(k);
1852  }
1853 
1867  unsigned int i,
1868  unsigned int ntest,
1869  unsigned int j,
1870  unsigned int nphi,
1871  unsigned int ivar,
1872  unsigned int jvar,
1873  const RealEigenMatrix & v) const
1874  {
1875  if (ivar == jvar && _component_block_diagonal[ivar])
1876  {
1877  for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1878  ke(i, j) += v(k, k);
1879  }
1880  else
1881  {
1882  const unsigned int saved_j = j;
1883  for (unsigned int k = 0; k < v.rows(); ++k, i += ntest)
1884  {
1885  j = saved_j;
1886  for (unsigned int l = 0; l < v.cols(); ++l, j += nphi)
1887  ke(i, j) += v(k, l);
1888  }
1889  }
1890  }
1891 
1892  DenseVector<Real> getJacobianDiagonal(const DenseMatrix<Number> & ke)
1893  {
1894  unsigned int rows = ke.m();
1895  unsigned int cols = ke.n();
1896  DenseVector<Real> diag(rows);
1897  for (unsigned int i = 0; i < rows; i++)
1898  // % operation is needed to account for cases of no component coupling of array variables
1899  diag(i) = ke(i, i % cols);
1900  return diag;
1901  }
1902 
1908  inline const libMesh::QBase * attachQRuleElem(unsigned int dim, FEBase & fe)
1909  {
1910  auto qrule = qrules(dim).vol.get();
1911  fe.attach_quadrature_rule(qrule);
1912  return qrule;
1913  }
1914 
1920  inline const libMesh::QBase * attachQRuleFace(unsigned int dim, FEBase & fe)
1921  {
1922  auto qrule = qrules(dim).face.get();
1923  fe.attach_quadrature_rule(qrule);
1924  return qrule;
1925  }
1926 
1931  void hasScalingVector();
1932 
1941  void modifyArbitraryWeights(const std::vector<Real> & weights);
1942 
1946  bool computingResidual() const { return _computing_residual; }
1947 
1951  bool computingJacobian() const { return _computing_jacobian; }
1952 
1957 
1961  const Elem * const & msmElem() const { return _msm_elem; }
1962 
1972  void havePRefinement(const std::unordered_set<FEFamily> & disable_p_refinement_for_families);
1973 
1977  void setCurrentLowerDElem(const Elem * const lower_d_elem);
1978 
1979 private:
1985  void reinitFE(const Elem * elem);
1986 
1993  void reinitFEFace(const Elem * elem, unsigned int side);
1994 
1995  void computeFaceMap(const Elem & elem, const unsigned int side, const std::vector<Real> & qw);
1996 
1997  void reinitFEFaceNeighbor(const Elem * neighbor, const std::vector<Point> & reference_points);
1998 
1999  void reinitFENeighbor(const Elem * neighbor, const std::vector<Point> & reference_points);
2000 
2001  template <typename Points, typename Coords>
2002  void setCoordinateTransformation(const libMesh::QBase * qrule,
2003  const Points & q_points,
2004  Coords & coord,
2005  SubdomainID sub_id);
2006 
2007  void computeCurrentElemVolume();
2008 
2009  void computeCurrentFaceVolume();
2010 
2012 
2018  void modifyWeightsDueToXFEM(const Elem * elem);
2019 
2026  void modifyFaceWeightsDueToXFEM(const Elem * elem, unsigned int side = 0);
2027 
2032  template <typename OutputType>
2033  void computeGradPhiAD(const Elem * elem,
2034  unsigned int n_qp,
2037 
2041  void resizeADMappingObjects(unsigned int n_qp, unsigned int dim);
2042 
2047  void
2048  computeSinglePointMapAD(const Elem * elem, const std::vector<Real> & qw, unsigned p, FEBase * fe);
2049 
2053  void addResidual(const VectorTag & vector_tag);
2057  void addResidualNeighbor(const VectorTag & vector_tag);
2062  void addResidualLower(const VectorTag & vector_tag);
2066  void addResidualScalar(const VectorTag & vector_tag);
2067 
2071  void clearCachedResiduals(const VectorTag & vector_tag);
2072 
2081  void cacheResidual(dof_id_type dof, Real value, TagID tag_id);
2082 
2091  void cacheResidual(dof_id_type dof, Real value, const std::set<TagID> & tags);
2092 
2097  void processLocalResidual(DenseVector<Number> & res_block,
2098  std::vector<dof_id_type> & dof_indices,
2099  const std::vector<Real> & scaling_factor);
2100 
2104  void addResidualBlock(NumericVector<Number> & residual,
2105  DenseVector<Number> & res_block,
2106  const std::vector<dof_id_type> & dof_indices,
2107  const std::vector<Real> & scaling_factor);
2108 
2112  void cacheResidualBlock(std::vector<Real> & cached_residual_values,
2113  std::vector<dof_id_type> & cached_residual_rows,
2114  DenseVector<Number> & res_block,
2115  const std::vector<dof_id_type> & dof_indices,
2116  const std::vector<Real> & scaling_factor);
2117 
2121  void setResidualBlock(NumericVector<Number> & residual,
2122  DenseVector<Number> & res_block,
2123  const std::vector<dof_id_type> & dof_indices,
2124  const std::vector<Real> & scaling_factor);
2125 
2130  DenseMatrix<Number> & jac_block,
2131  const MooseVariableBase & ivar,
2132  const MooseVariableBase & jvar,
2133  const std::vector<dof_id_type> & idof_indices,
2134  const std::vector<dof_id_type> & jdof_indices);
2135 
2139  void cacheJacobianBlock(const DenseMatrix<Number> & jac_block,
2140  const MooseVariableBase & ivar,
2141  const MooseVariableBase & jvar,
2142  const std::vector<dof_id_type> & idof_indices,
2143  const std::vector<dof_id_type> & jdof_indices,
2144  TagID tag);
2145 
2149  void cacheJacobianBlockNonzero(const DenseMatrix<Number> & jac_block,
2150  const MooseVariableBase & ivar,
2151  const MooseVariableBase & jvar,
2152  const std::vector<dof_id_type> & idof_indices,
2153  const std::vector<dof_id_type> & jdof_indices,
2154  TagID tag);
2155 
2159  void addJacobianCoupledVarPair(const MooseVariableBase & ivar, const MooseVariableBase & jvar);
2160 
2164  void cacheJacobianCoupledVarPair(const MooseVariableBase & ivar, const MooseVariableBase & jvar);
2165 
2171  void clearCachedJacobian();
2172 
2177  void buildFE(FEType type) const;
2178 
2183  void buildFaceFE(FEType type) const;
2184 
2189  void buildNeighborFE(FEType type) const;
2190 
2195  void buildFaceNeighborFE(FEType type) const;
2196 
2201  void buildLowerDFE(FEType type) const;
2202 
2203  void buildLowerDDualFE(FEType type) const;
2204 
2209  void buildVectorFE(FEType type) const;
2210 
2215  void buildVectorFaceFE(FEType type) const;
2216 
2221  void buildVectorNeighborFE(FEType type) const;
2222 
2227  void buildVectorFaceNeighborFE(FEType type) const;
2228 
2233  void buildVectorLowerDFE(FEType type) const;
2234  void buildVectorDualLowerDFE(FEType type) const;
2235 
2240  void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
2241  {
2242  _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2243  }
2244 
2249  char jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar) const
2250  {
2251  return _jacobian_block_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2252  }
2253 
2258  void jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
2259  {
2260  _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2261  }
2262 
2267  char jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar) const
2268  {
2269  return _jacobian_block_neighbor_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2270  }
2271 
2276  void jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
2277  {
2278  _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2279  }
2280 
2285  char jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar) const
2286  {
2287  return _jacobian_block_lower_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2288  }
2289 
2294  void jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
2295  {
2296  _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar] = used;
2297  }
2298 
2303  char jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar) const
2304  {
2305  return _jacobian_block_nonlocal_used[tag][ivar][_block_diagonal_matrix ? 0 : jvar];
2306  }
2307 
2311  void helpersRequestData();
2312 
2315 
2316  const bool _displaced;
2317 
2321 
2323  const bool & _computing_residual;
2324 
2326  const bool & _computing_jacobian;
2327 
2330 
2332  std::vector<std::pair<MooseVariableFieldBase *, MooseVariableFieldBase *>> _cm_ff_entry;
2334  std::vector<std::pair<MooseVariableFieldBase *, MooseVariableScalar *>> _cm_fs_entry;
2336  std::vector<std::pair<MooseVariableScalar *, MooseVariableFieldBase *>> _cm_sf_entry;
2338  std::vector<std::pair<MooseVariableScalar *, MooseVariableScalar *>> _cm_ss_entry;
2340  std::vector<std::pair<MooseVariableFieldBase *, MooseVariableFieldBase *>> _cm_nonlocal_entry;
2342  std::vector<std::vector<std::vector<unsigned char>>> _jacobian_block_used;
2343  std::vector<std::vector<std::vector<unsigned char>>> _jacobian_block_nonlocal_used;
2345  std::vector<std::vector<std::vector<unsigned char>>> _jacobian_block_neighbor_used;
2347  std::vector<std::vector<std::vector<unsigned char>>> _jacobian_block_lower_used;
2352 
2354 
2355  unsigned int _mesh_dimension;
2356 
2360 
2367 
2370  std::vector<std::unique_ptr<FEBase>> _unique_fe_helper;
2371  std::vector<std::unique_ptr<FEBase>> _unique_fe_face_helper;
2372  std::vector<std::unique_ptr<FEBase>> _unique_fe_face_neighbor_helper;
2373  std::vector<std::unique_ptr<FEBase>> _unique_fe_neighbor_helper;
2374  std::vector<std::unique_ptr<FEBase>> _unique_fe_lower_helper;
2375 
2378 
2380  std::shared_ptr<XFEMInterface> _xfem;
2381 
2383  std::map<FEType, FEBase *> _current_fe;
2385  std::map<FEType, FEBase *> _current_fe_face;
2387  std::map<FEType, FEBase *> _current_fe_neighbor;
2389  std::map<FEType, FEBase *> _current_fe_face_neighbor;
2390 
2392  std::map<FEType, FEVectorBase *> _current_vector_fe;
2394  std::map<FEType, FEVectorBase *> _current_vector_fe_face;
2396  std::map<FEType, FEVectorBase *> _current_vector_fe_neighbor;
2398  std::map<FEType, FEVectorBase *> _current_vector_fe_face_neighbor;
2399 
2400  /**** Volume Stuff ****/
2401 
2403  mutable std::map<unsigned int, std::map<FEType, FEBase *>> _fe;
2405  mutable std::map<unsigned int, std::map<FEType, FEVectorBase *>> _vector_fe;
2407  std::map<unsigned int, FEBase *> _holder_fe_helper;
2428 
2431  struct QRules
2432  {
2434  : vol(nullptr),
2435  face(nullptr),
2436  arbitrary_vol(nullptr),
2437  arbitrary_face(nullptr),
2438  neighbor(nullptr)
2439  {
2440  }
2441 
2443  std::unique_ptr<libMesh::QBase> vol;
2445  std::unique_ptr<libMesh::QBase> face;
2447  std::unique_ptr<libMesh::QBase> fv_face;
2449  std::unique_ptr<ArbitraryQuadrature> arbitrary_vol;
2451  std::unique_ptr<ArbitraryQuadrature> arbitrary_face;
2453  std::unique_ptr<ArbitraryQuadrature> neighbor;
2454  };
2455 
2460  std::unordered_map<SubdomainID, std::vector<QRules>> _qrules;
2461 
2468  libMesh::QBase * qruleFace(const Elem * elem, unsigned int side);
2469  ArbitraryQuadrature * qruleArbitraryFace(const Elem * elem, unsigned int side);
2470 
2471  template <typename T>
2472  T * qruleFaceHelper(const Elem * elem, unsigned int side, std::function<T *(QRules &)> rule_fn)
2473  {
2474  auto dim = elem->dim();
2475  auto neighbor = elem->neighbor_ptr(side);
2476  auto q = rule_fn(qrules(dim, elem->subdomain_id()));
2477  if (!neighbor)
2478  return q;
2479 
2480  // find the maximum face quadrature order for all blocks the face is in
2481  auto neighbor_block = neighbor->subdomain_id();
2482  if (neighbor_block == elem->subdomain_id())
2483  return q;
2484 
2485  auto q_neighbor = rule_fn(qrules(dim, neighbor_block));
2486  if (q->get_order() > q_neighbor->get_order())
2487  return q;
2488  return q_neighbor;
2489  }
2490 
2491  inline QRules & qrules(unsigned int dim) { return qrules(dim, _current_subdomain_id); }
2492 
2496  inline QRules & qrules(unsigned int dim, SubdomainID block)
2497  {
2498  if (_qrules.find(block) == _qrules.end())
2499  {
2500  mooseAssert(_qrules.find(Moose::ANY_BLOCK_ID) != _qrules.end(),
2501  "missing quadrature rules for specified block");
2502  mooseAssert(_qrules[Moose::ANY_BLOCK_ID].size() > dim,
2503  "quadrature rules not sized property for dimension");
2504  return _qrules[Moose::ANY_BLOCK_ID][dim];
2505  }
2506  mooseAssert(_qrules.find(block) != _qrules.end(),
2507  "missing quadrature rules for specified block");
2508  mooseAssert(_qrules[block].size() > dim, "quadrature rules not sized property for dimension");
2509  return _qrules[block][dim];
2510  }
2511 
2512  /**** Face Stuff ****/
2513 
2515  mutable std::map<unsigned int, std::map<FEType, FEBase *>> _fe_face;
2517  mutable std::map<unsigned int, std::map<FEType, FEVectorBase *>> _vector_fe_face;
2519  std::map<unsigned int, FEBase *> _holder_fe_face_helper;
2533  std::vector<Eigen::Map<RealDIMValue>> _mapped_normals;
2536 
2538  std::vector<dof_id_type> _extra_elem_ids;
2540  std::vector<dof_id_type> _neighbor_extra_elem_ids;
2542  std::map<unsigned int, const std::vector<Point> *> _holder_normals;
2543 
2544  /**** Neighbor Stuff ****/
2545 
2547  mutable std::map<unsigned int, std::map<FEType, FEBase *>> _fe_neighbor;
2548  mutable std::map<unsigned int, std::map<FEType, FEBase *>> _fe_face_neighbor;
2549  mutable std::map<unsigned int, std::map<FEType, FEVectorBase *>> _vector_fe_neighbor;
2550  mutable std::map<unsigned int, std::map<FEType, FEVectorBase *>> _vector_fe_face_neighbor;
2551 
2553  std::map<unsigned int, FEBase *> _holder_fe_neighbor_helper;
2554  std::map<unsigned int, FEBase *> _holder_fe_face_neighbor_helper;
2555 
2557  mutable std::map<unsigned int, std::map<FEType, FEBase *>> _fe_lower;
2559  mutable std::map<unsigned int, std::map<FEType, FEVectorBase *>> _vector_fe_lower;
2561  std::map<unsigned int, FEBase *> _holder_fe_lower_helper;
2562 
2568  mutable bool _need_JxW_neighbor;
2576 
2577  /********** mortar stuff *************/
2578 
2580  const std::vector<Real> * _JxW_msm;
2582  std::unique_ptr<FEBase> _fe_msm;
2590 
2594 
2595 protected:
2597  const Elem * _current_elem;
2605  unsigned int _current_side;
2607  const Elem * _current_side_elem;
2623  const Node * _current_node;
2630 
2645 
2648 
2649  /*
2650  * Residual contributions <tag_index, ivar>
2651  *
2652  * tag_index is the index into _residual_vector_tags, that is, _sub_Re[0] corresponds to the tag
2653  * with TagID _residual_vector_tags[0]._id
2654  *
2655  * When ivar corresponds to an array variable, the dense vector is in size of ndof * count,
2656  * where count is the number of components of the array variable. The local residual is ordered
2657  * as (r_i,j, i = 1,...,ndof; j = 1,...,count).
2658  *
2659  * Dense vectors for variables (ivar+i, i = 1,...,count) are empty.
2660  */
2661  std::vector<std::vector<DenseVector<Number>>> _sub_Re;
2662  std::vector<std::vector<DenseVector<Number>>> _sub_Rn;
2664  std::vector<std::vector<DenseVector<Number>>> _sub_Rl;
2665 
2668 
2669  /*
2670  * Jacobian contributions <Tag, ivar, jvar>
2671  * When ivar corresponds to an array variable, the number of rows of the dense matrix is in size
2672  * of indof * icount, where icount is the number of components of ivar. When jvar corresponds to
2673  * an array variable, the number of columns of the dense matrix is in size of jndof * jcount,
2674  * where jcount is the number of components of jvar. The local residual is ordered as
2675  * (K_(i,j,k,l), k=1,...,jndof; l = 1,...,jcout; i = 1,...,indof; j = 1,...,icount).
2676  *
2677  * Dense matrices for variables (ivar+i, i = 1,...,icount) or (jvar+j, j = 1,...,jcount) are
2678  * empty.
2679  */
2680  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Kee;
2681  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Keg;
2682 
2684  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Ken;
2686  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Kne;
2688  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Knn;
2690  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Kll;
2692  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Kle;
2694  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Kln;
2696  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Kel;
2698  std::vector<std::vector<std::vector<DenseMatrix<Number>>>> _sub_Knl;
2699 
2702 
2703  // Shape function values, gradients. second derivatives
2707 
2711 
2715 
2719 
2720  // Shape function values, gradients, second derivatives
2726 
2732 
2738 
2744 
2746  {
2747  public:
2753  };
2754 
2756  {
2757  public:
2763  };
2764 
2766  mutable std::map<FEType, std::unique_ptr<FEShapeData>> _fe_shape_data;
2767  mutable std::map<FEType, std::unique_ptr<FEShapeData>> _fe_shape_data_face;
2768  mutable std::map<FEType, std::unique_ptr<FEShapeData>> _fe_shape_data_neighbor;
2769  mutable std::map<FEType, std::unique_ptr<FEShapeData>> _fe_shape_data_face_neighbor;
2770  mutable std::map<FEType, std::unique_ptr<FEShapeData>> _fe_shape_data_lower;
2771  mutable std::map<FEType, std::unique_ptr<FEShapeData>> _fe_shape_data_dual_lower;
2772 
2774  mutable std::map<FEType, std::unique_ptr<VectorFEShapeData>> _vector_fe_shape_data;
2775  mutable std::map<FEType, std::unique_ptr<VectorFEShapeData>> _vector_fe_shape_data_face;
2776  mutable std::map<FEType, std::unique_ptr<VectorFEShapeData>> _vector_fe_shape_data_neighbor;
2777  mutable std::map<FEType, std::unique_ptr<VectorFEShapeData>> _vector_fe_shape_data_face_neighbor;
2778  mutable std::map<FEType, std::unique_ptr<VectorFEShapeData>> _vector_fe_shape_data_lower;
2779  mutable std::map<FEType, std::unique_ptr<VectorFEShapeData>> _vector_fe_shape_data_dual_lower;
2780 
2781  mutable std::map<FEType, ADTemplateVariablePhiGradient<Real>> _ad_grad_phi_data;
2782  mutable std::map<FEType, ADTemplateVariablePhiGradient<RealVectorValue>> _ad_vector_grad_phi_data;
2783  mutable std::map<FEType, ADTemplateVariablePhiGradient<Real>> _ad_grad_phi_data_face;
2784  mutable std::map<FEType, ADTemplateVariablePhiGradient<RealVectorValue>>
2786 
2796  const std::vector<VectorTag> & _residual_vector_tags;
2797 
2799  std::vector<std::vector<Real>> _cached_residual_values;
2800 
2802  std::vector<std::vector<dof_id_type>> _cached_residual_rows;
2803 
2805 
2807  std::vector<std::vector<Real>> _cached_jacobian_values;
2809  std::vector<std::vector<dof_id_type>> _cached_jacobian_rows;
2811  std::vector<std::vector<dof_id_type>> _cached_jacobian_cols;
2812 
2814 
2819  std::vector<bool> _component_block_diagonal;
2820 
2822  std::vector<dof_id_type> _temp_dof_indices;
2823 
2825  std::vector<Point> _temp_reference_points;
2826 
2828  std::vector<VectorValue<ADReal>> _ad_dxyzdxi_map;
2829  std::vector<VectorValue<ADReal>> _ad_dxyzdeta_map;
2830  std::vector<VectorValue<ADReal>> _ad_dxyzdzeta_map;
2831  std::vector<VectorValue<ADReal>> _ad_d2xyzdxi2_map;
2832  std::vector<VectorValue<ADReal>> _ad_d2xyzdxideta_map;
2833  std::vector<VectorValue<ADReal>> _ad_d2xyzdeta2_map;
2834  std::vector<ADReal> _ad_jac;
2837  std::vector<ADReal> _ad_dxidx_map;
2838  std::vector<ADReal> _ad_dxidy_map;
2839  std::vector<ADReal> _ad_dxidz_map;
2840  std::vector<ADReal> _ad_detadx_map;
2841  std::vector<ADReal> _ad_detady_map;
2842  std::vector<ADReal> _ad_detadz_map;
2843  std::vector<ADReal> _ad_dzetadx_map;
2844  std::vector<ADReal> _ad_dzetady_map;
2845  std::vector<ADReal> _ad_dzetadz_map;
2846 
2852 
2856  std::vector<std::pair<unsigned int, unsigned short>> _disp_numbers_and_directions;
2857 
2858  mutable bool _calculate_xyz;
2859  mutable bool _calculate_face_xyz;
2861 
2864  mutable bool _calculate_ad_coord;
2865 
2866  mutable std::set<FEType> _need_second_derivative;
2867  mutable std::set<FEType> _need_second_derivative_neighbor;
2868  mutable std::set<FEType> _need_curl;
2869  mutable std::set<FEType> _need_div;
2870  mutable std::set<FEType> _need_face_div;
2871  mutable std::set<FEType> _need_neighbor_div;
2872  mutable std::set<FEType> _need_face_neighbor_div;
2873 
2875  const NumericVector<Real> * _scaling_vector = nullptr;
2876 
2883 
2884  const Elem * _msm_elem = nullptr;
2885 
2890 
2895 
2899  std::vector<dof_id_type> _row_indices, _column_indices;
2900 
2903 
2905  std::vector<Point> _current_neighbor_ref_points;
2906 };
2907 
2908 template <typename OutputType>
2911 {
2912  buildLowerDFE(type);
2913  return _fe_shape_data_lower[type]->_phi;
2914 }
2915 
2916 template <typename OutputType>
2919 {
2920  buildLowerDDualFE(type);
2921  return _fe_shape_data_dual_lower[type]->_phi;
2922 }
2923 
2924 template <typename OutputType>
2927 {
2928  buildLowerDFE(type);
2929  return _fe_shape_data_lower[type]->_grad_phi;
2930 }
2931 
2932 template <typename OutputType>
2935 {
2936  buildLowerDDualFE(type);
2937  return _fe_shape_data_dual_lower[type]->_grad_phi;
2938 }
2939 
2940 template <>
2942 Assembly::feADGradPhi<RealVectorValue>(FEType type) const
2943 {
2944  return _ad_vector_grad_phi_data[type];
2945 }
2946 
2947 template <>
2949 Assembly::feADGradPhiFace<RealVectorValue>(FEType type) const
2950 {
2951  return _ad_vector_grad_phi_data_face[type];
2952 }
2953 
2954 template <>
2956 Assembly::fePhi<VectorValue<Real>>(FEType type) const;
2957 
2958 template <>
2960 Assembly::feGradPhi<VectorValue<Real>>(FEType type) const;
2961 
2962 template <>
2964 Assembly::feSecondPhi<VectorValue<Real>>(FEType type) const;
2965 
2966 template <>
2968 Assembly::fePhiLower<VectorValue<Real>>(FEType type) const;
2969 
2970 template <>
2972 Assembly::feDualPhiLower<VectorValue<Real>>(FEType type) const;
2973 
2974 template <>
2976 Assembly::feGradPhiLower<VectorValue<Real>>(FEType type) const;
2977 
2978 template <>
2980 Assembly::feGradDualPhiLower<VectorValue<Real>>(FEType type) const;
2981 
2982 template <>
2984 Assembly::fePhiFace<VectorValue<Real>>(FEType type) const;
2985 
2986 template <>
2988 Assembly::feGradPhiFace<VectorValue<Real>>(FEType type) const;
2989 
2990 template <>
2992 Assembly::feSecondPhiFace<VectorValue<Real>>(FEType type) const;
2993 
2994 template <>
2996 Assembly::fePhiNeighbor<VectorValue<Real>>(FEType type) const;
2997 
2998 template <>
3000 Assembly::feGradPhiNeighbor<VectorValue<Real>>(FEType type) const;
3001 
3002 template <>
3004 Assembly::feSecondPhiNeighbor<VectorValue<Real>>(FEType type) const;
3005 
3006 template <>
3008 Assembly::fePhiFaceNeighbor<VectorValue<Real>>(FEType type) const;
3009 
3010 template <>
3012 Assembly::feGradPhiFaceNeighbor<VectorValue<Real>>(FEType type) const;
3013 
3014 template <>
3016 Assembly::feSecondPhiFaceNeighbor<VectorValue<Real>>(FEType type) const;
3017 
3018 template <>
3020 Assembly::feCurlPhi<VectorValue<Real>>(FEType type) const;
3021 
3022 template <>
3024 Assembly::feCurlPhiFace<VectorValue<Real>>(FEType type) const;
3025 
3026 template <>
3028 Assembly::feCurlPhiNeighbor<VectorValue<Real>>(FEType type) const;
3029 
3030 template <>
3032 Assembly::feCurlPhiFaceNeighbor<VectorValue<Real>>(FEType type) const;
3033 
3034 template <>
3036 Assembly::feDivPhi<VectorValue<Real>>(FEType type) const;
3037 
3038 template <>
3040 Assembly::feDivPhiFace<VectorValue<Real>>(FEType type) const;
3041 
3042 template <>
3044 Assembly::feDivPhiNeighbor<VectorValue<Real>>(FEType type) const;
3045 
3046 template <>
3048 Assembly::feDivPhiFaceNeighbor<VectorValue<Real>>(FEType type) const;
3049 
3050 template <>
3052 Assembly::adGradPhi<RealVectorValue>(const MooseVariableFE<RealVectorValue> & v) const
3053 {
3054  return _ad_vector_grad_phi_data.at(v.feType());
3055 }
3056 
3057 template <typename Residuals, typename Indices>
3058 void
3059 Assembly::cacheResiduals(const Residuals & residuals,
3060  const Indices & input_row_indices,
3061  const Real scaling_factor,
3062  LocalDataKey,
3063  const std::set<TagID> & vector_tags)
3064 {
3065  mooseAssert(residuals.size() == input_row_indices.size(),
3066  "The number of residuals should match the number of dof indices");
3067  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3068 
3069  if (!computingResidual() || vector_tags.empty())
3070  return;
3071 
3072  if (residuals.size() == 1)
3073  {
3074  // No constraining is required. (This is likely a finite volume computation if we only have a
3075  // single dof)
3077  residuals, input_row_indices, scaling_factor, LocalDataKey{}, vector_tags);
3078  return;
3079  }
3080 
3081  // Need to make a copy because we might modify this in constrain_element_vector
3082  _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3083 
3085  for (const auto i : index_range(_row_indices))
3086  _element_vector(i) = MetaPhysicL::raw_value(residuals[i]) * scaling_factor;
3087 
3088  // At time of writing, this method doesn't do anything with the asymmetric_constraint_rows
3089  // argument, but we set it to false to be consistent with processLocalResidual
3091  _element_vector, _row_indices, /*asymmetric_constraint_rows=*/false);
3092 
3093  for (const auto i : index_range(_row_indices))
3094  cacheResidual(_row_indices[i], _element_vector(i), vector_tags);
3095 }
3096 
3097 template <typename Residuals, typename Indices>
3098 void
3100  const Indices & row_indices,
3101  const Real scaling_factor,
3102  LocalDataKey,
3103  const std::set<TagID> & vector_tags)
3104 {
3105  mooseAssert(residuals.size() == row_indices.size(),
3106  "The number of residuals should match the number of dof indices");
3107  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3108 
3109  if (computingResidual() && !vector_tags.empty())
3110  for (const auto i : index_range(row_indices))
3111  cacheResidual(
3112  row_indices[i], MetaPhysicL::raw_value(residuals[i]) * scaling_factor, vector_tags);
3113 }
3114 
3115 template <typename Residuals, typename Indices>
3116 void
3117 Assembly::cacheJacobian(const Residuals & residuals,
3118  const Indices & input_row_indices,
3119  const Real scaling_factor,
3120  LocalDataKey,
3121  const std::set<TagID> & matrix_tags)
3122 {
3123  if (!computingJacobian() || matrix_tags.empty())
3124  return;
3125 
3126  if (residuals.size() == 1)
3127  {
3128  // No constraining is required. (This is likely a finite volume computation if we only have a
3129  // single dof)
3131  residuals, input_row_indices, scaling_factor, LocalDataKey{}, matrix_tags);
3132  return;
3133  }
3134 
3135  const auto & compare_dofs = residuals[0].derivatives().nude_indices();
3136 #ifndef NDEBUG
3137  auto compare_dofs_set = std::set<dof_id_type>(compare_dofs.begin(), compare_dofs.end());
3138 
3139  for (const auto i : make_range(decltype(residuals.size())(1), residuals.size()))
3140  {
3141  const auto & residual = residuals[i];
3142  auto current_dofs_set = std::set<dof_id_type>(residual.derivatives().nude_indices().begin(),
3143  residual.derivatives().nude_indices().end());
3144  mooseAssert(compare_dofs_set == current_dofs_set,
3145  "We're going to see whether the dof sets are the same. IIRC the degree of freedom "
3146  "dependence (as indicated by the dof index set held by the ADReal) has to be the "
3147  "same for every residual passed to this method otherwise constrain_element_matrix "
3148  "will not work.");
3149  }
3150 #endif
3151  _column_indices.assign(compare_dofs.begin(), compare_dofs.end());
3152 
3153  // If there's no derivatives then there is nothing to do. Moreover, if we pass zero size column
3154  // indices to constrain_element_matrix then we will potentially get errors out of BLAS
3155  if (!_column_indices.size())
3156  return;
3157 
3158  // Need to make a copy because we might modify this in constrain_element_matrix
3159  _row_indices.assign(input_row_indices.begin(), input_row_indices.end());
3160 
3162  for (const auto i : index_range(_row_indices))
3163  {
3164  const auto & sparse_derivatives = residuals[i].derivatives();
3165 
3166  for (const auto j : index_range(_column_indices))
3167  _element_matrix(i, j) = sparse_derivatives[_column_indices[j]] * scaling_factor;
3168  }
3169 
3171 
3172  for (const auto i : index_range(_row_indices))
3173  for (const auto j : index_range(_column_indices))
3174  cacheJacobian(_row_indices[i], _column_indices[j], _element_matrix(i, j), {}, matrix_tags);
3175 }
3176 
3177 template <typename Residuals, typename Indices>
3178 void
3179 Assembly::cacheJacobianWithoutConstraints(const Residuals & residuals,
3180  const Indices & row_indices,
3181  const Real scaling_factor,
3182  LocalDataKey,
3183  const std::set<TagID> & matrix_tags)
3184 {
3185  mooseAssert(residuals.size() == row_indices.size(),
3186  "The number of residuals should match the number of dof indices");
3187  mooseAssert(residuals.size() >= 1, "Why you calling me with no residuals?");
3188 
3189  if (!computingJacobian() || matrix_tags.empty())
3190  return;
3191 
3192  for (const auto i : index_range(row_indices))
3193  {
3194  const auto row_index = row_indices[i];
3195 
3196  const auto & sparse_derivatives = residuals[i].derivatives();
3197  const auto & column_indices = sparse_derivatives.nude_indices();
3198  const auto & raw_derivatives = sparse_derivatives.nude_data();
3199 
3200  for (std::size_t j = 0; j < column_indices.size(); ++j)
3201  cacheJacobian(
3202  row_index, column_indices[j], raw_derivatives[j] * scaling_factor, {}, matrix_tags);
3203  }
3204 }
3205 
3206 inline const Real &
3208 {
3211 }
3212 
3213 inline const Real &
3215 {
3218 }
3219 
3220 inline void
3222  std::vector<std::pair<unsigned int, unsigned short>> && disp_numbers_and_directions)
3223 {
3224  _disp_numbers_and_directions = std::move(disp_numbers_and_directions);
3225 }
3226 
3227 inline void
3228 Assembly::setCurrentLowerDElem(const Elem * const lower_d_elem)
3229 {
3230  _current_lower_d_elem = lower_d_elem;
3231 }
const Real & neighborVolume()
Returns the reference to the current neighbor volume.
Definition: Assembly.h:508
VariablePhiSecond _second_phi_face
Definition: Assembly.h:2710
const Elem *const & elem() const
Return the current element.
Definition: Assembly.h:414
VariablePhiSecond _second_phi_face_neighbor
Definition: Assembly.h:2718
MooseArray< VectorValue< ADReal > > _ad_normals
Definition: Assembly.h:2848
const VectorVariablePhiValue & phi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1373
const FEVectorBase *const & getVectorFEFace(FEType type, unsigned int dim) const
GetVector a reference to a pointer that will contain the current "face" FE.
Definition: Assembly.h:204
void copyShapes(MooseVariableField< T > &v)
Definition: Assembly.C:3003
libMesh::ElemSideBuilder _compute_face_map_side_elem_builder
In place side element builder for computeFaceMap()
Definition: Assembly.h:2882
const FEVectorBase *const & getVectorFE(FEType type, unsigned int dim) const
Get a reference to a pointer that will contain the current volume FEVector.
Definition: Assembly.h:180
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
Definition: Assembly.h:2515
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
Definition: Assembly.h:2619
void cacheResidualNeighbor(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Rn of all field variables and appends them to the cached ...
Definition: Assembly.C:3442
const unsigned int & neighborSide() const
Returns the current neighboring side.
Definition: Assembly.h:452
VectorVariablePhiSecond & secondPhi(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1502
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
Definition: Assembly.h:2415
std::map< FEType, FEBase * > _current_fe
The "volume" fe object that matches the current elem.
Definition: Assembly.h:2383
MooseArray< Real > _curvatures
Definition: Assembly.h:2850
std::vector< ADReal > _ad_detadz_map
Definition: Assembly.h:2842
VectorVariablePhiValue _phi
Definition: Assembly.h:2758
SystemBase & _sys
Definition: Assembly.h:2313
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:2802
The Kokkos assembly class.
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Definition: Assembly.h:2809
Eigen::Matrix< ADReal, Eigen::Dynamic, 1 > ADRealEigenVector
Definition: MooseTypes.h:148
unsigned int _max_cached_residuals
Definition: Assembly.h:2804
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
Definition: Assembly.h:2783
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhi(FEType type) const
Definition: Assembly.h:1734
bool _user_added_fe_lower_of_helper_type
Definition: Assembly.h:2366
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
Definition: Assembly.h:2647
VariablePhiSecond & secondPhiNeighbor(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1600
const VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1364
const libMesh::FEType & feType() const
Get the type of finite element object.
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
Definition: Assembly.h:2374
MooseArray< ADReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
Definition: Assembly.h:2427
const MooseArray< ADPoint > & adQPointsFace() const
Definition: Assembly.h:401
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries()
Definition: Assembly.h:1294
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
Definition: Assembly.C:316
const VariablePhiSecond & secondPhi() const
Definition: Assembly.h:1329
void setMortarQRule(Order order)
Specifies a custom qrule for integration on mortar segment mesh.
Definition: Assembly.C:737
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension&#39;s actual vector fe objects indexed on type.
Definition: Assembly.h:2405
typename OutputTools< typename Moose::ADType< T >::type >::VariablePhiGradient ADTemplateVariablePhiGradient
Definition: MooseTypes.h:682
void buildVectorLowerDFE(FEType type) const
Build Vector FEs for a lower dimensional element with a type.
Definition: Assembly.C:405
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
Definition: Assembly.h:2572
const FEBase *const & getFENeighbor(FEType type, unsigned int dim) const
Get a reference to a pointer that will contain the current &#39;neighbor&#39; FE.
Definition: Assembly.h:144
void buildFE(FEType type) const
Build FEs with a type.
Definition: Assembly.C:268
T * qruleFaceHelper(const Elem *elem, unsigned int side, std::function< T *(QRules &)> rule_fn)
Definition: Assembly.h:2472
libMesh::QBase *const & writeableQRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:241
const bool & _computing_residual
Whether we are currently computing the residual.
Definition: Assembly.h:2323
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
dlower/dsecondary (or dlower/delement)
Definition: Assembly.h:2692
VectorVariablePhiGradient & gradPhiFace(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1519
void setCurrentBoundaryID(BoundaryID i)
set the current boundary ID
Definition: Assembly.h:434
void cacheResidualLower(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Rl and appends them to the cached values.
Definition: Assembly.C:3456
const std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > & fieldScalarCouplingEntries() const
Definition: Assembly.h:1309
const OutputTools< OutputType >::VariablePhiValue & fePhi(FEType type) const
Definition: Assembly.h:1619
void setFaceQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
Definition: Assembly.C:676
void saveLocalADArray(std::vector< ADReal > &re, unsigned int i, unsigned int ntest, const ADRealEigenVector &v) const
Definition: Assembly.C:3790
libMesh::QBase *const & writeableQRuleNeighbor()
Returns the reference to the current quadrature being used on a current neighbor. ...
Definition: Assembly.h:527
Keeps track of stuff related to assembling.
Definition: Assembly.h:109
Assembly(SystemBase &sys, THREAD_ID tid)
Definition: Assembly.C:81
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
Definition: Assembly.h:2766
Class for stuff related to variables.
Definition: Adaptivity.h:33
const MooseArray< ADReal > & adJxW() const
Definition: Assembly.h:278
const ADTemplateVariablePhiGradient< OutputType > & feADGradPhiFace(FEType type) const
Definition: Assembly.h:1674
void buildLowerDDualFE(FEType type) const
Definition: Assembly.C:384
VariablePhiGradient & gradPhiFace(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1583
unsigned int TagID
Definition: MooseTypes.h:238
VectorVariablePhiValue _vector_phi
Definition: Assembly.h:2721
MooseArray< Real > _current_JxW_neighbor
The current transformed jacobian weights on a neighbor&#39;s face.
Definition: Assembly.h:2570
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
Definition: Assembly.h:2380
void reinitNeighborLowerDElem(const Elem *elem)
reinitialize a neighboring lower dimensional element
Definition: Assembly.C:2385
virtual ~Assembly()
Definition: Assembly.C:188
void setCurrentLowerDElem(const Elem *const lower_d_elem)
Set the current lower dimensional element.
Definition: Assembly.h:3228
const VectorVariablePhiDivergence & divPhiNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1434
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
Definition: Assembly.C:2686
const libMesh::QBase *const & qRuleFace() const
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:322
DenseMatrix< Number > & jacobianBlockNonlocal(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block from non-local contribution for a pair of variables and a tag...
Definition: Assembly.h:1153
VariablePhiSecond & secondPhiFace(const MooseVariableField< Real > &)
Definition: Assembly.h:1471
VectorValue< Real > RealVectorValue
Definition: SubProblem.h:33
VariablePhiSecond & secondPhi(const MooseVariableField< Real > &)
Definition: Assembly.h:1467
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
dsecondary/dlower (or delement/dlower)
Definition: Assembly.h:2696
MooseArray< Real > _coord
The current coordinate transformation coefficients.
Definition: Assembly.h:2425
const OutputTools< OutputType >::VariablePhiValue & fePhiLower(FEType type) const
Definition: Assembly.h:2910
VariablePhiDivergence _div_phi
Definition: Assembly.h:2752
DenseMatrix< Number > & jacobianBlockNeighbor(Moose::DGJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block of a DG Jacobian type for a pair of variables and a tag. ...
Definition: Assembly.C:3120
void reinitFE(const Elem *elem)
Just an internal helper function to reinit the volume FE objects.
Definition: Assembly.C:762
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
Definition: Assembly.h:2564
const Real & neighborLowerDElemVolume() const
Definition: Assembly.h:3214
void saveDiagLocalArrayJacobian(DenseMatrix< Number > &ke, unsigned int i, unsigned int ntest, unsigned int j, unsigned int nphi, unsigned int ivar, const RealEigenVector &v) const
Helper function for assembling diagonal Jacobian contriubutions on local quadrature points for an arr...
Definition: Assembly.h:1841
VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1609
void jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not Jacobian coupling between ivar and jvar is used to the value used.
Definition: Assembly.h:2240
const MooseArray< Point > & physicalPoints() const
The current points in physical space where we have reinited through reinitAtPhysical() ...
Definition: Assembly.h:270
VectorVariablePhiGradient & gradPhiNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1540
void prepareNonlocal()
Definition: Assembly.C:2726
VariablePhiGradient _grad_phi
Definition: Assembly.h:2705
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2553
const VectorVariablePhiSecond & secondPhi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1381
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
Definition: Assembly.h:2582
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
Definition: Assembly.h:2769
const VectorVariablePhiValue & phiNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1415
VectorVariablePhiValue & phiFace(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1515
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & nonlocalCouplingEntries()
Definition: Assembly.h:1304
void createQRules(QuadratureType type, Order order, Order volume_order, Order face_order, SubdomainID block, bool allow_negative_qweights=true)
Creates block-specific volume, face and arbitrary qrules based on the orders and the flag of whether ...
Definition: Assembly.C:619
VariablePhiSecond _second_phi_neighbor
Definition: Assembly.h:2714
void setXFEM(std::shared_ptr< XFEMInterface > xfem)
Set the pointer to the XFEM controller object.
Definition: Assembly.h:1801
const MooseArray< ADPoint > & adQPoints() const
Definition: Assembly.h:395
void reinitAtPhysical(const Elem *elem, const std::vector< Point > &physical_points)
Reinitialize the assembly data at specific physical point in the given element.
Definition: Assembly.C:1794
void addCachedResidualDirectly(NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
Adds the values that have been cached by calling cacheResidual(), cacheResidualNeighbor(), and/or cacheResidualLower() to a user-defined residual (that is, not necessarily the vector that vector_tag points to)
Definition: Assembly.C:3515
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
Definition: Assembly.h:2627
std::vector< ADReal > _ad_detady_map
Definition: Assembly.h:2841
void jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not lower Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2276
MooseVariableFE< Real > MooseVariable
Definition: Assembly.h:59
const VectorVariablePhiDivergence & divPhi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1389
VectorVariablePhiGradient _vector_grad_phi_neighbor
Definition: Assembly.h:2734
const MooseArray< Point > & qPointsFaceNeighbor() const
Returns the reference to the current quadrature points being used on the neighbor face...
Definition: Assembly.h:539
std::vector< ADReal > _ad_dzetadz_map
Definition: Assembly.h:2845
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
Definition: Assembly.h:2373
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
dlower/dlower
Definition: Assembly.h:2690
VectorVariablePhiValue & phiFaceNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1556
VectorVariablePhiCurl & curlPhi(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1506
bool _user_added_fe_face_neighbor_of_helper_type
Definition: Assembly.h:2364
void setResidualNeighbor(NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
Sets local neighbor residuals of all field variables to the global residual vector for a tag...
Definition: Assembly.C:3542
bool _have_p_refinement
Whether we have ever conducted p-refinement.
Definition: Assembly.h:2902
VariablePhiValue _phi
Definition: Assembly.h:2748
Real _current_neighbor_volume
Volume of the current neighbor.
Definition: Assembly.h:2621
void resize(const unsigned int n)
void jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not nonlocal Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2294
ArbitraryQuadrature * qruleArbitraryFace(const Elem *elem, unsigned int side)
Definition: Assembly.C:1925
std::map< FEType, FEBase * > _current_fe_face
The "face" fe object that matches the current elem.
Definition: Assembly.h:2385
VectorVariablePhiGradient & gradPhi(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1498
const VectorVariablePhiCurl & curlPhi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1385
std::vector< Point > _current_neighbor_ref_points
The current reference points on the neighbor element.
Definition: Assembly.h:2905
void coordTransformFactor(const SubProblem &s, SubdomainID sub_id, const P &point, C &factor, SubdomainID neighbor_sub_id=libMesh::Elem::invalid_subdomain_id)
Computes a conversion multiplier for use when computing integraals for the current coordinate system ...
Definition: Assembly.C:43
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
dlower/dprimary (or dlower/dneighbor)
Definition: Assembly.h:2694
MooseVariableFE< RealVectorValue > VectorMooseVariable
Definition: Assembly.h:61
void setVolumeQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for volume integration.
Definition: Assembly.C:657
const Elem * _current_neighbor_elem
The current neighbor "element".
Definition: Assembly.h:2611
void addJacobianNonlocal(GlobalDataKey)
Adds non-local Jacobian to the global Jacobian matrices.
Definition: Assembly.C:3870
VectorVariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1560
VariablePhiValue & phiFace(const MooseVariableField< Real > &)
Definition: Assembly.h:1469
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
Definition: Assembly.h:2662
const OutputTools< OutputType >::VariablePhiValue & feDualPhiLower(FEType type) const
Definition: Assembly.h:2918
MooseMesh & _mesh
Definition: Assembly.h:2353
const VariablePhiValue & phi() const
Definition: Assembly.h:1320
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
Definition: Assembly.h:2768
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
Definition: Assembly.h:2554
auto raw_value(const Eigen::Map< T > &in)
Definition: EigenADReal.h:100
const VariablePhiGradient & gradPhi() const
Definition: Assembly.h:1327
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
Definition: Assembly.h:2529
void modifyWeightsDueToXFEM(const Elem *elem)
Update the integration weights for XFEM partial elements.
Definition: Assembly.C:4518
DenseMatrix< Number > _tmp_Ke
auxiliary matrix for scaling jacobians (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:2701
libMesh::QBase * writeableQRuleFace(unsigned int dim, SubdomainID block, InternalDataKey)
Returns the pointer to the quadrature used on a face of specified block and dimension.
Definition: Assembly.h:335
const Elem * _current_elem
The current "element" we are currently on.
Definition: Assembly.h:2597
VectorVariablePhiCurl _vector_curl_phi_neighbor
Definition: Assembly.h:2736
VectorVariablePhiCurl & curlPhiNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1548
const VariablePhiSecond & secondPhiNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1355
const FEBase *const & getFEFace(FEType type, unsigned int dim) const
Get a reference to a pointer that will contain the current "face" FE.
Definition: Assembly.h:156
const MooseArray< Moose::GenericType< Point, is_ad > > & genericQPoints() const
const libMesh::QBase *const & qRuleMortar() const
Returns a reference to the quadrature rule for the mortar segments.
Definition: Assembly.h:712
THREAD_ID _tid
Thread number (id)
Definition: Assembly.h:2351
void reinitFEFaceNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition: Assembly.C:1575
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:165
VectorVariablePhiGradient _vector_grad_phi
Definition: Assembly.h:2722
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.
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_helper
Definition: Assembly.h:2371
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
Definition: Assembly.h:2343
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
Definition: Assembly.h:2336
VectorVariablePhiValue _vector_phi_neighbor
Definition: Assembly.h:2733
void prepareNeighbor()
Definition: Assembly.C:2812
void resizeADMappingObjects(unsigned int n_qp, unsigned int dim)
resize any objects that contribute to automatic differentiation-related mapping calculations ...
Definition: Assembly.C:973
OutputTools< Real >::VariablePhiValue VariablePhiValue
Definition: MooseTypes.h:348
char jacobianBlockLowerUsed(TagID tag, unsigned int ivar, unsigned int jvar) const
Return a flag to indicate if a particular coupling lower Jacobian block between ivar and jvar is used...
Definition: Assembly.h:2285
unsigned int m() const
DenseVector< Real > getJacobianDiagonal(const DenseMatrix< Number > &ke)
Definition: Assembly.h:1892
VariablePhiValue & phi(const MooseVariableField< Real > &)
Definition: Assembly.h:1465
void setCoordinateTransformation(const libMesh::QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
Definition: Assembly.C:1733
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
Definition: Assembly.h:2550
const VariablePhiValue & phiFaceNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1360
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Definition: Assembly.h:2819
Real _current_elem_volume
Volume of the current element.
Definition: Assembly.h:2603
OutputTools< RealVectorValue >::VariablePhiGradient VectorVariablePhiGradient
Definition: MooseTypes.h:366
std::map< FEType, FEBase * > _current_fe_face_neighbor
The "neighbor face" fe object that matches the current elem.
Definition: Assembly.h:2389
const MooseArray< ADReal > & adCurvatures() const
Definition: Assembly.C:4798
This class provides an interface for common operations on field variables of both FE and FV types wit...
const MooseArray< Point > & qPoints() const
Returns the reference to the quadrature points.
Definition: Assembly.h:258
std::map< FEType, FEVectorBase * > _current_vector_fe_face
The "face" vector fe object that matches the current elem.
Definition: Assembly.h:2394
std::vector< std::unique_ptr< FEBase > > _unique_fe_helper
Containers for holding unique FE helper types if we are doing p-refinement.
Definition: Assembly.h:2370
const FEType _helper_type
The finite element type of the FE helper classes.
Definition: Assembly.h:2359
const Elem *const & msmElem() const
Definition: Assembly.h:1961
void addResidualLower(GlobalDataKey, const std::vector< VectorTag > &vector_tags)
Add local neighbor residuals of all field variables for a set of tags onto the global residual vector...
Definition: Assembly.C:3361
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
Definition: Assembly.h:1142
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
void addJacobianScalar(GlobalDataKey)
Add Jacobians for pairs of scalar variables into the global Jacobian matrices.
Definition: Assembly.C:4440
const bool & _computing_residual_and_jacobian
Whether we are currently computing the residual and Jacobian.
Definition: Assembly.h:2329
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2688
void saveLocalArrayResidual(DenseVector< Number > &re, unsigned int i, unsigned int ntest, const RealEigenVector &v) const
Helper function for assembling residual contriubutions on local quadrature points for an array kernel...
Definition: Assembly.h:1817
const ADTemplateVariablePhiGradient< T > & adGradPhi(const MooseVariableFE< T > &v) const
Definition: Assembly.h:1322
Base class for a system (of equations)
Definition: SystemBase.h:85
const std::vector< Eigen::Map< RealDIMValue > > & mappedNormals() const
Definition: Assembly.h:362
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
Definition: Assembly.h:2523
const VariablePhiValue & phiNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1347
FEGenericBase< RealGradient > FEVectorBase
VectorVariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1564
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
Definition: Assembly.h:373
static const T *const & constify_ref(T *const &inref)
Workaround for C++ compilers thinking they can&#39;t just cast a const-reference-to-pointer to const-refe...
Definition: Assembly.h:120
std::set< FEType > _need_second_derivative_neighbor
Definition: Assembly.h:2867
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
Definition: Assembly.h:2807
char jacobianBlockUsed(TagID tag, unsigned int ivar, unsigned int jvar) const
Return a flag to indicate if a particular coupling Jacobian block between ivar and jvar is used...
Definition: Assembly.h:2249
VariablePhiValue _phi
Definition: Assembly.h:2704
const OutputTools< OutputType >::VariablePhiSecond & feSecondPhiFaceNeighbor(FEType type) const
Definition: Assembly.h:1726
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
Definition: Assembly.h:2332
void addJacobianNeighborLowerD(GlobalDataKey)
Add all portions of the Jacobian except PrimaryPrimary, e.g.
Definition: Assembly.C:3930
const MooseArray< Real > & mortarCoordTransformation() const
Returns the reference to the coordinate transformation coefficients on the mortar segment mesh...
Definition: Assembly.h:294
std::map< FEType, FEVectorBase * > _current_vector_fe
The "volume" vector fe object that matches the current elem.
Definition: Assembly.h:2392
VariablePhiGradient & gradPhiNeighbor(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1596
VariablePhiGradient _grad_phi
Definition: Assembly.h:2749
std::vector< VectorValue< ADReal > > _ad_dxyzdeta_map
Definition: Assembly.h:2829
VariablePhiSecond & secondPhiNeighbor(const MooseVariableField< Real > &)
Definition: Assembly.h:1478
void prepareScalar()
Definition: Assembly.C:2953
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const dof_id_type & extraElemID(unsigned int id) const
Returns an integer ID of the current element given the index associated with the integer.
Definition: Assembly.h:378
void modifyFaceWeightsDueToXFEM(const Elem *elem, unsigned int side=0)
Update the face integration weights for XFEM partial elements.
Definition: Assembly.C:4538
void reinitElemAndNeighbor(const Elem *elem, unsigned int side, const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > *neighbor_reference_points=nullptr)
Reinitialize an element and its neighbor along a particular side.
Definition: Assembly.C:1996
const VectorVariablePhiSecond & secondPhiNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1425
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiFace(FEType type) const
Definition: Assembly.h:1667
const OutputTools< OutputType >::VariablePhiDivergence & feDivPhiFaceNeighbor(FEType type) const
Definition: Assembly.h:1789
OutputTools< Real >::VariablePhiSecond VariablePhiSecond
Definition: MooseTypes.h:350
std::unique_ptr< libMesh::QBase > face
area/face (meshdim-1) quadrature rule
Definition: Assembly.h:2445
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
Definition: Assembly.h:2667
unsigned int _mesh_dimension
Definition: Assembly.h:2355
std::vector< Eigen::Map< RealDIMValue > > _mapped_normals
Mapped normals.
Definition: Assembly.h:2533
VectorVariablePhiDivergence _vector_div_phi_face
Definition: Assembly.h:2731
VectorVariablePhiCurl & curlPhiFaceNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1568
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
Definition: Assembly.C:4045
const OutputTools< OutputType >::VariablePhiDivergence & feDivPhiNeighbor(FEType type) const
Definition: Assembly.h:1781
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
const NumericVector< Real > * _scaling_vector
The map from global index to variable scaling factor.
Definition: Assembly.h:2875
void processLocalResidual(DenseVector< Number > &res_block, std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
Appling scaling, constraints to the local residual block and populate the full DoF indices for array ...
Definition: Assembly.C:3221
void assignDisplacements(std::vector< std::pair< unsigned int, unsigned short >> &&disp_numbers_and_directions)
Assign the displacement numbers and directions.
Definition: Assembly.h:3221
void addCachedResiduals(GlobalDataKey, const std::vector< VectorTag > &tags)
Pushes all cached residuals to the global residual vectors associated with each tag.
Definition: Assembly.C:3470
Data structure for tracking/grouping a set of quadrature rules for a particular dimensionality of mes...
Definition: Assembly.h:2431
unsigned int _max_cached_jacobians
Definition: Assembly.h:2813
DenseMatrix< Number > & jacobianBlockMortar(Moose::ConstraintJacobianType type, unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Returns the jacobian block for the given mortar Jacobian type.
Definition: Assembly.C:3161
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
Definition: Assembly.h:2684
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
Definition: Assembly.h:2779
Nonlinear system to be solved.
VectorVariablePhiValue _vector_phi_face
Definition: Assembly.h:2727
std::vector< VectorValue< ADReal > > _ad_dxyzdzeta_map
Definition: Assembly.h:2830
const VectorVariablePhiSecond & secondPhiFace(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1402
std::vector< Point > _temp_reference_points
Temporary work data for reinitAtPhysical()
Definition: Assembly.h:2825
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
Definition: Assembly.h:2338
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
Definition: Assembly.h:2686
const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
Definition: Assembly.h:2634
OutputTools< RealVectorValue >::VariablePhiDivergence VectorVariablePhiDivergence
Definition: MooseTypes.h:369
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
Definition: Assembly.h:2615
void cacheResidualNodes(const DenseVector< Number > &res, const std::vector< dof_id_type > &dof_index, LocalDataKey, TagID tag)
Lets an external class cache residual at a set of nodes.
Definition: Assembly.C:3424
void init(const libMesh::CouplingMatrix *cm)
Initialize the Assembly object and set the CouplingMatrix for use throughout.
Definition: Assembly.C:2469
VectorVariablePhiSecond & secondPhiNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1544
void prepareLowerD()
Prepare the Jacobians and residuals for a lower dimensional element.
Definition: Assembly.C:2850
bool _user_added_fe_neighbor_of_helper_type
Definition: Assembly.h:2365
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
Definition: Assembly.C:338
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
Definition: Assembly.h:2775
void reinitLowerDElem(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
Reinitialize FE data for a lower dimenesional element with a given set of reference points...
Definition: Assembly.C:2292
void computeCurrentFaceVolume()
Definition: Assembly.C:1775
const VectorVariablePhiCurl & curlPhiNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1429
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
Definition: Assembly.h:2664
VariablePhiCurl _curl_phi
Definition: Assembly.h:2751
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:37
QRules & qrules(unsigned int dim)
Definition: Assembly.h:2491
VectorVariablePhiGradient _vector_grad_phi_face_neighbor
Definition: Assembly.h:2740
std::unique_ptr< libMesh::QBase > vol
volume/elem (meshdim) quadrature rule
Definition: Assembly.h:2443
void prepareOffDiagScalar()
Definition: Assembly.C:2977
VectorVariablePhiSecond _second_phi
Definition: Assembly.h:2760
const OutputTools< OutputType >::VariablePhiDivergence & feDivPhiFace(FEType type) const
Definition: Assembly.h:1773
bool needDual() const
Indicates whether dual shape functions are used (computation is now repeated on each element so expen...
Definition: Assembly.h:623
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
void addJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Adds element matrices for ivar rows and jvar columns to the global Jacobian matrices.
Definition: Assembly.C:3842
std::vector< ADReal > _ad_dzetadx_map
Definition: Assembly.h:2843
void addJacobianLowerD(GlobalDataKey)
Add portions of the Jacobian of LowerLower, LowerSecondary, and SecondaryLower for boundary condition...
Definition: Assembly.C:4008
char jacobianBlockNonlocalUsed(TagID tag, unsigned int ivar, unsigned int jvar) const
Return a flag to indicate if a particular coupling nonlocal Jacobian block between ivar and jvar is u...
Definition: Assembly.h:2303
VectorVariablePhiGradient _grad_phi
Definition: Assembly.h:2759
MooseArray< ADReal > _ad_curvatures
Definition: Assembly.h:2851
void computeGradPhiAD(const Elem *elem, unsigned int n_qp, ADTemplateVariablePhiGradient< OutputType > &grad_phi, libMesh::FEGenericBase< OutputType > *fe)
compute gradient of phi possibly with derivative information with respect to nonlinear displacement v...
ArbitraryQuadrature * _current_qrule_arbitrary_face
The current arbitrary quadrature rule used on the element face.
Definition: Assembly.h:2417
const MooseArray< ADReal > & adCoordTransformation() const
Returns the reference to the AD version of the coordinate transformation coefficients.
Definition: Assembly.h:300
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiFaceNeighbor(FEType type) const
Definition: Assembly.h:1758
void modifyArbitraryWeights(const std::vector< Real > &weights)
Modify the weights when using the arbitrary quadrature rule.
Definition: Assembly.C:4565
FEBase * _current_fe_face_helper
helper object for transforming coordinates
Definition: Assembly.h:2521
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
Definition: Assembly.h:2334
const std::vector< Real > * _JxW_msm
A JxW for working on mortar segement elements.
Definition: Assembly.h:2580
std::vector< ADReal > _ad_dzetady_map
Definition: Assembly.h:2844
dof_id_type numeric_index_type
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
Definition: Assembly.h:2781
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
Definition: Assembly.h:2460
const MooseArray< Point > & normals() const
Returns the array of normals for quadrature points on a current side.
Definition: Assembly.h:357
MooseVariableFE< RealEigenVector > ArrayMooseVariable
Definition: Assembly.h:62
const VectorVariablePhiGradient & gradPhi(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1377
void prepareResidual()
Sizes and zeroes the residual for the current element.
Definition: Assembly.C:2710
VectorVariablePhiCurl _curl_phi
Definition: Assembly.h:2761
std::map< FEType, FEBase * > _current_fe_neighbor
The "neighbor" fe object that matches the current elem.
Definition: Assembly.h:2387
const ADTemplateVariablePhiGradient< OutputType > & feADGradPhi(FEType type) const
Definition: Assembly.h:1633
Real elementVolume(const Elem *elem) const
On-demand computation of volume element accounting for RZ/RSpherical.
Definition: Assembly.C:3757
VariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< Real > &)
Definition: Assembly.h:1491
void cacheJacobianNeighbor(GlobalDataKey)
Takes the values that are currently in the neighbor Dense Matrices and appends them to the cached val...
Definition: Assembly.C:4097
SubdomainID _current_neighbor_subdomain_id
The current neighbor subdomain ID.
Definition: Assembly.h:2613
VectorVariablePhiValue _vector_phi_face_neighbor
Definition: Assembly.h:2739
VariablePhiSecond & secondPhi(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1580
VariablePhiValue & phiFaceNeighbor(const MooseVariableField< Real > &)
Definition: Assembly.h:1483
const VectorVariablePhiCurl & curlPhiFace(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1406
std::vector< std::vector< DenseVector< Number > > > _sub_Re
Definition: Assembly.h:2661
VectorVariablePhiSecond & secondPhiFace(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1523
OutputTools< RealVectorValue >::VariablePhiSecond VectorVariablePhiSecond
Definition: MooseTypes.h:367
boundary_id_type BoundaryID
void reinitNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Reinitializes the neighbor side using reference coordinates.
Definition: Assembly.C:1689
A NodeFaceConstraint is used when you need to create constraints between two surfaces in a mesh...
const MooseArray< Real > & coordTransformation() const
Returns the reference to the coordinate transformation coefficients.
Definition: Assembly.h:288
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiNeighbor(FEType type) const
Definition: Assembly.h:1750
std::vector< ADReal > _ad_dxidz_map
Definition: Assembly.h:2839
const Real & lowerDElemVolume() const
Definition: Assembly.h:3207
VectorVariablePhiDivergence _vector_div_phi_neighbor
Definition: Assembly.h:2737
QRules & qrules(unsigned int dim, SubdomainID block)
This is a helper function for accessing quadrature rules for a particular dimensionality of element...
Definition: Assembly.h:2496
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
Definition: Assembly.h:2342
void prepare()
Definition: Assembly.C:2719
void cacheJacobianWithoutConstraints(const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &matrix_tags)
Process the derivatives() data of a vector of ADReals.
Definition: Assembly.h:3179
VariablePhiGradient & gradPhiFace(const MooseVariableField< Real > &)
Definition: Assembly.h:1470
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:94
libMesh::QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
Definition: Assembly.h:2593
SubProblem & _subproblem
Definition: Assembly.h:2314
libMesh::QBase * writeableQRule(unsigned int dim, SubdomainID block, InternalDataKey)
Returns the pointer to the quadrature of specified block and dimension.
Definition: Assembly.h:248
const VariablePhiGradient & gradPhi(const MooseVariableField< Real > &) const
Definition: Assembly.h:1328
std::vector< ADReal > _ad_detadx_map
Definition: Assembly.h:2840
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
Definition: Assembly.C:294
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
Definition: Assembly.h:2547
DenseVector< Number > & residualBlockLower(unsigned int var_num, LocalDataKey, TagID tag_id)
Get residual block for lower.
Definition: Assembly.h:1133
void cacheResidual(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Re of all field variables and appends them to the cached ...
Definition: Assembly.C:3392
bool _calculate_xyz
Definition: Assembly.h:2858
void addJacobianBlockNonlocalTags(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, GlobalDataKey, const std::set< TagID > &tags)
Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix...
Definition: Assembly.C:4341
MooseArray< std::vector< Point > > _current_tangents
The current tangent vectors at the quadrature points.
Definition: Assembly.h:2535
bool _calculate_curvatures
Definition: Assembly.h:2860
VariablePhiGradient _grad_phi_face_neighbor
Definition: Assembly.h:2717
const std::vector< VectorTag > & _residual_vector_tags
The residual vector tags that Assembly could possibly contribute to.
Definition: Assembly.h:2796
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
The "neighbor face" vector fe object that matches the current elem.
Definition: Assembly.h:2398
const OutputTools< OutputType >::VariablePhiCurl & feCurlPhiFace(FEType type) const
Definition: Assembly.h:1742
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
Definition: Assembly.h:2540
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
Definition: Assembly.h:2421
std::vector< VectorValue< ADReal > > _ad_dxyzdxi_map
AD quantities.
Definition: Assembly.h:2828
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
Container of displacement numbers and directions.
Definition: Assembly.h:2856
VectorVariablePhiDivergence & divPhi(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1510
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
Definition: Assembly.h:2822
std::set< FEType > _need_neighbor_div
Definition: Assembly.h:2871
OutputTools< Real >::VariablePhiCurl VariablePhiCurl
Definition: MooseTypes.h:351
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
Definition: Assembly.h:2680
std::vector< VectorValue< ADReal > > _ad_d2xyzdxi2_map
Definition: Assembly.h:2831
std::vector< ADReal > _ad_jac
Definition: Assembly.h:2834
std::set< FEType > _need_curl
Definition: Assembly.h:2868
void addJacobianBlockNonlocal(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, GlobalDataKey, TagID tag)
Adds non-local element matrix for ivar rows and jvar columns to the global Jacobian matrix...
Definition: Assembly.C:4283
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
Definition: Assembly.h:2778
VectorVariablePhiValue & phiNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1536
const VariablePhiSecond & secondPhiFace(const MooseVariableField< Real > &) const
Definition: Assembly.h:1342
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
Definition: Assembly.h:2782
VariablePhiGradient _grad_phi_neighbor
Definition: Assembly.h:2713
ArbitraryQuadrature * _current_qface_arbitrary
The current arbitrary quadrature rule used on element faces.
Definition: Assembly.h:2525
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
Definition: Assembly.h:2517
VariablePhiValue _phi_face
Definition: Assembly.h:2708
VectorVariablePhiSecond _vector_second_phi
Definition: Assembly.h:2723
libMesh::QBase * _current_qrule_volume
The current volumetric quadrature for the element.
Definition: Assembly.h:2413
const std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > & couplingEntries() const
Definition: Assembly.h:1299
const OutputTools< OutputType >::VariablePhiGradient & feGradPhi(FEType type) const
Definition: Assembly.h:1626
const Elem * _msm_elem
Definition: Assembly.h:2884
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
Definition: MooseTypes.h:151
libMesh::QBase * qruleFace(const Elem *elem, unsigned int side)
This is an abstraction over the internal qrules function.
Definition: Assembly.C:1919
bool _calculate_ad_coord
Whether to calculate coord with AD.
Definition: Assembly.h:2864
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
Definition: Assembly.h:2770
const Elem * _current_lower_d_elem
The current lower dimensional element.
Definition: Assembly.h:2632
GlobalDataKey(const GlobalDataKey &)
Definition: Assembly.h:854
void addResidual(GlobalDataKey, const std::vector< VectorTag > &vector_tags)
Add local residuals of all field variables for a set of tags onto the global residual vectors associa...
Definition: Assembly.C:3317
const VariablePhiValue & phiFace() const
Definition: Assembly.h:1335
std::set< FEType > _need_second_derivative
Definition: Assembly.h:2866
bool computingResidualAndJacobian() const
Definition: Assembly.h:1956
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
Definition: Assembly.h:2557
const VectorVariablePhiCurl & curlPhiFaceNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1454
std::set< FEType > _need_face_neighbor_div
Definition: Assembly.h:2872
FEGenericBase< Real > FEBase
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
Definition: Assembly.h:2587
void cacheResiduals(const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &vector_tags)
Process the supplied residual values.
Definition: Assembly.h:3059
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiLower(FEType type) const
Definition: Assembly.h:2926
VariablePhiValue _phi_face_neighbor
Definition: Assembly.h:2716
libMesh::ElemSideBuilder _current_neighbor_side_elem_builder
In place side element builder for _current_neighbor_side_elem.
Definition: Assembly.h:2880
OutputTools< Real >::VariablePhiDivergence VariablePhiDivergence
Definition: MooseTypes.h:352
const Moose::CoordinateSystemType & coordSystem() const
Get the coordinate system type.
Definition: Assembly.h:316
Real _current_lower_d_elem_volume
The current lower dimensional element volume.
Definition: Assembly.h:2638
const OutputTools< OutputType >::VariablePhiValue & fePhiNeighbor(FEType type) const
Definition: Assembly.h:1688
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
Definition: Assembly.h:2411
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension&#39;s actual fe objects indexed on type.
Definition: Assembly.h:2403
const VariablePhiSecond & secondPhi(const MooseVariableField< Real > &) const
Definition: Assembly.h:1330
VariablePhiValue _phi_neighbor
Definition: Assembly.h:2712
const Node *const & nodeNeighbor() const
Returns the reference to the neighboring node.
Definition: Assembly.h:551
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
Definition: Assembly.h:276
void reinitMortarElem(const Elem *elem)
reinitialize a mortar segment mesh element in order to get a proper JxW
Definition: Assembly.C:2406
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiFaceNeighbor(FEType type) const
Definition: Assembly.h:1718
Real _current_side_volume
Volume of the current side element.
Definition: Assembly.h:2609
void cacheJacobianBlockNonzero(const DenseMatrix< Number > &jac_block, const MooseVariableBase &ivar, const MooseVariableBase &jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, TagID tag)
Push non-zeros of a local Jacobian block with proper scaling into cache for a certain tag...
Definition: Assembly.C:3665
std::set< FEType > _need_div
Definition: Assembly.h:2869
VectorVariablePhiCurl _vector_curl_phi
Definition: Assembly.h:2724
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
Definition: Assembly.h:2799
const bool _displaced
Definition: Assembly.h:2316
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
Definition: Assembly.C:455
VectorVariablePhiCurl _vector_curl_phi_face_neighbor
Definition: Assembly.h:2742
void addJacobianNeighborTags(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, GlobalDataKey, const std::set< TagID > &tags)
Adds three neighboring element matrices for ivar rows and jvar columns to the global Jacobian matrix...
Definition: Assembly.C:4425
void reinitFVFace(const FaceInfo &fi)
Definition: Assembly.C:1859
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
Definition: Assembly.h:2559
const MooseArray< Real > & JxWFace() const
Returns the reference to the transformed jacobian weights on a current face.
Definition: Assembly.h:351
const MooseArray< Real > & JxWNeighbor() const
Returns the reference to the transformed jacobian weights on a current face.
Definition: Assembly.C:261
const Node * _current_node
The current node we are working with.
Definition: Assembly.h:2623
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
Definition: Assembly.h:2377
bool _calculate_face_xyz
Definition: Assembly.h:2859
This is the XFEMInterface class.
Definition: XFEMInterface.h:37
DGJacobianType
Definition: MooseTypes.h:798
OutputTools< Real >::VariablePhiGradient VariablePhiGradient
Definition: MooseTypes.h:349
std::vector< ADReal > _ad_dxidx_map
Definition: Assembly.h:2837
std::vector< ADReal > _ad_dxidy_map
Definition: Assembly.h:2838
std::vector< VectorValue< ADReal > > _ad_d2xyzdxideta_map
Definition: Assembly.h:2832
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
Definition: Assembly.h:2777
void addJacobian(GlobalDataKey)
Adds all local Jacobian to the global Jacobian matrices.
Definition: Assembly.C:3857
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
Definition: Assembly.h:2531
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
Definition: Assembly.C:486
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19
void havePRefinement(const std::unordered_set< FEFamily > &disable_p_refinement_for_families)
Indicate that we have p-refinement.
Definition: Assembly.C:4844
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
Definition: Assembly.h:424
const std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > & scalarFieldCouplingEntries() const
Definition: Assembly.h:1314
const MooseArray< ADReal > & adJxWFace() const
Definition: Assembly.h:280
MooseArray< VectorValue< ADReal > > _ad_q_points
Definition: Assembly.h:2836
const VariablePhiGradient & gradPhiNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1351
VectorVariablePhiGradient _vector_grad_phi_face
Definition: Assembly.h:2728
MooseArray< VectorValue< ADReal > > _ad_q_points_face
Definition: Assembly.h:2849
VariablePhiValue & phiNeighbor(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1592
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const libMesh::CouplingMatrix * _cm
Coupling matrices.
Definition: Assembly.h:2319
const VectorVariablePhiDivergence & divPhiFace(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1410
const libMesh::QBase * attachQRuleElem(unsigned int dim, FEBase &fe)
Attaches the current elem/volume quadrature rule to the given fe.
Definition: Assembly.h:1908
void hasScalingVector()
signals this object that a vector containing variable scaling factors should be used when doing resid...
Definition: Assembly.C:4559
void addJacobianBlock(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, TagID tag)
Adds element matrix for ivar rows and jvar columns to the global Jacobian matrix. ...
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
const VectorVariablePhiDivergence & divPhiFaceNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1459
VariablePhiGradient & gradPhi(const MooseVariableField< Real > &)
Definition: Assembly.h:1466
OutputTools< RealVectorValue >::VariablePhiValue VectorVariablePhiValue
Definition: MooseTypes.h:365
const OutputTools< OutputType >::VariablePhiDivergence & feDivPhi(FEType type) const
Definition: Assembly.h:1766
std::unique_ptr< libMesh::QBase > fv_face
finite volume face/flux quadrature rule (meshdim-1)
Definition: Assembly.h:2447
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
Definition: Assembly.h:2771
void zeroCachedJacobian(GlobalDataKey)
Zero out previously-cached Jacobian rows.
Definition: Assembly.C:4497
CoordinateSystemType
Definition: MooseTypes.h:858
const VectorVariablePhiGradient & gradPhiNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1420
void reinitNeighborFaceRef(const Elem *neighbor_elem, unsigned int neighbor_side, Real tolerance, const std::vector< Point > *const pts, const std::vector< Real > *const weights=nullptr)
Reinitialize FE data for the given neighbor_element on the given side with a given set of reference p...
Definition: Assembly.C:2196
void constrain_element_vector(DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const
void setNeighborQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
Definition: Assembly.C:711
bool computingResidual() const
Definition: Assembly.h:1946
void activateDual()
Indicates that dual shape functions are used for mortar constraint.
Definition: Assembly.h:617
void prepareVariableNonlocal(MooseVariableFieldBase *var)
Definition: Assembly.C:2782
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
Definition: Assembly.h:2767
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
Definition: Assembly.h:2774
const VariablePhiGradient & gradPhiFace(const MooseVariableField< Real > &) const
Definition: Assembly.h:1338
void addResidualScalar(GlobalDataKey, const std::vector< VectorTag > &vector_tags)
Add residuals of all scalar variables for a set of tags onto the global residual vectors associated w...
Definition: Assembly.C:3384
MooseArray< Real > _coord_msm
The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment m...
Definition: Assembly.h:2575
DenseVector< Number > & residualBlockNeighbor(unsigned int var_num, LocalDataKey, TagID tag_id)
Get local neighbor residual block for a variable and a tag.
Definition: Assembly.h:1124
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
Definition: Assembly.h:2681
VariablePhiValue & phiFaceNeighbor(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1605
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
Definition: Assembly.h:2636
LocalDataKey(const LocalDataKey &)
Definition: Assembly.h:868
bool _user_added_fe_face_of_helper_type
Definition: Assembly.h:2363
const MooseArray< Point > & qPointsFace() const
Returns the reference to the current quadrature being used.
Definition: Assembly.h:345
DenseVector< Number > & residualBlock(unsigned int var_num, LocalDataKey, TagID tag_id)
Get local residual block for a variable and a tag.
Definition: Assembly.h:1115
VectorVariablePhiValue & phi(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1497
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
Definition: Assembly.C:516
std::unique_ptr< ArbitraryQuadrature > arbitrary_vol
volume/elem (meshdim) custom points quadrature rule
Definition: Assembly.h:2449
void reinitFENeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Definition: Assembly.C:1634
const VectorVariablePhiValue & phiFace(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1394
void initNonlocalCoupling()
Create pair of variables requiring nonlocal jacobian contributions.
Definition: Assembly.C:2651
ConstraintJacobianType
Definition: MooseTypes.h:845
const VectorVariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1444
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2519
const Elem *const & sideElem() const
Returns the side element.
Definition: Assembly.h:458
const bool & _computing_jacobian
Whether we are currently computing the Jacobian.
Definition: Assembly.h:2326
void computeCurrentNeighborVolume()
VariablePhiSecond & secondPhiFace(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1587
const Elem *const & neighbor() const
Return the neighbor element.
Definition: Assembly.h:470
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
Definition: Assembly.h:2549
char jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar) const
Return a flag to indicate if a particular coupling neighbor Jacobian block between ivar and jvar is u...
Definition: Assembly.h:2267
void resize(const unsigned int new_m, const unsigned int new_n)
const OutputTools< OutputType >::VariablePhiValue & fePhiFaceNeighbor(FEType type) const
Definition: Assembly.h:1710
VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< Real > &)
Definition: Assembly.h:1487
void cacheJacobianNonlocal(GlobalDataKey)
Takes the values that are currently in _sub_Keg and appends them to the cached values.
Definition: Assembly.C:4075
Class for scalar variables (they are different).
IntRange< T > make_range(T beg, T end)
const VariablePhiValue & phiFace(const MooseVariableField< Real > &) const
Definition: Assembly.h:1336
VariablePhiValue & phiNeighbor(const MooseVariableField< Real > &)
Definition: Assembly.h:1473
VectorVariablePhiDivergence & divPhiNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1552
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
Definition: Assembly.h:2372
void computeSinglePointMapAD(const Elem *elem, const std::vector< Real > &qw, unsigned p, FEBase *fe)
compute the finite element reference-physical mapping quantities (such as JxW) with possible dependen...
Definition: Assembly.C:1003
void helpersRequestData()
request phi, dphi, xyz, JxW, etc.
Definition: Assembly.C:4811
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
Definition: Assembly.h:2340
void addJacobianOffDiagScalar(unsigned int ivar, GlobalDataKey)
Add Jacobians for a scalar variables with all other field variables into the global Jacobian matrices...
Definition: Assembly.C:4447
void cacheResidualBlock(std::vector< Real > &cached_residual_values, std::vector< dof_id_type > &cached_residual_rows, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
Push a local residual block with proper scaling into cache.
Definition: Assembly.C:3266
std::vector< dof_id_type > _row_indices
Working vectors to avoid repeated heap allocations when caching residuals/Jacobians that must have li...
Definition: Assembly.h:2899
VectorVariablePhiSecond _vector_second_phi_face_neighbor
Definition: Assembly.h:2741
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
Definition: Assembly.C:360
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
Definition: Assembly.h:2605
const libMesh::QBase *const & qRule() const
Returns the reference to the current quadrature being used.
Definition: Assembly.h:235
const VectorVariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1449
void setCachedJacobian(GlobalDataKey)
Sets previously-cached Jacobian values via SparseMatrix::set() calls.
Definition: Assembly.C:4477
VariablePhiSecond _second_phi
Definition: Assembly.h:2750
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension&#39;s helper objects.
Definition: Assembly.h:2407
const libMesh::CouplingMatrix & _nonlocal_cm
Definition: Assembly.h:2320
const OutputTools< OutputType >::VariablePhiSecond & feSecondPhiNeighbor(FEType type) const
Definition: Assembly.h:1702
const FEVectorBase *const & getVectorFEFaceNeighbor(FEType type, unsigned int dim) const
GetVector a reference to a pointer that will contain the current "neighbor" FE.
Definition: Assembly.h:216
BoundaryID _current_boundary_id
The current boundary ID.
Definition: Assembly.h:2601
const OutputTools< OutputType >::VariablePhiGradient & feGradDualPhiLower(FEType type) const
Definition: Assembly.h:2934
const OutputTools< OutputType >::VariablePhiSecond & feSecondPhiFace(FEType type) const
Definition: Assembly.h:1680
void prepareVariable(MooseVariableFieldBase *var)
Used for preparing the dense residual and jacobian blocks for one particular variable.
Definition: Assembly.C:2752
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
Definition: Assembly.h:2617
DenseMatrix< Number > _element_matrix
A working matrix to avoid repeated heap allocations when caching Jacobians that must have libMesh-lev...
Definition: Assembly.h:2894
void reinitElemFaceRef(const Elem *elem, unsigned int elem_side, Real tolerance, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
Reinitialize FE data for the given element on the given side, optionally with a given set of referenc...
Definition: Assembly.C:2021
void copyFaceShapes(MooseVariableField< T > &v)
Definition: Assembly.C:3040
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Definition: Assembly.h:2538
const libMesh::QBase *const & qRuleNeighbor() const
Returns the reference to the current quadrature being used on a current neighbor. ...
Definition: Assembly.h:518
void clearCachedQRules()
Set the cached quadrature rules to nullptr.
Definition: Assembly.C:728
void addJacobianBlockTags(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, const std::set< TagID > &tags)
Add element matrix for ivar rows and jvar columns to the global Jacobian matrix for given tags...
Definition: Assembly.C:4215
void addResidualNeighbor(GlobalDataKey, const std::vector< VectorTag > &vector_tags)
Add local neighbor residuals of all field variables for a set of tags onto the global residual vector...
Definition: Assembly.C:3339
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
Definition: Assembly.h:2629
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
Definition: Assembly.h:2785
std::vector< dof_id_type > _column_indices
Definition: Assembly.h:2899
void jacobianBlockNeighborUsed(TagID tag, unsigned int ivar, unsigned int jvar, bool used)
Sets whether or not neighbor Jacobian coupling between ivar and jvar is used to the value used...
Definition: Assembly.h:2258
std::unique_ptr< ArbitraryQuadrature > arbitrary_face
area/face (meshdim-1) custom points quadrature rule
Definition: Assembly.h:2451
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:147
const VariablePhiValue & phi(const MooseVariableField< Real > &) const
Definition: Assembly.h:1326
const std::vector< Point > & qPointsMortar() const
Returns the reference to the mortar segment element quadrature points.
Definition: Assembly.h:264
const SubdomainID & currentSubdomainID() const
Return the current subdomain ID.
Definition: Assembly.h:419
const Real & elemVolume() const
Returns the reference to the current element volume.
Definition: Assembly.h:440
void prepareBlock(unsigned int ivar, unsigned jvar, const std::vector< dof_id_type > &dof_indices)
Definition: Assembly.C:2902
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
Definition: Assembly.h:2548
void addJacobianNeighbor(GlobalDataKey)
Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objec...
Definition: Assembly.C:3892
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_lower_used
Flag that indicates if the jacobian block for the lower dimensional element was used.
Definition: Assembly.h:2347
VectorVariablePhiDivergence _div_phi
Definition: Assembly.h:2762
VectorVariablePhiDivergence & divPhiFace(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1531
OutputTools< RealVectorValue >::VariablePhiCurl VectorVariablePhiCurl
Definition: MooseTypes.h:368
void addResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
Add a local residual block to a global residual vector with proper scaling.
Definition: Assembly.C:3251
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh...
Definition: Assembly.h:2589
const unsigned int & side() const
Returns the current side.
Definition: Assembly.h:446
const FEBase *const & getFE(FEType type, unsigned int dim) const
Get a reference to a pointer that will contain the current volume FE.
Definition: Assembly.h:132
void computeCurrentElemVolume()
Definition: Assembly.C:1756
bool computingJacobian() const
Definition: Assembly.h:1951
Real _current_neighbor_lower_d_elem_volume
The current neighboring lower dimensional element volume.
Definition: Assembly.h:2642
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
Definition: Assembly.h:2640
MooseArray< Point > _current_q_points
The current list of quadrature points.
Definition: Assembly.h:2419
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
Definition: Assembly.h:2362
void setResidualBlock(NumericVector< Number > &residual, DenseVector< Number > &res_block, const std::vector< dof_id_type > &dof_indices, const std::vector< Real > &scaling_factor)
Set a local residual block to a global residual vector with proper scaling.
Definition: Assembly.C:3289
void setLowerQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for lower dimensional integration.
Definition: Assembly.C:692
Moose::CoordinateSystemType _coord_type
The coordinate system.
Definition: Assembly.h:2423
void cacheJacobianMortar(GlobalDataKey)
Cache all portions of the Jacobian, e.g.
Definition: Assembly.C:4135
std::unique_ptr< ArbitraryQuadrature > neighbor
area/face (meshdim-1) custom points quadrature rule for DG
Definition: Assembly.h:2453
unsigned int n() const
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
Definition: Assembly.C:546
void buildVectorDualLowerDFE(FEType type) const
Definition: Assembly.C:430
void bumpVolumeQRuleOrder(Order volume_order, SubdomainID block)
Increases the element/volume quadrature order for the specified mesh block if and only if the current...
Definition: Assembly.C:577
const SubdomainID & currentNeighborSubdomainID() const
Return the current subdomain ID.
Definition: Assembly.h:497
VectorVariablePhiSecond _vector_second_phi_neighbor
Definition: Assembly.h:2735
void saveFullLocalArrayJacobian(DenseMatrix< Number > &ke, unsigned int i, unsigned int ntest, unsigned int j, unsigned int nphi, unsigned int ivar, unsigned int jvar, const RealEigenMatrix &v) const
Helper function for assembling full Jacobian contriubutions on local quadrature points for an array k...
Definition: Assembly.h:1866
Storage for all of the information pretaining to a vector tag.
Definition: VectorTag.h:17
VectorVariablePhiDivergence & divPhiFaceNeighbor(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1572
const Node *const & node() const
Returns the reference to the node.
Definition: Assembly.h:545
VariablePhiSecond _second_phi
Definition: Assembly.h:2706
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:2345
const OutputTools< OutputType >::VariablePhiGradient & feGradPhiNeighbor(FEType type) const
Definition: Assembly.h:1695
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
Definition: Assembly.h:2561
static constexpr subdomain_id_type invalid_subdomain_id
const libMesh::DofMap & _dof_map
DOF map.
Definition: Assembly.h:2349
VectorVariablePhiDivergence _vector_div_phi
Definition: Assembly.h:2725
void setCurrentNeighborSubdomainID(SubdomainID i)
set the current subdomain ID
Definition: Assembly.h:502
void computeADFace(const Elem &elem, const unsigned int side)
compute AD things on an element face
Definition: Assembly.C:2113
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
Definition: Assembly.h:2776
void setResidual(NumericVector< Number > &residual, GlobalDataKey, const VectorTag &vector_tag)
Sets local residuals of all field variables to the global residual vector for a tag.
Definition: Assembly.C:3533
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
Definition: Assembly.h:2811
void addCachedJacobian(GlobalDataKey)
Adds the values that have been cached by calling cacheJacobian() and or cacheJacobianNeighbor() to th...
Definition: Assembly.C:3800
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
Definition: Assembly.h:2527
void prepareBlockNonlocal(unsigned int ivar, unsigned jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices)
Definition: Assembly.C:2927
void bumpAllQRuleOrder(Order order, SubdomainID block)
Increases the element/volume and face/area quadrature orders for the specified mesh block if and only...
Definition: Assembly.C:600
const Elem *const & lowerDElem() const
Return the lower dimensional element.
Definition: Assembly.h:476
const VariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< Real > &) const
Definition: Assembly.h:1368
const libMesh::QBase * attachQRuleFace(unsigned int dim, FEBase &fe)
Attaches the current face/area quadrature rule to the given fe.
Definition: Assembly.h:1920
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
Definition: Assembly.h:2607
const MooseArray< std::vector< Point > > & tangents() const
Returns the array of tangents for quadrature points on a current side.
Definition: Assembly.h:368
bool _block_diagonal_matrix
Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take s...
Definition: Assembly.h:2816
const Elem *const & neighborLowerDElem() const
Return the neighboring lower dimensional element.
Definition: Assembly.h:482
const OutputTools< OutputType >::VariablePhiSecond & feSecondPhi(FEType type) const
Definition: Assembly.h:1639
FEBase * _current_fe_helper
The current helper object for transforming coordinates.
Definition: Assembly.h:2409
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
Definition: Assembly.h:2568
const VectorVariablePhiValue & phiFaceNeighbor(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1439
void copyNeighborShapes(MooseVariableField< T > &v)
Definition: Assembly.C:3077
void cacheJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Caches element matrix for ivar rows and jvar columns.
Definition: Assembly.C:4059
VectorVariablePhiSecond _vector_second_phi_face
Definition: Assembly.h:2729
const MooseArray< ADPoint > & adNormals() const
Definition: Assembly.h:393
VariablePhiGradient _grad_phi_face
Definition: Assembly.h:2709
MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
Definition: Assembly.h:2566
virtual void attach_quadrature_rule(QBase *q)=0
libMesh::ElemSideBuilder _current_side_elem_builder
In place side element builder for _current_side_elem.
Definition: Assembly.h:2878
const VectorVariablePhiGradient & gradPhiFace(const MooseVariableField< RealVectorValue > &) const
Definition: Assembly.h:1398
VectorVariablePhiCurl _vector_curl_phi_face
Definition: Assembly.h:2730
bool _need_dual
Whether dual shape functions need to be computed for mortar constraints.
Definition: Assembly.h:2644
auto index_range(const T &sizable)
const std::vector< Real > & jxWMortar() const
Returns a reference to JxW for mortar segment elements.
Definition: Assembly.h:707
const FEVectorBase *const & getVectorFENeighbor(FEType type, unsigned int dim) const
GetVector a reference to a pointer that will contain the current &#39;neighbor&#39; FE.
Definition: Assembly.h:192
Key structure for APIs adding/caching local element residuals/Jacobians.
Definition: Assembly.h:862
const dof_id_type & extraElemIDNeighbor(unsigned int id) const
Returns an integer ID of the current element given the index associated with the integer.
Definition: Assembly.h:387
DenseVector< Number > _element_vector
A working vector to avoid repeated heap allocations when caching residuals that must have libMesh-lev...
Definition: Assembly.h:2889
std::set< FEType > _need_face_div
Definition: Assembly.h:2870
const Real & sideElemVolume() const
Returns the reference to the volume of current side element.
Definition: Assembly.h:464
SubdomainID _current_subdomain_id
The current subdomain ID.
Definition: Assembly.h:2599
VectorVariablePhiCurl & curlPhiFace(const MooseVariableField< RealVectorValue > &)
Definition: Assembly.h:1527
VariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1613
const FEBase *const & getFEFaceNeighbor(FEType type, unsigned int dim) const
Get a reference to a pointer that will contain the current "neighbor" FE.
Definition: Assembly.h:168
std::map< unsigned int, const std::vector< Point > * > _holder_normals
Holds pointers to the dimension&#39;s normal vectors.
Definition: Assembly.h:2542
Base variable class.
void cacheJacobianBlock(const DenseMatrix< Number > &jac_block, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &tags)
Cache a local Jacobian block with the provided rows (idof_indices) and columns (jdof_indices) for eve...
std::map< FEType, FEVectorBase * > _current_vector_fe_neighbor
The "neighbor" vector fe object that matches the current elem.
Definition: Assembly.h:2396
void clearCachedResiduals(GlobalDataKey)
Clears all of the residuals in _cached_residual_rows and _cached_residual_values. ...
Definition: Assembly.C:3485
unsigned int THREAD_ID
Definition: MooseTypes.h:237
const Node * _current_neighbor_node
The current neighboring node we are working with.
Definition: Assembly.h:2625
std::vector< VectorValue< ADReal > > _ad_d2xyzdeta2_map
Definition: Assembly.h:2833
void cacheResidualsWithoutConstraints(const Residuals &residuals, const Indices &row_indices, Real scaling_factor, LocalDataKey, const std::set< TagID > &vector_tags)
Process the supplied residual values.
Definition: Assembly.h:3099
void clearCachedJacobian()
Clear any currently cached jacobians.
Definition: Assembly.C:4507
uint8_t dof_id_type
const BoundaryID & currentBoundaryID() const
Return the current boundary ID.
Definition: Assembly.h:429
VectorVariablePhiDivergence _vector_div_phi_face_neighbor
Definition: Assembly.h:2743
libMesh::QBase *const & writeableQRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:328
const VariablePhiGradient & gradPhiFace() const
Definition: Assembly.h:1337
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
dprimary/dlower (or dneighbor/dlower)
Definition: Assembly.h:2698
const OutputTools< OutputType >::VariablePhiValue & fePhiFace(FEType type) const
Definition: Assembly.h:1660
VariablePhiValue & phi(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1578
VariablePhiGradient & gradPhiNeighbor(const MooseVariableField< Real > &)
Definition: Assembly.h:1474
VariablePhiGradient & gradPhi(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1579
void reinitFEFace(const Elem *elem, unsigned int side)
Just an internal helper function to reinit the face FE objects.
Definition: Assembly.C:1270
MooseArray< ADReal > _ad_JxW
Definition: Assembly.h:2835
MooseArray< ADReal > _ad_JxW_face
Definition: Assembly.h:2847
void computeFaceMap(const Elem &elem, const unsigned int side, const std::vector< Real > &qw)
Definition: Assembly.C:1350
VariablePhiValue & phiFace(const MooseVariableField< RealEigenVector > &)
Definition: Assembly.h:1582
void reinitDual(const Elem *elem, const std::vector< Point > &pts, const std::vector< Real > &JxW)
Reintialize dual basis coefficients based on a customized quadrature rule.
Definition: Assembly.C:2274
void constrain_element_matrix(DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const
Key structure for APIs manipulating global vectors/matrices.
Definition: Assembly.h:844