From 3b2292e1c7ed7456c206913d0fa3adeffe283923 Mon Sep 17 00:00:00 2001 From: uttamcadamb07 Date: Wed, 3 Jul 2024 10:36:45 +0100 Subject: [PATCH 01/13] Passive scalar source added for a box without Gaussian smoothing --- src/adjoint/DAFvSource/DAFvSourceScalar.C | 369 ++++++++++++++++++++++ src/adjoint/DAFvSource/DAFvSourceScalar.H | 78 +++++ 2 files changed, 447 insertions(+) create mode 100644 src/adjoint/DAFvSource/DAFvSourceScalar.C create mode 100644 src/adjoint/DAFvSource/DAFvSourceScalar.H diff --git a/src/adjoint/DAFvSource/DAFvSourceScalar.C b/src/adjoint/DAFvSource/DAFvSourceScalar.C new file mode 100644 index 00000000..f3bd84f3 --- /dev/null +++ b/src/adjoint/DAFvSource/DAFvSourceScalar.C @@ -0,0 +1,369 @@ +/*---------------------------------------------------------------------------*\ + + DAFoam : Discrete Adjoint with OpenFOAM + Version : v3 + +\*---------------------------------------------------------------------------*/ + +#include "DAFvSourceScalar.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +defineTypeNameAndDebug(DAFvSourceScalar, 0); +addToRunTimeSelectionTable(DAFvSource, DAFvSourceScalar, dictionary); +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +DAFvSourceScalar::DAFvSourceScalar( + const word modelType, + const fvMesh& mesh, + const DAOption& daOption, + const DAModel& daModel, + const DAIndex& daIndex) + : DAFvSource(modelType, mesh, daOption, daModel, daIndex) +{ + printInterval_ = daOption.getOption