https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
27void
33
34void
38
39void
43
44void
48
49const std::vector<ADReal> &
50ADBoundaryFluxBase::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 {
59
60 calcFlux(iside, ielem, uvec1, dwave, _flux);
61 }
62 return _flux;
63}
unsigned int _cached_flux_side_id
side ID of the cached flux values
static InputParameters validParams()
virtual void finalize() override
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.
virtual void threadJoin(const UserObject &) override
virtual void execute() override
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.
ADBoundaryFluxBase(const InputParameters &parameters)
std::vector< ADReal > _flux
Cached flux.
unsigned int _cached_flux_elem_id
element ID of the cached flux values
virtual void initialize() override
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
const unsigned int invalid_uint