Line data Source code
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 "LevelSetAdvection.h" 11 : 12 : registerMooseObject("LevelSetApp", LevelSetAdvection); 13 : 14 : InputParameters 15 420 : LevelSetAdvection::validParams() 16 : { 17 420 : InputParameters params = ADKernelValue::validParams(); 18 420 : params.addClassDescription("Implements the level set advection equation: $\\vec{v}\\cdot\\nabla " 19 : "u = 0$, where the weak form is $(\\psi_i, \\vec{v}\\cdot\\nabla u) = " 20 : "0$."); 21 840 : params.addRequiredCoupledVar("velocity", "Velocity vector variable."); 22 420 : return params; 23 0 : } 24 : 25 240 : LevelSetAdvection::LevelSetAdvection(const InputParameters & parameters) 26 240 : : ADKernelValue(parameters), _velocity(adCoupledVectorValue("velocity")) 27 : { 28 240 : } 29 : 30 : ADReal 31 72256960 : LevelSetAdvection::precomputeQpResidual() 32 : { 33 72256960 : return _velocity[_qp] * _grad_u[_qp]; 34 : }