www.mooseframework.org
LevelSetAdvection.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 // MOOSE includes
9 #include "LevelSetAdvection.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<Kernel>();
16  params.addClassDescription("Implements the level set advection equation: $\\vec{v}\\cdot\\nabla "
17  "u = 0$, where the weak form is $(\\psi_i, \\vec{v}\\cdot\\nabla u) = "
18  "0$.");
19  params += validParams<LevelSetVelocityInterface<>>();
20  return params;
21 }
22 
23 LevelSetAdvection::LevelSetAdvection(const InputParameters & parameters)
24  : LevelSetVelocityInterface<Kernel>(parameters)
25 {
26 }
27 
28 Real
30 {
32  return _test[_i][_qp] * (_velocity * _grad_u[_qp]);
33 }
34 
35 Real
37 {
39  return _test[_i][_qp] * (_velocity * _grad_phi[_j][_qp]);
40 }
RealVectorValue _velocity
Storage for velocity vector.
virtual Real computeQpJacobian() override
A helper class for defining the velocity as coupled variables for the levelset equation.
LevelSetAdvection(const InputParameters &parameters)
virtual Real computeQpResidual() override
InputParameters validParams< LevelSetAdvection >()
void computeQpVelocity()
This method should be called when the velocity vector needs to be updated, this is not done automatic...