Nektar++
DiffusionLDG.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: DiffusionLDG.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: LDG diffusion class.
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#include <iomanip>
36#include <iostream>
37
38#include <boost/algorithm/string/predicate.hpp>
39
41
42namespace Nektar::SolverUtils
43{
45 "LDG", DiffusionLDG::create, "Local Discontinuous Galkerin");
46
48{
49}
50
54{
55 m_session = pSession;
56
57 m_session->LoadSolverInfo("ShockCaptureType", m_shockCaptureType, "Off");
58
59 // Set up penalty term for LDG
60 m_session->LoadParameter("LDGc11", m_C11, 1.0);
61
62 // Setting up the normals
63 std::size_t nDim = pFields[0]->GetCoordim(0);
64 std::size_t nTracePts = pFields[0]->GetTrace()->GetTotPoints();
65
67 for (std::size_t i = 0; i < nDim; ++i)
68 {
70 }
71 pFields[0]->GetTrace()->GetNormals(m_traceNormals);
72}
73
75 const std::size_t nConvectiveFields,
77 const Array<OneD, Array<OneD, NekDouble>> &inarray,
79 const Array<OneD, Array<OneD, NekDouble>> &pFwd,
80 const Array<OneD, Array<OneD, NekDouble>> &pBwd)
81{
82 std::size_t nCoeffs = fields[0]->GetNcoeffs();
83
84 Array<OneD, Array<OneD, NekDouble>> tmp{nConvectiveFields};
85 for (std::size_t i = 0; i < nConvectiveFields; ++i)
86 {
87 tmp[i] = Array<OneD, NekDouble>{nCoeffs, 0.0};
88 }
89
90 DiffusionLDG::v_DiffuseCoeffs(nConvectiveFields, fields, inarray, tmp, pFwd,
91 pBwd);
92
93 for (std::size_t i = 0; i < nConvectiveFields; ++i)
94 {
95 fields[i]->BwdTrans(tmp[i], outarray[i]);
96 }
97}
98
100 const std::size_t nConvectiveFields,
102 const Array<OneD, Array<OneD, NekDouble>> &inarray,
104 const Array<OneD, Array<OneD, NekDouble>> &pFwd,
105 const Array<OneD, Array<OneD, NekDouble>> &pBwd)
106{
107 std::size_t nDim = fields[0]->GetCoordim(0);
108 std::size_t nPts = fields[0]->GetTotPoints();
109 std::size_t nCoeffs = fields[0]->GetNcoeffs();
110 std::size_t nTracePts = fields[0]->GetTrace()->GetTotPoints();
111
112 Array<OneD, NekDouble> tmp{nCoeffs};
113
114 TensorOfArray3D<NekDouble> qfield{nDim};
115 for (std::size_t j = 0; j < nDim; ++j)
116 {
117 qfield[j] = Array<OneD, Array<OneD, NekDouble>>{nConvectiveFields};
118 for (std::size_t i = 0; i < nConvectiveFields; ++i)
119 {
120 qfield[j][i] = Array<OneD, NekDouble>{nPts, 0.0};
121 }
122 }
123
124 Array<OneD, Array<OneD, NekDouble>> traceflux{nConvectiveFields};
125 for (std::size_t i = 0; i < nConvectiveFields; ++i)
126 {
127 traceflux[i] = Array<OneD, NekDouble>{nTracePts, 0.0};
128 }
129
130 DiffuseCalcDerivative(fields, inarray, qfield, pFwd, pBwd);
131
132 // Initialize viscous tensor
134 for (std::size_t j = 0; j < nDim; ++j)
135 {
136 viscTensor[j] = Array<OneD, Array<OneD, NekDouble>>{nConvectiveFields};
137 for (std::size_t i = 0; i < nConvectiveFields; ++i)
138 {
139 viscTensor[j][i] = Array<OneD, NekDouble>{nPts, 0.0};
140 }
141 }
142 DiffuseVolumeFlux(fields, inarray, qfield, viscTensor);
143 DiffuseTraceFlux(fields, inarray, qfield, viscTensor, traceflux, pFwd,
144 pBwd);
145
147
148 for (std::size_t i = 0; i < nConvectiveFields; ++i)
149 {
150 for (std::size_t j = 0; j < nDim; ++j)
151 {
152 qdbase[j] = viscTensor[j][i];
153 }
154 fields[i]->IProductWRTDerivBase(qdbase, tmp);
155
156 Vmath::Neg(nCoeffs, tmp, 1);
157 fields[i]->AddTraceIntegral(traceflux[i], tmp);
158 fields[i]->SetPhysState(false);
159 fields[i]->MultiplyByElmtInvMass(tmp, outarray[i]);
160 }
161}
162
165 const Array<OneD, Array<OneD, NekDouble>> &inarray,
167 const Array<OneD, Array<OneD, NekDouble>> &pFwd,
168 const Array<OneD, Array<OneD, NekDouble>> &pBwd)
169{
170 std::size_t nConvectiveFields = fields.size();
171 std::size_t nDim = fields[0]->GetCoordim(0);
172 std::size_t nCoeffs = fields[0]->GetNcoeffs();
173 std::size_t nTracePts = fields[0]->GetTrace()->GetTotPoints();
174
175 Array<OneD, NekDouble> tmp{nCoeffs};
177 for (std::size_t j = 0; j < nDim; ++j)
178 {
179 flux[j] = Array<OneD, Array<OneD, NekDouble>>{nConvectiveFields};
180 for (std::size_t i = 0; i < nConvectiveFields; ++i)
181 {
182 flux[j][i] = Array<OneD, NekDouble>{nTracePts, 0.0};
183 }
184 }
185
186 NumFluxforScalar(fields, inarray, flux, pFwd, pBwd);
187
188 for (std::size_t j = 0; j < nDim; ++j)
189 {
190 for (std::size_t i = 0; i < nConvectiveFields; ++i)
191 {
192 fields[i]->IProductWRTDerivBase(j, inarray[i], tmp);
193 Vmath::Neg(nCoeffs, tmp, 1);
194 fields[i]->AddTraceIntegral(flux[j][i], tmp);
195 fields[i]->SetPhysState(false);
196 fields[i]->MultiplyByElmtInvMass(tmp, tmp);
197 fields[i]->BwdTrans(tmp, qfield[j][i]);
198 }
199 }
200}
201
203 [[maybe_unused]] const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
204 const Array<OneD, Array<OneD, NekDouble>> &inarray,
206 [[maybe_unused]] Array<OneD, int> &nonZeroIndex)
207{
208 m_fluxVector(inarray, qfield, viscTensor);
209}
210
213 const Array<OneD, Array<OneD, NekDouble>> &inarray,
214 [[maybe_unused]] TensorOfArray3D<NekDouble> &qfield,
215 TensorOfArray3D<NekDouble> &viscTensor,
216 Array<OneD, Array<OneD, NekDouble>> &TraceFlux,
217 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &pFwd,
218 [[maybe_unused]] const Array<OneD, Array<OneD, NekDouble>> &pBwd,
219 [[maybe_unused]] Array<OneD, int> &nonZeroIndex)
220{
221 NumFluxforVector(fields, inarray, viscTensor, TraceFlux);
222}
223
226 const Array<OneD, Array<OneD, NekDouble>> &ufield,
228 const Array<OneD, Array<OneD, NekDouble>> &pFwd,
229 const Array<OneD, Array<OneD, NekDouble>> &pBwd)
230{
231 std::size_t nTracePts = fields[0]->GetTrace()->GetTotPoints();
232 std::size_t nvariables = fields.size();
233 std::size_t nDim = fields[0]->GetCoordim(0);
234
235 Array<OneD, NekDouble> Fwd{nTracePts};
236 Array<OneD, NekDouble> Bwd{nTracePts};
237 Array<OneD, NekDouble> fluxtemp{nTracePts, 0.0};
238
239 // Get the sign of (v \cdot n), v = an arbitrary vector
240 // Evaluate upwind flux:
241 // uflux = \hat{u} \phi \cdot u = u^{(+,-)} n
242 for (std::size_t i = 0; i < nvariables; ++i)
243 {
244 // Compute Fwd and Bwd value of ufield of i direction
245 if (pFwd == NullNekDoubleArrayOfArray ||
247 {
248 fields[i]->GetFwdBwdTracePhys(ufield[i], Fwd, Bwd);
249 }
250 else
251 {
252 Fwd = pFwd[i];
253 Bwd = pBwd[i];
254 }
255
256 // Upwind
257 Vmath::Vcopy(nTracePts, Fwd, 1, fluxtemp, 1);
258
259 // Imposing weak boundary condition with flux
260 if (fields[0]->GetBndCondExpansions().size())
261 {
262 ApplyScalarBCs(fields, i, ufield[i], Fwd, Bwd, fluxtemp);
263 }
264
265 for (std::size_t j = 0; j < nDim; ++j)
266 {
267 Vmath::Vmul(nTracePts, m_traceNormals[j], 1, fluxtemp, 1,
268 uflux[j][i], 1);
269 }
270 }
271}
272
275 const std::size_t var,
276 [[maybe_unused]] const Array<OneD, const NekDouble> &ufield,
278 [[maybe_unused]] const Array<OneD, const NekDouble> &Bwd,
279 Array<OneD, NekDouble> &penaltyflux)
280{
281 // Number of boundary regions
282 std::size_t nBndRegions = fields[var]->GetBndCondExpansions().size();
283 std::size_t cnt = 0;
284 for (std::size_t i = 0; i < nBndRegions; ++i)
285 {
286 if (fields[var]->GetBndConditions()[i]->GetBoundaryConditionType() ==
288 {
289 continue;
290 }
291
292 // Number of boundary expansion related to that region
293 std::size_t nBndEdges =
294 fields[var]->GetBndCondExpansions()[i]->GetExpSize();
295
296 // Weakly impose boundary conditions by modifying flux values
297 for (std::size_t e = 0; e < nBndEdges; ++e)
298 {
299 std::size_t nBndEdgePts = fields[var]
300 ->GetBndCondExpansions()[i]
301 ->GetExp(e)
302 ->GetTotPoints();
303
304 std::size_t id1 =
305 fields[var]->GetBndCondExpansions()[i]->GetPhys_Offset(e);
306
307 std::size_t id2 = fields[0]->GetTrace()->GetPhys_Offset(
308 fields[0]->GetTraceMap()->GetBndCondIDToGlobalTraceID(cnt++));
309
310 // AV boundary conditions
311 if (boost::iequals(
312 fields[var]->GetBndConditions()[i]->GetUserDefined(),
313 "Wall") ||
314 boost::iequals(
315 fields[var]->GetBndConditions()[i]->GetUserDefined(),
316 "Symmetry") ||
317 boost::iequals(
318 fields[var]->GetBndConditions()[i]->GetUserDefined(),
319 "WallViscous") ||
320 boost::iequals(
321 fields[var]->GetBndConditions()[i]->GetUserDefined(),
322 "WallAdiabatic"))
323 {
324 Vmath::Vcopy(nBndEdgePts, &Fwd[id2], 1, &penaltyflux[id2], 1);
325 }
326 // For Dirichlet boundary condition: uflux = g_D
327 else if (fields[var]
328 ->GetBndConditions()[i]
329 ->GetBoundaryConditionType() ==
331 {
333 nBndEdgePts,
334 &(fields[var]->GetBndCondExpansions()[i]->GetPhys())[id1],
335 1, &penaltyflux[id2], 1);
336 }
337 // For Neumann boundary condition: uflux = u+
338 else if ((fields[var]->GetBndConditions()[i])
339 ->GetBoundaryConditionType() ==
341 {
342 Vmath::Vcopy(nBndEdgePts, &Fwd[id2], 1, &penaltyflux[id2], 1);
343 }
344 }
345 }
346}
347
348/**
349 * @brief Build the numerical flux for the 2nd order derivatives
350 * todo: add variable coeff and h dependence to penalty term
351 */
354 const Array<OneD, Array<OneD, NekDouble>> &ufield,
357{
358 std::size_t nTracePts = fields[0]->GetTrace()->GetTotPoints();
359 std::size_t nvariables = fields.size();
360 std::size_t nDim = qfield.size();
361
362 Array<OneD, NekDouble> Fwd{nTracePts};
363 Array<OneD, NekDouble> Bwd{nTracePts};
364 Array<OneD, NekDouble> qFwd{nTracePts};
365 Array<OneD, NekDouble> qBwd{nTracePts};
366 Array<OneD, NekDouble> qfluxtemp{nTracePts, 0.0};
367 Array<OneD, NekDouble> uterm{nTracePts};
368
369 // Evaulate upwind flux:
370 // qflux = \hat{q} \cdot u = q \cdot n - C_(11)*(u^+ - u^-)
371 for (std::size_t i = 0; i < nvariables; ++i)
372 {
373 // Generate Stability term = - C11 ( u- - u+ )
374 fields[i]->GetFwdBwdTracePhys(ufield[i], Fwd, Bwd);
375 Vmath::Vsub(nTracePts, Fwd, 1, Bwd, 1, uterm, 1);
376 Vmath::Smul(nTracePts, -m_C11, uterm, 1, uterm, 1);
377
378 qflux[i] = Array<OneD, NekDouble>{nTracePts, 0.0};
379 for (std::size_t j = 0; j < nDim; ++j)
380 {
381 // Compute Fwd and Bwd value of ufield of jth direction
382 fields[i]->GetFwdBwdTracePhys(qfield[j][i], qFwd, qBwd);
383
384 // Downwind
385 Vmath::Vcopy(nTracePts, qBwd, 1, qfluxtemp, 1);
386
387 Vmath::Vmul(nTracePts, m_traceNormals[j], 1, qfluxtemp, 1,
388 qfluxtemp, 1);
389
390 // Flux = {Fwd, Bwd} * (nx, ny, nz) + uterm * (nx, ny)
391 Vmath::Vadd(nTracePts, uterm, 1, qfluxtemp, 1, qfluxtemp, 1);
392
393 // Imposing weak boundary condition with flux
394 if (fields[0]->GetBndCondExpansions().size())
395 {
396 ApplyVectorBCs(fields, i, j, qfield[j][i], qFwd, qBwd,
397 qfluxtemp);
398 }
399
400 // q_hat \cdot n = (q_xi \cdot n_xi) or (q_eta \cdot n_eta)
401 // n_xi = n_x * tan_xi_x + n_y * tan_xi_y + n_z * tan_xi_z
402 // n_xi = n_x * tan_eta_x + n_y * tan_eta_y + n_z*tan_eta_z
403 Vmath::Vadd(nTracePts, qfluxtemp, 1, qflux[i], 1, qflux[i], 1);
404 }
405 }
406}
407
408/**
409 * Diffusion: Imposing weak boundary condition for q with flux
410 * uflux = g_D on Dirichlet boundary condition
411 * uflux = u_Fwd on Neumann boundary condition
412 */
415 const std::size_t var, const std::size_t dir,
416 [[maybe_unused]] const Array<OneD, const NekDouble> &qfield,
418 [[maybe_unused]] const Array<OneD, const NekDouble> &qBwd,
419 Array<OneD, NekDouble> &penaltyflux)
420{
421 std::size_t nBndRegions = fields[var]->GetBndCondExpansions().size();
422 std::size_t cnt = 0;
423
424 for (std::size_t i = 0; i < nBndRegions; ++i)
425 {
426 if (fields[var]->GetBndConditions()[i]->GetBoundaryConditionType() ==
428 {
429 continue;
430 }
431 std::size_t nBndEdges =
432 fields[var]->GetBndCondExpansions()[i]->GetExpSize();
433
434 // Weakly impose boundary conditions by modifying flux values
435 for (std::size_t e = 0; e < nBndEdges; ++e)
436 {
437 std::size_t nBndEdgePts = fields[var]
438 ->GetBndCondExpansions()[i]
439 ->GetExp(e)
440 ->GetTotPoints();
441
442 std::size_t id1 =
443 fields[var]->GetBndCondExpansions()[i]->GetPhys_Offset(e);
444
445 std::size_t id2 = fields[0]->GetTrace()->GetPhys_Offset(
446 fields[0]->GetTraceMap()->GetBndCondIDToGlobalTraceID(cnt++));
447
448 // AV boundary conditions
449 if (boost::iequals(
450 fields[var]->GetBndConditions()[i]->GetUserDefined(),
451 "Wall") ||
452 boost::iequals(
453 fields[var]->GetBndConditions()[i]->GetUserDefined(),
454 "Symmetry") ||
455 boost::iequals(
456 fields[var]->GetBndConditions()[i]->GetUserDefined(),
457 "WallViscous") ||
458 boost::iequals(
459 fields[var]->GetBndConditions()[i]->GetUserDefined(),
460 "WallAdiabatic"))
461 {
462 Vmath::Zero(nBndEdgePts, &penaltyflux[id2], 1);
463 }
464 // For Dirichlet boundary condition:
465 // qflux = q+ - C_11 (u+ - g_D) (nx, ny)
466 else if (fields[var]
467 ->GetBndConditions()[i]
468 ->GetBoundaryConditionType() ==
470 {
471 Vmath::Vmul(nBndEdgePts, &m_traceNormals[dir][id2], 1,
472 &qFwd[id2], 1, &penaltyflux[id2], 1);
473 }
474 // For Neumann boundary condition: qflux = g_N
475 else if ((fields[var]->GetBndConditions()[i])
476 ->GetBoundaryConditionType() ==
478 {
480 nBndEdgePts, &m_traceNormals[dir][id2], 1,
481 &(fields[var]->GetBndCondExpansions()[i]->GetPhys())[id1],
482 1, &penaltyflux[id2], 1);
483 }
484 }
485 }
486}
487
488} // namespace Nektar::SolverUtils
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:197
SOLVER_UTILS_EXPORT void DiffuseCalcDerivative(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfields, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayOfArray)
Definition: Diffusion.h:201
SOLVER_UTILS_EXPORT void DiffuseVolumeFlux(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfields, TensorOfArray3D< NekDouble > &VolumeFlux, Array< OneD, int > &nonZeroIndex=NullInt1DArray)
Diffusion Volume FLux.
Definition: Diffusion.h:214
SOLVER_UTILS_EXPORT void 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=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayOfArray, Array< OneD, int > &nonZeroIndex=NullInt1DArray)
Diffusion term Trace Flux.
Definition: Diffusion.h:225
DiffusionFluxVecCB m_fluxVector
Definition: Diffusion.h:346
void v_Diffuse(const std::size_t nConvective, 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) override
void ApplyScalarBCs(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const std::size_t var, const Array< OneD, const NekDouble > &ufield, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &penaltyflux)
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) override
Diffusion Volume Flux.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Definition: DiffusionLDG.h:104
static DiffusionSharedPtr create(std::string diffType)
Definition: DiffusionLDG.h:45
void ApplyVectorBCs(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const std::size_t var, const std::size_t dir, const Array< OneD, const NekDouble > &qfield, const Array< OneD, const NekDouble > &qFwd, const Array< OneD, const NekDouble > &qBwd, Array< OneD, NekDouble > &penaltyflux)
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) override
Diffusion Flux, calculate the physical derivatives.
void NumFluxforScalar(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &ufield, TensorOfArray3D< NekDouble > &uflux, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)
void v_DiffuseCoeffs(const std::size_t nConvective, 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) override
LibUtilities::SessionReaderSharedPtr m_session
Definition: DiffusionLDG.h:105
void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) override
void NumFluxforVector(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &ufield, TensorOfArray3D< NekDouble > &qfield, Array< OneD, Array< OneD, NekDouble > > &qflux)
Build the numerical flux for the 2nd order derivatives todo: add variable coeff and h dependence to p...
NekDouble m_C11
Coefficient of penalty term.
Definition: DiffusionLDG.h:102
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) override
Diffusion term Trace Flux.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
DiffusionFactory & GetDiffusionFactory()
Definition: Diffusion.cpp:39
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.hpp:72
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.hpp:292
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.hpp:180
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition: Vmath.hpp:100
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.hpp:273
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.hpp:825
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.hpp:220