www.mooseframework.org
TestBoundaryFlux.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 
10 #include "TestBoundaryFlux.h"
11 
13 
16 {
18  params.addClassDescription("Boundary flux used for testing");
19  return params;
20 }
21 
23  : BoundaryFluxBase(parameters)
24 {
25 }
26 
27 void
28 TestBoundaryFlux::calcFlux(unsigned int /*iside*/,
29  dof_id_type /*ielem*/,
30  const std::vector<Real> & solution,
31  const RealVectorValue & normal,
32  std::vector<Real> & flux) const
33 {
34  mooseAssert(solution.size() == 3, "Solution vector must have exactly 3 entries.");
35 
36  const Real & A = solution[0];
37  const Real & B = solution[1];
38  const Real & C = solution[2];
39 
40  flux.resize(2);
41  flux[0] = (A - B) * C * normal(0);
42  flux[1] = A * B * normal(0);
43 }
44 
45 void
46 TestBoundaryFlux::calcJacobian(unsigned int /*iside*/,
47  dof_id_type /*ielem*/,
48  const std::vector<Real> & /*uvec*/,
49  const RealVectorValue & /*dwave*/,
50  DenseMatrix<Real> & /*jac1*/) const
51 {
52  mooseError("Not implemented.");
53 }
static InputParameters validParams()
virtual void calcJacobian(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave, DenseMatrix< Real > &jac1) const override
Compute the Jacobian matrix on the boundary face.
virtual void calcFlux(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave, std::vector< Real > &flux) const override
Solve the Riemann problem on the boundary face.
static InputParameters validParams()
A base class for computing/caching fluxes at boundaries.
registerMooseObject("RdgTestApp", TestBoundaryFlux)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
TestBoundaryFlux(const InputParameters &parameters)
Boundary flux used for testing.
static const std::string C
Definition: NS.h:153
uint8_t dof_id_type