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 300 : LevelSetAdvection::validParams() 16 : { 17 300 : InputParameters params = ADKernelValue::validParams(); 18 300 : 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 600 : params.addRequiredCoupledVar("velocity", "Velocity vector variable."); 22 300 : return params; 23 0 : } 24 : 25 160 : LevelSetAdvection::LevelSetAdvection(const InputParameters & parameters) 26 160 : : ADKernelValue(parameters), _velocity(adCoupledVectorValue("velocity")) 27 : { 28 160 : } 29 : 30 : ADReal 31 60466144 : LevelSetAdvection::precomputeQpResidual() 32 : { 33 60466144 : return _velocity[_qp] * _grad_u[_qp]; 34 : }