Skip to content

Commit

Permalink
ADDGConvection -> ADDGAdvection
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsayad authored and oanaoana committed Oct 19, 2023
1 parent 30a14e6 commit 2b76014
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
@@ -1,17 +1,17 @@
# ADDGConvection
# ADDGAdvection

!syntax description /DGKernels/ADDGConvection
!syntax description /DGKernels/ADDGAdvection

This is the automatic differentiation analog of [DGConvection.md] but with a
couple distinctions:

- The [!param](/DGKernels/ADDGConvection/velocity) parameter is a material
- The [!param](/DGKernels/ADDGAdvection/velocity) parameter is a material
property instead of a constant. This allows this object's use in a
simulation where the velocity is being solved for
and/or changing spatially. Additionally, the use of a material property as
opposed to a coupled variable allows more straightforward
propagation of derivatives for automatic differentiation.
- A [!param](/DGKernels/ADDGConvection/advected_quantity) paramter is
- A [!param](/DGKernels/ADDGAdvection/advected_quantity) paramter is
available which allows for advecting different quantities than the `variable`
this object is acting upon

Expand All @@ -24,8 +24,8 @@ and bottom boundaries of the domain.

!listing test/tests/dgkernels/passive-scalar-channel-flow/test.i block=DGKernels

!syntax parameters /DGKernels/ADDGConvection
!syntax parameters /DGKernels/ADDGAdvection

!syntax inputs /DGKernels/ADDGConvection
!syntax inputs /DGKernels/ADDGAdvection

!syntax children /DGKernels/ADDGConvection
!syntax children /DGKernels/ADDGAdvection
2 changes: 1 addition & 1 deletion framework/doc/content/source/dgkernels/DGConvection.md
Expand Up @@ -12,7 +12,7 @@ More information about the discontinuous Galerkin method may be found in the
## Example input syntax

In this example, a field `u` is advected from a boundary condition on its left to the right boundary
with a `1 0 0` velocity using the `ADDGConvection`, the version of this kernel with automatic differentiation.
with a `1 0 0` velocity using [ADDGAdvection.md], the version of this kernel with automatic differentiation.

!listing test/tests/dgkernels/ad_dg_convection/ad_dg_convection.i block=DGKernels

Expand Down
Expand Up @@ -9,7 +9,7 @@ The `ADConservativeAdvection` kernel implements the same advection term as
property instead of a coupled variable. This allows more straightforward
propagation of derivatives for automatic differentiation
- No upwinding option is currently implemented. In that vein this object may be
best used within a discontinuous Galerkin scheme with [ADDGConvection.md].
best used within a discontinuous Galerkin scheme with [ADDGAdvection.md].
- A [!param](/Kernels/ADConservativeAdvection/advected_quantity) parameter is
available which allows for advecting different quantities than the `variable`
this object is acting upon
Expand Down
Expand Up @@ -15,12 +15,12 @@
* Adds residual/Jacobian contributions for a convection term from internal faces for a
* discontinuous Galerkin formulation
*/
class ADDGConvection : public ADDGKernel
class ADDGAdvection : public ADDGKernel
{
public:
static InputParameters validParams();

ADDGConvection(const InputParameters & parameters);
ADDGAdvection(const InputParameters & parameters);

protected:
virtual ADReal computeQpResidual(Moose::DGResidualType type) override;
Expand Down
Expand Up @@ -7,12 +7,12 @@
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#include "ADDGConvection.h"
#include "ADDGAdvection.h"

registerMooseObject("MooseApp", ADDGConvection);
registerMooseObject("MooseApp", ADDGAdvection);

InputParameters
ADDGConvection::validParams()
ADDGAdvection::validParams()
{
InputParameters params = ADDGKernel::validParams();
params.addRequiredParam<MaterialPropertyName>("velocity", "Velocity vector");
Expand All @@ -24,7 +24,7 @@ ADDGConvection::validParams()
return params;
}

ADDGConvection::ADDGConvection(const InputParameters & parameters)
ADDGAdvection::ADDGAdvection(const InputParameters & parameters)
: ADDGKernel(parameters),
_velocity(getADMaterialProperty<RealVectorValue>("velocity")),
_velocity_neighbor(getNeighborADMaterialProperty<RealVectorValue>("velocity")),
Expand All @@ -38,7 +38,7 @@ ADDGConvection::ADDGConvection(const InputParameters & parameters)
}

ADReal
ADDGConvection::computeQpResidual(Moose::DGResidualType type)
ADDGAdvection::computeQpResidual(Moose::DGResidualType type)
{
ADReal r = 0;

Expand Down
2 changes: 1 addition & 1 deletion test/tests/dgkernels/ad_dg_convection/ad_dg_convection.i
Expand Up @@ -21,7 +21,7 @@

[DGKernels]
[convection]
type = ADDGConvection
type = ADDGAdvection
variable = u
velocity = velocity
[]
Expand Down
2 changes: 1 addition & 1 deletion test/tests/dgkernels/passive-scalar-channel-flow/test.i
Expand Up @@ -32,7 +32,7 @@

[DGKernels]
[convection]
type = ADDGConvection
type = ADDGAdvection
variable = u
velocity = 'velocity'
[]
Expand Down
2 changes: 1 addition & 1 deletion test/tests/dgkernels/passive-scalar-channel-flow/tests
@@ -1,6 +1,6 @@
[Tests]
issues = '#24055'
design = 'ADConservativeAdvection.md ADDGConvection.md ADConservativeAdvectionBC.md MatDiffusion.md DGDiffusion.md DGFunctionDiffusionDirichletBC.md'
design = 'ADConservativeAdvection.md ADDGAdvection.md ADConservativeAdvectionBC.md MatDiffusion.md DGDiffusion.md DGFunctionDiffusionDirichletBC.md'
[test]
type = Exodiff
input = test.i
Expand Down

0 comments on commit 2b76014

Please sign in to comment.