Nektar++
Loading...
Searching...
No Matches
AcousticSystem.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: AcousticSystem.cpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2018 Kilian Lackhove
10// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
11// Department of Aeronautics, Imperial College London (UK), and Scientific
12// Computing and Imaging Institute, University of Utah (USA).
13//
14// Permission is hereby granted, free of charge, to any person obtaining a
15// copy of this software and associated documentation files (the "Software"),
16// to deal in the Software without restriction, including without limitation
17// the rights to use, copy, modify, merge, publish, distribute, sublicense,
18// and/or sell copies of the Software, and to permit persons to whom the
19// Software is furnished to do so, subject to the following conditions:
20//
21// The above copyright notice and this permission notice shall be included
22// in all copies or substantial portions of the Software.
23//
24// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30// DEALINGS IN THE SOFTWARE.
31//
32// Description: AcousticSystem
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#include <iostream>
37
38// Define variable to avoid deprecated warning in Boost 1.69.
39#include <boost/version.hpp>
40#if BOOST_VERSION >= 106900 && BOOST_VERSION < 107000
41#define BOOST_ALLOW_DEPRECATED_HEADERS
42#endif
43
44#include <boost/random/normal_distribution.hpp>
45
47
49
50namespace Nektar
51{
52
56 : UnsteadySystem(pSession, pGraph), AdvectionSystem(pSession, pGraph),
57 m_ip(-1), m_irho(-1), m_iu(1), m_conservative(false)
58{
59}
60
61/**
62 * @brief Initialization object for the AcousticSystem class.
63 */
64void AcousticSystem::v_InitObject(bool DeclareFields)
65{
66 AdvectionSystem::v_InitObject(DeclareFields);
67
70 "Only Projection=DisContinuous supported by the AcousticSystem class.");
71
72 m_bfNames.push_back("c0sq");
73 m_bfNames.push_back("rho0");
74 m_bfNames.push_back("u0");
75 m_bfNames.push_back("v0");
76 m_bfNames.push_back("w0");
77
78 // Resize the advection velocities vector to dimension of the problem
79 m_bfNames.resize(m_spacedim + 2);
80
82 m_fields, m_fields.size());
83
84 // Do not forwards transform initial condition
85 m_homoInitialFwd = false;
86
87 // Set up locations of velocity and base velocity vectors.
90 for (int i = 0; i < m_spacedim; ++i)
91 {
92 // u', v', w'
93 m_vecLocs[0][i] = m_iu + i;
94 }
95
96 if (m_session->DefinesElement("Nektar/Coupling"))
97 {
98 TiXmlElement *vCoupling = m_session->GetElement("Nektar/Coupling");
99
100 ASSERTL0(vCoupling->Attribute("TYPE"),
101 "Missing TYPE attribute in Coupling");
102 std::string vType = vCoupling->Attribute("TYPE");
103 ASSERTL0(!vType.empty(),
104 "TYPE attribute must be non-empty in Coupling");
105
106 m_coupling = GetCouplingFactory().CreateInstance(vType, m_fields[0]);
107 }
108
110 m_whiteNoiseBC_p = 0.0;
111}
112
113/**
114 * @brief v_PreIntegrate
115 */
117{
118 GetFunction("Baseflow", m_fields[0], true)
119 ->Evaluate(m_bfNames, m_bf, m_time);
120
121 if (m_coupling)
122 {
123 int numForceFields = 0;
124 for (auto &x : m_forcing)
125 {
126 numForceFields += x->GetForces().size();
127 }
128 std::vector<std::string> varNames;
130 m_fields.size() + m_bfNames.size() + numForceFields);
131 for (int i = 0; i < m_fields.size(); ++i)
132 {
133 varNames.push_back(m_session->GetVariable(i));
134 phys[i] = m_fields[i]->UpdatePhys();
135 }
136 for (int i = 0; i < m_bfNames.size(); ++i)
137 {
138 varNames.push_back(m_bfNames[i]);
139 phys[m_fields.size() + i] = m_bf[i];
140 }
141
142 int f = 0;
143 for (auto &x : m_forcing)
144 {
145 for (int i = 0; i < x->GetForces().size(); ++i)
146 {
147 phys[m_fields.size() + m_bfNames.size() + f + i] =
148 x->GetForces()[i];
149 varNames.push_back("F_" + std::to_string(f) + "_" +
150 m_session->GetVariable(i));
151 }
152 f++;
153 }
154
155 m_coupling->Send(step, m_time, phys, varNames);
156 m_coupling->Receive(step, m_time, phys, varNames);
157 }
158
159 return AdvectionSystem::v_PreIntegrate(step);
160}
161
163{
164 if (m_coupling)
165 {
166 m_coupling->Finalize();
167 }
168
169 AdvectionSystem::v_Output();
170}
171
172/**
173 * @brief Compute the right-hand side.
174 */
176 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
177 Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time)
178{
179 int nVariables = inarray.size();
180 int nq = GetTotPoints();
181
182 // WeakDG does not use advVel, so we only provide a dummy array
184 m_advection->Advect(nVariables, m_fields, advVel, inarray, outarray, time);
185
186 // Negate the LHS terms
187 for (int i = 0; i < nVariables; ++i)
188 {
189 Vmath::Neg(nq, outarray[i], 1);
190 }
191
192 v_AddLinTerm(inarray, outarray);
193
194 for (auto &x : m_forcing)
195 {
196 x->Apply(m_fields, inarray, outarray, m_time);
197 }
198}
199
200/**
201 * @brief Compute the projection and call the method for imposing the
202 * boundary conditions in case of discontinuous projection.
203 */
205 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
206 Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time)
207{
208 int nvariables = inarray.size();
209 int nq = m_fields[0]->GetNpoints();
210
211 // deep copy
212 if (inarray != outarray)
213 {
214 for (int i = 0; i < nvariables; ++i)
215 {
216 Vmath::Vcopy(nq, inarray[i], 1, outarray[i], 1);
217 }
218 }
219
221
222 SetBoundaryConditions(outarray, time);
223}
224
225/**
226 * @brief Apply the Boundary Conditions to the AcousticSystem equations.
227 */
230{
231 std::string varName;
232 int nvariables = m_fields.size();
233 int cnt = 0;
234 int nTracePts = GetTraceTotPoints();
235
236 // Extract trace for boundaries. Needs to be done on all processors to avoid
237 // deadlock.
238 Array<OneD, Array<OneD, NekDouble>> Fwd(nvariables);
239 for (int i = 0; i < nvariables; ++i)
240 {
241 Fwd[i] = Array<OneD, NekDouble>(nTracePts);
242 m_fields[i]->ExtractTracePhys(inarray[i], Fwd[i]);
243 }
245
246 // loop over Boundary Regions
247 for (int n = 0; n < m_fields[0]->GetBndConditions().size(); ++n)
248 {
249 std::string userDefStr =
250 m_fields[0]->GetBndConditions()[n]->GetUserDefined();
251
252 if (!userDefStr.empty())
253 {
254 // Wall Boundary Condition
255 if (boost::iequals(userDefStr, "Wall"))
256 {
257 WallBC(n, cnt, Fwd, inarray);
258 }
259 else if (boost::iequals(userDefStr, "WhiteNoise"))
260 {
261 WhiteNoiseBC(n, cnt, Fwd, bfFwd, inarray);
262 }
263 else if (boost::iequals(userDefStr, "RiemannInvariantBC"))
264 {
265 v_RiemannInvariantBC(n, cnt, Fwd, bfFwd, inarray);
266 }
267 else if (boost::iequals(userDefStr, "TimeDependent"))
268 {
269 for (int i = 0; i < nvariables; ++i)
270 {
271 varName = m_session->GetVariable(i);
272 m_fields[i]->EvaluateBoundaryConditions(time, varName);
273 }
274 }
275 else
276 {
277 std::string errmsg = "Unrecognised boundary condition: ";
278 errmsg += userDefStr;
279 ASSERTL0(false, errmsg.c_str());
280 }
281 }
282 else
283 {
284 for (int i = 0; i < nvariables; ++i)
285 {
286 varName = m_session->GetVariable(i);
287 m_fields[i]->EvaluateBoundaryConditions(time, varName);
288 }
289 }
290
291 cnt += m_fields[0]->GetBndCondExpansions()[n]->GetExpSize();
292 }
293}
294
295/**
296 * @brief Wall boundary conditions for the AcousticSystem equations.
297 */
298void AcousticSystem::WallBC(int bcRegion, int cnt,
300 Array<OneD, Array<OneD, NekDouble>> &physarray)
301{
302 int nVariables = physarray.size();
303
304 const Array<OneD, const int> &traceBndMap = m_fields[0]->GetTraceBndMap();
305
306 // Adjust the physical values of the trace to take
307 // user defined boundaries into account
308 int id1, id2, nBCEdgePts;
309 int eMax = m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
310
311 for (int e = 0; e < eMax; ++e)
312 {
313 nBCEdgePts = m_fields[0]
314 ->GetBndCondExpansions()[bcRegion]
315 ->GetExp(e)
316 ->GetTotPoints();
317 id1 = m_fields[0]->GetBndCondExpansions()[bcRegion]->GetPhys_Offset(e);
318 id2 = m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[cnt + e]);
319
320 // For 2D/3D, define: v* = v - 2(v.n)n
321 Array<OneD, NekDouble> tmp(nBCEdgePts, 0.0);
322
323 // Calculate (v.n)
324 for (int i = 0; i < m_spacedim; ++i)
325 {
326 Vmath::Vvtvp(nBCEdgePts, &Fwd[m_iu + i][id2], 1,
327 &m_traceNormals[i][id2], 1, &tmp[0], 1, &tmp[0], 1);
328 }
329
330 // Calculate 2.0(v.n)
331 Vmath::Smul(nBCEdgePts, -2.0, &tmp[0], 1, &tmp[0], 1);
332
333 // Calculate v* = v - 2.0(v.n)n
334 for (int i = 0; i < m_spacedim; ++i)
335 {
336 Vmath::Vvtvp(nBCEdgePts, &tmp[0], 1, &m_traceNormals[i][id2], 1,
337 &Fwd[m_iu + i][id2], 1, &Fwd[m_iu + i][id2], 1);
338 }
339
340 // Copy boundary adjusted values into the boundary expansion
341 for (int i = 0; i < nVariables; ++i)
342 {
343 Vmath::Vcopy(nBCEdgePts, &Fwd[i][id2], 1,
344 &(m_fields[i]
345 ->GetBndCondExpansions()[bcRegion]
346 ->UpdatePhys())[id1],
347 1);
348 }
349 }
350}
351
352/**
353 * @brief Wall boundary conditions for the AcousticSystem equations.
354 */
356 int bcRegion, int cnt,
357 [[maybe_unused]] Array<OneD, Array<OneD, NekDouble>> &Fwd,
359 Array<OneD, Array<OneD, NekDouble>> &physarray)
360{
361 int id1, id2, nBCEdgePts;
362 int nVariables = physarray.size();
363
364 const Array<OneD, const int> &traceBndMap = m_fields[0]->GetTraceBndMap();
365
366 if (m_rng.count(bcRegion) == 0)
367 {
368 m_rng[bcRegion] = std::mt19937(bcRegion);
369 }
370
371 ASSERTL0(
372 m_fields[0]->GetBndConditions()[bcRegion]->GetBoundaryConditionType() ==
374 "WhiteNoise BCs must be Dirichlet type BCs");
375
377 std::static_pointer_cast<SpatialDomains::DirichletBoundaryCondition>(
378 m_fields[0]->GetBndConditions()[bcRegion])
379 ->m_dirichletCondition;
380 NekDouble sigma = cond->Evaluate();
381
383 "sigma must be greater than zero");
384
385 // random velocity perturbation
387 {
389
390 boost::normal_distribution<> dist(0, sigma);
391 m_whiteNoiseBC_p = dist(m_rng[bcRegion]);
392 }
393
394 int eMax = m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
395 for (int e = 0; e < eMax; ++e)
396 {
397 nBCEdgePts = m_fields[0]
398 ->GetBndCondExpansions()[bcRegion]
399 ->GetExp(e)
400 ->GetTotPoints();
401 id1 = m_fields[0]->GetBndCondExpansions()[bcRegion]->GetPhys_Offset(e);
402 id2 = m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[cnt + e]);
403
404 Array<OneD, Array<OneD, NekDouble>> tmp(nVariables);
405 for (int i = 0; i < nVariables; ++i)
406 {
407 tmp[i] = Array<OneD, NekDouble>(nBCEdgePts, 0.0);
408 }
409
410 // pressure perturbation
411 Vmath::Fill(nBCEdgePts, m_whiteNoiseBC_p, &tmp[m_ip][0], 1);
412
413 if (m_conservative)
414 {
415 for (int i = 0; i < nBCEdgePts; ++i)
416 {
417 // density perturbation
418 tmp[m_irho][i] = m_whiteNoiseBC_p *
419 BfFwd[m_spacedim + 2][id2 + i] /
420 BfFwd[0][id2 + i];
421
422 // velocity perturbation
423 NekDouble ru = m_whiteNoiseBC_p / sqrt(BfFwd[0][id2 + i]);
424 for (int j = 0; j < m_spacedim; ++j)
425 {
426 tmp[m_iu + j][i] = -1.0 * ru * m_traceNormals[j][id2 + i];
427 }
428 }
429 }
430 else
431 {
432 for (int i = 0; i < nBCEdgePts; ++i)
433 {
434 // velocity perturbation
436 (sqrt(BfFwd[0][id2 + i]) * BfFwd[1][id2 + i]);
437
438 for (int j = 0; j < m_spacedim; ++j)
439 {
440 tmp[m_iu + j][i] = -1.0 * u * m_traceNormals[j][id2 + i];
441 }
442 }
443 }
444
445 // Copy boundary adjusted values into the boundary expansion
446 for (int i = 0; i < nVariables; ++i)
447 {
448 Vmath::Vcopy(nBCEdgePts, &tmp[i][0], 1,
449 &(m_fields[i]
450 ->GetBndCondExpansions()[bcRegion]
451 ->UpdatePhys())[id1],
452 1);
453 }
454 }
455}
456
457/**
458 * @brief Compute the advection velocity in the standard space
459 * for each element of the expansion.
460 *
461 * @return Standard velocity field.
462 */
464 [[maybe_unused]] const NekDouble SpeedSoundFactor)
465{
466 int nElm = m_fields[0]->GetExpSize();
467
468 Array<OneD, NekDouble> stdV(nElm, 0.0);
469
473
474 int cnt = 0;
475
476 for (int el = 0; el < nElm; ++el)
477 {
478 ptsKeys = m_fields[0]->GetExp(el)->GetPointsKeys();
479
480 // Possible bug: not multiply by jacobian??
481 SpatialDomains::GeomFactors *metricInfo =
482 m_fields[0]->GetExp(el)->GetGeomFactors();
483 const Array<TwoD, const NekDouble> &gmat =
484 metricInfo->GetDerivFactors();
485
486 int nq = m_fields[0]->GetExp(el)->GetTotPoints();
487
488 for (int i = 0; i < m_spacedim; ++i)
489 {
490 stdVelocity[i] = Array<OneD, NekDouble>(nq, 0.0);
491
492 velocity[i] = Array<OneD, NekDouble>(nq, 0.0);
493 for (int j = 0; j < nq; ++j)
494 {
495 // The total advection velocity is v+c, so we need to scale c by
496 // adding it before we do the transformation.
497 NekDouble c = sqrt(m_bf[0][cnt + j]);
498 velocity[i][j] = m_bf[i + 2][cnt + j] + c;
499 }
500 }
501
502 // scale the velocity components
503 if (metricInfo->GetGtype() == SpatialDomains::eDeformed)
504 {
505 // d xi/ dx = gmat = 1/J * d x/d xi
506 for (int i = 0; i < m_spacedim; ++i)
507 {
508 Vmath::Vmul(nq, gmat[i], 1, velocity[0], 1, stdVelocity[i], 1);
509 for (int j = 1; j < m_spacedim; ++j)
510 {
511 Vmath::Vvtvp(nq, gmat[m_spacedim * j + i], 1, velocity[j],
512 1, stdVelocity[i], 1, stdVelocity[i], 1);
513 }
514 }
515 }
516 else
517 {
518 for (int i = 0; i < m_spacedim; ++i)
519 {
520 Vmath::Smul(nq, gmat[i][0], velocity[0], 1, stdVelocity[i], 1);
521 for (int j = 1; j < m_spacedim; ++j)
522 {
523 Vmath::Svtvp(nq, gmat[m_spacedim * j + i][0], velocity[j],
524 1, stdVelocity[i], 1, stdVelocity[i], 1);
525 }
526 }
527 }
528
529 // compute the max absolute velocity of the element
530 for (int i = 0; i < nq; ++i)
531 {
532 NekDouble pntVelocity = 0.0;
533 for (int j = 0; j < m_spacedim; ++j)
534 {
535 pntVelocity += stdVelocity[j][i] * stdVelocity[j][i];
536 }
537 pntVelocity = sqrt(pntVelocity);
538
539 if (pntVelocity > stdV[el])
540 {
541 stdV[el] = pntVelocity;
542 }
543 }
544
545 cnt += nq;
546 }
547
548 return stdV;
549}
550
552 std::vector<Array<OneD, NekDouble>> &fieldcoeffs,
553 std::vector<std::string> &variables)
554{
555 for (int i = 0; i < m_bfNames.size(); i++)
556 {
557 variables.push_back(m_bfNames[i]);
559 m_fields[0]->FwdTrans(m_bf[i], tmpC);
560 fieldcoeffs.push_back(tmpC);
561 }
562
563 int f = 0;
564 for (auto &x : m_forcing)
565 {
566 for (int i = 0; i < x->GetForces().size(); ++i)
567 {
568 variables.push_back("F_" + std::to_string(f) + "_" +
569 m_session->GetVariable(i));
571 m_fields[0]->FwdTrans(x->GetForces()[i], tmpC);
572 fieldcoeffs.push_back(tmpC);
573 }
574 f++;
575 }
576}
577
579{
580 for (int i = 0; i < m_bfNames.size(); i++)
581 {
582 int j = m_bfNames.size() + i;
583 m_fields[0]->GetFwdBwdTracePhys(m_bf[i], m_bfFwdBwd[i], m_bfFwdBwd[j]);
585 }
586}
587
590{
591 int cnt = 0;
592 // loop over Boundary Regions
593 for (int bcRegion = 0; bcRegion < m_fields[0]->GetBndConditions().size();
594 ++bcRegion)
595 {
596
597 // Copy the forward trace of the field to the backward trace
598 int e, id2, npts;
599
600 for (e = 0;
601 e < m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
602 ++e)
603 {
604 npts = m_fields[0]
605 ->GetBndCondExpansions()[bcRegion]
606 ->GetExp(e)
607 ->GetTotPoints();
608 id2 = m_fields[0]->GetTrace()->GetPhys_Offset(
609 m_fields[0]->GetTraceMap()->GetBndCondIDToGlobalTraceID(cnt +
610 e));
611
612 Vmath::Vcopy(npts, &Fwd[id2], 1, &Bwd[id2], 1);
613 }
614
615 cnt += m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
616 }
617}
618
619} // namespace Nektar
#define ASSERTL0(condition, msg)
SolverUtils::CouplingSharedPtr m_coupling
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the right-hand side.
std::map< int, std::mt19937 > m_rng
Array< OneD, NekDouble > v_GetMaxStdVelocity(const NekDouble SpeedSoundFactor) override
Compute the advection velocity in the standard space for each element of the expansion.
std::vector< std::string > m_bfNames
Array< OneD, Array< OneD, NekDouble > > m_vecLocs
void CopyBoundaryTrace(const Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
bool m_conservative
we are dealing with a conservative formualtion
void v_ExtraFldOutput(std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables) override
virtual void v_RiemannInvariantBC(int bcRegion, int cnt, Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &BfFwd, Array< OneD, Array< OneD, NekDouble > > &physarray)=0
SolverUtils::AdvectionSharedPtr m_advection
void WallBC(int bcRegion, int cnt, Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray)
Wall boundary conditions for the AcousticSystem equations.
AcousticSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Initialises UnsteadySystem class members.
void WhiteNoiseBC(int bcRegion, int cnt, Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &BfFwd, Array< OneD, Array< OneD, NekDouble > > &physarray)
Wall boundary conditions for the AcousticSystem equations.
int m_ip
indices of the fields
Array< OneD, Array< OneD, NekDouble > > m_bfFwdBwd
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the projection and call the method for imposing the boundary conditions in case of discontinu...
Array< OneD, Array< OneD, NekDouble > > m_bf
void v_InitObject(bool DeclareFields=true) override
Initialization object for the AcousticSystem class.
std::vector< SolverUtils::ForcingSharedPtr > m_forcing
const Array< OneD, const Array< OneD, NekDouble > > & GetBasefieldFwdBwd()
virtual void v_AddLinTerm(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)=0
NekDouble m_whiteNoiseBC_lastUpdate
void SetBoundaryConditions(Array< OneD, Array< OneD, NekDouble > > &physarray, NekDouble time)
Apply the Boundary Conditions to the AcousticSystem equations.
bool v_PreIntegrate(int step) override
v_PreIntegrate
A base class for PDEs which include an advection component.
SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareField=true) override
Initialisation object for EquationSystem.
int m_spacedim
Spatial dimension (>= expansion dim).
NekDouble m_time
Current time of simulation.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT int GetNcoeffs()
SOLVER_UTILS_EXPORT int GetExpSize()
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array holding trace normals for DG simulations in the forwards direction.
SOLVER_UTILS_EXPORT int GetTotPoints()
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
SOLVER_UTILS_EXPORT int GetTraceTotPoints()
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
static SOLVER_UTILS_EXPORT std::vector< ForcingSharedPtr > Load(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields=0)
Definition Forcing.cpp:76
Base class for unsteady solvers.
bool m_homoInitialFwd
Flag to determine if simulation should start in homogeneous forward transformed state.
Calculation and storage of geometric factors associated with the mapping from StdRegions reference el...
Definition GeomFactors.h:68
const Array< TwoD, const NekDouble > GetDerivFactors()
Return the derivative of the reference coordinates with respect to the mapping, .
GeomType GetGtype()
Returns whether the geometry is regular or deformed.
Wall boundary conditions for compressible flow problems.
Definition WallBC.h:47
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Equation > EquationSharedPtr
Definition Equation.h:131
std::vector< PointsKey > PointsKeyVector
Definition Points.h:313
static const NekDouble kNekZeroTol
CouplingFactory & GetCouplingFactory()
Declaration of the Coupling factory singleton.
Definition Coupling.cpp:40
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition MeshGraph.h:224
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 Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
Definition Vmath.hpp:396
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition Vmath.hpp:292
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition Vmath.hpp:366
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 Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition Vmath.hpp:54
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:825
scalarT< T > sqrt(scalarT< T > in)
Definition scalar.hpp:290