www.mooseframework.org
MooseVariableConstMonomial.C
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 
11 #include "SubProblem.h"
12 #include "SystemBase.h"
13 #include "Assembly.h"
14 
15 #include "libmesh/quadrature.h"
16 
18  const FEType & fe_type,
19  SystemBase & sys,
20  Assembly & assembly,
21  Moose::VarKindType var_kind,
22  THREAD_ID tid)
23  : MooseVariable(var_num, fe_type, sys, assembly, var_kind, tid)
24 {
25 }
26 
27 void
29 {
30  _element_data->setGeometry(Moose::Volume);
31 
32  // We have not optimized AD calculations for const monomials yet, so we fall back on the
33  // non-optimized routine
35  _element_data->computeValues();
36  else
37  _element_data->computeMonomialValues();
38 }
39 
40 void
42 {
43  _element_data->setGeometry(Moose::Face);
44 
45  // We have not optimized AD calculations for const monomials yet, so we fall back on the
46  // non-optimized routine
48  _element_data->computeValues();
49  else
50  _element_data->computeMonomialValues();
51 }
52 
53 void
55 {
56  _neighbor_data->setGeometry(Moose::Volume);
57 
58  // We have not optimized AD calculations for const monomials yet, so we fall back on the
59  // non-optimized routine
61  _neighbor_data->computeValues();
62  else
63  _neighbor_data->computeMonomialValues();
64 }
65 
66 void
68 {
69  _neighbor_data->setGeometry(Moose::Face);
70 
71  // We have not optimized AD calculations for const monomials yet, so we fall back on the
72  // non-optimized routine
74  _neighbor_data->computeValues();
75  else
76  _neighbor_data->computeMonomialValues();
77 }
MooseVariableConstMonomial(unsigned int var_num, const FEType &fe_type, SystemBase &sys, Assembly &assembly, Moose::VarKindType var_kind, THREAD_ID tid)
Keeps track of stuff related to assembling.
Definition: Assembly.h:62
virtual const bool & currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:569
virtual void computeElemValues() override
Actually compute variable values.
std::unique_ptr< MooseVariableData< Real > > _neighbor_data
Holder for all the data associated with the neighbor element.
Base class for a system (of equations)
Definition: SystemBase.h:92
virtual void computeNeighborValuesFace() override
Compute values at facial quadrature points for the neighbor.
SubProblem & _subproblem
Problem this variable is part of.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:481
virtual void computeNeighborValues() override
Compute values at quadrature points for the neighbor.
virtual void computeElemValuesFace() override
Compute values at facial quadrature points.
std::unique_ptr< MooseVariableData< Real > > _element_data
Holder for all the data associated with the "main" element.
unsigned int THREAD_ID
Definition: MooseTypes.h:161