Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
ADBoundaryFluxBase.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 "ADBoundaryFluxBase.h"
11 
14 {
16  params.addClassDescription("Base class for computing boundary fluxes");
17  return params;
18 }
19 
21  : ThreadedGeneralUserObject(parameters),
22  _cached_flux_elem_id(libMesh::invalid_uint),
23  _cached_flux_side_id(libMesh::invalid_uint)
24 {
25 }
26 
27 void
29 {
32 }
33 
34 void
36 {
37 }
38 
39 void
41 {
42 }
43 
44 void
46 {
47 }
48 
49 const std::vector<ADReal> &
50 ADBoundaryFluxBase::getFlux(unsigned int iside,
51  dof_id_type ielem,
52  const std::vector<ADReal> & uvec1,
53  const RealVectorValue & dwave) const
54 {
55  if (_cached_flux_elem_id != ielem || _cached_flux_side_id != iside)
56  {
57  _cached_flux_elem_id = ielem;
58  _cached_flux_side_id = iside;
59 
60  calcFlux(iside, ielem, uvec1, dwave, _flux);
61  }
62  return _flux;
63 }
ADBoundaryFluxBase(const InputParameters &parameters)
virtual const std::vector< ADReal > & getFlux(unsigned int iside, dof_id_type ielem, const std::vector< ADReal > &uvec1, const RealVectorValue &dwave) const
Get the boundary flux vector.
static InputParameters validParams()
virtual void initialize() override
const unsigned int invalid_uint
virtual void calcFlux(unsigned int iside, dof_id_type ielem, const std::vector< ADReal > &uvec1, const RealVectorValue &dwave, std::vector< ADReal > &flux) const =0
Solve the Riemann problem on the boundary face.
static InputParameters validParams()
std::vector< ADReal > _flux
Cached flux.
unsigned int _cached_flux_side_id
side ID of the cached flux values
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
virtual void finalize() override
unsigned int _cached_flux_elem_id
element ID of the cached flux values
virtual void threadJoin(const UserObject &) override
void addClassDescription(const std::string &doc_string)
virtual void execute() override
uint8_t dof_id_type