https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TestBoundaryFlux.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 "TestBoundaryFlux.h"
11
13
16{
18 params.addClassDescription("Boundary flux used for testing");
19 return params;
20}
21
23 : BoundaryFluxBase(parameters)
24{
25}
26
27void
28TestBoundaryFlux::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
45void
46TestBoundaryFlux::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}
registerMooseObject("RdgTestApp", TestBoundaryFlux)
A base class for computing/caching fluxes at boundaries.
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const
Boundary flux used for testing.
TestBoundaryFlux(const InputParameters &parameters)
static InputParameters validParams()
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.
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.