Nektar++
Diffusion.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: Diffusion.cpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Abstract base class for diffusion.
32//
33///////////////////////////////////////////////////////////////////////////////
34
36
37namespace Nektar::SolverUtils
38{
40{
41 static DiffusionFactory instance;
42 return instance;
43}
44
46 [[maybe_unused]] const std::size_t nConvectiveFields,
47 [[maybe_unused]] const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
48 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &inarray,
49 [[maybe_unused]] Array<OneD, Array<OneD, NekDouble>> &outarray,
50 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &pFwd,
51 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &pBwd)
52{
53 NEKERROR(ErrorUtil::efatal, "v_DiffuseCoeffs not defined");
54}
55
57{
58 NEKERROR(ErrorUtil::efatal, "v_GetTraceNormal not defined");
60}
61
63 [[maybe_unused]] const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
64 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &inarray,
65 [[maybe_unused]] TensorOfArray3D<NekDouble> &qfields,
66 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &pFwd,
67 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &pBwd)
68{
69 NEKERROR(ErrorUtil::efatal, "Not defined for function DiffuseVolumeFLux.");
70}
71
73 [[maybe_unused]] const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
74 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &inarray,
75 [[maybe_unused]] TensorOfArray3D<NekDouble> &qfields,
76 [[maybe_unused]] TensorOfArray3D<NekDouble> &VolumeFlux,
77 [[maybe_unused]] Array<OneD, int> &nonZeroIndex)
78{
79 NEKERROR(ErrorUtil::efatal, "Not defined for function DiffuseVolumeFLux.");
80}
81
83 [[maybe_unused]] const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
84 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &inarray,
85 [[maybe_unused]] TensorOfArray3D<NekDouble> &qfields,
86 [[maybe_unused]] TensorOfArray3D<NekDouble> &VolumeFlux,
87 [[maybe_unused]] Array<OneD, Array<OneD, NekDouble>> &TraceFlux,
88 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &pFwd,
89 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &pBwd,
90 [[maybe_unused]] Array<OneD, int> &nonZeroIndex)
91{
92 NEKERROR(ErrorUtil::efatal, "Not defined function DiffuseTraceFLux.");
93}
94
95} // namespace Nektar::SolverUtils
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:202
Provides a generic Factory class.
virtual SOLVER_UTILS_EXPORT void v_DiffuseCoeffs(const std::size_t nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)
Definition: Diffusion.cpp:45
virtual SOLVER_UTILS_EXPORT void v_DiffuseVolumeFlux(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfields, TensorOfArray3D< NekDouble > &VolumeFlux, Array< OneD, int > &nonZeroIndex)
Diffusion Volume Flux.
Definition: Diffusion.cpp:72
virtual SOLVER_UTILS_EXPORT void v_DiffuseCalcDerivative(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfields, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)
Diffusion Flux, calculate the physical derivatives.
Definition: Diffusion.cpp:62
virtual SOLVER_UTILS_EXPORT void v_DiffuseTraceFlux(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &Qfields, TensorOfArray3D< NekDouble > &VolumeFlux, Array< OneD, Array< OneD, NekDouble > > &TraceFlux, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd, Array< OneD, int > &nonZeroIndex)
Diffusion term Trace Flux.
Definition: Diffusion.cpp:82
virtual SOLVER_UTILS_EXPORT const Array< OneD, const Array< OneD, NekDouble > > & v_GetTraceNormal()
Definition: Diffusion.cpp:56
DiffusionFactory & GetDiffusionFactory()
Definition: Diffusion.cpp:39
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray