www.mooseframework.org
MaskedBodyForce.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #pragma once
11 
12 #include "BodyForce.h"
13 #include "JvarMapInterface.h"
14 #include "DerivativeMaterialInterface.h"
15 
16 // Forward Declarations
17 class MaskedBodyForce;
18 class Function;
19 
20 template <>
21 InputParameters validParams<MaskedBodyForce>();
22 
29 class MaskedBodyForce : public DerivativeMaterialInterface<JvarMapKernelInterface<BodyForce>>
30 {
31 public:
32  MaskedBodyForce(const InputParameters & parameters);
33  virtual void initialSetup();
34 
35 protected:
36  virtual Real computeQpResidual();
37  virtual Real computeQpJacobian();
38  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
39 
40  const MaterialProperty<Real> & _mask;
41 
43  const unsigned int _nvar;
44 
46  VariableName _v_name;
47 
49  const MaterialProperty<Real> & _dmaskdv;
50 
52  std::vector<const MaterialProperty<Real> *> _dmaskdarg;
53 };
54 
MaskedBodyForce::initialSetup
virtual void initialSetup()
Definition: MaskedBodyForce.C:43
MaskedBodyForce::_mask
const MaterialProperty< Real > & _mask
Definition: MaskedBodyForce.h:40
MaskedBodyForce::computeQpJacobian
virtual Real computeQpJacobian()
Definition: MaskedBodyForce.C:55
MaskedBodyForce::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: MaskedBodyForce.C:61
MaskedBodyForce::_dmaskdv
const MaterialProperty< Real > & _dmaskdv
derivative of the mask wrt the kernel's nonlinear variable
Definition: MaskedBodyForce.h:49
MaskedBodyForce::computeQpResidual
virtual Real computeQpResidual()
Definition: MaskedBodyForce.C:49
MaskedBodyForce::MaskedBodyForce
MaskedBodyForce(const InputParameters &parameters)
Definition: MaskedBodyForce.C:26
validParams< MaskedBodyForce >
InputParameters validParams< MaskedBodyForce >()
Definition: MaskedBodyForce.C:17
MaskedBodyForce
This kernel creates a body force that is modified by a mask defined as a material.
Definition: MaskedBodyForce.h:29
MaskedBodyForce::_dmaskdarg
std::vector< const MaterialProperty< Real > * > _dmaskdarg
Reaction rate derivatives w.r.t. other coupled variables.
Definition: MaskedBodyForce.h:52
MaskedBodyForce::_v_name
VariableName _v_name
name of the nonlinear variable (needed to retrieve the derivative material properties)
Definition: MaskedBodyForce.h:46
MaskedBodyForce::_nvar
const unsigned int _nvar
number of coupled variables
Definition: MaskedBodyForce.h:43