20 params.
addClassDescription(
"Conservative form of $\\nabla \\cdot \\vec{v} u$ (advection), using "
21 "the Flux Limited TVD scheme invented by Kuzmin and Turek");
23 "AdvectiveFluxCalculator UserObject");
36 mooseError(
"FluxLimitedTVDAdvection::computeQpResidual() called\n");
57 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
58 for (
unsigned int i = 0; i <
_save_in.size(); i++)
79 std::vector<dof_id_type> idof_indices(
89 std::vector<dof_id_type> jdof_indices(derivs.size());
90 DenseMatrix<Number> deriv_matrix(1, derivs.size());
92 for (
const auto & node_j_deriv : derivs)
95 const dof_id_type node_id_j = node_j_deriv.first;
100 deriv_matrix(0, j) = node_j_deriv.second / valence;
registerMooseObject("PorousFlowApp", FluxLimitedTVDAdvection)
Base class to compute Advective fluxes.
Real getFluxOut(dof_id_type node_i) const
Returns the flux out of lobal node id.
const std::map< dof_id_type, Real > & getdFluxOutdu(dof_id_type node_i) const
Returns r where r[j] = d(flux out of global node i)/du(global node j) used in Jacobian computations.
unsigned getValence(dof_id_type node_i) const
Returns the valence of the global node i Valence is the number of times the node is encountered in a ...
Advection of the variable with velocity set in the AdvectiveFluxCalculator.
virtual Real computeQpResidual() override
static InputParameters validParams()
FluxLimitedTVDAdvection(const InputParameters ¶meters)
virtual void computeResidual() override
const AdvectiveFluxCalculatorBase & _fluo
The user object that computes Kuzmin and Turek's K_ij, R+ and R-, etc quantities.
virtual void computeJacobian() override
std::vector< MooseVariableFEBase * > _save_in
const Elem *const & _current_elem
static InputParameters validParams()
void mooseError(Args &&... args) const
void scalingFactor(const std::vector< Real > &factor)
unsigned int number() const
virtual void precalculateJacobian()
virtual void precalculateResidual()
unsigned int number() const
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
void addJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
void accumulateTaggedLocalResidual()
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
DenseVector< Number > _local_re