www.mooseframework.org
InternalSideIndicator.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 // local includes
13 #include "Indicator.h"
14 #include "NeighborCoupleable.h"
15 #include "ScalarCoupleable.h"
17 
18 // Forward Declarations
20 template <typename>
24 
25 template <>
27 
34  public NeighborCoupleable,
35  public ScalarCoupleable,
37 {
38 public:
44 
48  virtual void computeIndicator() override;
49 
50  virtual void finalize() override;
51 
52 protected:
54 
55  const Elem * const & _current_elem;
57  const Elem * const & _neighbor_elem;
58 
60  const unsigned int & _current_side;
62  const Elem * const & _current_side_elem;
63 
66  unsigned int _qp;
68  const QBase * const & _qrule;
71 
73 
75 
77 
79  const VariableValue & _u;
80 
83 
86 
89 
92 
99  virtual Real computeQpIntegral() = 0;
100 
101 public:
102  // boundary id used for internal edges (all DG kernels lives on this boundary id -- a made-up
103  // number)
104  static const BoundaryID InternalBndId;
105 };
106 
const Moose::CoordinateSystemType & _coord_sys
Coordinate system.
Class for stuff related to variables.
Definition: Adaptivity.h:29
const Elem *const & _current_side_elem
Current side element.
virtual Real computeQpIntegral()=0
The virtual function you will want to override to compute error contributions.
static const BoundaryID InternalBndId
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MooseVariableFE< VectorValue< Real > > VectorMooseVariable
const unsigned int & _current_side
Current side.
const MooseArray< Point > & _q_point
Enhances MooseVariableInterface interface provide values from neighbor elements.
virtual void finalize() override
Can be overridden to do a final postprocessing of the indicator field.
InternalSideIndicator(const InputParameters &parameters)
Factory constructor initializes all internal references needed for indicator computation.
const VariableGradient & _grad_u_neighbor
Holds the current solution gradient at the current quadrature point.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
boundary_id_type BoundaryID
const VariableValue & _u
Holds the current solution at the current quadrature point on the face.
virtual void computeIndicator() override
Computes the indicator for the current side.
const Elem *const & _neighbor_elem
The neighboring element.
MooseVariableFE< Real > MooseVariable
CoordinateSystemType
Definition: MooseTypes.h:556
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:197
The InternalSideIndicator class is responsible for calculating the residuals for various physics on i...
const VariableGradient & _grad_u
Holds the current solution gradient at the current quadrature point on the face.
const MooseArray< Point > & _normals
Normal vectors at the quadrature points.
const MooseArray< Real > & _coord
Interface for objects that needs scalar coupling capabilities.
const VariableValue & _u_neighbor
Holds the current solution at the current quadrature point.
InputParameters validParams< InternalSideIndicator >()
const MooseArray< Real > & _JxW
Enhances Coupleable interface to also couple the values from neighbor elements.
const Elem *const & _current_elem
const QBase *const & _qrule