https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MooseVariableFE.C
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#include "MooseVariableFE.h"
11#include <typeinfo>
12#include "TimeIntegrator.h"
13#include "NonlinearSystemBase.h"
14#include "DisplacedSystem.h"
15#include "Assembly.h"
16#include "MooseVariableData.h"
17#include "ArbitraryQuadrature.h"
18
19#include "libmesh/quadrature_monomial.h"
20
21using namespace libMesh;
22
23template <>
26{
28 params.addClassDescription(
29 "Represents standard field variables, e.g. Lagrange, Hermite, or non-constant Monomials");
30 return params;
31}
32
33template <>
36{
38 params.addClassDescription(
39 "Represents vector field variables, e.g. Vector Lagrange, Nedelec or Raviart-Thomas");
40 return params;
41}
42
43template <>
46{
48 params.addClassDescription(
49 "Used for grouping standard field variables with the same finite element family and order");
50 return params;
51}
52
53template <typename OutputType>
55 : MooseVariableField<OutputType>(parameters)
56{
57 _element_data = std::make_unique<MooseVariableData<OutputType>>(*this,
58 _sys,
59 _tid,
61 this->_assembly.qRule(),
62 this->_assembly.qRuleFace(),
63 this->_assembly.node(),
64 this->_assembly.elem());
65 _neighbor_data = std::make_unique<MooseVariableData<OutputType>>(
66 *this,
67 _sys,
68 _tid,
70 this->_assembly.qRuleNeighbor(), // Place holder
72 this->_assembly.nodeNeighbor(),
73 this->_assembly.neighbor());
75 std::make_unique<MooseVariableData<OutputType>>(*this,
76 _sys,
77 _tid,
79 this->_assembly.qRuleFace(),
80 this->_assembly.qRuleFace(), // Place holder
81 this->_assembly.node(), // Place holder
82 this->_assembly.lowerDElem());
83}
84
85template <typename OutputType>
86void
91
92template <typename OutputType>
93void
95{
96 _element_data->prepare();
99template <typename OutputType>
100void
102{
103 _neighbor_data->prepare();
106template <typename OutputType>
107void
109{
110 _lower_data->prepare();
111}
112
113template <typename OutputType>
114void
116{
117 _element_data->prepareAux();
118 _neighbor_data->prepareAux();
119 _lower_data->prepareAux();
120}
121
122template <typename OutputType>
123void
125{
126 _element_data->reinitNode();
127}
128
129template <typename OutputType>
130void
133 _element_data->reinitAux();
134}
135
136template <typename OutputType>
137void
139{
140 _neighbor_data->reinitAux();
141}
143template <typename OutputType>
144void
145MooseVariableFE<OutputType>::reinitNodes(const std::vector<dof_id_type> & nodes)
146{
147 _element_data->reinitNodes(nodes);
148}
149
150template <typename OutputType>
151void
152MooseVariableFE<OutputType>::reinitNodesNeighbor(const std::vector<dof_id_type> & nodes)
153{
154 _neighbor_data->reinitNodes(nodes);
155}
157template <typename OutputType>
158void
160 std::vector<dof_id_type> & dof_indices) const
161{
162 _element_data->getDofIndices(elem, dof_indices);
164
165template <typename OutputType>
168{
169 return _element_data->getNodalValue(node, Moose::Current);
170}
171
172template <typename OutputType>
175{
176 return _element_data->getNodalValue(node, Moose::Old);
178
179template <typename OutputType>
182{
183 return _element_data->getNodalValue(node, Moose::Older);
184}
185
186template <typename OutputType>
188MooseVariableFE<OutputType>::getElementalValue(const Elem * elem, unsigned int idx) const
189{
190 return _element_data->getElementalValue(elem, Moose::Current, idx);
191}
192
193template <typename OutputType>
195MooseVariableFE<OutputType>::getElementalValueOld(const Elem * elem, unsigned int idx) const
196{
197 return _element_data->getElementalValue(elem, Moose::Old, idx);
198}
199
200template <typename OutputType>
204 return _element_data->getElementalValue(elem, Moose::Older, idx);
206
207template <typename OutputType>
208void
210{
211 _element_data->insert(vector);
212}
213
214template <typename OutputType>
215void
218 _lower_data->insert(vector);
219}
220
221template <typename OutputType>
222void
224{
225 _element_data->add(vector);
226}
227
228template <typename OutputType>
229void
232 _element_data->addSolution(this->_sys.solution(), v);
233}
234
235template <typename OutputType>
236void
238{
239 _neighbor_data->addSolution(this->_sys.solution(), v);
240}
241
242template <typename OutputType>
246 mooseDeprecated("Use dofValues instead of dofValue");
247 return dofValues();
248}
249
250template <typename OutputType>
253{
254 return _element_data->dofValues();
255}
256
257template <typename OutputType>
260{
261 return _element_data->dofValuesOld();
262}
263
264template <typename OutputType>
267{
268 return _element_data->dofValuesOlder();
269}
270
271template <typename OutputType>
274{
275 return _element_data->dofValuesPreviousNL();
276}
277
278template <typename OutputType>
281{
282 return _neighbor_data->dofValues();
283}
284
285template <typename OutputType>
288{
289 return _neighbor_data->dofValuesOld();
290}
291
292template <typename OutputType>
295{
296 return _neighbor_data->dofValuesOlder();
297}
298
299template <typename OutputType>
302{
303 return _neighbor_data->dofValuesPreviousNL();
304}
305
306template <typename OutputType>
309{
310 return _element_data->dofValuesDot();
311}
312
313template <typename OutputType>
316{
317 return _element_data->dofValuesDotDot();
318}
319
320template <typename OutputType>
323{
324 return _element_data->dofValuesDotOld();
325}
326
327template <typename OutputType>
330{
331 return _element_data->dofValuesDotDotOld();
332}
333
334template <typename OutputType>
337{
338 return _neighbor_data->dofValuesDot();
339}
340
341template <typename OutputType>
344{
345 return _neighbor_data->dofValuesDotDot();
346}
347
348template <typename OutputType>
351{
352 return _neighbor_data->dofValuesDotOld();
353}
354
355template <typename OutputType>
358{
359 return _neighbor_data->dofValuesDotDotOld();
360}
361
362template <typename OutputType>
363const MooseArray<Number> &
365{
366 return _element_data->dofValuesDuDotDu();
367}
368
369template <typename OutputType>
370const MooseArray<Number> &
372{
373 return _element_data->dofValuesDuDotDotDu();
374}
375
376template <typename OutputType>
377const MooseArray<Number> &
379{
380 return _neighbor_data->dofValuesDuDotDu();
381}
382
383template <typename OutputType>
384const MooseArray<Number> &
386{
387 return _neighbor_data->dofValuesDuDotDotDu();
388}
389
390template <typename OutputType>
391void
393{
394 _element_data->prepareIC();
395}
396
397template <typename OutputType>
398void
400{
401 _element_data->setGeometry(Moose::Volume);
402 _element_data->computeValues();
403}
404
405template <typename OutputType>
406void
408{
409 _element_data->setGeometry(Moose::Face);
410 _element_data->computeValues();
411}
412
413template <typename OutputType>
414void
416{
417 _neighbor_data->setGeometry(Moose::Face);
418 _neighbor_data->computeValues();
419}
420
421template <typename OutputType>
422void
424{
425 _neighbor_data->setGeometry(Moose::Volume);
426 _neighbor_data->computeValues();
427}
428
429template <typename OutputType>
430void
432{
433 _lower_data->setGeometry(Moose::Volume);
434 _lower_data->computeValues();
435}
436
437template <typename OutputType>
438void
440{
441 _element_data->computeIncrementAtQps(increment_vec);
442}
443
444template <typename OutputType>
445void
447{
448 _element_data->computeIncrementAtNode(increment_vec);
449}
450
451template <typename OutputType>
452OutputType
454 const std::vector<std::vector<OutputShape>> & phi) const
455{
456 std::vector<dof_id_type> dof_indices;
457 this->_dof_map.dof_indices(elem, dof_indices, _var_num);
458
459 OutputType value = 0;
460 if (isNodal())
461 {
462 mooseAssert(dof_indices.size() == phi.size(),
463 "The number of shapes does not match the number of dof indices on the elem");
464
465 for (unsigned int i = 0; i < dof_indices.size(); ++i)
466 {
467 // The zero index is because we only have one point that the phis are evaluated at
468 value += phi[i][0] * (*this->_sys.currentSolution())(dof_indices[i]);
469 }
470 }
471 else
472 {
473 mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
474 value = (*this->_sys.currentSolution())(dof_indices[0]);
475 }
476
477 return value;
478}
479
480template <>
483 const std::vector<std::vector<Real>> & phi) const
484{
485 std::vector<dof_id_type> dof_indices;
486 this->_dof_map.dof_indices(elem, dof_indices, _var_num);
487
488 RealEigenVector value(_count);
489 if (isNodal())
490 {
491 for (unsigned int i = 0; i < dof_indices.size(); ++i)
492 for (unsigned int j = 0; j < _count; j++)
493 {
494 // The zero index is because we only have one point that the phis are evaluated at
495 value(j) += phi[i][0] * (*this->_sys.currentSolution())(dof_indices[i] + j);
496 }
497 }
498 else
499 {
500 mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
501 unsigned int n = 0;
502 for (unsigned int j = 0; j < _count; j++)
503 {
504 value(j) = (*this->_sys.currentSolution())(dof_indices[0] + n);
505 n += this->_dof_indices.size();
506 }
507 }
508
509 return value;
512template <typename OutputType>
515 const Elem * elem,
516 const std::vector<std::vector<typename OutputTools<OutputType>::OutputShapeGradient>> &
517 grad_phi) const
518{
519 std::vector<dof_id_type> dof_indices;
520 this->_dof_map.dof_indices(elem, dof_indices, _var_num);
521
523 if (isNodal())
524 {
525 for (unsigned int i = 0; i < dof_indices.size(); ++i)
526 {
527 // The zero index is because we only have one point that the phis are evaluated at
528 value += grad_phi[i][0] * (*this->_sys.currentSolution())(dof_indices[i]);
529 }
530 }
531 else
532 {
533 mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
534 value = 0.0;
535 }
536
537 return value;
538}
539
540template <>
543 const Elem * elem, const std::vector<std::vector<RealVectorValue>> & grad_phi) const
544{
545 std::vector<dof_id_type> dof_indices;
546 this->_dof_map.dof_indices(elem, dof_indices, _var_num);
547
548 RealVectorArrayValue value(_count, LIBMESH_DIM);
549 if (isNodal())
550 {
551 for (unsigned int i = 0; i < dof_indices.size(); ++i)
552 for (unsigned int j = 0; j < _count; ++j)
553 for (const auto k : make_range(Moose::dim))
554 {
555 // The zero index is because we only have one point that the phis are evaluated at
556 value(j, k) += grad_phi[i][0](k) * (*this->_sys.currentSolution())(dof_indices[i] + j);
557 }
558 }
559 else
560 {
561 mooseAssert(dof_indices.size() == 1, "Wrong size for dof indices");
563
564 return value;
565}
566
567template <typename OutputType>
568const OutputType &
570{
571 return _element_data->nodalValue(Moose::Current);
572}
574template <typename OutputType>
575const OutputType &
577{
578 return _neighbor_data->nodalValue(Moose::Current);
579}
580
581template <typename OutputType>
584{
585 return _element_data->nodalVectorTagValue(tag);
588template <typename OutputType>
592 return _element_data->nodalMatrixTagValue(tag);
595template <typename OutputType>
596const OutputType &
599 return _element_data->nodalValue(Moose::Old);
601
602template <typename OutputType>
603const OutputType &
606 return _neighbor_data->nodalValue(Moose::Old);
608
609template <typename OutputType>
610const OutputType &
612{
613 return _element_data->nodalValue(Moose::Older);
614}
615
616template <typename OutputType>
617const OutputType &
619{
620 return _neighbor_data->nodalValue(Moose::Older);
622
623template <typename OutputType>
624const OutputType &
626{
627 return _element_data->nodalValue(Moose::PreviousNL);
628}
630template <typename OutputType>
631const OutputType &
633{
634 return _neighbor_data->nodalValue(Moose::PreviousNL);
635}
636
637template <typename OutputType>
638const OutputType &
640{
641 return _element_data->nodalValueDot();
642}
643
644template <typename OutputType>
645const OutputType &
647{
648 return _element_data->nodalValueDotDot();
649}
650
651template <typename OutputType>
652const OutputType &
654{
655 return _element_data->nodalValueDotOld();
656}
657
658template <typename OutputType>
659const OutputType &
661{
662 return _element_data->nodalValueDotDotOld();
663}
665template <typename OutputType>
666void
669 _element_data->computeNodalValues();
672template <typename OutputType>
673void
676 _neighbor_data->computeNodalValues();
678
679template <typename OutputType>
680void
681MooseVariableFE<OutputType>::setNodalValue(const OutputType & value, unsigned int idx)
682{
683 _element_data->setNodalValue(value, idx);
684}
685
686template <typename OutputType>
687void
688MooseVariableFE<OutputType>::setDofValue(const DofValue & value, unsigned int index)
689{
690 _element_data->setDofValue(value, index);
691}
692
693template <typename OutputType>
694void
696{
697 _element_data->setDofValues(values);
698}
699
700template <typename OutputType>
701void
707template <typename OutputType>
708void
710{
711 _element_data->insertNodalValue(residual, v);
714template <typename OutputType>
717{
718 return _element_data->secondPhi();
719}
720
721template <typename OutputType>
724{
725 return _element_data->curlPhi();
726}
727
728template <typename OutputType>
731{
732 return _element_data->divPhi();
733}
734
735template <typename OutputType>
738{
739 return _element_data->secondPhiFace();
740}
741
742template <typename OutputType>
745{
746 return _element_data->curlPhiFace();
747}
748
749template <typename OutputType>
753 return _element_data->divPhiFace();
756template <typename OutputType>
760 return _neighbor_data->secondPhi();
761}
763template <typename OutputType>
766{
767 return _neighbor_data->curlPhi();
769
770template <typename OutputType>
774 return _neighbor_data->divPhi();
775}
776
777template <typename OutputType>
780{
781 return _neighbor_data->secondPhiFace();
782}
783
784template <typename OutputType>
787{
788 return _neighbor_data->curlPhiFace();
789}
790
791template <typename OutputType>
794{
795 return _neighbor_data->divPhiFace();
796}
797
798template <typename OutputType>
799bool
801{
802 return _element_data->usesSecondPhi();
803}
804
805template <typename OutputType>
806bool
808{
809 return _neighbor_data->usesSecondPhi();
810}
811
812template <typename OutputType>
813bool
815{
816 return _element_data->computingCurl();
817}
818
819template <typename OutputType>
820bool
822{
823 return _element_data->computingDiv();
824}
825
826template <typename OutputType>
827bool
829{
830 return _element_data->isNodalDefined();
831}
832
833template <typename OutputType>
834bool
836{
837 return _neighbor_data->isNodalDefined();
838}
839
840template <typename OutputType>
841unsigned int
843{
844 unsigned int state = 0;
845 state = std::max(state, _element_data->oldestSolutionStateRequested());
846 state = std::max(state, _neighbor_data->oldestSolutionStateRequested());
847 state = std::max(state, _lower_data->oldestSolutionStateRequested());
848 return state;
849}
850
851template <typename OutputType>
852void
854{
855 _element_data->clearDofIndices();
856 _neighbor_data->clearDofIndices();
857 _lower_data->clearDofIndices();
858}
859
860template <typename OutputType>
862MooseVariableFE<OutputType>::evaluate(const NodeArg & node_arg, const StateArg & state) const
863{
864 mooseAssert(node_arg.node, "Must have a node");
865 const Node & node = *node_arg.node;
866 mooseAssert(node.n_dofs(this->_sys.number(), this->number()),
867 "Our variable must have dofs on the requested node");
868 const auto & soln = this->getSolution(state);
869 if constexpr (std::is_same<OutputType, Real>::value)
870 {
871 const auto dof_number = node.dof_number(this->_sys.number(), this->number(), 0);
872 ValueType ret = soln(dof_number);
873 if (Moose::doDerivatives(_subproblem, _sys))
874 Moose::derivInsert(ret.derivatives(), dof_number, 1);
875 return ret;
876 }
877 else if constexpr (std::is_same<OutputType, RealVectorValue>::value)
878 {
879 ValueType ret;
880 const auto do_derivatives = Moose::doDerivatives(_subproblem, _sys);
881 for (const auto d : make_range(this->_mesh.dimension()))
882 {
883 const auto dof_number = node.dof_number(this->_sys.number(), this->number(), d);
884 auto & component = ret(d);
885 component = soln(dof_number);
886 if (do_derivatives)
887 Moose::derivInsert(component.derivatives(), dof_number, 1);
888 }
889 return ret;
890 }
891 else
892 mooseError("RealEigenVector not yet supported for functors");
893}
894
895namespace
896{
897template <typename OutputType>
898struct FEBaseHelper
899{
900 typedef FEBase type;
901};
902
903template <>
904struct FEBaseHelper<RealVectorValue>
905{
906 typedef FEVectorBase type;
907};
908}
909
910template <typename OutputType>
911template <typename Shapes, typename Solution, typename GradShapes, typename GradSolution>
912void
914 const unsigned int n_qp,
915 const StateArg & state,
916 const Shapes & phi,
917 Solution & local_soln,
918 const GradShapes & grad_phi,
919 GradSolution & grad_local_soln,
920 Solution & dot_local_soln,
921 GradSolution & grad_dot_local_soln) const
922{
923 std::vector<dof_id_type> dof_indices;
924 this->_dof_map.dof_indices(elem, dof_indices, _var_num);
925 std::vector<ADReal> dof_values;
926 std::vector<ADReal> dof_values_dot;
927 dof_values.reserve(dof_indices.size());
928
929 const bool computing_dot = _time_integrator && _time_integrator->dt();
930 if (computing_dot)
931 dof_values_dot.reserve(dof_indices.size());
932
933 const bool do_derivatives = Moose::doDerivatives(_subproblem, _sys);
934 const auto & global_soln = getSolution(state);
935 for (const auto dof_index : dof_indices)
936 {
937 dof_values.push_back(ADReal(global_soln(dof_index)));
938 if (do_derivatives && state.state == 0)
939 Moose::derivInsert(dof_values.back().derivatives(), dof_index, 1.);
940 if (computing_dot)
941 {
942 if (_var_kind == Moose::VAR_SOLVER)
943 {
944 dof_values_dot.push_back(dof_values.back());
945 _time_integrator->computeADTimeDerivatives(
946 dof_values_dot.back(), dof_index, _ad_real_dummy);
947 }
948 else
949 dof_values_dot.push_back((*this->_sys.solutionUDot())(dof_index));
950 }
951 }
952
953 local_soln.resize(n_qp);
954 grad_local_soln.resize(n_qp);
955 if (computing_dot)
956 {
957 dot_local_soln.resize(n_qp);
958 grad_dot_local_soln.resize(n_qp);
959 }
960
961 for (const auto qp : make_range(n_qp))
962 {
963 local_soln[qp] = 0;
964 grad_local_soln[qp] = 0;
965 if (computing_dot)
966 {
967 dot_local_soln[qp] = 0;
968 grad_dot_local_soln[qp] = GradientType{};
969 }
970 for (const auto i : index_range(dof_indices))
971 {
972 local_soln[qp] += dof_values[i] * phi[i][qp];
973 grad_local_soln[qp] += dof_values[i] * grad_phi[i][qp];
974 if (computing_dot)
975 {
976 dot_local_soln[qp] += dof_values_dot[i] * phi[i][qp];
977 grad_dot_local_soln[qp] += dof_values_dot[i] * grad_phi[i][qp];
978 }
979 }
980 }
981}
982
983template <typename OutputType>
984void
986 const StateArg & state,
987 const bool cache_eligible) const
988{
989 mooseAssert(this->hasBlocks(elem_qp.elem->subdomain_id()),
990 "Variable " + this->name() + " doesn't exist on block " +
991 std::to_string(elem_qp.elem->subdomain_id()));
992
993 const Elem * const elem = elem_qp.elem;
994 if (!cache_eligible || (elem != _current_elem_qp_functor_elem))
995 {
996 const QBase * const qrule_template = elem_qp.qrule;
997
998 using FEBaseType = typename FEBaseHelper<OutputType>::type;
999 std::unique_ptr<FEBaseType> fe(FEBaseType::build(elem->dim(), _fe_type));
1000 auto qrule = qrule_template->clone();
1001
1002 const auto & phi = fe->get_phi();
1003 const auto & dphi = fe->get_dphi();
1004 fe->attach_quadrature_rule(qrule.get());
1005 fe->reinit(elem);
1006
1007 computeSolution(elem,
1008 qrule->n_points(),
1009 state,
1010 phi,
1011 _current_elem_qp_functor_sln,
1012 dphi,
1013 _current_elem_qp_functor_gradient,
1014 _current_elem_qp_functor_dot,
1015 _current_elem_qp_functor_grad_dot);
1016 }
1017 if (cache_eligible)
1018 _current_elem_qp_functor_elem = elem;
1019 else
1020 // These evaluations are not eligible for caching, e.g. maybe this is a single point quadrature
1021 // rule evaluation at an arbitrary point and we don't want those evaluations to potentially be
1022 // re-used when this function is called with a standard quadrature rule or a different point
1023 _current_elem_qp_functor_elem = nullptr;
1024}
1025
1026template <>
1027void
1028MooseVariableFE<RealEigenVector>::evaluateOnElement(const ElemQpArg &, const StateArg &, bool) const
1029{
1030 mooseError("evaluate not implemented for array variables");
1031}
1032
1033template <typename OutputType>
1035MooseVariableFE<OutputType>::evaluate(const ElemQpArg & elem_qp, const StateArg & state) const
1036{
1037 evaluateOnElement(elem_qp, state, /*query_cache=*/true);
1038 const auto qp = elem_qp.qp;
1039 mooseAssert(qp < _current_elem_qp_functor_sln.size(),
1040 "The requested " << qp << " is outside our solution size");
1041 return _current_elem_qp_functor_sln[qp];
1042}
1043
1044template <typename OutputType>
1046MooseVariableFE<OutputType>::evaluate(const ElemArg & elem_arg, const StateArg & state) const
1047{
1048 const QMonomial qrule(elem_arg.elem->dim(), CONSTANT);
1049 // We can use whatever we want for the point argument since it won't be used
1050 const ElemQpArg elem_qp_arg{elem_arg.elem, /*qp=*/0, &qrule, Point(0, 0, 0)};
1051 evaluateOnElement(elem_qp_arg, state, /*cache_eligible=*/false);
1052 return _current_elem_qp_functor_sln[0];
1053}
1054
1055template <typename OutputType>
1058 const StateArg & state,
1059 const std::vector<ValueType> & cache_data) const
1060{
1061 const QMonomial qrule(face_arg.fi->elem().dim() - 1, CONSTANT);
1062 auto side_evaluate =
1063 [this, &qrule, &state, &cache_data](const Elem * const elem, const unsigned int side)
1064 {
1065 // We can use whatever we want for the point argument since it won't be used
1066 const ElemSideQpArg elem_side_qp_arg{elem, side, /*qp=*/0, &qrule, Point(0, 0, 0)};
1067 evaluateOnElementSide(elem_side_qp_arg, state, /*cache_eligible=*/false);
1068 return cache_data[0];
1069 };
1070
1071 const auto continuity = this->getContinuity();
1072 bool on_elem;
1073 bool on_neighbor;
1074 if (!face_arg.face_side)
1075 {
1076 on_elem = this->hasBlocks(face_arg.fi->elemPtr()->subdomain_id());
1077 on_neighbor =
1078 face_arg.fi->neighborPtr() && this->hasBlocks(face_arg.fi->neighborPtr()->subdomain_id());
1079 }
1080 else
1081 {
1082 on_elem = face_arg.face_side == face_arg.fi->elemPtr();
1083 on_neighbor = face_arg.face_side == face_arg.fi->neighborPtr();
1084 }
1085
1086 // Only do multiple evaluations if we are not continuous and we are on an internal face
1087 if ((continuity != C_ZERO && continuity != C_ONE) && on_elem && on_neighbor)
1088 return (side_evaluate(face_arg.fi->elemPtr(), face_arg.fi->elemSideID()) +
1089 side_evaluate(face_arg.fi->neighborPtr(), face_arg.fi->neighborSideID())) /
1090 2;
1091 else if (on_elem)
1092 return side_evaluate(face_arg.fi->elemPtr(), face_arg.fi->elemSideID());
1093 else if (on_neighbor)
1094 return side_evaluate(face_arg.fi->neighborPtr(), face_arg.fi->neighborSideID());
1095 else
1096 mooseError(
1097 "Attempted to evaluate a moose finite element variable on a face where it is not defined");
1098}
1099
1100template <typename OutputType>
1102MooseVariableFE<OutputType>::evaluate(const FaceArg & face_arg, const StateArg & state) const
1103{
1104 return faceEvaluate(face_arg, state, _current_elem_side_qp_functor_sln);
1105}
1106
1107template <typename OutputType>
1110 const StateArg & state) const
1111{
1112 mooseAssert(elem_point_arg.elem, "We need an Elem");
1113 const Elem & elem = *elem_point_arg.elem;
1114 const auto dim = elem.dim();
1115 ArbitraryQuadrature qrule(dim);
1116 const std::vector<Point> ref_point = {FEMap::inverse_map(dim, &elem, elem_point_arg.point)};
1117 qrule.setPoints(ref_point);
1118 // We can use whatever we want for the point argument since it won't be used
1119 const ElemQpArg elem_qp_arg{elem_point_arg.elem, /*qp=*/0, &qrule, elem_point_arg.point};
1120 evaluateOnElement(elem_qp_arg, state, /*cache_eligible=*/false);
1121 return _current_elem_qp_functor_sln[0];
1122}
1123
1124template <typename OutputType>
1127 const StateArg & state) const
1128{
1129 evaluateOnElement(elem_qp, state, /*query_cache=*/true);
1130 const auto qp = elem_qp.qp;
1131 mooseAssert(qp < _current_elem_qp_functor_gradient.size(),
1132 "The requested " << qp << " is outside our gradient size");
1133 return _current_elem_qp_functor_gradient[qp];
1134}
1135
1136template <typename OutputType>
1139 const StateArg & state) const
1140{
1141 const QMonomial qrule(elem_arg.elem->dim(), CONSTANT);
1142 // We can use whatever we want for the point argument since it won't be used
1143 const ElemQpArg elem_qp_arg{elem_arg.elem, /*qp=*/0, &qrule, Point(0, 0, 0)};
1144 evaluateOnElement(elem_qp_arg, state, /*cache_eligible=*/false);
1145 return _current_elem_qp_functor_gradient[0];
1146}
1147
1148template <typename OutputType>
1151{
1152 mooseAssert(_time_integrator,
1153 "A time derivative is being requested but we do not have a time integrator so we'll "
1154 "have no idea how to compute it");
1155 mooseAssert(_time_integrator->dt(),
1156 "A time derivative is being requested but the time integrator wants to perform a 0s "
1157 "time step");
1158 evaluateOnElement(elem_qp, state, /*query_cache=*/true);
1159 const auto qp = elem_qp.qp;
1160 mooseAssert(qp < _current_elem_qp_functor_dot.size(),
1161 "The requested " << qp << " is outside our dot size");
1162 return _current_elem_qp_functor_dot[qp];
1163}
1164
1165template <typename OutputType>
1167MooseVariableFE<OutputType>::evaluateDot(const ElemArg & elem_arg, const StateArg & state) const
1168{
1169 mooseAssert(_time_integrator,
1170 "A time derivative is being requested but we do not have a time integrator so we'll "
1171 "have no idea how to compute it");
1172 mooseAssert(_time_integrator->dt(),
1173 "A time derivative is being requested but the time integrator wants to perform a 0s "
1174 "time step");
1175 const QMonomial qrule(elem_arg.elem->dim(), CONSTANT);
1176 // We can use whatever we want for the point argument since it won't be used
1177 const ElemQpArg elem_qp_arg{elem_arg.elem, /*qp=*/0, &qrule, Point(0, 0, 0)};
1178 evaluateOnElement(elem_qp_arg, state, /*cache_eligible=*/false);
1179 return _current_elem_qp_functor_dot[0];
1180}
1181
1182template <typename OutputType>
1185{
1186 mooseAssert(_time_integrator,
1187 "A time derivative is being requested but we do not have a time integrator so we'll "
1188 "have no idea how to compute it");
1189 mooseAssert(_time_integrator->dt(),
1190 "A time derivative is being requested but the time integrator wants to perform a 0s "
1191 "time step");
1192 const QMonomial qrule(elem_arg.elem->dim(), CONSTANT);
1193 // We can use whatever we want for the point argument since it won't be used
1194 const ElemQpArg elem_qp_arg{elem_arg.elem, /*qp=*/0, &qrule, Point(0, 0, 0)};
1195 evaluateOnElement(elem_qp_arg, state, /*cache_eligible=*/false);
1196 return _current_elem_qp_functor_grad_dot[0];
1197}
1198
1199template <typename OutputType>
1200void
1202 const StateArg & state,
1203 const bool cache_eligible) const
1204{
1205 mooseAssert(this->hasBlocks(elem_side_qp.elem->subdomain_id()),
1206 "Variable " + this->name() + " doesn't exist on block " +
1207 std::to_string(elem_side_qp.elem->subdomain_id()));
1208
1209 const Elem * const elem = elem_side_qp.elem;
1210 const auto side = elem_side_qp.side;
1211 if (!cache_eligible || elem != _current_elem_side_qp_functor_elem_side.first ||
1212 side != _current_elem_side_qp_functor_elem_side.second)
1213 {
1214 const QBase * const qrule_template = elem_side_qp.qrule;
1215
1216 using FEBaseType = typename FEBaseHelper<OutputType>::type;
1217 std::unique_ptr<FEBaseType> fe(FEBaseType::build(elem->dim(), _fe_type));
1218 auto qrule = qrule_template->clone();
1219
1220 const auto & phi = fe->get_phi();
1221 const auto & dphi = fe->get_dphi();
1222 fe->attach_quadrature_rule(qrule.get());
1223 fe->reinit(elem, side);
1224
1225 computeSolution(elem,
1226 qrule->n_points(),
1227 state,
1228 phi,
1229 _current_elem_side_qp_functor_sln,
1230 dphi,
1231 _current_elem_side_qp_functor_gradient,
1232 _current_elem_side_qp_functor_dot,
1233 _current_elem_side_qp_functor_grad_dot);
1234 }
1235 if (cache_eligible)
1236 _current_elem_side_qp_functor_elem_side = std::make_pair(elem, side);
1237 else
1238 // These evaluations are not eligible for caching, e.g. maybe this is a single point quadrature
1239 // rule evaluation at an arbitrary point and we don't want those evaluations to potentially be
1240 // re-used when this function is called with a standard quadrature rule or a different point
1241 _current_elem_side_qp_functor_elem_side = std::make_pair(nullptr, libMesh::invalid_uint);
1242}
1243
1244template <>
1245void
1247 const StateArg &,
1248 bool) const
1249{
1250 mooseError("evaluate not implemented for array variables");
1251}
1252
1253template <typename OutputType>
1256 const StateArg & state) const
1257{
1258 evaluateOnElementSide(elem_side_qp, state, true);
1259 const auto qp = elem_side_qp.qp;
1260 mooseAssert(qp < _current_elem_side_qp_functor_sln.size(),
1261 "The requested " << qp << " is outside our solution size");
1262 return _current_elem_side_qp_functor_sln[qp];
1263}
1264
1265template <typename OutputType>
1268 const StateArg & state) const
1269{
1270 evaluateOnElementSide(elem_side_qp, state, true);
1271 const auto qp = elem_side_qp.qp;
1272 mooseAssert(qp < _current_elem_side_qp_functor_gradient.size(),
1273 "The requested " << qp << " is outside our gradient size");
1274 return _current_elem_side_qp_functor_gradient[qp];
1275}
1276
1277template <typename OutputType>
1280 const StateArg & state) const
1281{
1282 mooseAssert(_time_integrator && _time_integrator->dt(),
1283 "A time derivative is being requested but we do not have a time integrator so we'll "
1284 "have no idea how to compute it");
1285 evaluateOnElementSide(elem_side_qp, state, true);
1286 const auto qp = elem_side_qp.qp;
1287 mooseAssert(qp < _current_elem_side_qp_functor_dot.size(),
1288 "The requested " << qp << " is outside our dot size");
1289 return _current_elem_side_qp_functor_dot[qp];
1290}
1291
1292template <typename OutputType>
1294MooseVariableFE<OutputType>::evaluateDot(const FaceArg & face_arg, const StateArg & state) const
1295{
1296 mooseAssert(_time_integrator && _time_integrator->dt(),
1297 "A time derivative is being requested but we do not have a time integrator so we'll "
1298 "have no idea how to compute it");
1299 return faceEvaluate(face_arg, state, _current_elem_side_qp_functor_dot);
1300}
1301
1302template <>
1304MooseVariableFE<RealEigenVector>::evaluate(const ElemQpArg &, const StateArg &) const
1305{
1306 mooseError(
1307 "MooseVariableFE::evaluate(ElemQpArg &, const StateArg &) overload not implemented for "
1308 "array variables");
1309}
1310
1311template <>
1313MooseVariableFE<RealEigenVector>::evaluate(const ElemSideQpArg &, const StateArg &) const
1314{
1315 mooseError("MooseVariableFE::evaluate(ElemSideQpArg &, const StateArg &) overload not "
1316 "implemented for array variables");
1317}
1318
1319template <>
1321MooseVariableFE<RealEigenVector>::evaluateGradient(const ElemQpArg &, const StateArg &) const
1322{
1323 mooseError("MooseVariableFE::evaluateGradient(ElemQpArg &, const StateArg &) overload not "
1324 "implemented for array variables");
1325}
1326
1327template <>
1329MooseVariableFE<RealEigenVector>::evaluateGradient(const ElemSideQpArg &, const StateArg &) const
1330{
1331 mooseError("MooseVariableFE::evaluateGradient(ElemSideQpArg &, const StateArg &) overload not "
1332 "implemented for array variables");
1333}
1334
1335template <>
1337MooseVariableFE<RealEigenVector>::evaluateDot(const ElemQpArg &, const StateArg &) const
1338{
1339 mooseError("MooseVariableFE::evaluateDot(ElemQpArg &, const StateArg &) overload not "
1340 "implemented for array variables");
1341}
1342
1343template <>
1345MooseVariableFE<RealEigenVector>::evaluateDot(const ElemSideQpArg &, const StateArg &) const
1346{
1347 mooseError("MooseVariableFE::evaluateDot(ElemSideQpArg &, const StateArg &) overload not "
1348 "implemented for array variables");
1349}
1350
1351template <typename OutputType>
1352void
1354{
1355 _current_elem_qp_functor_elem = nullptr;
1356 _current_elem_side_qp_functor_elem_side = std::make_pair(nullptr, libMesh::invalid_uint);
1358}
1359
1360template <typename OutputType>
1361void
1363{
1364 _current_elem_qp_functor_elem = nullptr;
1365 _current_elem_side_qp_functor_elem_side = std::make_pair(nullptr, libMesh::invalid_uint);
1367}
1368
1369template <typename OutputType>
1370void
1372{
1373 _current_elem_qp_functor_elem = nullptr;
1374 _current_elem_side_qp_functor_elem_side = std::make_pair(nullptr, libMesh::invalid_uint);
1376}
1377
1378template <typename OutputType>
1379void
1381{
1382 _element_data->sizeMatrixTagData();
1383 _neighbor_data->sizeMatrixTagData();
1384 _lower_data->sizeMatrixTagData();
1385}
1386
1387template class MooseVariableFE<Real>;
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition MooseError.h:363
unsigned int TagID
Definition MooseTypes.h:238
std::array< Real, 2 > values
Definition MortarUtils.C:52
unsigned int dim
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
void setPoints(const std::vector< libMesh::Point > &points)
Set the quadrature points.
const Elem *const & elem() const
Return the current element.
Definition Assembly.h:414
const libMesh::QBase *const & qRuleNeighbor() const
Returns the reference to the current quadrature being used on a current neighbor.
Definition Assembly.h:518
const Node *const & node() const
Returns the reference to the node.
Definition Assembly.h:545
const libMesh::QBase *const & qRuleFace() const
Returns the reference to the current quadrature being used on a current face.
Definition Assembly.h:322
const libMesh::QBase *const & qRule() const
Returns the reference to the current quadrature being used.
Definition Assembly.h:235
const Node *const & nodeNeighbor() const
Returns the reference to the neighboring node.
Definition Assembly.h:551
const Elem *const & neighbor() const
Return the neighbor element.
Definition Assembly.h:470
const Elem *const & lowerDElem() const
Return the lower dimensional element.
Definition Assembly.h:476
unsigned int neighborSideID() const
Definition FaceInfo.h:114
const Elem & elem() const
Definition FaceInfo.h:85
const Elem * neighborPtr() const
Definition FaceInfo.h:88
unsigned int elemSideID() const
Definition FaceInfo.h:113
const Elem * elemPtr() const
Definition FaceInfo.h:86
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
virtual void meshChanged()
Called on this object when the mesh changes.
forward declarations
Definition MooseArray.h:18
THREAD_ID _tid
Thread ID.
Assembly & _assembly
Assembly data.
SystemBase & _sys
System this variable is part of.
Class for stuff related to variables.
const MooseArray< libMesh::Number > & dofValuesDuDotDu() const override
const OutputType & nodalValueOldNeighbor() const
virtual void computeElemValuesFace() override
Compute values at facial quadrature points.
OutputType getValue(const Elem *elem, const std::vector< std::vector< OutputShape > > &phi) const
Compute the variable value at a point on an element.
GradientType evaluateGradient(const ElemQpArg &elem_qp, const StateArg &state) const override
virtual void add(libMesh::NumericVector< libMesh::Number > &vector) override
Add the current local DOF values to the input vector.
const DofValues & dofValuesDotNeighbor() const override
virtual void residualSetup() override
Gets called just before the residual is computed and before this object is asked to do its job.
std::unique_ptr< MooseVariableData< OutputType > > _lower_data
Holder for all the data associated with the lower dimeensional element.
OutputTools< OutputType >::OutputGradient getGradient(const Elem *elem, const std::vector< std::vector< typename OutputTools< OutputType >::OutputShapeGradient > > &grad_phi) const
Compute the variable gradient value at a point on an element.
void reinitNode() override
ValueType faceEvaluate(const FaceArg &, const StateArg &, const std::vector< ValueType > &cache_data) const
A common method that both evaluate(FaceArg) and evaluateDot(FaceArg) can call.
const FieldVariablePhiCurl & curlPhiNeighbor() const
static InputParameters validParams()
DofValue getElementalValue(const Elem *elem, unsigned int idx=0) const
Get the current value of this variable on an element.
void evaluateOnElement(const ElemQpArg &elem_qp, const StateArg &state, bool cache_eligible) const
Evaluate solution and gradient for the elem_qp argument.
const DofValues & dofValuesDot() const override
void prepareAux() override
const DofValues & dofValues() const override
dof values getters
const DofValues & dofValuesPreviousNLNeighbor() const override
const OutputType & nodalValuePreviousNL() const
const OutputType & nodalValuePreviousNLNeighbor() const
DofValue getNodalValue(const Node &node) const
Get the value of this variable at given node.
void reinitAux() override
void computeSolution(const Elem *elem, unsigned int n_qp, const StateArg &state, const Shapes &phi, Solution &local_soln, const GradShapes &grad_phi, GradSolution &grad_local_soln, Solution &dot_local_soln, GradSolution &grad_dot_local_soln) const
Compute the solution, gradient, time derivative, and gradient of the time derivative with provided sh...
void computeIncrementAtNode(const libMesh::NumericVector< libMesh::Number > &increment_vec)
Compute and store incremental change at the current node based on increment_vec.
virtual void computeNodalNeighborValues() override
Compute nodal values of this variable in the neighbor.
void prepare() override
Prepare the elemental degrees of freedom.
const OutputType & nodalValueOld() const
void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes) override
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job.
virtual void computeNeighborValuesFace() override
Compute values at facial quadrature points for the neighbor.
const FieldVariablePhiDivergence & divPhiFace() const
const DofValues & dofValuesOlderNeighbor() const override
unsigned int oldestSolutionStateRequested() const override final
The oldest solution state that is requested for this variable (0 = current, 1 = old,...
bool usesSecondPhiNeighbor() const override final
Whether or not this variable is actually using the shape function second derivative on a neighbor.
const OutputType & nodalValueDotDot() const
void reinitAuxNeighbor() override
const OutputType & nodalValue() const
Methods for retrieving values of variables at the nodes.
const FieldVariablePhiCurl & curlPhi() const override final
Curl of the shape functions.
bool isNodalNeighborDefined() const
DofValue getNodalValueOlder(const Node &node) const
Get the t-2 value of this variable at given node.
bool computingDiv() const override final
Whether or not this variable is computing the divergence.
bool computingCurl() const override final
Whether or not this variable is computing the curl.
const DofValues & dofValuesDotOldNeighbor() const override
bool usesSecondPhi() const
Whether or not this variable is computing any second derivatives.
const FieldVariablePhiDivergence & divPhiFaceNeighbor() const
MooseVariableFE(const InputParameters &parameters)
virtual void setLowerDofValues(const DenseVector< DofValue > &values) override
Set local DOF values for a lower dimensional element and evaluate the values on quadrature points.
ValueType evaluate(const ElemQpArg &elem_qp, const StateArg &state) const override final
void prepareNeighbor() override
Prepare the neighbor element degrees of freedom.
const FieldVariablePhiSecond & secondPhiFace() const override final
Return the rank-2 tensor of second derivatives of the variable's shape functions on an element face.
void evaluateOnElementSide(const ElemSideQpArg &elem_side_qp, const StateArg &state, bool cache_eligible) const
Evaluate solution and gradient for the elem_side_qp argument.
virtual void computeNeighborValues() override
Compute values at quadrature points for the neighbor.
void addSolution(const DenseVector< libMesh::Number > &v)
Add passed in local DOF values onto the current solution.
const FieldVariablePhiSecond & secondPhi() const override final
Return the rank-2 tensor of second derivatives of the variable's elemental shape functions.
const MooseArray< libMesh::Number > & dofValuesDuDotDuNeighbor() const override
void prepareLowerD() override
Prepare a lower dimensional element's degrees of freedom.
DotType evaluateDot(const ElemQpArg &elem_qp, const StateArg &state) const override final
const DofValues & nodalVectorTagValue(TagID tag) const override
const DofValues & dofValuesDotDotNeighbor() const override
virtual void getDofIndices(const Elem *elem, std::vector< dof_id_type > &dof_indices) const override
const FieldVariablePhiCurl & curlPhiFaceNeighbor() const
const DofValues & dofValue() const
typename MooseVariableField< OutputType >::FieldVariablePhiSecond FieldVariablePhiSecond
typename MooseVariableField< OutputType >::FieldVariablePhiCurl FieldVariablePhiCurl
GradientType evaluateGradDot(const ElemArg &, const StateArg &) const override final
Evaluate the functor gradient-dot with a given element.
virtual void computeElemValues() override
Actually compute variable values from the solution vectors.
DofValue getElementalValueOld(const Elem *elem, unsigned int idx=0) const
Get the old value of this variable on an element.
const OutputType & nodalValueOlder() const
const FieldVariablePhiDivergence & divPhiNeighbor() const
const OutputType & nodalValueNeighbor() const
const FieldVariablePhiDivergence & divPhi() const override final
Divergence of the shape functions.
virtual void prepareIC() override
Prepare the initial condition.
virtual void insert(libMesh::NumericVector< libMesh::Number > &vector) override
Set the current local DOF values to the input vector.
void computeIncrementAtQps(const libMesh::NumericVector< libMesh::Number > &increment_vec)
Compute and store incremental change in solution at QPs based on increment_vec.
const OutputType & nodalValueDotDotOld() const
const FieldVariablePhiSecond & secondPhiFaceNeighbor() const override final
Return the rank-2 tensor of second derivatives of the variable's shape functions on a neighboring ele...
const FieldVariablePhiSecond & secondPhiNeighbor() const override final
Return the rank-2 tensor of second derivatives of the variable's shape functions on a neighboring ele...
virtual void setDofValues(const DenseVector< DofValue > &values) override
Set local DOF values and evaluate the values on quadrature points.
virtual void setDofValue(const DofValue &value, unsigned int index) override
Degree of freedom value setters.
virtual void computeLowerDValues() override
compute values at quadrature points on the lower dimensional element
DofValue getNodalValueOld(const Node &node) const
Get the old value of this variable at given node.
void reinitNodes(const std::vector< dof_id_type > &nodes) override
const DofValues & dofValuesDotDotOld() const override
void insertNodalValue(libMesh::NumericVector< libMesh::Number > &residual, const DofValue &v)
Write a nodal value to the passed-in solution vector.
typename MooseVariableField< OutputType >::FieldVariablePhiDivergence FieldVariablePhiDivergence
std::unique_ptr< MooseVariableData< OutputType > > _element_data
Holder for all the data associated with the "main" element.
DofValue getElementalValueOlder(const Elem *elem, unsigned int idx=0) const
Get the older value of this variable on an element.
virtual void meshChanged() override
Called on this object when the mesh changes.
const DofValues & dofValuesDotOld() const override
const MooseArray< libMesh::Number > & dofValuesDuDotDotDu() const override
const DofValues & dofValuesNeighbor() const override
void clearAllDofIndices() final
const DofValues & dofValuesDotDotOldNeighbor() const override
virtual void setNodalValue(const OutputType &value, unsigned int idx=0) override
virtual void computeNodalValues() override
Compute nodal values of this variable.
virtual bool isNodalDefined() const override
Is this variable defined at nodes.
const OutputType & nodalValueOlderNeighbor() const
const DofValues & nodalMatrixTagValue(TagID tag) const override
virtual void insertLower(libMesh::NumericVector< libMesh::Number > &vector) override
Insert the currently cached degree of freedom values for a lower-dimensional element into the provide...
void addSolutionNeighbor(const DenseVector< libMesh::Number > &v)
Add passed in local neighbor DOF values onto the current solution.
void clearDofIndices() override
Clear out the dof indices.
const MooseArray< libMesh::Number > & dofValuesDuDotDotDuNeighbor() const override
const DofValues & dofValuesOldNeighbor() const override
std::unique_ptr< MooseVariableData< OutputType > > _neighbor_data
Holder for all the data associated with the neighbor element.
const DofValues & dofValuesOlder() const override
const OutputType & nodalValueDot() const
const DofValues & dofValuesPreviousNL() const override
virtual void sizeMatrixTagData() override
Size data structures related to matrix tagging.
const DofValues & dofValuesOld() const override
const OutputType & nodalValueDotOld() const
const DofValues & dofValuesDotDot() const override
const FieldVariablePhiCurl & curlPhiFace() const
virtual void clearDofIndices()=0
Clear out the dof indices.
Class for stuff related to variables.
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job.
typename MooseVariableDataBase< OutputType >::DofValue DofValue
static InputParameters validParams()
typename MooseVariableDataBase< OutputType >::DofValues DofValues
virtual void residualSetup() override
Gets called just before the residual is computed and before this object is asked to do its job.
typename FunctorReturnType< Moose::ADType< OutputType >::type, FunctorEvaluationKind::Gradient >::type GradientType
This rigmarole makes it so that a user can create functors that return containers (std::vector,...
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
unsigned int n_dofs(const unsigned int s, const unsigned int var=libMesh::invalid_uint) const
virtual unsigned short dim() const=0
subdomain_id_type subdomain_id() const
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
virtual std::unique_ptr< QBase > clone() const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
bool doDerivatives(const SubProblem &subproblem, const SystemBase &sys)
Definition ADUtils.C:83
@ Current
Definition MooseTypes.h:263
@ PreviousNL
Definition MooseTypes.h:266
@ VAR_SOLVER
Definition MooseTypes.h:770
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &derivs, libMesh::dof_id_type index, Real value)
Definition ADReal.h:21
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
auto index_range(const T &sizable)
Eigen::Matrix< Real, Eigen::Dynamic, Moose::dim > RealVectorArrayValue
Definition MooseTypes.h:149
const unsigned int invalid_uint
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition MooseTypes.h:147
IntRange< T > make_range(T beg, T end)
A structure that is used to evaluate Moose functors logically at an element/cell center.
const libMesh::Elem * elem
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
const libMesh::Elem * elem
Argument for requesting functor evaluation at a quadrature point location in an element.
const libMesh::Elem * elem
The element.
const libMesh::QBase * qrule
The quadrature rule.
unsigned int qp
The quadrature point index.
Argument for requesting functor evaluation at quadrature point locations on an element side.
const libMesh::Elem * elem
The element.
unsigned int qp
The quadrature point index.
unsigned int side
The local side index.
const libMesh::QBase * qrule
The quadrature rule.
A structure defining a "face" evaluation calling argument for Moose functors.
const libMesh::Elem * face_side
A member that can be used to indicate whether there is a sidedness to this face.
const FaceInfo * fi
a face information object which defines our location in space
const libMesh::Node * node
The node which defines our location in space.
State argument for evaluating functors.
unsigned int state
The state.