25 #include "libmesh/coupling_matrix.h" 26 #include "libmesh/dof_map.h" 27 #include "libmesh/elem.h" 28 #include "libmesh/equation_systems.h" 29 #include "libmesh/fe_interface.h" 30 #include "libmesh/node.h" 31 #include "libmesh/quadrature_gauss.h" 32 #include "libmesh/sparse_matrix.h" 33 #include "libmesh/tensor_value.h" 34 #include "libmesh/vector_value.h" 35 #include "libmesh/fe.h" 41 template <
typename P,
typename C>
52 template <
typename P,
typename C>
61 ?
mesh.getCoordSystem(sub_id) ==
mesh.getCoordSystem(neighbor_sub_id)
63 "Coordinate systems must be the same between element and neighbor");
64 const auto coord_type =
mesh.getCoordSystem(sub_id);
68 if (
mesh.usingGeneralAxisymmetricCoordAxes())
70 const auto & axis =
mesh.getGeneralAxisymmetricCoordAxis(sub_id);
75 point, factor, coord_type,
mesh.getAxisymmetricRadialCoord());
83 _subproblem(_sys.subproblem()),
85 _nonlocal_cm(_subproblem.nonlocalCouplingMatrix(_sys.number())),
86 _computing_residual(_subproblem.currentlyComputingResidual()),
87 _computing_jacobian(_subproblem.currentlyComputingJacobian()),
88 _computing_residual_and_jacobian(_subproblem.currentlyComputingResidualAndJacobian()),
89 _dof_map(_sys.dofMap()),
92 _mesh_dimension(_mesh.dimension()),
94 _user_added_fe_of_helper_type(false),
95 _user_added_fe_face_of_helper_type(false),
96 _user_added_fe_face_neighbor_of_helper_type(false),
97 _user_added_fe_neighbor_of_helper_type(false),
98 _user_added_fe_lower_of_helper_type(false),
99 _building_helpers(false),
100 _current_qrule(nullptr),
101 _current_qrule_volume(nullptr),
102 _current_qrule_arbitrary(nullptr),
104 _current_qrule_face(nullptr),
105 _current_qface_arbitrary(nullptr),
106 _current_qrule_neighbor(nullptr),
107 _need_JxW_neighbor(false),
109 _custom_mortar_qrule(false),
110 _current_qrule_lower(nullptr),
112 _current_elem(nullptr),
113 _current_elem_volume(0),
115 _current_side_elem(nullptr),
116 _current_side_volume(0),
117 _current_neighbor_elem(nullptr),
118 _current_neighbor_side(0),
119 _current_neighbor_side_elem(nullptr),
120 _need_neighbor_elem_volume(false),
121 _current_neighbor_volume(0),
122 _current_node(nullptr),
123 _current_neighbor_node(nullptr),
124 _current_elem_volume_computed(false),
125 _current_side_volume_computed(false),
127 _current_lower_d_elem(nullptr),
128 _current_neighbor_lower_d_elem(nullptr),
129 _need_lower_d_elem_volume(false),
130 _need_neighbor_lower_d_elem_volume(false),
134 _cached_residual_values(2),
135 _cached_residual_rows(2),
136 _max_cached_residuals(0),
137 _max_cached_jacobians(0),
139 _block_diagonal_matrix(false),
140 _calculate_xyz(false),
141 _calculate_face_xyz(false),
142 _calculate_curvatures(false),
143 _calculate_ad_coord(false),
144 _have_p_refinement(false)
178 _fe_msm->add_p_level_in_reinit(
false);
191 for (
auto & it :
_fe[
dim])
282 _fe[
dim][type]->get_phi();
283 _fe[
dim][type]->get_dphi();
287 _fe[
dim][type]->get_xyz();
289 _fe[
dim][type]->get_d2phi();
415 if (ending_dim <
dim)
417 for (;
dim <= ending_dim;
dim++)
440 if (ending_dim <
dim)
442 for (;
dim <= ending_dim;
dim++)
461 unsigned int min_dim;
492 unsigned int min_dim;
522 unsigned int min_dim;
552 unsigned int min_dim;
580 mooseAssert(qdefault.size() > 0,
"default quadrature must be initialized before order bumps");
584 if (qvec.size() != ndims || !qvec[0].vol)
586 qdefault[0].arbitrary_vol->get_order(),
588 qdefault[0].face->get_order(),
590 else if (qvec[0].vol->get_order() < volume_order)
592 qvec[0].arbitrary_vol->get_order(),
594 qvec[0].face->get_order(),
603 mooseAssert(qdefault.size() > 0,
"default quadrature must be initialized before order bumps");
607 if (qvec.size() != ndims || !qvec[0].vol)
608 createQRules(qdefault[0].vol->type(), order, order, order, block);
609 else if (qvec[0].vol->get_order() < order || qvec[0].face->get_order() < order)
611 std::max(order, qvec[0].arbitrary_vol->get_order()),
612 std::max(order, qvec[0].vol->get_order()),
613 std::max(order, qvec[0].face->get_order()),
624 bool allow_negative_qweights)
628 if (qvec.size() != ndims)
631 for (
unsigned int i = 0; i < qvec.size(); i++)
634 auto & q = qvec[
dim];
635 q.vol = QBase::build(type,
dim, volume_order);
636 q.vol->allow_rules_with_negative_weights = allow_negative_qweights;
637 q.face = QBase::build(type,
dim - 1, face_order);
638 q.face->allow_rules_with_negative_weights = allow_negative_qweights;
640 q.fv_face->allow_rules_with_negative_weights = allow_negative_qweights;
641 q.neighbor = std::make_unique<ArbitraryQuadrature>(
dim - 1, face_order);
642 q.neighbor->allow_rules_with_negative_weights = allow_negative_qweights;
643 q.arbitrary_vol = std::make_unique<ArbitraryQuadrature>(
dim, order);
644 q.arbitrary_vol->allow_rules_with_negative_weights = allow_negative_qweights;
645 q.arbitrary_face = std::make_unique<ArbitraryQuadrature>(
dim - 1, face_order);
646 q.arbitrary_face->allow_rules_with_negative_weights = allow_negative_qweights;
663 for (
auto & it :
_fe[
dim])
664 it.second->attach_quadrature_rule(qrule);
666 it.second->attach_quadrature_rule(qrule);
681 it.second->attach_quadrature_rule(qrule);
683 it.second->attach_quadrature_rule(qrule);
700 it.second->attach_quadrature_rule(qrule);
702 it.second->attach_quadrature_rule(qrule);
716 it.second->attach_quadrature_rule(qrule);
718 it.second->attach_quadrature_rule(qrule);
722 "We should not be indexing out of bounds");
755 " does not match previously specified quadrature_order: ",
757 ". Quadrature_order (when specified) must match for all mortar constraints.");
766 for (
const auto & it :
_fe[
dim])
769 const FEType & fe_type = it.first;
777 fesd.
_phi.shallowCopy(
const_cast<std::vector<std::vector<Real>
> &>(fe.
get_phi()));
779 const_cast<std::vector<std::vector<VectorValue<Real>
>> &>(fe.
get_dphi()));
787 const FEType & fe_type = it.first;
795 fesd.
_phi.shallowCopy(
const_cast<std::vector<std::vector<VectorValue<Real>
>> &>(fe.
get_phi()));
797 const_cast<std::vector<std::vector<TensorValue<Real>
>> &>(fe.
get_dphi()));
826 for (
unsigned int qp = 0; qp != n_qp; qp++)
831 for (
unsigned qp = 0; qp < n_qp; ++qp)
834 for (
unsigned qp = 0; qp < n_qp; ++qp)
838 for (
const auto & it :
_fe[
dim])
841 auto fe_type = it.first;
842 auto num_shapes = FEInterface::n_shape_functions(fe_type,
elem);
845 grad_phi.resize(num_shapes);
846 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
847 grad_phi[i].resize(n_qp);
853 const auto & regular_grad_phi =
_fe_shape_data[fe_type]->_grad_phi;
854 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
855 for (
unsigned qp = 0; qp < n_qp; ++qp)
856 grad_phi[i][qp] = regular_grad_phi[i][qp];
862 auto fe_type = it.first;
863 auto num_shapes = FEInterface::n_shape_functions(fe_type,
elem);
866 grad_phi.resize(num_shapes);
867 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
868 grad_phi[i].resize(n_qp);
875 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
876 for (
unsigned qp = 0; qp < n_qp; ++qp)
877 grad_phi[i][qp] = regular_grad_phi[i][qp];
887 if (
_xfem !=
nullptr)
891 template <
typename OutputType>
913 auto num_shapes = grad_phi.size();
919 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
920 for (
unsigned qp = 0; qp < n_qp; ++qp)
927 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
928 for (
unsigned qp = 0; qp < n_qp; ++qp)
930 grad_phi[i][qp].slice(0) = dphidxi[i][qp] *
_ad_dxidx_map[qp];
931 grad_phi[i][qp].slice(1) = dphidxi[i][qp] *
_ad_dxidy_map[qp];
932 grad_phi[i][qp].slice(2) = dphidxi[i][qp] *
_ad_dxidz_map[qp];
939 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
940 for (
unsigned qp = 0; qp < n_qp; ++qp)
942 grad_phi[i][qp].slice(0) =
944 grad_phi[i][qp].slice(1) =
946 grad_phi[i][qp].slice(2) =
954 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
955 for (
unsigned qp = 0; qp < n_qp; ++qp)
957 grad_phi[i][qp].slice(0) = dphidxi[i][qp] *
_ad_dxidx_map[qp] +
960 grad_phi[i][qp].slice(1) = dphidxi[i][qp] *
_ad_dxidy_map[qp] +
963 grad_phi[i][qp].slice(2) = dphidxi[i][qp] *
_ad_dxidz_map[qp] +
1004 const std::vector<Real> & qw,
1047 auto num_shapes = FEInterface::n_shape_functions(fe->
get_fe_type(),
elem);
1053 const bool do_derivatives =
1074 for (std::size_t i = 0; i < num_shapes; i++)
1077 const Node &
node = *elem_nodes[i];
1083 elem_point(direction).derivatives(),
node.
dof_number(sys_num, disp_num, 0), 1.);
1095 static bool failing =
false;
1100 libmesh_error_msg(
"ERROR: negative Jacobian " <<
_ad_jac[p].
value() <<
" at point index " 1101 << p <<
" in element " <<
elem->
id());
1124 for (std::size_t i = 0; i < num_shapes; i++)
1127 const Node &
node = *elem_nodes[i];
1133 elem_point(direction).derivatives(),
node.
dof_number(sys_num, disp_num, 0), 1.);
1146 const auto g11 = (dx_dxi * dx_dxi + dy_dxi * dy_dxi + dz_dxi * dz_dxi);
1148 const auto g12 = (dx_dxi * dx_deta + dy_dxi * dy_deta + dz_dxi * dz_deta);
1150 const auto & g21 = g12;
1152 const auto g22 = (dx_deta * dx_deta + dy_deta * dy_deta + dz_deta * dz_deta);
1154 auto det = (g11 * g22 - g12 * g21);
1156 if (det.value() <= -TOLERANCE * TOLERANCE)
1158 static bool failing =
false;
1163 libmesh_error_msg(
"ERROR: negative Jacobian " << det <<
" at point index " << p
1164 <<
" in element " <<
elem->
id());
1169 else if (det.value() <= 0.)
1170 det.value() = TOLERANCE * TOLERANCE;
1172 const auto inv_det = 1. / det;
1178 const auto g11inv = g22 * inv_det;
1179 const auto g12inv = -g12 * inv_det;
1180 const auto g21inv = -g21 * inv_det;
1181 const auto g22inv = g11 * inv_det;
1202 for (std::size_t i = 0; i < num_shapes; i++)
1205 const Node &
node = *elem_nodes[i];
1211 elem_point(direction).derivatives(),
node.
dof_number(sys_num, disp_num, 0), 1.);
1227 _ad_jac[p] = (dx_dxi * (dy_deta * dz_dzeta - dz_deta * dy_dzeta) +
1228 dy_dxi * (dz_deta * dx_dzeta - dx_deta * dz_dzeta) +
1229 dz_dxi * (dx_deta * dy_dzeta - dy_deta * dx_dzeta));
1233 static bool failing =
false;
1238 libmesh_error_msg(
"ERROR: negative Jacobian " <<
_ad_jac[p].
value() <<
" at point index " 1239 << p <<
" in element " <<
elem->
id());
1247 const auto inv_jac = 1. /
_ad_jac[p];
1249 _ad_dxidx_map[p] = (dy_deta * dz_dzeta - dz_deta * dy_dzeta) * inv_jac;
1250 _ad_dxidy_map[p] = (dz_deta * dx_dzeta - dx_deta * dz_dzeta) * inv_jac;
1251 _ad_dxidz_map[p] = (dx_deta * dy_dzeta - dy_deta * dx_dzeta) * inv_jac;
1253 _ad_detadx_map[p] = (dz_dxi * dy_dzeta - dy_dxi * dz_dzeta) * inv_jac;
1254 _ad_detady_map[p] = (dx_dxi * dz_dzeta - dz_dxi * dx_dzeta) * inv_jac;
1255 _ad_detadz_map[p] = (dy_dxi * dx_dzeta - dx_dxi * dy_dzeta) * inv_jac;
1265 libmesh_error_msg(
"Invalid dim = " <<
dim);
1276 FEBase & fe_face = *it.second;
1277 const FEType & fe_type = it.first;
1282 fesd.
_phi.shallowCopy(
const_cast<std::vector<std::vector<Real>
> &>(fe_face.
get_phi()));
1284 const_cast<std::vector<std::vector<VectorValue<Real>
>> &>(fe_face.
get_dphi()));
1292 const FEType & fe_type = it.first;
1300 fesd.
_phi.shallowCopy(
1301 const_cast<std::vector<std::vector<VectorValue<Real>
>> &>(fe_face.
get_phi()));
1303 const_cast<std::vector<std::vector<TensorValue<Real>
>> &>(fe_face.
get_dphi()));
1312 const_cast<std::vector<std::vector<Real>> &>(fe_face.
get_div_phi()));
1340 if (
_xfem !=
nullptr)
1360 const auto n_qp = qw.size();
1364 std::vector<std::vector<Real>>
const * d2psidxi2_map =
nullptr;
1365 std::vector<std::vector<Real>>
const * d2psidxideta_map =
nullptr;
1366 std::vector<std::vector<Real>>
const * d2psideta2_map =
nullptr;
1398 side_point(direction).derivatives(),
node.
dof_number(sys_num, disp_num, 0), 1.);
1431 const auto n_mapping_shape_functions =
1434 for (
unsigned int i = 0; i < n_mapping_shape_functions; i++)
1442 side_point(direction).derivatives(),
node.
dof_number(sys_num, disp_num, 0), 1.);
1464 libmesh_assert_not_equal_to(denominator, 0);
1499 const unsigned int n_mapping_shape_functions =
1502 for (
unsigned int i = 0; i < n_mapping_shape_functions; i++)
1510 side_point(direction).derivatives(),
node.
dof_number(sys_num, disp_num, 0), 1.);
1537 const auto g11 = (dxdxi * dxdxi + dydxi * dydxi + dzdxi * dzdxi);
1539 const auto g12 = (dxdxi * dxdeta + dydxi * dydeta + dzdxi * dzdeta);
1541 const auto & g21 = g12;
1543 const auto g22 = (dxdeta * dxdeta + dydeta * dydeta + dzdeta * dzdeta);
1546 const auto the_jac =
sqrt(g11 * g22 - g12 * g21);
1559 const auto numerator = E *
N - 2. * F * M + G * L;
1560 const auto denominator = E * G - F * F;
1561 libmesh_assert_not_equal_to(denominator, 0.);
1582 FEBase & fe_face_neighbor = *it.second;
1583 FEType fe_type = it.first;
1590 fesd.
_phi.shallowCopy(
const_cast<std::vector<std::vector<Real>
> &>(fe_face_neighbor.
get_phi()));
1592 const_cast<std::vector<std::vector<RealGradient>
> &>(fe_face_neighbor.
get_dphi()));
1600 const FEType & fe_type = it.first;
1608 fesd.
_phi.shallowCopy(
1609 const_cast<std::vector<std::vector<VectorValue<Real>
>> &>(fe_face_neighbor.
get_phi()));
1611 const_cast<std::vector<std::vector<TensorValue<Real>
>> &>(fe_face_neighbor.
get_dphi()));
1620 const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.
get_div_phi()));
1625 "We should be in bounds here");
1641 FEBase & fe_neighbor = *it.second;
1642 FEType fe_type = it.first;
1649 fesd.
_phi.shallowCopy(
const_cast<std::vector<std::vector<Real>
> &>(fe_neighbor.
get_phi()));
1651 const_cast<std::vector<std::vector<RealGradient>
> &>(fe_neighbor.
get_dphi()));
1659 const FEType & fe_type = it.first;
1667 fesd.
_phi.shallowCopy(
1668 const_cast<std::vector<std::vector<VectorValue<Real>
>> &>(fe_neighbor.
get_phi()));
1670 const_cast<std::vector<std::vector<TensorValue<Real>
>> &>(fe_neighbor.
get_dphi()));
1679 const_cast<std::vector<std::vector<Real>> &>(fe_neighbor.
get_div_phi()));
1693 "Neighbor subdomain ID has not been correctly set");
1697 neighbor_rule->setPoints(reference_points);
1702 "current neighbor subdomain has been set incorrectly");
1714 const std::vector<Real> &
JxW = fe.
get_JxW();
1721 for (
unsigned int qp = 0; qp < qrule->
n_points(); qp++)
1731 template <
typename Po
ints,
typename Coords>
1734 const Points & q_points,
1739 mooseAssert(qrule,
"The quadrature rule is null in Assembly::setCoordinateTransformation");
1741 mooseAssert(n_points == q_points.size(),
1742 "The number of points in the quadrature rule doesn't match the number of passed-in " 1743 "points in Assembly::setCoordinateTransformation");
1750 coord.resize(n_points);
1751 for (
unsigned int qp = 0; qp < n_points; qp++)
1799 "current subdomain has been set incorrectly");
1813 unsigned int elem_dimension =
elem->
dim();
1826 "current subdomain has been set incorrectly");
1840 "current subdomain has been set incorrectly");
1866 "current subdomain has been set incorrectly");
1890 "Our finite volume quadrature rule should always yield a single point");
1898 const auto & ref_point = ref_points[0];
1905 "current neighbor subdomain has been set incorrectly");
1911 neighbor_rule->setPoints(ref_points);
1921 return qruleFaceHelper<QBase>(
elem,
side, [](
QRules & q) {
return q.face.get(); });
1927 return qruleFaceHelper<ArbitraryQuadrature>(
1934 const auto elem_dimension =
elem->
dim();
1947 "current subdomain has been set incorrectly");
1961 Assembly::reinit(
const Elem * elem,
unsigned int side,
const std::vector<Point> & reference_points)
1966 "current subdomain has been set incorrectly");
1998 const Elem * neighbor,
1999 unsigned int neighbor_side,
2000 const std::vector<Point> * neighbor_reference_points)
2008 if (neighbor_reference_points)
2022 unsigned int elem_side,
2024 const std::vector<Point> *
const pts,
2025 const std::vector<Real> *
const weights)
2029 unsigned int elem_dim =
elem->
dim();
2035 face_rule->setPoints(*pts);
2046 for (
const auto & it :
_fe_face[elem_dim])
2048 FEBase & fe_face = *it.second;
2049 FEType fe_type = it.first;
2052 fe_face.
reinit(
elem, elem_side, tolerance, pts, weights);
2056 fesd.
_phi.shallowCopy(
const_cast<std::vector<std::vector<Real>
> &>(fe_face.
get_phi()));
2058 const_cast<std::vector<std::vector<RealGradient>
> &>(fe_face.
get_dphi()));
2066 const FEType & fe_type = it.first;
2072 fe_face.
reinit(
elem, elem_side, tolerance, pts, weights);
2074 fesd.
_phi.shallowCopy(
2075 const_cast<std::vector<std::vector<VectorValue<Real>
>> &>(fe_face.
get_phi()));
2077 const_cast<std::vector<std::vector<TensorValue<Real>
>> &>(fe_face.
get_dphi()));
2086 const_cast<std::vector<std::vector<Real>> &>(fe_face.
get_div_phi()));
2132 const std::vector<Real> dummy_qw(n_qp, 1.);
2134 for (
unsigned int qp = 0; qp != n_qp; qp++)
2139 for (
unsigned qp = 0; qp < n_qp; ++qp)
2145 for (
unsigned qp = 0; qp < n_qp; ++qp)
2148 for (
unsigned qp = 0; qp < n_qp; ++qp)
2154 FEBase & fe = *it.second;
2155 auto fe_type = it.first;
2156 auto num_shapes = FEInterface::n_shape_functions(fe_type, &
elem);
2159 grad_phi.resize(num_shapes);
2160 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2161 grad_phi[i].resize(n_qp);
2168 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2169 for (
unsigned qp = 0; qp < n_qp; ++qp)
2170 grad_phi[i][qp] = regular_grad_phi[i][qp];
2175 auto fe_type = it.first;
2176 auto num_shapes = FEInterface::n_shape_functions(fe_type, &
elem);
2179 grad_phi.resize(num_shapes);
2180 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2181 grad_phi[i].resize(n_qp);
2188 for (decltype(num_shapes) i = 0; i < num_shapes; ++i)
2189 for (
unsigned qp = 0; qp < n_qp; ++qp)
2190 grad_phi[i][qp] = regular_grad_phi[i][qp];
2197 unsigned int neighbor_side,
2199 const std::vector<Point> *
const pts,
2200 const std::vector<Real> *
const weights)
2220 FEBase & fe_face_neighbor = *it.second;
2221 FEType fe_type = it.first;
2224 fe_face_neighbor.
reinit(
neighbor, neighbor_side, tolerance, pts, weights);
2228 fesd.
_phi.shallowCopy(
const_cast<std::vector<std::vector<Real>
> &>(fe_face_neighbor.
get_phi()));
2230 const_cast<std::vector<std::vector<RealGradient>
> &>(fe_face_neighbor.
get_dphi()));
2238 const FEType & fe_type = it.first;
2244 fe_face_neighbor.
reinit(
neighbor, neighbor_side, tolerance, pts, weights);
2246 fesd.
_phi.shallowCopy(
2247 const_cast<std::vector<std::vector<VectorValue<Real>
>> &>(fe_face_neighbor.
get_phi()));
2249 const_cast<std::vector<std::vector<TensorValue<Real>
>> &>(fe_face_neighbor.
get_dphi()));
2258 const_cast<std::vector<std::vector<Real>> &>(fe_face_neighbor.
get_div_phi()));
2263 "We should be in bounds here");
2265 neighbor, neighbor_side, tolerance, pts, weights);
2275 const std::vector<Point> & pts,
2276 const std::vector<Real> & JxW)
2278 const unsigned int elem_dim =
elem->
dim();
2280 "Dual shape functions should only be computed on lower dimensional face elements");
2282 for (
const auto & it :
_fe_lower[elem_dim])
2284 FEBase & fe_lower = *it.second;
2293 const std::vector<Point> *
const pts,
2294 const std::vector<Real> *
const weights)
2298 const unsigned int elem_dim =
elem->
dim();
2300 "The lower dimensional element should truly be a lower dimensional element");
2318 for (
const auto & it :
_fe_lower[elem_dim])
2320 FEBase & fe_lower = *it.second;
2321 FEType fe_type = it.first;
2327 fesd->_phi.shallowCopy(
const_cast<std::vector<std::vector<Real>
> &>(fe_lower.
get_phi()));
2328 fesd->_grad_phi.shallowCopy(
2329 const_cast<std::vector<std::vector<RealGradient>
> &>(fe_lower.
get_dphi()));
2331 fesd->_second_phi.shallowCopy(
2338 fesd->_phi.shallowCopy(
const_cast<std::vector<std::vector<Real>
> &>(fe_lower.
get_dual_phi()));
2339 fesd->_grad_phi.shallowCopy(
2340 const_cast<std::vector<std::vector<RealGradient>
> &>(fe_lower.
get_dual_dphi()));
2342 fesd->_second_phi.shallowCopy(
2355 if (pts && !weights)
2373 const auto & physical_q_points = helper_fe.
get_xyz();
2388 "You should be calling reinitNeighborLowerDElem on a lower dimensional element");
2409 "You should be calling reinitMortarElem on a lower dimensional element");
2421 unsigned int neighbor_side,
2422 const std::vector<Point> & physical_points)
2430 physical_points.size() == 1,
2431 "If reinitializing with more than one point, then I am dubious of your use case. Perhaps " 2432 "you are performing a DG type method and you are reinitializing using points from the " 2433 "element face. In such a case your neighbor JxW must have its index order 'match' the " 2434 "element JxW index order, e.g. imagining a vertical 1D face with two quadrature points, " 2436 "index 0 for elem JxW corresponds to the 'top' quadrature point, then index 0 for " 2438 "JxW must also correspond to the 'top' quadrature point. And libMesh/MOOSE has no way to " 2439 "guarantee that with multiple quadrature points.");
2457 const std::vector<Point> & physical_points)
2483 for (
auto & ivar :
vars)
2485 auto i = ivar->number();
2490 for (
unsigned int k = 0; k < ivar->count(); ++k)
2492 unsigned int iv = i + k;
2504 auto pair = std::make_pair(ivar, &jvar);
2505 auto c = ivar_start;
2507 bool has_pair =
false;
2520 if (i != jvar.number())
2531 for (
auto & ivar : scalar_vars)
2533 auto i = ivar->number();
2555 _sub_Re.resize(num_vector_tags);
2556 _sub_Rn.resize(num_vector_tags);
2557 _sub_Rl.resize(num_vector_tags);
2591 for (MooseIndex(num_matrix_tags) tag = 0; tag < num_matrix_tags; tag++)
2657 for (
auto & ivar :
vars)
2659 auto i = ivar->number();
2661 for (
unsigned int k = 0; k < ivar->count(); ++k)
2663 unsigned int iv = i + k;
2668 auto pair = std::make_pair(ivar, &jvar);
2669 auto c = ivar_start;
2671 bool has_pair =
false;
2693 unsigned int vi = ivar.
number();
2694 unsigned int vj = jvar.
number();
2698 if (array_block_diagonal_purely_diagonal)
2699 num_cols /= jvar.
count();
2713 for (
const auto & var :
vars)
2715 tag_Re[var->number()].resize(var->dofIndices().size());
2733 unsigned int vi = ivar.
number();
2734 unsigned int vj = jvar.
number();
2738 if (array_block_diagonal_purely_diagonal)
2739 num_cols /= jvar.
count();
2759 unsigned int vi = ivar.
number();
2760 unsigned int vj = jvar.
number();
2764 if (array_block_diagonal_purely_diagonal)
2765 num_cols /= jvar.
count();
2789 unsigned int vi = ivar.
number();
2790 unsigned int vj = jvar.
number();
2794 if (array_block_diagonal_purely_diagonal)
2795 num_cols /= jvar.
count();
2819 unsigned int vi = ivar.
number();
2820 unsigned int vj = jvar.
number();
2823 const auto dofs_divisor = array_block_diagonal_purely_diagonal ? jvar.
count() : 1;
2844 for (
const auto & var :
vars)
2846 tag_Rn[var->number()].resize(var->dofIndicesNeighbor().size());
2857 unsigned int vi = ivar.
number();
2858 unsigned int vj = jvar.
number();
2861 const auto dofs_divisor = array_block_diagonal_purely_diagonal ? jvar.
count() : 1;
2896 for (
const auto & var :
vars)
2898 tag_Rl[var->number()].resize(var->dofIndicesLower().size());
2904 const std::vector<dof_id_type> & dof_indices)
2908 const unsigned int ivn = iv.
number();
2909 const unsigned int jvn = jv.number();
2910 const unsigned int icount = iv.count();
2911 unsigned int jcount = jv.count();
2918 .resize(dof_indices.size() * icount, dof_indices.size() * jcount);
2923 tag_Re[ivn].resize(dof_indices.size() * icount);
2929 const std::vector<dof_id_type> & idof_indices,
2930 const std::vector<dof_id_type> & jdof_indices)
2934 const unsigned int ivn = iv.
number();
2935 const unsigned int jvn = jv.number();
2936 const unsigned int icount = iv.count();
2937 unsigned int jcount = jv.count();
2946 .resize(idof_indices.size() * icount, jdof_indices.size() * jcount);
2956 for (
const auto & ivar :
vars)
2958 auto idofs = ivar->dofIndices().size();
2961 tag_Re[ivar->number()].resize(idofs);
2963 for (
const auto & jvar :
vars)
2965 auto jdofs = jvar->dofIndices().size();
2982 for (
const auto & ivar : scalar_vars)
2984 auto idofs = ivar->dofIndices().size();
2986 for (
const auto & jvar :
vars)
2988 auto jdofs = jvar->dofIndices().size() * jvar->count();
3001 template <
typename T>
3005 phi(v).shallowCopy(v.
phi());
3029 if (v.computingCurl())
3030 curlPhi(v).shallowCopy(v.curlPhi());
3031 if (v.computingDiv())
3032 divPhi(v).shallowCopy(v.divPhi());
3035 mooseError(
"Unsupported variable field type!");
3038 template <
typename T>
3066 if (v.computingCurl())
3068 if (v.computingDiv())
3072 mooseError(
"Unsupported variable field type!");
3075 template <
typename T>
3116 mooseError(
"Unsupported variable field type!");
3222 std::vector<dof_id_type> & dof_indices,
3223 const std::vector<Real> & scaling_factor)
3225 mooseAssert(res_block.
size() == dof_indices.size(),
3226 "The size of residual and degree of freedom container must be the same");
3231 const auto ntdof = res_block.
size();
3232 const auto count = scaling_factor.size();
3233 const auto ndof = ntdof / count;
3237 for (MooseIndex(count) j = 0; j < count; ++j)
3238 for (MooseIndex(ndof) i = 0; i < ndof; ++i)
3239 res_block(p++) *= scaling_factor[j];
3243 if (scaling_factor[0] != 1.0)
3244 res_block *= scaling_factor[0];
3253 const std::vector<dof_id_type> & dof_indices,
3254 const std::vector<Real> & scaling_factor)
3256 if (dof_indices.size() > 0 && res_block.
size())
3267 std::vector<dof_id_type> & cached_residual_rows,
3269 const std::vector<dof_id_type> & dof_indices,
3270 const std::vector<Real> & scaling_factor)
3272 if (dof_indices.size() > 0 && res_block.
size())
3280 cached_residual_values.push_back(
_tmp_Re(i));
3291 const std::vector<dof_id_type> & dof_indices,
3292 const std::vector<Real> & scaling_factor)
3294 if (dof_indices.size() > 0)
3296 std::vector<dof_id_type> di(dof_indices);
3307 "Non-residual tag in Assembly::addResidual");
3312 for (
const auto & var :
vars)
3313 addResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3319 for (
const auto & vector_tag : vector_tags)
3328 "Non-residual tag in Assembly::addResidualNeighbor");
3333 for (
const auto & var :
vars)
3335 residual, tag_Rn[var->number()], var->dofIndicesNeighbor(), var->arrayScalingFactor());
3341 for (
const auto & vector_tag : vector_tags)
3350 "Non-residual tag in Assembly::addResidualLower");
3355 for (
const auto & var :
vars)
3357 residual, tag_Rl[var->number()], var->dofIndicesLower(), var->arrayScalingFactor());
3363 for (
const auto & vector_tag : vector_tags)
3373 "Non-residual tag in Assembly::addResidualScalar");
3379 for (
const auto & var :
vars)
3380 addResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3386 for (
const auto & vector_tag : vector_tags)
3395 for (
const auto & var :
vars)
3396 for (
const auto & vector_tag : tags)
3400 _sub_Re[vector_tag._type_id][var->number()],
3402 var->arrayScalingFactor());
3419 for (
auto & tag : tags)
3425 const std::vector<dof_id_type> & dof_index,
3434 for (MooseIndex(dof_index) i = 0; i < dof_index.size(); ++i)
3445 for (
const auto & var :
vars)
3446 for (
const auto & vector_tag : tags)
3450 _sub_Rn[vector_tag._type_id][var->number()],
3451 var->dofIndicesNeighbor(),
3452 var->arrayScalingFactor());
3459 for (
const auto & var :
vars)
3460 for (
const auto & vector_tag : tags)
3464 _sub_Rl[vector_tag._type_id][var->number()],
3465 var->dofIndicesLower(),
3466 var->arrayScalingFactor());
3472 for (
const auto & vector_tag : tags)
3498 mooseAssert(values.size() == rows.size(),
3499 "Number of cached residuals and number of rows must match!");
3522 mooseAssert(values.size() == rows.size(),
3523 "Number of cached residuals and number of rows must match!");
3525 if (!values.empty())
3537 for (
const auto & var :
vars)
3538 setResidualBlock(residual, tag_Re[var->number()], var->dofIndices(), var->arrayScalingFactor());
3548 for (
const auto & var :
vars)
3550 residual, tag_Rn[var->number()], var->dofIndicesNeighbor(), var->arrayScalingFactor());
3559 const std::vector<dof_id_type> & idof_indices,
3560 const std::vector<dof_id_type> & jdof_indices)
3562 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3564 if (jac_block.
n() == 0 || jac_block.
m() == 0)
3568 const unsigned int iv = ivar.
number();
3569 const unsigned int jv = jvar.
number();
3571 for (
unsigned int i = 0; i < ivar.
count(); ++i)
3575 if (jt < jv || jt >= jv + jvar.
count())
3577 unsigned int j = jt - jv;
3581 auto indof = di.size();
3582 auto jndof = dj.size();
3584 unsigned int jj = j;
3589 auto sub = jac_block.
sub_matrix(i * indof, indof, jj * jndof, jndof);
3590 if (scaling_factors[i] != 1.0)
3591 sub *= scaling_factors[i];
3609 const std::vector<dof_id_type> & idof_indices,
3610 const std::vector<dof_id_type> & jdof_indices,
3613 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3615 if (jac_block.
n() == 0 || jac_block.
m() == 0)
3621 const unsigned int iv = ivar.
number();
3622 const unsigned int jv = jvar.
number();
3624 for (
unsigned int i = 0; i < ivar.
count(); ++i)
3628 if (jt < jv || jt >= jv + jvar.
count())
3630 unsigned int j = jt - jv;
3634 auto indof = di.size();
3635 auto jndof = dj.size();
3637 unsigned int jj = j;
3642 auto sub = jac_block.
sub_matrix(i * indof, indof, jj * jndof, jndof);
3643 if (scaling_factors[i] != 1.0)
3644 sub *= scaling_factors[i];
3652 for (MooseIndex(di) i = 0; i < di.size(); i++)
3653 for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3668 const std::vector<dof_id_type> & idof_indices,
3669 const std::vector<dof_id_type> & jdof_indices,
3672 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
3674 if (jac_block.
n() == 0 || jac_block.
m() == 0)
3681 for (
unsigned int i = 0; i < ivar.
count(); ++i)
3683 unsigned int iv = ivar.
number();
3686 unsigned int jv = jvar.
number();
3687 if (jt < jv || jt >= jv + jvar.
count())
3689 unsigned int j = jt - jv;
3693 auto indof = di.size();
3694 auto jndof = dj.size();
3696 unsigned int jj = j;
3701 auto sub = jac_block.
sub_matrix(i * indof, indof, jj * jndof, jndof);
3702 if (scaling_factor[i] != 1.0)
3703 sub *= scaling_factor[i];
3707 for (MooseIndex(di) i = 0; i < di.size(); i++)
3708 for (MooseIndex(dj) j = 0; j < dj.size(); j++)
3709 if (sub(i, j) != 0.0)
3722 const std::vector<dof_id_type> & idof_indices,
3723 const std::vector<dof_id_type> & jdof_indices,
3724 Real scaling_factor,
3726 const std::set<TagID> & tags)
3728 const auto has_matrix =
3729 std::any_of(tags.begin(), tags.end(), [
this](
const auto tag) {
return _sys.
hasMatrix(tag); });
3733 if ((idof_indices.size() > 0) && (jdof_indices.size() > 0) && jac_block.
n() && jac_block.
m() &&
3736 _row_indices.assign(idof_indices.begin(), idof_indices.end());
3746 if (scaling_factor != 1.0)
3763 const std::vector<Real> &
JxW = fe->get_JxW();
3764 const std::vector<Point> & q_points = fe->get_xyz();
3768 QGauss qrule(
elem->
dim(), fe_type.default_quadrature_order());
3769 fe->attach_quadrature_rule(&qrule);
3774 mooseAssert(qrule.n_points() == q_points.size(),
3775 "The number of points in the quadrature rule doesn't match the number of passed-in " 3776 "points in Assembly::setCoordinateTransformation");
3780 for (
unsigned int qp = 0; qp < qrule.n_points(); ++qp)
3784 vol +=
JxW[qp] * coord;
3795 for (
unsigned int j = 0; j < v.size(); ++j, i += ntest)
3806 "Error: Cached data sizes MUST be the same!");
3809 "Error: Cached data sizes MUST be the same for a given tag!");
3874 auto ivar = it.first;
3875 auto jvar = it.second;
3896 auto ivar = it.first;
3897 auto jvar = it.second;
3910 jvar->dofIndicesNeighbor());
3916 ivar->dofIndicesNeighbor(),
3923 ivar->dofIndicesNeighbor(),
3924 jvar->dofIndicesNeighbor());
3934 auto ivar = it.first;
3935 auto jvar = it.second;
3946 ivar->dofIndicesLower(),
3947 jvar->dofIndicesLower());
3953 ivar->dofIndicesLower(),
3954 jvar->dofIndicesNeighbor());
3960 ivar->dofIndicesLower(),
3967 ivar->dofIndicesNeighbor(),
3968 jvar->dofIndicesLower());
3975 jvar->dofIndicesLower());
3988 jvar->dofIndicesNeighbor());
3994 ivar->dofIndicesNeighbor(),
4001 ivar->dofIndicesNeighbor(),
4002 jvar->dofIndicesNeighbor());
4012 auto ivar = it.first;
4013 auto jvar = it.second;
4024 ivar->dofIndicesLower(),
4025 jvar->dofIndicesLower());
4031 ivar->dofIndicesLower(),
4039 jvar->dofIndicesLower());
4079 auto ivar = it.first;
4080 auto jvar = it.second;
4101 auto ivar = it.first;
4102 auto jvar = it.second;
4115 jvar->dofIndicesNeighbor(),
4120 ivar->dofIndicesNeighbor(),
4127 ivar->dofIndicesNeighbor(),
4128 jvar->dofIndicesNeighbor(),
4139 auto ivar = it.first;
4140 auto jvar = it.second;
4150 ivar->dofIndicesLower(),
4151 jvar->dofIndicesLower(),
4157 ivar->dofIndicesLower(),
4164 ivar->dofIndicesLower(),
4165 jvar->dofIndicesNeighbor(),
4172 jvar->dofIndicesLower(),
4187 jvar->dofIndicesNeighbor(),
4193 ivar->dofIndicesNeighbor(),
4194 jvar->dofIndicesLower(),
4200 ivar->dofIndicesNeighbor(),
4207 ivar->dofIndicesNeighbor(),
4208 jvar->dofIndicesNeighbor(),
4219 std::vector<dof_id_type> & dof_indices,
4221 const std::set<TagID> & tags)
4223 for (
auto tag : tags)
4232 std::vector<dof_id_type> & dof_indices,
4236 if (dof_indices.size() == 0)
4238 if (!(*
_cm)(ivar, jvar))
4245 const unsigned int ivn = iv.number();
4246 const unsigned int jvn = jv.number();
4255 const unsigned int i = ivar - ivn;
4256 const unsigned int j = jvar - jvn;
4259 auto di = dof_indices;
4260 auto dj = dof_indices;
4262 auto indof = di.size();
4263 auto jndof = dj.size();
4265 unsigned int jj = j;
4269 auto sub = ke.
sub_matrix(i * indof, indof, jj * jndof, jndof);
4276 if (scaling_factor[i] != 1.0)
4277 sub *= scaling_factor[i];
4284 const unsigned int ivar,
4285 const unsigned int jvar,
4287 const std::vector<dof_id_type> & idof_indices,
4288 const std::vector<dof_id_type> & jdof_indices,
4292 if (idof_indices.size() == 0 || jdof_indices.size() == 0)
4294 if (jacobian.
n() == 0 || jacobian.
m() == 0)
4296 if (!(*
_cm)(ivar, jvar))
4303 const unsigned int ivn = iv.number();
4304 const unsigned int jvn = jv.number();
4313 const unsigned int i = ivar - ivn;
4314 const unsigned int j = jvar - jvn;
4317 auto di = idof_indices;
4318 auto dj = jdof_indices;
4320 auto indof = di.size();
4321 auto jndof = dj.size();
4323 unsigned int jj = j;
4327 auto sub = keg.
sub_matrix(i * indof, indof, jj * jndof, jndof);
4334 if (scaling_factor[i] != 1.0)
4335 sub *= scaling_factor[i];
4342 const unsigned int ivar,
4343 const unsigned int jvar,
4345 const std::vector<dof_id_type> & idof_indices,
4346 const std::vector<dof_id_type> & jdof_indices,
4348 const std::set<TagID> & tags)
4350 for (
auto tag : tags)
4352 jacobian, ivar, jvar, dof_map, idof_indices, jdof_indices,
GlobalDataKey{}, tag);
4357 const unsigned int ivar,
4358 const unsigned int jvar,
4360 std::vector<dof_id_type> & dof_indices,
4361 std::vector<dof_id_type> & neighbor_dof_indices,
4365 if (dof_indices.size() == 0 && neighbor_dof_indices.size() == 0)
4367 if (!(*
_cm)(ivar, jvar))
4374 const unsigned int ivn = iv.number();
4375 const unsigned int jvn = jv.number();
4386 const unsigned int i = ivar - ivn;
4387 const unsigned int j = jvar - jvn;
4389 auto dc = dof_indices;
4390 auto dn = neighbor_dof_indices;
4391 auto cndof = dc.size();
4392 auto nndof = dn.size();
4394 unsigned int jj = j;
4398 auto suben = ken.
sub_matrix(i * cndof, cndof, jj * nndof, nndof);
4399 auto subne = kne.
sub_matrix(i * nndof, nndof, jj * cndof, cndof);
4400 auto subnn = knn.
sub_matrix(i * nndof, nndof, jj * nndof, nndof);
4412 if (scaling_factor[i] != 1.0)
4414 suben *= scaling_factor[i];
4415 subne *= scaling_factor[i];
4416 subnn *= scaling_factor[i];
4426 const unsigned int ivar,
4427 const unsigned int jvar,
4429 std::vector<dof_id_type> & dof_indices,
4430 std::vector<dof_id_type> & neighbor_dof_indices,
4432 const std::set<TagID> & tags)
4434 for (
const auto tag : tags)
4436 jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices,
GlobalDataKey{}, tag);
4451 for (
const auto & var_j :
vars)
4469 const std::set<TagID> & tags)
4471 for (
auto tag : tags)
4520 mooseAssert(
_xfem !=
nullptr,
"This function should not be called if xfem is inactive");
4529 "Size of weight multipliers in xfem doesn't match number of quadrature points");
4530 for (
unsigned i = 0; i < xfem_weight_multipliers.
size(); i++)
4533 xfem_weight_multipliers.
release();
4540 mooseAssert(
_xfem !=
nullptr,
"This function should not be called if xfem is inactive");
4546 if (
_xfem->getXFEMFaceWeights(
4550 "Size of weight multipliers in xfem doesn't match number of quadrature points");
4551 for (
unsigned i = 0; i < xfem_face_weight_multipliers.
size(); i++)
4554 xfem_face_weight_multipliers.
release();
4570 for (MooseIndex(weights.size()) i = 0; i < weights.size(); ++i)
4576 Assembly::fePhi<VectorValue<Real>>(
FEType type)
const 4578 buildVectorFE(type);
4579 return _vector_fe_shape_data[type]->_phi;
4584 Assembly::feGradPhi<VectorValue<Real>>(
FEType type)
const 4586 buildVectorFE(type);
4587 return _vector_fe_shape_data[type]->_grad_phi;
4592 Assembly::feSecondPhi<VectorValue<Real>>(
FEType type)
const 4594 _need_second_derivative.insert(type);
4595 buildVectorFE(type);
4596 return _vector_fe_shape_data[type]->_second_phi;
4601 Assembly::fePhiLower<VectorValue<Real>>(
FEType type)
const 4603 buildVectorLowerDFE(type);
4604 return _vector_fe_shape_data_lower[type]->_phi;
4609 Assembly::feDualPhiLower<VectorValue<Real>>(
FEType type)
const 4611 buildVectorDualLowerDFE(type);
4612 return _vector_fe_shape_data_dual_lower[type]->_phi;
4617 Assembly::feGradPhiLower<VectorValue<Real>>(
FEType type)
const 4619 buildVectorLowerDFE(type);
4620 return _vector_fe_shape_data_lower[type]->_grad_phi;
4625 Assembly::feGradDualPhiLower<VectorValue<Real>>(
FEType type)
const 4627 buildVectorDualLowerDFE(type);
4628 return _vector_fe_shape_data_dual_lower[type]->_grad_phi;
4633 Assembly::fePhiFace<VectorValue<Real>>(
FEType type)
const 4635 buildVectorFaceFE(type);
4636 return _vector_fe_shape_data_face[type]->_phi;
4641 Assembly::feGradPhiFace<VectorValue<Real>>(
FEType type)
const 4643 buildVectorFaceFE(type);
4644 return _vector_fe_shape_data_face[type]->_grad_phi;
4649 Assembly::feSecondPhiFace<VectorValue<Real>>(
FEType type)
const 4651 _need_second_derivative.insert(type);
4652 buildVectorFaceFE(type);
4657 buildVectorFaceNeighborFE(type);
4659 return _vector_fe_shape_data_face[type]->_second_phi;
4664 Assembly::fePhiNeighbor<VectorValue<Real>>(
FEType type)
const 4666 buildVectorNeighborFE(type);
4667 return _vector_fe_shape_data_neighbor[type]->_phi;
4672 Assembly::feGradPhiNeighbor<VectorValue<Real>>(
FEType type)
const 4674 buildVectorNeighborFE(type);
4675 return _vector_fe_shape_data_neighbor[type]->_grad_phi;
4680 Assembly::feSecondPhiNeighbor<VectorValue<Real>>(
FEType type)
const 4682 _need_second_derivative_neighbor.insert(type);
4683 buildVectorNeighborFE(type);
4684 return _vector_fe_shape_data_neighbor[type]->_second_phi;
4689 Assembly::fePhiFaceNeighbor<VectorValue<Real>>(
FEType type)
const 4691 buildVectorFaceNeighborFE(type);
4692 return _vector_fe_shape_data_face_neighbor[type]->_phi;
4697 Assembly::feGradPhiFaceNeighbor<VectorValue<Real>>(
FEType type)
const 4699 buildVectorFaceNeighborFE(type);
4700 return _vector_fe_shape_data_face_neighbor[type]->_grad_phi;
4705 Assembly::feSecondPhiFaceNeighbor<VectorValue<Real>>(
FEType type)
const 4707 _need_second_derivative_neighbor.insert(type);
4708 buildVectorFaceNeighborFE(type);
4709 return _vector_fe_shape_data_face_neighbor[type]->_second_phi;
4714 Assembly::feCurlPhi<VectorValue<Real>>(
FEType type)
const 4716 _need_curl.insert(type);
4717 buildVectorFE(type);
4718 return _vector_fe_shape_data[type]->_curl_phi;
4723 Assembly::feCurlPhiFace<VectorValue<Real>>(
FEType type)
const 4725 _need_curl.insert(type);
4726 buildVectorFaceFE(type);
4731 buildVectorFaceNeighborFE(type);
4733 return _vector_fe_shape_data_face[type]->_curl_phi;
4738 Assembly::feCurlPhiNeighbor<VectorValue<Real>>(
FEType type)
const 4740 _need_curl.insert(type);
4741 buildVectorNeighborFE(type);
4742 return _vector_fe_shape_data_neighbor[type]->_curl_phi;
4747 Assembly::feCurlPhiFaceNeighbor<VectorValue<Real>>(
FEType type)
const 4749 _need_curl.insert(type);
4750 buildVectorFaceNeighborFE(type);
4752 return _vector_fe_shape_data_face_neighbor[type]->_curl_phi;
4757 Assembly::feDivPhi<VectorValue<Real>>(
FEType type)
const 4759 _need_div.insert(type);
4760 buildVectorFE(type);
4761 return _vector_fe_shape_data[type]->_div_phi;
4766 Assembly::feDivPhiFace<VectorValue<Real>>(
FEType type)
const 4768 _need_face_div.insert(type);
4769 buildVectorFaceFE(type);
4774 buildVectorFaceNeighborFE(type);
4776 return _vector_fe_shape_data_face[type]->_div_phi;
4781 Assembly::feDivPhiNeighbor<VectorValue<Real>>(
FEType type)
const 4783 _need_neighbor_div.insert(type);
4784 buildVectorNeighborFE(type);
4785 return _vector_fe_shape_data_neighbor[type]->_div_phi;
4790 Assembly::feDivPhiFaceNeighbor<VectorValue<Real>>(
FEType type)
const 4792 _need_face_neighbor_div.insert(type);
4793 buildVectorFaceNeighborFE(type);
4794 return _vector_fe_shape_data_face_neighbor[type]->_div_phi;
4805 feSecondPhi<Real>(helper_type);
4806 feSecondPhiFace<Real>(helper_type);
4853 [&disable_families](
const unsigned int num_dimensionalities,
auto & fe_container)
4855 if (!disable_families.empty())
4858 auto fe_container_it = fe_container.find(
dim);
4859 if (fe_container_it != fe_container.end())
4860 for (
auto & [fe_type, fe_ptr] : fe_container_it->second)
4861 if (disable_families.count(fe_type.family))
4862 fe_ptr->add_p_level_in_reinit(
false);
4865 auto process_fe_and_helpers = [process_fe, &helper_type](
auto & unique_helper_container,
4866 auto & helper_container,
4867 const unsigned int num_dimensionalities,
4868 const bool user_added_helper_type,
4869 auto & fe_container)
4871 unique_helper_container.resize(num_dimensionalities);
4874 auto & unique_helper = unique_helper_container[
dim];
4877 unique_helper->add_p_level_in_reinit(
false);
4878 helper_container[
dim] = unique_helper.get();
4883 if (!user_added_helper_type)
4885 auto & fe_container_dim = libmesh_map_find(fe_container,
dim);
4886 auto fe_it = fe_container_dim.find(helper_type);
4887 mooseAssert(fe_it != fe_container_dim.end(),
"We should have the helper type");
4888 delete fe_it->second;
4889 fe_container_dim.erase(fe_it);
4893 process_fe(num_dimensionalities, fe_container);
4957 Assembly::genericQPoints<false>()
const 4964 Assembly::genericQPoints<true>()
const const Elem *const & elem() const
Return the current element.
virtual MooseMesh & mesh()=0
MooseArray< VectorValue< ADReal > > _ad_normals
void copyShapes(MooseVariableField< T > &v)
libMesh::ElemSideBuilder _compute_face_map_side_elem_builder
In place side element builder for computeFaceMap()
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face
types of finite elements
bool _need_neighbor_elem_volume
true is apps need to compute neighbor element volume
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 ...
virtual void insert(const T *v, const std::vector< numeric_index_type > &dof_indices)
ArbitraryQuadrature * _current_qrule_arbitrary
The current arbitrary quadrature rule used within the element interior.
std::map< FEType, FEBase * > _current_fe
The "volume" fe object that matches the current elem.
MooseArray< Real > _curvatures
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
std::vector< ADReal > _ad_detadz_map
VectorVariablePhiValue _phi
std::unique_ptr< FEGenericBase< Real > > build(const unsigned int dim, const FEType &fet)
std::vector< std::vector< dof_id_type > > _cached_residual_rows
Where the cached values should go (the first vector is for TIME vs NONTIME)
std::vector< std::vector< dof_id_type > > _cached_jacobian_rows
Row where the corresponding cached value should go.
Eigen::Matrix< ADReal, Eigen::Dynamic, 1 > ADRealEigenVector
unsigned int _max_cached_residuals
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data_face
std::vector< dof_id_type > componentDofIndices(const std::vector< dof_id_type > &dof_indices, unsigned int component) const
Obtain DoF indices of a component with the indices of the 0th component.
virtual_for_inffe const std::vector< std::vector< OutputDivergence > > & get_div_phi() const
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
bool _user_added_fe_lower_of_helper_type
MooseArray< Point > _current_physical_points
This will be filled up with the physical points passed into reinitAtPhysical() if it is called...
const VariablePhiGradient & gradPhiFaceNeighbor(const MooseVariableField< Real > &) const
std::vector< std::unique_ptr< FEBase > > _unique_fe_lower_helper
void print_info(std::ostream &os=libMesh::out) const
MooseArray< ADReal > _ad_coord
The AD version of the current coordinate transformation coefficients.
virtual const FieldVariablePhiValue & phi() const =0
Return the variable's elemental shape functions.
void buildNeighborFE(FEType type) const
Build FEs for a neighbor with a type.
const VariablePhiSecond & secondPhi() const
void setMortarQRule(Order order)
Specifies a custom qrule for integration on mortar segment mesh.
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe
Each dimension's actual vector fe objects indexed on type.
typename OutputTools< typename Moose::ADType< T >::type >::VariablePhiGradient ADTemplateVariablePhiGradient
const std::vector< std::vector< OutputShape > > & get_dual_phi() const
void buildVectorLowerDFE(FEType type) const
Build Vector FEs for a lower dimensional element with a type.
MooseArray< Real > _coord_neighbor
The current coordinate transformation coefficients.
virtual void haveADObjects(bool have_ad_objects)
Method for setting whether we have any ad objects.
void buildFE(FEType type) const
Build FEs with a type.
const std::vector< MooseVariableScalar * > & getScalarVariables(THREAD_ID tid)
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kle
dlower/dsecondary (or dlower/delement)
virtual void zero() override final
void cacheResidualLower(GlobalDataKey, const std::vector< VectorTag > &tags)
Takes the values that are currently in _sub_Rl and appends them to the cached values.
const unsigned int invalid_uint
void setFaceQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for face integration.
bool hasVector(const std::string &tag_name) const
Check if the named vector exists in the system.
void saveLocalADArray(std::vector< ADReal > &re, unsigned int i, unsigned int ntest, const ADRealEigenVector &v) const
Assembly(SystemBase &sys, THREAD_ID tid)
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data
Shape function values, gradients, second derivatives for each FE type.
void buildLowerDDualFE(FEType type) const
virtual bool checkNonlocalCouplingRequirement() const =0
MooseArray< Real > _current_JxW_neighbor
The current transformed jacobian weights on a neighbor's face.
std::shared_ptr< XFEMInterface > _xfem
The XFEM controller.
void reinitNeighborLowerDElem(const Elem *elem)
reinitialize a neighboring lower dimensional element
void prepareJacobianBlock()
Sizes and zeroes the Jacobian blocks used for the current element.
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...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kel
dsecondary/dlower (or delement/dlower)
const std::vector< Real > & arrayScalingFactor() const
MooseArray< Real > _coord
The current coordinate transformation coefficients.
unsigned int number() const
Get variable number coming from libMesh.
bool allow_rules_with_negative_weights
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. ...
void reinitFE(const Elem *elem)
Just an internal helper function to reinit the volume FE objects.
TagID _id
The id associated with the vector tag.
virtual unsigned int currentNlSysNum() const =0
libMesh::QBase * _current_qrule_neighbor
quadrature rule used on neighbors
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.
void coordTransformFactor(const P &point, C &factor, const Moose::CoordinateSystemType coord_type, const unsigned int rz_radial_coord=libMesh::invalid_uint)
Compute a coordinate transformation volume integration factor.
std::map< unsigned int, FEBase * > _holder_fe_neighbor_helper
Each dimension's helper objects.
std::unique_ptr< FEBase > _fe_msm
A FE object for working on mortar segement elements.
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face_neighbor
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 ...
const std::vector< std::vector< Real > > & get_dphidzeta_map() const
const Elem & elem() const
void reinitAtPhysical(const Elem *elem, const std::vector< Point > &physical_points)
Reinitialize the assembly data at specific physical point in the given element.
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)
bool _current_elem_volume_computed
Boolean to indicate whether current element volumes has been computed.
std::vector< ADReal > _ad_detady_map
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...
const VectorVariablePhiDivergence & divPhi(const MooseVariableField< RealVectorValue > &) const
std::vector< ADReal > _ad_dzetadz_map
std::vector< std::unique_ptr< FEBase > > _unique_fe_neighbor_helper
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kll
dlower/dlower
bool _user_added_fe_face_neighbor_of_helper_type
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...
bool _have_p_refinement
Whether we have ever conducted p-refinement.
Real _current_neighbor_volume
Volume of the current neighbor.
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...
virtual void add_vector(const T *v, const std::vector< numeric_index_type > &dof_indices)
ArbitraryQuadrature * qruleArbitraryFace(const Elem *elem, unsigned int side)
std::map< FEType, FEBase * > _current_fe_face
The "face" fe object that matches the current elem.
const VectorVariablePhiCurl & curlPhi(const MooseVariableField< RealVectorValue > &) const
std::vector< Point > _current_neighbor_ref_points
The current reference points on the neighbor element.
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kln
dlower/dprimary (or dlower/dneighbor)
void setVolumeQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for volume integration.
const Elem * _current_neighbor_elem
The current neighbor "element".
void addJacobianNonlocal(GlobalDataKey)
Adds non-local Jacobian to the global Jacobian matrices.
std::vector< std::vector< DenseVector< Number > > > _sub_Rn
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
virtual const FieldVariablePhiGradient & gradPhiNeighbor() const =0
Return the gradients of the variable's shape functions on a neighboring element.
const VariablePhiValue & phi() const
TagTypeID _type_id
The index for this tag into a vector that contains tags of only its type ordered by ID...
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_neighbor
std::map< unsigned int, FEBase * > _holder_fe_face_neighbor_helper
unsigned int n_elem_integers() const
const VariablePhiGradient & gradPhi() const
MooseArray< Real > _current_JxW_face
The current transformed jacobian weights on a face.
void modifyWeightsDueToXFEM(const Elem *elem)
Update the integration weights for XFEM partial elements.
const std::vector< Real > & get_weights() const
void coordTransformFactorRZGeneral(const P &point, const std::pair< Point, RealVectorValue > &axis, C &factor)
Computes a coordinate transformation factor for a general axisymmetric axis.
const Elem * _current_elem
The current "element" we are currently on.
const VariablePhiSecond & secondPhiNeighbor(const MooseVariableField< Real > &) const
bool computingScalingJacobian() const
Whether we are computing an initial Jacobian for automatic variable scaling.
THREAD_ID _tid
Thread number (id)
void reinitFEFaceNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
virtual const FieldVariablePhiSecond & secondPhi() const =0
Return the rank-2 tensor of second derivatives of the variable's elemental shape functions.
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
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_nonlocal_used
std::vector< std::pair< MooseVariableScalar *, MooseVariableFieldBase * > > _cm_sf_entry
Entries in the coupling matrix for scalar variables vs field variables.
void resizeADMappingObjects(unsigned int n_qp, unsigned int dim)
resize any objects that contribute to automatic differentiation-related mapping calculations ...
OutputTools< Real >::VariablePhiValue VariablePhiValue
virtual bool hasMatrix(TagID tag) const
Check if the tagged matrix exists in the system.
const std::vector< std::vector< Real > > & get_phi_map() const
void setCoordinateTransformation(const libMesh::QBase *qrule, const Points &q_points, Coords &coord, SubdomainID sub_id)
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face_neighbor
const VariablePhiValue & phiFaceNeighbor(const MooseVariableField< Real > &) const
unsigned int elemSideID() const
std::vector< bool > _component_block_diagonal
An flag array Indiced by variable index to show if there is no component-wise coupling for the variab...
Real _current_elem_volume
Volume of the current element.
std::map< FEType, FEBase * > _current_fe_face_neighbor
The "neighbor face" fe object that matches the current elem.
const MooseArray< ADReal > & adCurvatures() const
This class provides an interface for common operations on field variables of both FE and FV types wit...
std::map< FEType, FEVectorBase * > _current_vector_fe_face
The "face" vector fe object that matches the current elem.
void shallowCopy(const MooseArray &rhs)
Doesn't actually make a copy of the data.
std::vector< std::unique_ptr< FEBase > > _unique_fe_helper
Containers for holding unique FE helper types if we are doing p-refinement.
const FEType _helper_type
The finite element type of the FE helper classes.
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...
DenseMatrix< Number > & jacobianBlock(unsigned int ivar, unsigned int jvar, LocalDataKey, TagID tag)
Get local Jacobian block for a pair of variables and a tag.
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.
const std::vector< std::vector< OutputShape > > & get_dphideta() const
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knn
jacobian contributions from the neighbor <Tag, ivar, jvar>
Base class for a system (of equations)
libMesh::QBase * _current_qrule_face
quadrature rule used on faces
const VariablePhiValue & phiNeighbor(const MooseVariableField< Real > &) const
unsigned int numExtraElemIntegers() const
Number of extra element integers Assembly tracked.
std::set< FEType > _need_second_derivative_neighbor
void setWeights(const std::vector< libMesh::Real > &weights)
Set the quadrature weights.
DualNumber< Real, DNDerivativeType, true > ADReal
std::vector< std::vector< Real > > _cached_jacobian_values
Values cached by calling cacheJacobian()
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_ff_entry
Entries in the coupling matrix for field variables.
void addJacobianNeighborLowerD(GlobalDataKey)
Add all portions of the Jacobian except PrimaryPrimary, e.g.
std::map< FEType, FEVectorBase * > _current_vector_fe
The "volume" vector fe object that matches the current elem.
VariablePhiGradient _grad_phi
template void coordTransformFactor< ADPoint, ADReal >(const SubProblem &s, SubdomainID sub_id, const ADPoint &point, ADReal &factor, SubdomainID neighbor_sub_id)
std::vector< VectorValue< ADReal > > _ad_dxyzdeta_map
virtual const FieldVariablePhiValue & phiNeighbor() const =0
Return the variable's shape functions on a neighboring element.
void modifyFaceWeightsDueToXFEM(const Elem *elem, unsigned int side=0)
Update the face integration weights for XFEM partial elements.
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.
OutputTools< Real >::VariablePhiSecond VariablePhiSecond
std::unique_ptr< libMesh::QBase > face
area/face (meshdim-1) quadrature rule
unsigned int neighborSideID() const
DenseVector< Number > _tmp_Re
auxiliary vector for scaling residuals (optimization to avoid expensive construction/destruction) ...
unsigned int _mesh_dimension
virtual QuadratureType type() const=0
std::vector< Eigen::Map< RealDIMValue > > _mapped_normals
Mapped normals.
VectorVariablePhiDivergence _vector_div_phi_face
void cacheJacobian(GlobalDataKey)
Takes the values that are currently in _sub_Kee and appends them to the cached values.
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.
auto max(const L &left, const R &right)
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 ...
const std::vector< std::vector< OutputShape > > & get_dphidzeta() const
virtual void set(const numeric_index_type i, const numeric_index_type j, const T value)=0
void addCachedResiduals(GlobalDataKey, const std::vector< VectorTag > &tags)
Pushes all cached residuals to the global residual vectors associated with each tag.
Data structure for tracking/grouping a set of quadrature rules for a particular dimensionality of mes...
const std::vector< std::vector< Real > > & get_dphideta_map() const
unsigned int _max_cached_jacobians
virtual void add(const numeric_index_type i, const numeric_index_type j, const T value)=0
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.
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Ken
jacobian contributions from the element and neighbor <Tag, ivar, jvar>
FEType get_fe_type() const
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_dual_lower
virtual unsigned int nVariables() const
Get the number of variables in this system.
virtual const FieldVariablePhiValue & phiFaceNeighbor() const =0
Return the variable's shape functions on a neighboring element face.
unsigned int n_dofs(const unsigned int s, const unsigned int var=libMesh::invalid_uint) const
std::vector< VectorValue< ADReal > > _ad_dxyzdzeta_map
std::vector< Point > _temp_reference_points
Temporary work data for reinitAtPhysical()
std::vector< std::pair< MooseVariableScalar *, MooseVariableScalar * > > _cm_ss_entry
Entries in the coupling matrix for scalar variables.
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kne
jacobian contributions from the neighbor and element <Tag, ivar, jvar>
const Elem * _current_neighbor_lower_d_elem
The current neighboring lower dimensional element.
unsigned int _current_neighbor_side
The current side of the selected neighboring element (valid only when working with sides) ...
void cacheResidualNodes(const DenseVector< Number > &res, const std::vector< dof_id_type > &dof_index, LocalDataKey, TagID tag)
Lets an external class cache residual at a set of nodes.
void init(const libMesh::CouplingMatrix *cm)
Initialize the Assembly object and set the CouplingMatrix for use throughout.
void prepareLowerD()
Prepare the Jacobians and residuals for a lower dimensional element.
bool _user_added_fe_neighbor_of_helper_type
const std::vector< std::vector< OutputGradient > > & get_dphi() const
void buildFaceNeighborFE(FEType type) const
Build FEs for a neighbor face with a type.
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face
void reinitLowerDElem(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
Reinitialize FE data for a lower dimenesional element with a given set of reference points...
void computeCurrentFaceVolume()
std::vector< std::vector< DenseVector< Number > > > _sub_Rl
residual contributions for each variable from the lower dimensional element
This data structure is used to store geometric and variable related metadata about each cell face in ...
QRules & qrules(unsigned int dim)
virtual const FieldVariablePhiSecond & secondPhiFaceNeighbor() const =0
Return the rank-2 tensor of second derivatives of the variable's shape functions on a neighboring ele...
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const =0
Get neighbor DOF indices for currently selected element.
std::unique_ptr< libMesh::QBase > vol
volume/elem (meshdim) quadrature rule
virtual void add_matrix(const DenseMatrix< T > &dm, const std::vector< numeric_index_type > &rows, const std::vector< numeric_index_type > &cols)=0
void prepareOffDiagScalar()
VectorVariablePhiSecond _second_phi
unsigned int size() const
The number of elements that can currently be stored in the array.
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.
std::vector< ADReal > _ad_dzetadx_map
void addJacobianLowerD(GlobalDataKey)
Add portions of the Jacobian of LowerLower, LowerSecondary, and SecondaryLower for boundary condition...
virtual const FieldVariablePhiSecond & secondPhiFace() const =0
Return the rank-2 tensor of second derivatives of the variable's shape functions on an element face...
void setPoints(const std::vector< libMesh::Point > &points)
Set the quadrature points.
const Elem * neighborPtr() const
VectorVariablePhiGradient _grad_phi
MooseArray< ADReal > _ad_curvatures
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.
void modifyArbitraryWeights(const std::vector< Real > &weights)
Modify the weights when using the arbitrary quadrature rule.
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableScalar * > > _cm_fs_entry
Entries in the coupling matrix for field variables vs scalar variables.
const Node & node_ref(const unsigned int i) const
const std::vector< Real > * _JxW_msm
A JxW for working on mortar segement elements.
std::vector< ADReal > _ad_dzetady_map
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
void coordTransformFactor(const SubProblem &s, const SubdomainID sub_id, const P &point, C &factor, const SubdomainID neighbor_sub_id)
Computes a conversion multiplier for use when computing integraals for the current coordinate system ...
dof_id_type numeric_index_type
std::map< FEType, ADTemplateVariablePhiGradient< Real > > _ad_grad_phi_data
template void coordTransformFactor< Point, Real >(const SubProblem &s, SubdomainID sub_id, const Point &point, Real &factor, SubdomainID neighbor_sub_id)
std::unordered_map< SubdomainID, std::vector< QRules > > _qrules
Holds quadrature rules for each dimension.
void prepareResidual()
Sizes and zeroes the residual for the current element.
VectorVariablePhiCurl _curl_phi
std::map< FEType, FEBase * > _current_fe_neighbor
The "neighbor" fe object that matches the current elem.
Real elementVolume(const Elem *elem) const
On-demand computation of volume element accounting for RZ/RSpherical.
void cacheJacobianNeighbor(GlobalDataKey)
Takes the values that are currently in the neighbor Dense Matrices and appends them to the cached val...
SubdomainID _current_neighbor_subdomain_id
The current neighbor subdomain ID.
const std::vector< std::vector< OutputGradient > > & get_dual_dphi() const
std::vector< std::vector< DenseVector< Number > > > _sub_Re
void reinitNeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
Reinitializes the neighbor side using reference coordinates.
std::vector< ADReal > _ad_dxidz_map
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_used
Flag that indicates if the jacobian block was used.
virtual numeric_index_type m() const=0
const Node *const * get_nodes() const
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
libMesh::QBase * _current_qrule_lower
quadrature rule used on lower dimensional elements.
std::vector< ADReal > _ad_detadx_map
void buildFaceFE(FEType type) const
Build FEs for a face with a type.
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_neighbor
types of finite elements
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 ...
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...
MooseArray< std::vector< Point > > _current_tangents
The current tangent vectors at the quadrature points.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
bool _calculate_curvatures
const std::vector< VectorTag > & _residual_vector_tags
The residual vector tags that Assembly could possibly contribute to.
virtual_for_inffe const std::vector< Real > & get_JxW() const
std::map< FEType, FEVectorBase * > _current_vector_fe_face_neighbor
The "neighbor face" vector fe object that matches the current elem.
std::vector< dof_id_type > _neighbor_extra_elem_ids
Extra element IDs of neighbor.
MooseArray< Real > _current_JxW
The current list of transformed jacobian weights.
std::vector< VectorValue< ADReal > > _ad_dxyzdxi_map
AD quantities.
virtual void zero_rows(std::vector< numeric_index_type > &rows, T diag_value=0.0)
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
std::vector< std::pair< unsigned int, unsigned short > > _disp_numbers_and_directions
Container of displacement numbers and directions.
std::vector< dof_id_type > _temp_dof_indices
Temporary work vector to keep from reallocating it.
std::set< FEType > _need_neighbor_div
OutputTools< Real >::VariablePhiCurl VariablePhiCurl
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Kee
std::vector< VectorValue< ADReal > > _ad_d2xyzdxi2_map
unsigned int get_dim() const
std::vector< ADReal > _ad_jac
std::set< FEType > _need_curl
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...
unsigned int n_points() const
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_lower
OStreamProxy err(std::cerr)
const VariablePhiSecond & secondPhiFace(const MooseVariableField< Real > &) const
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data
virtual_for_inffe const std::vector< Point > & get_xyz() const
bool usesPhiNeighbor() const
Whether or not this variable is actually using the shape function value.
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_face
types of vector finite elements
libMesh::QBase * _current_qrule_volume
The current volumetric quadrature for the element.
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
virtual bool computingSecond() const =0
Whether or not this variable is computing any second derivatives.
unsigned int number() const
Gets the number of this system.
std::vector< T > stdVector() const
Extremely inefficient way to produce a std::vector from a MooseArray!
libMesh::QBase * qruleFace(const Elem *elem, unsigned int side)
This is an abstraction over the internal qrules function.
bool _calculate_ad_coord
Whether to calculate coord with AD.
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_lower
const Elem * _current_lower_d_elem
The current lower dimensional element.
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...
const VariablePhiValue & phiFace() const
std::set< FEType > _need_second_derivative
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_lower
FE objects for lower dimensional elements.
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
std::set< FEType > _need_face_neighbor_div
libMesh::QBase * _qrule_msm
A qrule object for working on mortar segement elements.
libMesh::ElemSideBuilder _current_neighbor_side_elem_builder
In place side element builder for _current_neighbor_side_elem.
OutputTools< Real >::VariablePhiDivergence VariablePhiDivergence
Real _current_lower_d_elem_volume
The current lower dimensional element volume.
libMesh::QBase * _current_qrule
The current current quadrature rule being used (could be either volumetric or arbitrary - for dirac k...
std::map< unsigned int, std::map< FEType, FEBase * > > _fe
Each dimension's actual fe objects indexed on type.
const MooseArray< Real > & JxW() const
Returns the reference to the transformed jacobian weights.
void reinitMortarElem(const Elem *elem)
reinitialize a mortar segment mesh element in order to get a proper JxW
Real _current_side_volume
Volume of the current side element.
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...
std::set< FEType > _need_div
std::vector< std::vector< Real > > _cached_residual_values
Values cached by calling cacheResidual() (the first vector is for TIME vs NONTIME) ...
virtual bool usesSecondPhiNeighbor() const =0
Whether or not this variable is actually using the shape function second derivatives.
virtual const FieldVariablePhiSecond & secondPhiNeighbor() const =0
Return the rank-2 tensor of second derivatives of the variable's shape functions on a neighboring ele...
void buildVectorFE(FEType type) const
Build Vector FEs with a type.
virtual const FieldVariablePhiGradient & gradPhiFaceNeighbor() const =0
Return the gradients of the variable's shape functions on a neighboring element face.
void addJacobianNeighborTags(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, std::vector< dof_id_type > &neighbor_dof_indices, GlobalDataKey, const std::set< TagID > &tags)
Adds three neighboring element matrices for ivar rows and jvar columns to the global Jacobian matrix...
void reinitFVFace(const FaceInfo &fi)
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_lower
Vector FE objects for lower dimensional elements.
const MooseArray< Real > & JxWNeighbor() const
Returns the reference to the transformed jacobian weights on a current face.
const Node * _current_node
The current node we are working with.
bool _building_helpers
Whether we are currently building the FE classes for the helpers.
virtual unsigned int numMatrixTags() const
The total number of tags.
OutputTools< Real >::VariablePhiGradient VariablePhiGradient
std::vector< ADReal > _ad_dxidx_map
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a scalar variable with specified number.
std::vector< ADReal > _ad_dxidy_map
std::vector< VectorValue< ADReal > > _ad_d2xyzdxideta_map
void set_calculate_default_dual_coeff(const bool val)
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_face_neighbor
void addJacobian(GlobalDataKey)
Adds all local Jacobian to the global Jacobian matrices.
MooseArray< Point > _current_normals
The current Normal vectors at the quadrature points.
virtual const FieldVariablePhiValue & phiFace() const =0
Return the variable's shape functions on an element face.
void buildVectorFaceFE(FEType type) const
Build Vector FEs for a face with a type.
void havePRefinement(const std::unordered_set< FEFamily > &disable_p_refinement_for_families)
Indicate that we have p-refinement.
const SubdomainID ANY_BLOCK_ID
MooseArray< VectorValue< ADReal > > _ad_q_points
const VariablePhiGradient & gradPhiNeighbor(const MooseVariableField< Real > &) const
MooseArray< VectorValue< ADReal > > _ad_q_points_face
virtual const FieldVariablePhiGradient & gradPhi() const =0
Return the gradients of the variable's elemental shape functions.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const libMesh::CouplingMatrix * _cm
Coupling matrices.
void hasScalingVector()
signals this object that a vector containing variable scaling factors should be used when doing resid...
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.
subdomain_id_type subdomain_id() const
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_dual_lower
void zeroCachedJacobian(GlobalDataKey)
Zero out previously-cached Jacobian rows.
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...
void constrain_element_vector(DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
void setNeighborQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for neighbor integration.
const std::vector< Point > & get_points() const
virtual unsigned short dim() const=0
bool usesGradPhiNeighbor() const
Whether or not this variable is actually using the shape function gradient.
void prepareVariableNonlocal(MooseVariableFieldBase *var)
void release()
Manually deallocates the data pointer.
std::map< FEType, std::unique_ptr< FEShapeData > > _fe_shape_data_face
virtual libMesh::SparseMatrix< Number > & getMatrix(TagID tag)
Get a raw SparseMatrix.
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data
Shape function values, gradients, second derivatives for each vector FE type.
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...
MooseArray< Real > _coord_msm
The coordinate transformation coefficients evaluated on the quadrature points of the mortar segment m...
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Keg
bool _need_lower_d_elem_volume
Whether we need to compute the lower dimensional element volume.
bool _user_added_fe_face_of_helper_type
const std::vector< dof_id_type > & allDofIndices() const
Get all global dofindices for the variable.
void buildVectorNeighborFE(FEType type) const
Build Vector FEs for a neighbor with a type.
std::unique_ptr< ArbitraryQuadrature > arbitrary_vol
volume/elem (meshdim) custom points quadrature rule
void reinitFENeighbor(const Elem *neighbor, const std::vector< Point > &reference_points)
void initNonlocalCoupling()
Create pair of variables requiring nonlocal jacobian contributions.
std::map< unsigned int, FEBase * > _holder_fe_face_helper
Each dimension's helper objects.
const std::vector< std::vector< Real > > & get_dphidxi_map() const
const Elem *const & neighbor() const
Return the neighbor element.
std::map< unsigned int, std::map< FEType, FEVectorBase * > > _vector_fe_neighbor
virtual Real volume() const
void cacheJacobianNonlocal(GlobalDataKey)
Takes the values that are currently in _sub_Keg and appends them to the cached values.
Class for scalar variables (they are different).
IntRange< T > make_range(T beg, T end)
std::vector< std::unique_ptr< FEBase > > _unique_fe_face_neighbor_helper
void resize(unsigned int size)
Change the number of elements the array can store.
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...
void helpersRequestData()
request phi, dphi, xyz, JxW, etc.
std::vector< std::pair< MooseVariableFieldBase *, MooseVariableFieldBase * > > _cm_nonlocal_entry
Entries in the coupling matrix for field variables for nonlocal calculations.
void addJacobianOffDiagScalar(unsigned int ivar, GlobalDataKey)
Add Jacobians for a scalar variables with all other field variables into the global Jacobian matrices...
virtual void init(const Elem &e, unsigned int p_level=invalid_uint)
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.
std::vector< dof_id_type > _row_indices
Working vectors to avoid repeated heap allocations when caching residuals/Jacobians that must have li...
void buildLowerDFE(FEType type) const
Build FEs for a lower dimensional element with a type.
virtual unsigned int size() const override final
unsigned int _current_side
The current side of the selected element (valid only when working with sides)
void setCachedJacobian(GlobalDataKey)
Sets previously-cached Jacobian values via SparseMatrix::set() calls.
VariablePhiSecond _second_phi
const libMesh::CouplingMatrix & _nonlocal_cm
std::map< unsigned int, FEBase * > _holder_fe_helper
Each dimension's helper objects.
void prepareVariable(MooseVariableFieldBase *var)
Used for preparing the dense residual and jacobian blocks for one particular variable.
const Elem * _current_neighbor_side_elem
The current side element of the ncurrent neighbor element.
DenseMatrix< Number > _element_matrix
A working matrix to avoid repeated heap allocations when caching Jacobians that must have libMesh-lev...
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
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...
void copyFaceShapes(MooseVariableField< T > &v)
std::vector< dof_id_type > _extra_elem_ids
Extra element IDs.
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
void clearCachedQRules()
Set the cached quadrature rules to nullptr.
void addJacobianBlockTags(libMesh::SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, GlobalDataKey, const std::set< TagID > &tags)
Add element matrix for ivar rows and jvar columns to the global Jacobian matrix for given tags...
void 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...
bool _current_side_volume_computed
Boolean to indicate whether current element side volumes has been computed.
virtual bool isScalarVariable(unsigned int var_name) const
virtual void reinit_dual_shape_coeffs(const Elem *, const std::vector< Point > &, const std::vector< Real > &)
std::map< FEType, ADTemplateVariablePhiGradient< RealVectorValue > > _ad_vector_grad_phi_data_face
std::vector< dof_id_type > _column_indices
Moose::VectorTagType _type
The type of the vector tag.
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...
std::unique_ptr< ArbitraryQuadrature > arbitrary_face
area/face (meshdim-1) custom points quadrature rule
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
virtual const std::vector< dof_id_type > & dofIndicesLower() const =0
Get dof indices for the current lower dimensional element (this is meaningful when performing mortar ...
void prepareBlock(unsigned int ivar, unsigned jvar, const std::vector< dof_id_type > &dof_indices)
std::map< unsigned int, std::map< FEType, FEBase * > > _fe_face_neighbor
void addJacobianNeighbor(GlobalDataKey)
Add ElementNeighbor, NeighborElement, and NeighborNeighbor portions of the Jacobian for compute objec...
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.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
VectorVariablePhiDivergence _div_phi
const std::vector< std::vector< OutputShape > > & get_dphidxi() const
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
Gets a reference to a variable of with specified name.
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.
bool _custom_mortar_qrule
Flag specifying whether a custom quadrature rule has been specified for mortar segment mesh...
const unsigned int & side() const
Returns the current side.
void computeCurrentElemVolume()
Real _current_neighbor_lower_d_elem_volume
The current neighboring lower dimensional element volume.
const FEMap & get_fe_map() const
bool _need_neighbor_lower_d_elem_volume
Whether we need to compute the neighboring lower dimensional element volume.
MooseArray< Point > _current_q_points
The current list of quadrature points.
bool _user_added_fe_of_helper_type
Whether user code requested a FEType the same as our _helper_type.
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.
Moose::CoordinateSystemType _coord_type
The coordinate system.
void setLowerQRule(libMesh::QBase *qrule, unsigned int dim)
Set the qrule to be used for lower dimensional integration.
void cacheJacobianMortar(GlobalDataKey)
Cache all portions of the Jacobian, e.g.
std::unique_ptr< ArbitraryQuadrature > neighbor
area/face (meshdim-1) custom points quadrature rule for DG
void buildVectorFaceNeighborFE(FEType type) const
Build Vector FEs for a neighbor face with a type.
void buildVectorDualLowerDFE(FEType type) const
void bumpVolumeQRuleOrder(Order volume_order, SubdomainID block)
Increases the element/volume quadrature order for the specified mesh block if and only if the current...
Storage for all of the information pretaining to a vector tag.
const Node *const & node() const
Returns the reference to the node.
std::vector< std::vector< std::vector< unsigned char > > > _jacobian_block_neighbor_used
Flag that indicates if the jacobian block for neighbor was used.
std::map< unsigned int, FEBase * > _holder_fe_lower_helper
helper object for transforming coordinates for lower dimensional element quadrature points ...
static constexpr subdomain_id_type invalid_subdomain_id
const libMesh::DofMap & _dof_map
DOF map.
virtual Order default_order() const=0
void computeADFace(const Elem &elem, const unsigned int side)
compute AD things on an element face
std::map< FEType, std::unique_ptr< VectorFEShapeData > > _vector_fe_shape_data_neighbor
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.
std::vector< std::vector< dof_id_type > > _cached_jacobian_cols
Column where the corresponding cached value should go.
void addCachedJacobian(GlobalDataKey)
Adds the values that have been cached by calling cacheJacobian() and or cacheJacobianNeighbor() to th...
DenseMatrix sub_matrix(unsigned int row_id, unsigned int row_size, unsigned int col_id, unsigned int col_size) const
MooseArray< Point > _current_q_points_face
The current quadrature points on a face.
void prepareBlockNonlocal(unsigned int ivar, unsigned jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices)
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
void bumpAllQRuleOrder(Order order, SubdomainID block)
Increases the element/volume and face/area quadrature orders for the specified mesh block if and only...
const VariablePhiSecond & secondPhiFaceNeighbor(const MooseVariableField< Real > &) const
const Elem * _current_side_elem
The current "element" making up the side we are currently on.
bool _block_diagonal_matrix
Will be true if our preconditioning matrix is a block-diagonal matrix. Which means that we can take s...
bool _need_JxW_neighbor
Flag to indicate that JxW_neighbor is needed.
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
void copyNeighborShapes(MooseVariableField< T > &v)
void cacheJacobianCoupledVarPair(const MooseVariableBase &ivar, const MooseVariableBase &jvar)
Caches element matrix for ivar rows and jvar columns.
dof_id_type node_id(const unsigned int i) const
MooseArray< Point > _current_q_points_face_neighbor
The current quadrature points on the neighbor face.
virtual void attach_quadrature_rule(QBase *q)=0
libMesh::ElemSideBuilder _current_side_elem_builder
In place side element builder for _current_side_elem.
VectorVariablePhiCurl _vector_curl_phi_face
auto index_range(const T &sizable)
Key structure for APIs adding/caching local element residuals/Jacobians.
std::set< FEType > _need_face_div
SubdomainID _current_subdomain_id
The current subdomain ID.
dof_id_type get_extra_integer(const unsigned int index) const
virtual numeric_index_type n() const=0
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.
void clearCachedResiduals(GlobalDataKey)
Clears all of the residuals in _cached_residual_rows and _cached_residual_values. ...
virtual const FieldVariablePhiGradient & gradPhiFace() const =0
Return the gradients of the variable's shape functions on an element face.
const Node * _current_neighbor_node
The current neighboring node we are working with.
std::vector< VectorValue< ADReal > > _ad_d2xyzdeta2_map
void clearCachedJacobian()
Clear any currently cached jacobians.
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi() const
const std::vector< std::vector< OutputShape > > & get_phi() const
const VariablePhiGradient & gradPhiFace() const
std::vector< std::vector< std::vector< DenseMatrix< Number > > > > _sub_Knl
dprimary/dlower (or dneighbor/dlower)
const std::vector< std::vector< OutputTensor > > & get_dual_d2phi() const
MooseVariableField< T > & getActualFieldVariable(THREAD_ID tid, const std::string &var_name)
Returns a field variable pointer - this includes finite volume variables.
void reinitFEFace(const Elem *elem, unsigned int side)
Just an internal helper function to reinit the face FE objects.
MooseArray< ADReal > _ad_JxW
MooseArray< ADReal > _ad_JxW_face
void computeFaceMap(const Elem &elem, const unsigned int side, const std::vector< Real > &qw)
void reinitDual(const Elem *elem, const std::vector< Point > &pts, const std::vector< Real > &JxW)
Reintialize dual basis coefficients based on a customized quadrature rule.
void 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.