https://mooseframework.inl.gov
ADBoundaryFluxBase.h
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 #pragma once
11 
13 
26 {
27 public:
29 
31 
32  virtual void execute() override;
33  virtual void initialize() override;
34  virtual void finalize() override;
35  virtual void threadJoin(const UserObject &) override;
36 
44  virtual const std::vector<ADReal> & getFlux(unsigned int iside,
45  dof_id_type ielem,
46  const std::vector<ADReal> & uvec1,
47  const RealVectorValue & dwave) const;
48 
57  virtual void calcFlux(unsigned int iside,
58  dof_id_type ielem,
59  const std::vector<ADReal> & uvec1,
60  const RealVectorValue & dwave,
61  std::vector<ADReal> & flux) const = 0;
62 
63 protected:
65  mutable unsigned int _cached_flux_elem_id;
67  mutable unsigned int _cached_flux_side_id;
68 
70  mutable std::vector<ADReal> _flux;
71 };
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
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.
std::vector< ADReal > _flux
Cached flux.
unsigned int _cached_flux_side_id
side ID of the cached flux values
virtual void finalize() override
unsigned int _cached_flux_elem_id
element ID of the cached flux values
virtual void threadJoin(const UserObject &) override
A base class for computing/caching fluxes at boundaries.
const InputParameters & parameters() const
virtual void execute() override
uint8_t dof_id_type