https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSFVElementalKernel.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
11
19
24
25void
36
37void
39{
40 if (_rc_uo.segregated())
41 {
43 mooseAssert(_var.dofIndices().size() == 1, "We're currently built to use CONSTANT MONOMIALS");
44 addJacobian(_assembly, std::array<ADReal, 1>{{r}}, _var.dofIndices(), _var.scalingFactor());
45 }
46}
47
48void
58
59void
60INSFVElementalKernel::addResidualAndJacobian(const ADReal & residual, const dof_id_type dof_index)
61{
63 std::array<ADReal, 1>{{residual}},
64 std::array<dof_id_type, 1>{{dof_index}},
66}
DualNumber< Real, DNDerivativeType, true > ADReal
const Real & elemVolume() const
static InputParameters validParams()
MooseVariableFV< Real > & _var
void computeResidualAndJacobian() override
static InputParameters validParams()
virtual ADReal computeSegregatedContribution()
Compute the contribution which goes into the residual of the segregated system.
INSFVElementalKernel(const InputParameters &params)
void addResidualAndJacobian(const ADReal &residual, dof_id_type dof)
Process into either the system residual or Jacobian.
void computeResidual() override
void computeJacobian() override
All objects that contribute to pressure-based (e.g.
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms.
void scalingFactor(const std::vector< Real > &factor)
unsigned int number() const
virtual const std::vector< dof_id_type > & dofIndices() const final
Assembly & _assembly
virtual bool segregated() const =0
Bool of the Rhie Chow user object is used in monolithic/segregated approaches.
void addJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
void accumulateTaggedLocalResidual()
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
DenseVector< Number > _local_re
auto raw_value(const Eigen::Map< T > &in)