www.mooseframework.org
MooseVariableFE.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "MooseTypes.h"
13 #include "MooseVariableFEBase.h"
14 #include "SubProblem.h"
15 #include "MooseMesh.h"
16 #include "MooseVariableField.h"
17 #include "MooseVariableData.h"
18 
19 #include "libmesh/numeric_vector.h"
20 #include "libmesh/dof_map.h"
21 #include "libmesh/elem.h"
22 #include "libmesh/quadrature.h"
23 #include "libmesh/dense_vector.h"
24 #include "libmesh/enum_fe_family.h"
25 
26 class TimeIntegrator;
27 template <typename>
32 
45 template <typename OutputType>
46 class MooseVariableFE : public MooseVariableField<OutputType>
47 {
48 public:
52 
58 
63 
71 
79 
82 
87 
89 
91 
92  void clearDofIndices() override;
93 
94  void prepare() override;
95  void prepareNeighbor() override;
96  void prepareLowerD() override;
97  virtual void prepareIC() override;
98 
99  void prepareAux() override;
100 
101  void reinitNode() override;
102  void reinitAux() override;
103  void reinitAuxNeighbor() override;
104 
105  void reinitNodes(const std::vector<dof_id_type> & nodes) override;
106  void reinitNodesNeighbor(const std::vector<dof_id_type> & nodes) override;
107 
113  bool usesPhi() const { return true; }
119  bool usesGradPhi() const { return true; }
120 
124  bool usesSecondPhi() const;
125 
130  bool usesSecondPhiNeighbor() const override final;
131 
135  bool computingSecond() const override final { return usesSecondPhi(); }
136 
140  bool computingCurl() const override final;
141 
145  bool computingDiv() const override final;
146 
147  bool isNodal() const override { return _element_data->isNodal(); }
148  bool hasDoFsOnNodes() const override { return _element_data->hasDoFsOnNodes(); }
149  FEContinuity getContinuity() const override { return _element_data->getContinuity(); };
150  Moose::VarFieldType fieldType() const override;
151  bool isArray() const override;
152  bool isVector() const override;
153  const Node * const & node() const { return _element_data->node(); }
154  const dof_id_type & nodalDofIndex() const override { return _element_data->nodalDofIndex(); }
155  virtual bool isNodalDefined() const override;
156 
157  const Node * const & nodeNeighbor() const { return _neighbor_data->node(); }
158  const dof_id_type & nodalDofIndexNeighbor() const override
159  {
160  return _neighbor_data->nodalDofIndex();
161  }
162  bool isNodalNeighborDefined() const;
163 
164  const Elem * const & currentElem() const override { return _element_data->currentElem(); }
165 
169  const unsigned int & currentSide() const { return _element_data->currentSide(); }
170 
174  const Elem * const & neighbor() const { return _neighbor_data->currentElem(); }
175 
176  virtual void getDofIndices(const Elem * elem,
177  std::vector<dof_id_type> & dof_indices) const override;
178  const std::vector<dof_id_type> & dofIndices() const final { return _element_data->dofIndices(); }
179  unsigned int numberOfDofs() const final { return _element_data->numberOfDofs(); }
180  const std::vector<dof_id_type> & dofIndicesNeighbor() const final
181  {
182  return _neighbor_data->dofIndices();
183  }
184  const std::vector<dof_id_type> & dofIndicesLower() const final
185  {
186  return _lower_data->dofIndices();
187  }
188 
189  void clearAllDofIndices() final;
190 
191  unsigned int numberOfDofsNeighbor() override { return _neighbor_data->dofIndices().size(); }
192 
193  const FieldVariablePhiValue & phi() const override { return _element_data->phi(); }
194  const FieldVariablePhiGradient & gradPhi() const override final
195  {
196  return _element_data->gradPhi();
197  }
199  {
200  return _element_data->arrayGradPhi();
201  }
202  const FieldVariablePhiSecond & secondPhi() const override final;
203  const FieldVariablePhiCurl & curlPhi() const override final;
204  const FieldVariablePhiDivergence & divPhi() const override final;
205 
206  const FieldVariablePhiValue & phiFace() const override final { return _element_data->phiFace(); }
207  const FieldVariablePhiGradient & gradPhiFace() const override final
208  {
209  return _element_data->gradPhiFace();
210  }
212  {
213  return _element_data->arrayGradPhiFace();
214  }
215  const FieldVariablePhiSecond & secondPhiFace() const override final;
216  const FieldVariablePhiCurl & curlPhiFace() const;
217  const FieldVariablePhiDivergence & divPhiFace() const;
218 
219  const FieldVariablePhiValue & phiNeighbor() const override final { return _neighbor_data->phi(); }
220  const FieldVariablePhiGradient & gradPhiNeighbor() const override final
221  {
222  return _neighbor_data->gradPhi();
223  }
225  {
226  return _neighbor_data->arrayGradPhi();
227  }
228  const FieldVariablePhiSecond & secondPhiNeighbor() const override final;
229  const FieldVariablePhiCurl & curlPhiNeighbor() const;
231 
232  const FieldVariablePhiValue & phiFaceNeighbor() const override final
233  {
234  return _neighbor_data->phiFace();
235  }
236  const FieldVariablePhiGradient & gradPhiFaceNeighbor() const override final
237  {
238  return _neighbor_data->gradPhiFace();
239  }
241  {
242  return _neighbor_data->arrayGradPhiFace();
243  }
244  const FieldVariablePhiSecond & secondPhiFaceNeighbor() const override final;
247 
248  virtual const FieldVariablePhiValue & phiLower() const override { return _lower_data->phi(); }
249  const FieldVariablePhiGradient & gradPhiLower() const { return _lower_data->gradPhi(); }
250 
252  {
253  return _element_data->adGradPhi();
254  }
255 
257  {
258  return _element_data->adGradPhiFace();
259  }
260 
262  {
263  return _neighbor_data->adGradPhiFace();
264  }
265 
266  // damping
267  const FieldVariableValue & increment() const { return _element_data->increment(); }
268 
269  const FieldVariableValue & vectorTagValue(TagID tag) const override
270  {
271  return _element_data->vectorTagValue(tag);
272  }
274  {
275  return _element_data->vectorTagGradient(tag);
276  }
277  const DoFValue & vectorTagDofValue(TagID tag) const override
278  {
279  return _element_data->vectorTagDofValue(tag);
280  }
281  const FieldVariableValue & matrixTagValue(TagID tag) const override
282  {
283  return _element_data->matrixTagValue(tag);
284  }
285 
287  const FieldVariableValue & sln() const override { return _element_data->sln(Moose::Current); }
288  const FieldVariableValue & slnOld() const override { return _element_data->sln(Moose::Old); }
289  const FieldVariableValue & slnOlder() const override { return _element_data->sln(Moose::Older); }
291 
293  const FieldVariableGradient & gradSln() const override
294  {
295  return _element_data->gradSln(Moose::Current);
296  }
297  const FieldVariableGradient & gradSlnOld() const override
298  {
299  return _element_data->gradSln(Moose::Old);
300  }
302  {
303  return _element_data->gradSln(Moose::Older);
304  }
306  {
307  return _element_data->gradSln(Moose::PreviousNL);
308  }
309 
311  const FieldVariableGradient & gradSlnDot() const { return _element_data->gradSlnDot(); }
312  const FieldVariableGradient & gradSlnDotDot() const { return _element_data->gradSlnDotDot(); }
313 
315  const FieldVariableSecond & secondSln() const { return _element_data->secondSln(Moose::Current); }
316  const FieldVariableSecond & secondSlnOld() const { return _element_data->secondSln(Moose::Old); }
318  {
319  return _element_data->secondSln(Moose::Older);
320  }
322  {
323  return _element_data->secondSln(Moose::PreviousNL);
324  }
325 
327  const FieldVariableCurl & curlSln() const { return _element_data->curlSln(Moose::Current); }
328  const FieldVariableCurl & curlSlnOld() const { return _element_data->curlSln(Moose::Old); }
329  const FieldVariableCurl & curlSlnOlder() const { return _element_data->curlSln(Moose::Older); }
330 
332  const FieldVariableDivergence & divSln() const { return _element_data->divSln(Moose::Current); }
333  const FieldVariableDivergence & divSlnOld() const { return _element_data->divSln(Moose::Old); }
335  {
336  return _element_data->divSln(Moose::Older);
337  }
338 
341  {
342  return _element_data->adSln();
343  }
344 
346  {
347  return _element_data->adGradSln();
348  }
350  {
351  return _element_data->adSecondSln();
352  }
354  {
355  return _element_data->adUDot();
356  }
358  {
359  return _element_data->adUDotDot();
360  }
362  {
363  return _element_data->adGradSlnDot();
364  }
365 
368  {
369  return _neighbor_data->adSln();
370  }
372  {
373  return _neighbor_data->adGradSln();
374  }
376  {
377  return _neighbor_data->adSecondSln();
378  }
380  {
381  return _neighbor_data->adUDot();
382  }
384  {
385  return _neighbor_data->adUDotDot();
386  }
388  {
389  return _neighbor_data->adGradSlnDot();
390  }
391 
393  const FieldVariableValue & uDot() const { return _element_data->uDot(); }
394  const FieldVariableValue & uDotDot() const { return _element_data->uDotDot(); }
395  const FieldVariableValue & uDotOld() const { return _element_data->uDotOld(); }
396  const FieldVariableValue & uDotDotOld() const { return _element_data->uDotDotOld(); }
397  const VariableValue & duDotDu() const { return _element_data->duDotDu(); }
398  const VariableValue & duDotDotDu() const { return _element_data->duDotDotDu(); }
399 
401  const FieldVariableValue & slnNeighbor() const override
402  {
403  return _neighbor_data->sln(Moose::Current);
404  }
405  const FieldVariableValue & slnOldNeighbor() const override
406  {
407  return _neighbor_data->sln(Moose::Old);
408  }
411  {
412  return _neighbor_data->sln(Moose::PreviousNL);
413  }
414 
416  const FieldVariableGradient & gradSlnNeighbor() const override
417  {
418  return _neighbor_data->gradSln(Moose::Current);
419  }
420  const FieldVariableGradient & gradSlnOldNeighbor() const override
421  {
422  return _neighbor_data->gradSln(Moose::Old);
423  }
425  {
426  return _neighbor_data->gradSln(Moose::Older);
427  }
429  {
430  return _neighbor_data->gradSln(Moose::PreviousNL);
431  }
432 
434  const FieldVariableGradient & gradSlnNeighborDot() const { return _neighbor_data->gradSlnDot(); }
436  {
437  return _neighbor_data->gradSlnDotDot();
438  }
439 
442  {
443  return _neighbor_data->secondSln(Moose::Current);
444  }
446  {
447  return _neighbor_data->secondSln(Moose::Old);
448  }
450  {
451  return _neighbor_data->secondSln(Moose::Older);
452  }
454  {
455  return _neighbor_data->secondSln(Moose::PreviousNL);
456  }
457 
460  {
461  return _neighbor_data->curlSln(Moose::Current);
462  }
464  {
465  return _neighbor_data->curlSln(Moose::Old);
466  }
468  {
469  return _neighbor_data->curlSln(Moose::Older);
470  }
471 
474  {
475  return _neighbor_data->divSln(Moose::Current);
476  }
478  {
479  return _neighbor_data->divSln(Moose::Old);
480  }
482  {
483  return _neighbor_data->divSln(Moose::Older);
484  }
485 
487  const FieldVariableValue & uDotNeighbor() const { return _neighbor_data->uDot(); }
488  const FieldVariableValue & uDotDotNeighbor() const { return _neighbor_data->uDotDot(); }
489  const FieldVariableValue & uDotOldNeighbor() const { return _neighbor_data->uDotOld(); }
490  const FieldVariableValue & uDotDotOldNeighbor() const { return _neighbor_data->uDotDotOld(); }
491  const VariableValue & duDotDuNeighbor() const { return _neighbor_data->duDotDu(); }
492  const VariableValue & duDotDotDuNeighbor() const { return _neighbor_data->duDotDotDu(); }
493 
495  const ADTemplateVariableValue<OutputType> & adSlnLower() const { return _lower_data->adSln(); }
496  const FieldVariableValue & slnLower() const { return _lower_data->sln(Moose::Current); }
497  const FieldVariableValue & slnLowerOld() const { return _lower_data->sln(Moose::Old); }
498 
500  virtual void computeElemValues() override;
501  virtual void computeElemValuesFace() override;
502  virtual void computeNeighborValuesFace() override;
503  virtual void computeNeighborValues() override;
504  virtual void computeLowerDValues() override;
505 
506  virtual void setNodalValue(const OutputType & value, unsigned int idx = 0) override;
507 
508  virtual void setDofValue(const OutputData & value, unsigned int index) override;
509 
513  virtual void setDofValues(const DenseVector<OutputData> & values) override;
514  virtual void setLowerDofValues(const DenseVector<OutputData> & values) override;
515 
519  void insertNodalValue(NumericVector<Number> & residual, const OutputData & v);
520 
524  OutputData getNodalValue(const Node & node) const;
528  OutputData getNodalValueOld(const Node & node) const;
532  OutputData getNodalValueOlder(const Node & node) const;
539  OutputData getElementalValue(const Elem * elem, unsigned int idx = 0) const;
546  OutputData getElementalValueOld(const Elem * elem, unsigned int idx = 0) const;
553  OutputData getElementalValueOlder(const Elem * elem, unsigned int idx = 0) const;
554 
558  virtual void insert(NumericVector<Number> & vector) override;
559  virtual void insertLower(NumericVector<Number> & vector) override;
560 
564  virtual void add(NumericVector<Number> & vector) override;
565 
569  void addSolution(const DenseVector<Number> & v);
570 
575 
576  const DoFValue & dofValue() const;
577  const DoFValue & dofValues() const override;
578  const DoFValue & dofValuesOld() const override;
579  const DoFValue & dofValuesOlder() const override;
580  const DoFValue & dofValuesPreviousNL() const override;
581  const DoFValue & dofValuesNeighbor() const override;
582  const DoFValue & dofValuesOldNeighbor() const override;
583  const DoFValue & dofValuesOlderNeighbor() const override;
584  const DoFValue & dofValuesPreviousNLNeighbor() const override;
585  const DoFValue & dofValuesDot() const override;
586  const DoFValue & dofValuesDotNeighbor() const override;
587  const DoFValue & dofValuesDotNeighborResidual() const;
588  const DoFValue & dofValuesDotOld() const override;
589  const DoFValue & dofValuesDotOldNeighbor() const override;
590  const DoFValue & dofValuesDotDot() const override;
591  const DoFValue & dofValuesDotDotNeighbor() const override;
593  const DoFValue & dofValuesDotDotOld() const override;
594  const DoFValue & dofValuesDotDotOldNeighbor() const override;
595  const MooseArray<Number> & dofValuesDuDotDu() const override;
596  const MooseArray<Number> & dofValuesDuDotDuNeighbor() const override;
597  const MooseArray<Number> & dofValuesDuDotDotDu() const override;
598  const MooseArray<Number> & dofValuesDuDotDotDuNeighbor() const override;
599 
603  const MooseArray<ADReal> & adDofValues() const override;
604 
608  const MooseArray<ADReal> & adDofValuesNeighbor() const override;
609 
613  void computeIncrementAtQps(const NumericVector<Number> & increment_vec);
614 
618  void computeIncrementAtNode(const NumericVector<Number> & increment_vec);
619 
626  OutputType getValue(const Elem * elem, const std::vector<std::vector<OutputShape>> & phi) const;
627 
635  const Elem * elem,
636  const std::vector<std::vector<typename OutputTools<OutputType>::OutputShapeGradient>> &
637  grad_phi) const;
638 
642  virtual std::size_t phiSize() const final { return _element_data->phiSize(); }
646  virtual std::size_t phiFaceSize() const final { return _element_data->phiFaceSize(); }
650  virtual std::size_t phiNeighborSize() const final { return _neighbor_data->phiSize(); }
654  virtual std::size_t phiFaceNeighborSize() const final { return _neighbor_data->phiFaceSize(); }
655 
656  std::size_t phiLowerSize() const final { return _lower_data->phiSize(); }
657 
661  const OutputType & nodalValue() const;
662  const OutputType & nodalValueOld() const;
663  const OutputType & nodalValueOlder() const;
664  const OutputType & nodalValuePreviousNL() const;
665  const OutputType & nodalValueDot() const;
666  const OutputType & nodalValueDotDot() const;
667  const OutputType & nodalValueDotOld() const;
668  const OutputType & nodalValueDotDotOld() const;
669  const OutputType & nodalValueDuDotDu() const;
670  const OutputType & nodalValueDuDotDotDu() const;
671  const OutputType & nodalValueNeighbor() const;
672  const OutputType & nodalValueOldNeighbor() const;
673  const OutputType & nodalValueOlderNeighbor() const;
674  const OutputType & nodalValuePreviousNLNeighbor() const;
675  const OutputType & nodalValueDotNeighbor() const;
676  const OutputType & nodalValueDotNeighborResidual() const;
677  const OutputType & nodalValueDotDotNeighbor() const;
678  const OutputType & nodalValueDotDotNeighborResidual() const;
679  const OutputType & nodalValueDotOldNeighbor() const;
680  const OutputType & nodalValueDotDotOldNeighbor() const;
681  const OutputType & nodalValueDuDotDuNeighbor() const;
682  const OutputType & nodalValueDuDotDotDuNeighbor() const;
683 
684  const MooseArray<OutputType> & nodalValueArray() const override
685  {
686  return _element_data->nodalValueArray(Moose::Current);
687  }
689  {
690  return _element_data->nodalValueArray(Moose::Old);
691  }
693  {
694  return _element_data->nodalValueArray(Moose::Older);
695  }
696 
697  const DoFValue & nodalVectorTagValue(TagID tag) const override;
698  const DoFValue & nodalMatrixTagValue(TagID tag) const override;
699 
700  const typename Moose::ADType<OutputType>::type & adNodalValue() const;
701 
702  virtual void computeNodalValues() override;
703  virtual void computeNodalNeighborValues() override;
704 
705  unsigned int oldestSolutionStateRequested() const override final;
706 
707  void setActiveTags(const std::set<TagID> & vtags) override;
708 
709  virtual void meshChanged() override;
710  virtual void residualSetup() override;
711  virtual void jacobianSetup() override;
712 
713  bool supportsFaceArg() const override final { return true; }
714  bool supportsElemSideQpArg() const override final { return true; }
715 
716 protected:
718 
720  std::unique_ptr<MooseVariableData<OutputType>> _element_data;
721 
723  std::unique_ptr<MooseVariableData<OutputType>> _neighbor_data;
724 
726  std::unique_ptr<MooseVariableData<OutputType>> _lower_data;
727 
739 
746  ValueType
747  faceEvaluate(const FaceArg &, const StateArg &, const std::vector<ValueType> & cache_data) const;
748 
749  ValueType evaluate(const ElemQpArg & elem_qp, const StateArg & state) const override final;
750  ValueType evaluate(const ElemSideQpArg & elem_side_qp,
751  const StateArg & state) const override final;
752  ValueType evaluate(const ElemArg &, const StateArg &) const override final;
753  ValueType evaluate(const ElemPointArg &, const StateArg &) const override final;
754  ValueType evaluate(const NodeArg & node_arg, const StateArg & state) const override final;
755  ValueType evaluate(const FaceArg &, const StateArg &) const override final;
756 
757  GradientType evaluateGradient(const ElemQpArg & elem_qp, const StateArg & state) const override;
758  GradientType evaluateGradient(const ElemSideQpArg & elem_side_qp,
759  const StateArg & state) const override final;
760  GradientType evaluateGradient(const ElemArg &, const StateArg &) const override final;
761 
762  DotType evaluateDot(const ElemQpArg & elem_qp, const StateArg & state) const override final;
763  DotType evaluateDot(const ElemSideQpArg & elem_side_qp,
764  const StateArg & state) const override final;
765  DotType evaluateDot(const ElemArg &, const StateArg &) const override final;
766  DotType evaluateDot(const FaceArg &, const StateArg &) const override final;
767 
768  GradientType evaluateGradDot(const ElemArg &, const StateArg &) const override final;
769 
770 private:
775  template <typename Shapes, typename Solution, typename GradShapes, typename GradSolution>
776  void computeSolution(const Elem * elem,
777  unsigned int n_qp,
778  const StateArg & state,
779  const Shapes & phi,
780  Solution & local_soln,
781  const GradShapes & grad_phi,
782  GradSolution & grad_local_soln,
783  Solution & dot_local_soln,
784  GradSolution & grad_dot_local_soln) const;
785 
789  void
790  evaluateOnElement(const ElemQpArg & elem_qp, const StateArg & state, bool cache_eligible) const;
791 
795  void evaluateOnElementSide(const ElemSideQpArg & elem_side_qp,
796  const StateArg & state,
797  bool cache_eligible) const;
798 
802  mutable const Elem * _current_elem_qp_functor_elem = nullptr;
803 
805  mutable std::vector<ValueType> _current_elem_qp_functor_sln;
806 
808  mutable std::vector<GradientType> _current_elem_qp_functor_gradient;
809 
811  mutable std::vector<DotType> _current_elem_qp_functor_dot;
812 
814  mutable std::vector<GradientType> _current_elem_qp_functor_grad_dot;
815 
819  mutable std::pair<const Elem *, unsigned int> _current_elem_side_qp_functor_elem_side{
820  nullptr, libMesh::invalid_uint};
821 
823  mutable std::vector<ValueType> _current_elem_side_qp_functor_sln;
824 
826  mutable std::vector<GradientType> _current_elem_side_qp_functor_gradient;
827 
829  mutable std::vector<DotType> _current_elem_side_qp_functor_dot;
830 
833  mutable std::vector<GradientType> _current_elem_side_qp_functor_grad_dot;
834 };
835 
836 template <typename OutputType>
837 inline const MooseArray<ADReal> &
839 {
840  return _element_data->adDofValues();
841 }
842 
843 template <typename OutputType>
844 inline const MooseArray<ADReal> &
846 {
847  return _neighbor_data->adDofValues();
848 }
849 
850 template <typename OutputType>
851 inline const typename Moose::ADType<OutputType>::type &
853 {
854  return _element_data->adNodalValue();
855 }
856 
857 template <typename OutputType>
858 void
859 MooseVariableFE<OutputType>::setActiveTags(const std::set<TagID> & vtags)
860 {
861  _element_data->setActiveTags(vtags);
862  _neighbor_data->setActiveTags(vtags);
863  _lower_data->setActiveTags(vtags);
864 }
typename MooseVariableField< Real >::FieldVariablePhiValue FieldVariablePhiValue
typename OutputTools< typename Moose::ADType< T >::type >::VariableSecond ADTemplateVariableSecond
Definition: MooseTypes.h:522
const FieldVariableValue & vectorTagValue(TagID tag) const override
tag values getters
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...
VarFieldType
Definition: MooseTypes.h:634
const ADTemplateVariableGradient< OutputType > & adGradSlnDot() const override
AD grad of time derivative solution getter.
const FieldVariableValue & uDotDotNeighbor() const
const FieldVariableCurl & curlSlnNeighbor() const
neighbor solution curls
const Node *const & node() const
typename MooseVariableField< Real >::OutputShapeGradient OutputShapeGradient
const MooseArray< Number > & dofValuesDuDotDotDu() const override
const FieldVariableSecond & secondSlnOlderNeighbor() const
GradientType evaluateGradDot(const ElemArg &, const StateArg &) const override final
Evaluate the functor gradient-dot with a given element.
bool computingCurl() const override final
Whether or not this variable is computing the curl.
bool isNodalNeighborDefined() const
const OutputType & nodalValueDuDotDotDu() const
bool computingDiv() const override final
Whether or not this variable is computing the divergence.
const ADTemplateVariableTestGradient< OutputShape > & adGradPhiFace() const
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.
ValueType evaluate(const ElemQpArg &elem_qp, const StateArg &state) const override final
const DoFValue & dofValuesOlderNeighbor() const override
const FieldVariableGradient & gradSlnPreviousNL() const
const DoFValue & dofValuesDotOld() const override
typename MooseVariableField< Real >::OutputGradient OutputGradient
const unsigned int invalid_uint
const FieldVariablePhiValue & phiNeighbor() const override final
Return the variable&#39;s shape functions on a neighboring element.
const OutputType & nodalValueOld() const
Class for stuff related to variables.
Definition: Adaptivity.h:31
typename MooseVariableField< Real >::FieldVariablePhiSecond FieldVariablePhiSecond
void addSolution(const DenseVector< Number > &v)
Add passed in local DOF values onto the current solution.
unsigned int TagID
Definition: MooseTypes.h:199
const OutputType & nodalValueDuDotDu() const
const OutputType & nodalValueDotDotOld() const
const FieldVariablePhiDivergence & divPhiNeighbor() const
const DoFValue & dofValuesDotNeighborResidual() const
const OutputType & nodalValueDot() const
Class for stuff related to variables.
Definition: Coupleable.h:37
TensorTools::IncrementRank< OutputType >::type OutputGradient
const MooseArray< Number > & dofValuesDuDotDu() const override
const FieldVariableSecond & secondSlnPreviousNLNeighbor() const
OutputType getValue(const Elem *elem, const std::vector< std::vector< OutputShape >> &phi) const
Compute the variable value at a point on an element.
const FieldVariableCurl & curlSlnOldNeighbor() const
virtual void setNodalValue(const OutputType &value, unsigned int idx=0) override
void insertNodalValue(NumericVector< Number > &residual, const OutputData &v)
Write a nodal value to the passed-in solution vector.
virtual void computeLowerDValues() override
compute values at quadrature points on the lower dimensional element
const FieldVariableGradient & gradSlnNeighborDotDot() const
std::vector< DotType > _current_elem_qp_functor_dot
The values of the time derivative for the _current_elem_qp_functor_elem.
const OutputType & nodalValueNeighbor() const
typename MooseVariableField< Real >::FieldVariablePhiCurl FieldVariablePhiCurl
const FieldVariableGradient & gradSln() const override
element gradients
const FieldVariablePhiCurl & curlPhiFaceNeighbor() const
const FieldVariableValue & slnNeighbor() const override
neighbor solutions
const MooseArray< Number > & dofValuesDuDotDuNeighbor() const override
virtual void setDofValues(const DenseVector< OutputData > &values) override
Set local DOF values and evaluate the values on quadrature points.
void computeIncrementAtQps(const NumericVector< Number > &increment_vec)
Compute and store incremental change in solution at QPs based on increment_vec.
const VariableValue & duDotDuNeighbor() const
const DoFValue & dofValue() const
void reinitAux() override
const FieldVariableSecond & secondSlnOld() const
const FieldVariableValue & slnOlderNeighbor() const
const OutputType & nodalValuePreviousNLNeighbor() const
const ADTemplateVariableSecond< OutputType > & adSecondSlnNeighbor() const override
AD second neighbor solution getter.
virtual std::size_t phiFaceNeighborSize() const final
Return phiFaceNeighbor size.
void reinitNodes(const std::vector< dof_id_type > &nodes) override
const std::vector< dof_id_type > & dofIndicesLower() const final
Get dof indices for the current lower dimensional element (this is meaningful when performing mortar ...
const OutputType & nodalValueDuDotDuNeighbor() const
const OutputType & nodalValueDuDotDotDuNeighbor() const
bool isVector() const override
std::unique_ptr< MooseVariableData< OutputType > > _neighbor_data
Holder for all the data associated with the neighbor element.
void prepareNeighbor() override
Prepare the neighbor element degrees of freedom.
const DoFValue & dofValuesDotDotNeighbor() const override
MooseVariableFE(const InputParameters &parameters)
const FieldVariablePhiGradient & gradPhiNeighbor() const override final
Return the gradients of the variable&#39;s shape functions on a neighboring element.
const OutputType & nodalValueDotDotNeighbor() const
typename OutputTools< typename Moose::ADType< T >::type >::VariableValue ADTemplateVariableValue
Definition: MooseTypes.h:516
const FieldVariableValue & slnLowerOld() const
const FieldVariableDivergence & divSlnOld() const
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const MooseArray< Number > & dofValuesDuDotDotDuNeighbor() const override
const FieldVariableGradient & gradSlnPreviousNLNeighbor() const
typename MooseVariableField< Real >::FieldVariableValue FieldVariableValue
const OutputType & nodalValueDotDotOldNeighbor() const
const DoFValue & dofValuesDotOldNeighbor() const override
const ADTemplateVariableValue< OutputType > & adSlnNeighbor() const override
neighbor AD
Moose::VarFieldType fieldType() const override
Filed type of this variable.
const FieldVariablePhiSecond & secondPhi() const override final
Return the rank-2 tensor of second derivatives of the variable&#39;s elemental shape functions.
const MappedArrayVariablePhiGradient & arrayGradPhiFaceNeighbor() const
const FieldVariableValue & uDotOld() const
OutputData getElementalValueOlder(const Elem *elem, unsigned int idx=0) const
Get the older value of this variable on an element.
typename MooseVariableField< Real >::OutputShapeSecond OutputShapeSecond
const FieldVariablePhiDivergence & divPhi() const override final
Divergence of the shape functions.
const DoFValue & dofValuesNeighbor() const override
typename MooseVariableField< Real >::FieldVariableGradient FieldVariableGradient
bool hasDoFsOnNodes() const override
Does this variable have DoFs on nodes.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
virtual void prepareIC() override
Prepare the initial condition.
TensorTools::IncrementRank< OutputGradient >::type OutputSecond
A structure for storing the various lists that contain the names of the items to be exported...
bool usesSecondPhiNeighbor() const override final
Whether or not this variable is actually using the shape function second derivative on a neighbor...
virtual void setDofValue(const OutputData &value, unsigned int index) override
Degree of freedom value setters.
const ADTemplateVariableValue< OutputType > & adUDotNeighbor() const override
AD neighbor time derivative getter.
const FieldVariableCurl & curlSlnOld() const
const DoFValue & dofValuesDotDot() const override
const ADTemplateVariableValue< OutputType > & adUDot() const override
AD time derivative getter.
const ADTemplateVariableGradient< OutputType > & adGradSlnNeighborDot() const override
AD grad of time derivative neighbor solution getter.
typename MooseVariableField< Real >::OutputSecond OutputSecond
virtual void insertLower(NumericVector< Number > &vector) override
Insert the currently cached degree of freedom values for a lower-dimensional element into the provide...
virtual void jacobianSetup() override
typename FunctorReturnType< T, FunctorEvaluationKind::Gradient >::type GradientType
This rigmarole makes it so that a user can create functors that return containers (std::vector...
Definition: MooseFunctor.h:149
std::vector< GradientType > _current_elem_qp_functor_grad_dot
The values of the gradient of the time derivative for the _current_elem_qp_functor_elem.
const ADTemplateVariableSecond< OutputType > & adSecondSln() const override
AD second solution getter.
bool supportsFaceArg() const override final
Whether this functor supports evaluation with FaceArg.
std::pair< const Elem *, unsigned int > _current_elem_side_qp_functor_elem_side
Keep track of the current elem-side-qp functor element and side in order to enable local caching (e...
OutputData getElementalValue(const Elem *elem, unsigned int idx=0) const
Get the current value of this variable on an element.
const FieldVariableGradient & gradSlnOlderNeighbor() const
Moose::DOFType< OutputType >::type OutputData
virtual void computeNodalValues() override
Compute nodal values of this variable.
const FieldVariableSecond & secondSlnOldNeighbor() const
bool usesSecondPhi() const
Whether or not this variable is computing any second derivatives.
const MooseArray< OutputType > & nodalValueOldArray() const override
const FieldVariablePhiCurl & curlPhiNeighbor() const
const FieldVariableValue & uDot() const
element dots
MooseVariableFE< RealVectorValue > VectorMooseVariable
const FieldVariablePhiGradient & gradPhiFaceNeighbor() const override final
Return the gradients of the variable&#39;s shape functions on a neighboring element face.
GradientType evaluateGradient(const ElemQpArg &elem_qp, const StateArg &state) const override
void prepareLowerD() override
Prepare a lower dimensional element&#39;s degrees of freedom.
const FieldVariableCurl & curlSln() const
element curls
typename MooseVariableField< Real >::FieldVariableTestValue FieldVariableTestValue
std::vector< DotType > _current_elem_side_qp_functor_dot
The values of the time derivative for the _current_elem_side_qp_functor_elem_side.
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.
unsigned int numberOfDofsNeighbor() override
const VariableValue & duDotDotDu() const
const DoFValue & dofValuesOlder() const override
const MappedArrayVariablePhiGradient & arrayGradPhi() const
typename MooseVariableField< Real >::FieldVariableDivergence FieldVariableDivergence
const FieldVariablePhiCurl & curlPhiFace() const
const MooseArray< OutputType > & nodalValueOlderArray() const override
const OutputType & nodalValueDotDot() const
const FieldVariableValue & uDotDotOldNeighbor() const
const OutputType & nodalValueDotDotNeighborResidual() const
const std::vector< dof_id_type > & dofIndices() const final
Get local DoF indices.
const ADTemplateVariableTestGradient< OutputShape > & adGradPhiFaceNeighbor() const
const FieldVariableDivergence & divSlnOlder() const
const FieldVariableSecond & secondSlnPreviousNL() const
const OutputType & nodalValueOlder() const
A structure defining a "face" evaluation calling argument for Moose functors.
void reinitAuxNeighbor() override
const MappedArrayVariablePhiGradient & arrayGradPhiNeighbor() const
TensorTools::DecrementRank< OutputShape >::type OutputShapeDivergence
virtual void getDofIndices(const Elem *elem, std::vector< dof_id_type > &dof_indices) const override
virtual void computeElemValuesFace() override
Compute values at facial quadrature points.
FEContinuity getContinuity() const override
Return the continuity of this variable.
const FieldVariableValue & slnPreviousNL() const
const OutputType & nodalValueDotNeighbor() const
unsigned int numberOfDofs() const final
Get the number of local DoFs.
const FieldVariableValue & uDotDot() const
const FieldVariableValue & sln() const override
element solutions
void setActiveTags(const std::set< TagID > &vtags) override
Set the active vector tags.
const FieldVariableSecond & secondSlnNeighbor() const
neighbor solution seconds
const FieldVariablePhiValue & phi() const override
Return the variable&#39;s elemental shape functions.
TensorTools::IncrementRank< OutputType >::type OutputGradient
Definition: MooseTypes.h:268
MooseVariableFE< RealEigenVector > ArrayMooseVariable
std::vector< std::vector< Eigen::Map< RealDIMValue > > > MappedArrayVariablePhiGradient
Definition: MooseTypes.h:343
std::size_t phiLowerSize() const final
Return the number of shape functions on the lower dimensional element for this variable.
typename OutputTools< typename Moose::ADType< T >::type >::VariableTestGradient ADTemplateVariableTestGradient
Definition: MooseTypes.h:542
typename MooseVariableField< Real >::FieldVariableTestDivergence FieldVariableTestDivergence
const DoFValue & dofValuesOld() const override
const FieldVariableSecond & secondSlnOlder() const
std::vector< GradientType > _current_elem_side_qp_functor_grad_dot
The values of the gradient of the time derivative for the _current_elem_side_qp_functor_elem_side.
const DoFValue & dofValuesPreviousNLNeighbor() const override
typename MooseVariableField< Real >::FieldVariableTestSecond FieldVariableTestSecond
typename MooseVariableField< Real >::OutputShapeDivergence OutputShapeDivergence
const FieldVariableValue & uDotDotOld() const
const DoFValue & dofValuesOldNeighbor() const override
typename OutputTools< typename Moose::ADType< T >::type >::VariableGradient ADTemplateVariableGradient
Definition: MooseTypes.h:519
const unsigned int & currentSide() const
Current side this variable is being evaluated on.
virtual void computeNodalNeighborValues() override
Compute nodal values of this variable in the neighbor.
TensorTools::IncrementRank< OutputShape >::type OutputShapeGradient
Definition: MooseTypes.h:279
typename MooseVariableField< Real >::FieldVariableSecond FieldVariableSecond
const FieldVariableGradient & vectorTagGradient(TagID tag) const
A structure that is used to evaluate Moose functors logically at an element/cell center.
virtual void meshChanged() override
Called on this object when the mesh changes.
const ADTemplateVariableValue< OutputType > & adSln() const override
AD.
std::vector< ValueType > _current_elem_qp_functor_sln
The values of the solution for the _current_elem_qp_functor_elem.
const FieldVariablePhiSecond & secondPhiFace() const override final
Return the rank-2 tensor of second derivatives of the variable&#39;s shape functions on an element face...
const Node *const & nodeNeighbor() const
Argument for requesting functor evaluation at a quadrature point location in an element.
TensorTools::IncrementRank< OutputShape >::type OutputShapeGradient
const FieldVariableValue & uDotNeighbor() const
neighbor dots
const OutputType & nodalValue() const
Methods for retrieving values of variables at the nodes.
const FieldVariableValue & increment() const
typename MooseVariableField< Real >::FieldVariableCurl FieldVariableCurl
OutputData getNodalValueOlder(const Node &node) const
Get the t-2 value of this variable at given node.
virtual void setLowerDofValues(const DenseVector< OutputData > &values) override
Set local DOF values for a lower dimensional element and evaluate the values on quadrature points...
void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes) override
virtual void insert(NumericVector< Number > &vector) override
Set the current local DOF values to the input vector.
const FieldVariablePhiSecond & secondPhiNeighbor() const override final
Return the rank-2 tensor of second derivatives of the variable&#39;s shape functions on a neighboring ele...
std::unique_ptr< MooseVariableData< OutputType > > _lower_data
Holder for all the data associated with the lower dimeensional element.
const FieldVariableSecond & secondSln() const
element seconds
virtual std::size_t phiFaceSize() const final
Return phiFace size.
const DoFValue & dofValuesDotDotOld() const override
typename MooseVariableField< Real >::FieldVariableTestGradient FieldVariableTestGradient
const DoFValue & nodalVectorTagValue(TagID tag) const override
void clearDofIndices() override
Clear out the dof indices.
const FieldVariableValue & slnLower() const
const FieldVariableGradient & gradSlnOldNeighbor() const override
MooseVariableFE< Real > MooseVariable
const MooseArray< ADReal > & adDofValues() const override
Return the AD dof values.
const ADTemplateVariableValue< OutputType > & adUDotDot() const override
AD second time derivative getter.
void computeIncrementAtNode(const NumericVector< Number > &increment_vec)
Compute and store incremental change at the current node based on increment_vec.
const FieldVariableGradient & gradSlnOld() const override
typename MooseVariableField< Real >::FieldVariablePhiGradient FieldVariablePhiGradient
const ADTemplateVariableGradient< OutputType > & adGradSlnNeighbor() const override
AD grad neighbor solution getter.
OutputData getNodalValue(const Node &node) const
Get the value of this variable at given node.
bool isNodal() const override
Is this variable nodal.
const FieldVariableGradient & gradSlnNeighbor() const override
neighbor solution gradients
void evaluateOnElement(const ElemQpArg &elem_qp, const StateArg &state, bool cache_eligible) const
Evaluate solution and gradient for the elem_qp argument.
virtual void computeNeighborValuesFace() override
Compute values at facial quadrature points for the neighbor.
const Elem *const & neighbor() const
Current neighboring element.
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:302
const MooseArray< OutputType > & nodalValueArray() const override
Methods for retrieving values of variables at the nodes in a MooseArray for AuxKernelBase.
const FieldVariableValue & slnOlder() const override
const FieldVariablePhiSecond & secondPhiFaceNeighbor() const override final
Return the rank-2 tensor of second derivatives of the variable&#39;s shape functions on a neighboring ele...
virtual std::size_t phiSize() const final
Return phi size.
const dof_id_type & nodalDofIndexNeighbor() const override
const OutputType & nodalValueDotOldNeighbor() const
Base class for time integrators.
const OutputType & nodalValueOldNeighbor() const
virtual bool isNodalDefined() const override
Is this variable defined at nodes.
const dof_id_type & nodalDofIndex() const override
const FieldVariableGradient & gradSlnNeighborDot() const
neighbor grad dots
OutputData getElementalValueOld(const Elem *elem, unsigned int idx=0) const
Get the old value of this variable on an element.
TensorTools::IncrementRank< OutputShapeGradient >::type OutputShapeSecond
const DoFValue & dofValuesDotDotNeighborResidual() const
const DoFValue & vectorTagDofValue(TagID tag) const override
const FieldVariableGradient & gradSlnDotDot() const
void addSolutionNeighbor(const DenseVector< Number > &v)
Add passed in local neighbor DOF values onto the current solution.
const ADTemplateVariableGradient< OutputType > & adGradSln() const override
AD grad solution getter.
FEContinuity
const FieldVariableCurl & curlSlnOlder() const
const FieldVariablePhiCurl & curlPhi() const override final
Curl of the shape functions.
static InputParameters validParams()
virtual void computeNeighborValues() override
Compute values at quadrature points for the neighbor.
const DoFValue & dofValues() const override
dof values getters
const std::vector< dof_id_type > & dofIndicesNeighbor() const final
Get neighbor DOF indices for currently selected element.
typename MooseVariableField< Real >::OutputShape OutputShape
std::vector< GradientType > _current_elem_qp_functor_gradient
The values of the gradient for the _current_elem_qp_functor_elem.
const FieldVariableValue & matrixTagValue(TagID tag) const override
const FieldVariablePhiDivergence & divPhiFaceNeighbor() const
bool computingSecond() const override final
Whether or not this variable is computing any second derivatives.
std::vector< GradientType > _current_elem_side_qp_functor_gradient
The values of the gradient for the _current_elem_side_qp_functor_elem_side.
const FieldVariableDivergence & divSlnOldNeighbor() const
virtual const FieldVariablePhiValue & phiLower() const override
Return the variable&#39;s shape functions on a lower-dimensional element.
const FieldVariablePhiGradient & gradPhiLower() const
bool usesGradPhi() const
Whether or not this variable is actually using the shape function gradient.
const ADTemplateVariableTestGradient< OutputShape > & adGradPhi() const
const FieldVariableValue & uDotOldNeighbor() const
const MooseArray< ADReal > & adDofValuesNeighbor() const override
Return the AD neignbor dof values.
const VariableValue & duDotDu() const
typename MooseVariableField< Real >::DoFValue DoFValue
bool supportsElemSideQpArg() const override final
Whether this functor supports evaluation with ElemSideQpArg.
const Elem * _current_elem_qp_functor_elem
Keep track of the current elem-qp functor element in order to enable local caching (e...
void evaluateOnElementSide(const ElemSideQpArg &elem_side_qp, const StateArg &state, bool cache_eligible) const
Evaluate solution and gradient for the elem_side_qp argument.
const InputParameters & parameters() const
Get the parameters of the object.
State argument for evaluating functors.
const FieldVariablePhiValue & phiFace() const override final
Return the variable&#39;s shape functions on an element face.
const DoFValue & dofValuesPreviousNL() const override
bool usesPhi() const
Whether or not this variable is actually using the shape function value.
const FieldVariableGradient & gradSlnOlder() const
void prepare() override
Prepare the elemental degrees of freedom.
const FieldVariableDivergence & divSlnOlderNeighbor() const
const FieldVariableGradient & gradSlnDot() const
element gradient dots
std::vector< ValueType > _current_elem_side_qp_functor_sln
The values of the solution for the _current_elem_side_qp_functor_elem_side.
const VariableValue & duDotDotDuNeighbor() const
void reinitNode() override
const Moose::ADType< OutputType >::type & adNodalValue() const
const DoFValue & dofValuesDotNeighbor() const override
const FieldVariablePhiGradient & gradPhi() const override final
Return the gradients of the variable&#39;s elemental shape functions.
bool isArray() const override
const FieldVariableCurl & curlSlnOlderNeighbor() const
const DoFValue & nodalMatrixTagValue(TagID tag) const override
typename MooseVariableField< Real >::FieldVariableTestCurl FieldVariableTestCurl
const OutputType & nodalValueDotNeighborResidual() const
unsigned int oldestSolutionStateRequested() const override final
The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).
const ADTemplateVariableValue< OutputType > & adSlnLower() const
lower-d element solution
typename MooseVariableField< Real >::OutputDivergence OutputDivergence
virtual void add(NumericVector< Number > &vector) override
Add the current local DOF values to the input vector.
const FieldVariableDivergence & divSln() const
element divergence
std::unique_ptr< MooseVariableData< OutputType > > _element_data
Holder for all the data associated with the "main" element.
const FieldVariableValue & slnOld() const override
const DoFValue & dofValuesDotDotOldNeighbor() const override
virtual void residualSetup() override
typename MooseVariableField< Real >::FieldVariablePhiDivergence FieldVariablePhiDivergence
const Elem *const & currentElem() const override
Current element this variable is evaluated at.
const OutputType & nodalValueOlderNeighbor() const
const OutputType & nodalValueDotOld() const
const FieldVariableValue & slnOldNeighbor() const override
DotType evaluateDot(const ElemQpArg &elem_qp, const StateArg &state) const override final
virtual std::size_t phiNeighborSize() const final
Return phiNeighbor size.
Argument for requesting functor evaluation at quadrature point locations on an element side...
const FieldVariableValue & slnPreviousNLNeighbor() const
virtual void computeElemValues() override
Actually compute variable values from the solution vectors.
Moose::ShapeType< OutputType >::type OutputShape
const DoFValue & dofValuesDot() const override
const MappedArrayVariablePhiGradient & arrayGradPhiFace() const
typename Moose::ADType< Real >::type FunctorArg
const FieldVariableDivergence & divSlnNeighbor() const
neighbor solution divergence
const FieldVariablePhiGradient & gradPhiFace() const override final
Return the gradients of the variable&#39;s shape functions on an element face.
uint8_t dof_id_type
const FieldVariablePhiDivergence & divPhiFace() const
const FieldVariablePhiValue & phiFaceNeighbor() const override final
Return the variable&#39;s shape functions on a neighboring element face.
TensorTools::DecrementRank< OutputType >::type OutputDivergence
const OutputType & nodalValuePreviousNL() const
OutputData getNodalValueOld(const Node &node) const
Get the old value of this variable at given node.
const ADTemplateVariableValue< OutputType > & adUDotDotNeighbor() const override
AD neighbor second time derivative getter.
void prepareAux() override
void clearAllDofIndices() final