Nektar++
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#include <boost/random/variate_generator.hpp>
46
48
50
51namespace Nektar
52{
53
57 : UnsteadySystem(pSession, pGraph), AdvectionSystem(pSession, pGraph),
58 m_ip(-1), m_irho(-1), m_iu(1), m_conservative(false)
59{
60}
61
62/**
63 * @brief Initialization object for the AcousticSystem class.
64 */
65void AcousticSystem::v_InitObject(bool DeclareFields)
66{
67 AdvectionSystem::v_InitObject(DeclareFields);
68
71 "Only Projection=DisContinuous supported by the AcousticSystem class.");
72
73 m_bfNames.push_back("c0sq");
74 m_bfNames.push_back("rho0");
75 m_bfNames.push_back("u0");
76 m_bfNames.push_back("v0");
77 m_bfNames.push_back("w0");
78
79 // Resize the advection velocities vector to dimension of the problem
80 m_bfNames.resize(m_spacedim + 2);
81
83 m_fields, m_fields.size());
84
85 // Do not forwards transform initial condition
86 m_homoInitialFwd = false;
87
88 // Set up locations of velocity and base velocity vectors.
91 for (int i = 0; i < m_spacedim; ++i)
92 {
93 // u', v', w'
94 m_vecLocs[0][i] = m_iu + i;
95 }
96
97 if (m_session->DefinesElement("Nektar/Coupling"))
98 {
99 TiXmlElement *vCoupling = m_session->GetElement("Nektar/Coupling");
100
101 ASSERTL0(vCoupling->Attribute("TYPE"),
102 "Missing TYPE attribute in Coupling");
103 std::string vType = vCoupling->Attribute("TYPE");
104 ASSERTL0(!vType.empty(),
105 "TYPE attribute must be non-empty in Coupling");
106
107 m_coupling = GetCouplingFactory().CreateInstance(vType, m_fields[0]);
108 }
109
111 m_whiteNoiseBC_p = 0.0;
112}
113
114/**
115 * @brief v_PreIntegrate
116 */
118{
119 GetFunction("Baseflow", m_fields[0], true)
120 ->Evaluate(m_bfNames, m_bf, m_time);
121
122 if (m_coupling)
123 {
124 int numForceFields = 0;
125 for (auto &x : m_forcing)
126 {
127 numForceFields += x->GetForces().size();
128 }
129 std::vector<std::string> varNames;
131 m_fields.size() + m_bfNames.size() + numForceFields);
132 for (int i = 0; i < m_fields.size(); ++i)
133 {
134 varNames.push_back(m_session->GetVariable(i));
135 phys[i] = m_fields[i]->UpdatePhys();
136 }
137 for (int i = 0; i < m_bfNames.size(); ++i)
138 {
139 varNames.push_back(m_bfNames[i]);
140 phys[m_fields.size() + i] = m_bf[i];
141 }
142
143 int f = 0;
144 for (auto &x : m_forcing)
145 {
146 for (int i = 0; i < x->GetForces().size(); ++i)
147 {
148 phys[m_fields.size() + m_bfNames.size() + f + i] =
149 x->GetForces()[i];
150 varNames.push_back("F_" + std::to_string(f) + "_" +
151 m_session->GetVariable(i));
152 }
153 f++;
154 }
155
156 m_coupling->Send(step, m_time, phys, varNames);
157 m_coupling->Receive(step, m_time, phys, varNames);
158 }
159
161}
162
164{
165 if (m_coupling)
166 {
167 m_coupling->Finalize();
168 }
169
171}
172
173/**
174 * @brief Compute the right-hand side.
175 */
177 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
178 Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time)
179{
180 int nVariables = inarray.size();
181 int nq = GetTotPoints();
182
183 // WeakDG does not use advVel, so we only provide a dummy array
185 m_advection->Advect(nVariables, m_fields, advVel, inarray, outarray, time);
186
187 // Negate the LHS terms
188 for (int i = 0; i < nVariables; ++i)
189 {
190 Vmath::Neg(nq, outarray[i], 1);
191 }
192
193 v_AddLinTerm(inarray, outarray);
194
195 for (auto &x : m_forcing)
196 {
197 x->Apply(m_fields, inarray, outarray, m_time);
198 }
199}
200
201/**
202 * @brief Compute the projection and call the method for imposing the
203 * boundary conditions in case of discontinuous projection.
204 */
206 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
207 Array<OneD, Array<OneD, NekDouble>> &outarray, const NekDouble time)
208{
209 int nvariables = inarray.size();
210 int nq = m_fields[0]->GetNpoints();
211
212 // deep copy
213 if (inarray != outarray)
214 {
215 for (int i = 0; i < nvariables; ++i)
216 {
217 Vmath::Vcopy(nq, inarray[i], 1, outarray[i], 1);
218 }
219 }
220
222
223 SetBoundaryConditions(outarray, time);
224}
225
226/**
227 * @brief Apply the Boundary Conditions to the AcousticSystem equations.
228 */
231{
232 std::string varName;
233 int nvariables = m_fields.size();
234 int cnt = 0;
235 int nTracePts = GetTraceTotPoints();
236
237 // Extract trace for boundaries. Needs to be done on all processors to avoid
238 // deadlock.
239 Array<OneD, Array<OneD, NekDouble>> Fwd(nvariables);
240 for (int i = 0; i < nvariables; ++i)
241 {
242 Fwd[i] = Array<OneD, NekDouble>(nTracePts);
243 m_fields[i]->ExtractTracePhys(inarray[i], Fwd[i]);
244 }
246
247 // loop over Boundary Regions
248 for (int n = 0; n < m_fields[0]->GetBndConditions().size(); ++n)
249 {
250 std::string userDefStr =
251 m_fields[0]->GetBndConditions()[n]->GetUserDefined();
252
253 if (!userDefStr.empty())
254 {
255 // Wall Boundary Condition
256 if (boost::iequals(userDefStr, "Wall"))
257 {
258 WallBC(n, cnt, Fwd, inarray);
259 }
260 else if (boost::iequals(userDefStr, "WhiteNoise"))
261 {
262 WhiteNoiseBC(n, cnt, Fwd, bfFwd, inarray);
263 }
264 else if (boost::iequals(userDefStr, "RiemannInvariantBC"))
265 {
266 v_RiemannInvariantBC(n, cnt, Fwd, bfFwd, inarray);
267 }
268 else if (boost::iequals(userDefStr, "TimeDependent"))
269 {
270 for (int i = 0; i < nvariables; ++i)
271 {
272 varName = m_session->GetVariable(i);
273 m_fields[i]->EvaluateBoundaryConditions(time, varName);
274 }
275 }
276 else
277 {
278 std::string errmsg = "Unrecognised boundary condition: ";
279 errmsg += userDefStr;
280 ASSERTL0(false, errmsg.c_str());
281 }
282 }
283 else
284 {
285 for (int i = 0; i < nvariables; ++i)
286 {
287 varName = m_session->GetVariable(i);
288 m_fields[i]->EvaluateBoundaryConditions(time, varName);
289 }
290 }
291
292 cnt += m_fields[0]->GetBndCondExpansions()[n]->GetExpSize();
293 }
294}
295
296/**
297 * @brief Wall boundary conditions for the AcousticSystem equations.
298 */
299void AcousticSystem::WallBC(int bcRegion, int cnt,
301 Array<OneD, Array<OneD, NekDouble>> &physarray)
302{
303 int nVariables = physarray.size();
304
305 const Array<OneD, const int> &traceBndMap = m_fields[0]->GetTraceBndMap();
306
307 // Adjust the physical values of the trace to take
308 // user defined boundaries into account
309 int id1, id2, nBCEdgePts;
310 int eMax = m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
311
312 for (int e = 0; e < eMax; ++e)
313 {
314 nBCEdgePts = m_fields[0]
315 ->GetBndCondExpansions()[bcRegion]
316 ->GetExp(e)
317 ->GetTotPoints();
318 id1 = m_fields[0]->GetBndCondExpansions()[bcRegion]->GetPhys_Offset(e);
319 id2 = m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[cnt + e]);
320
321 // For 2D/3D, define: v* = v - 2(v.n)n
322 Array<OneD, NekDouble> tmp(nBCEdgePts, 0.0);
323
324 // Calculate (v.n)
325 for (int i = 0; i < m_spacedim; ++i)
326 {
327 Vmath::Vvtvp(nBCEdgePts, &Fwd[m_iu + i][id2], 1,
328 &m_traceNormals[i][id2], 1, &tmp[0], 1, &tmp[0], 1);
329 }
330
331 // Calculate 2.0(v.n)
332 Vmath::Smul(nBCEdgePts, -2.0, &tmp[0], 1, &tmp[0], 1);
333
334 // Calculate v* = v - 2.0(v.n)n
335 for (int i = 0; i < m_spacedim; ++i)
336 {
337 Vmath::Vvtvp(nBCEdgePts, &tmp[0], 1, &m_traceNormals[i][id2], 1,
338 &Fwd[m_iu + i][id2], 1, &Fwd[m_iu + i][id2], 1);
339 }
340
341 // Copy boundary adjusted values into the boundary expansion
342 for (int i = 0; i < nVariables; ++i)
343 {
344 Vmath::Vcopy(nBCEdgePts, &Fwd[i][id2], 1,
345 &(m_fields[i]
346 ->GetBndCondExpansions()[bcRegion]
347 ->UpdatePhys())[id1],
348 1);
349 }
350 }
351}
352
353/**
354 * @brief Wall boundary conditions for the AcousticSystem equations.
355 */
357 int bcRegion, int cnt,
358 [[maybe_unused]] Array<OneD, Array<OneD, NekDouble>> &Fwd,
360 Array<OneD, Array<OneD, NekDouble>> &physarray)
361{
362 int id1, id2, nBCEdgePts;
363 int nVariables = physarray.size();
364
365 const Array<OneD, const int> &traceBndMap = m_fields[0]->GetTraceBndMap();
366
367 if (m_rng.count(bcRegion) == 0)
368 {
369 m_rng[bcRegion] = boost::mt19937(bcRegion);
370 }
371
372 ASSERTL0(
373 m_fields[0]->GetBndConditions()[bcRegion]->GetBoundaryConditionType() ==
375 "WhiteNoise BCs must be Dirichlet type BCs");
376
378 std::static_pointer_cast<SpatialDomains::DirichletBoundaryCondition>(
379 m_fields[0]->GetBndConditions()[bcRegion])
380 ->m_dirichletCondition;
381 NekDouble sigma = cond.Evaluate();
382
384 "sigma must be greater than zero");
385
386 // random velocity perturbation
388 {
390
391 boost::normal_distribution<> dist(0, sigma);
392 m_whiteNoiseBC_p = dist(m_rng[bcRegion]);
393 }
394
395 int eMax = m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
396 for (int e = 0; e < eMax; ++e)
397 {
398 nBCEdgePts = m_fields[0]
399 ->GetBndCondExpansions()[bcRegion]
400 ->GetExp(e)
401 ->GetTotPoints();
402 id1 = m_fields[0]->GetBndCondExpansions()[bcRegion]->GetPhys_Offset(e);
403 id2 = m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[cnt + e]);
404
405 Array<OneD, Array<OneD, NekDouble>> tmp(nVariables);
406 for (int i = 0; i < nVariables; ++i)
407 {
408 tmp[i] = Array<OneD, NekDouble>(nBCEdgePts, 0.0);
409 }
410
411 // pressure perturbation
412 Vmath::Fill(nBCEdgePts, m_whiteNoiseBC_p, &tmp[m_ip][0], 1);
413
414 if (m_conservative)
415 {
416 for (int i = 0; i < nBCEdgePts; ++i)
417 {
418 // density perturbation
419 tmp[m_irho][i] = m_whiteNoiseBC_p *
420 BfFwd[m_spacedim + 2][id2 + i] /
421 BfFwd[0][id2 + i];
422
423 // velocity perturbation
424 NekDouble ru = m_whiteNoiseBC_p / sqrt(BfFwd[0][id2 + i]);
425 for (int j = 0; j < m_spacedim; ++j)
426 {
427 tmp[m_iu + j][i] = -1.0 * ru * m_traceNormals[j][id2 + i];
428 }
429 }
430 }
431 else
432 {
433 for (int i = 0; i < nBCEdgePts; ++i)
434 {
435 // velocity perturbation
437 (sqrt(BfFwd[0][id2 + i]) * BfFwd[1][id2 + i]);
438
439 for (int j = 0; j < m_spacedim; ++j)
440 {
441 tmp[m_iu + j][i] = -1.0 * u * m_traceNormals[j][id2 + i];
442 }
443 }
444 }
445
446 // Copy boundary adjusted values into the boundary expansion
447 for (int i = 0; i < nVariables; ++i)
448 {
449 Vmath::Vcopy(nBCEdgePts, &tmp[i][0], 1,
450 &(m_fields[i]
451 ->GetBndCondExpansions()[bcRegion]
452 ->UpdatePhys())[id1],
453 1);
454 }
455 }
456}
457
458/**
459 * @brief Compute the advection velocity in the standard space
460 * for each element of the expansion.
461 *
462 * @return Standard velocity field.
463 */
465 [[maybe_unused]] const NekDouble SpeedSoundFactor)
466{
467 int nElm = m_fields[0]->GetExpSize();
468
469 Array<OneD, NekDouble> stdV(nElm, 0.0);
470
474
475 int cnt = 0;
476
477 for (int el = 0; el < nElm; ++el)
478 {
479 ptsKeys = m_fields[0]->GetExp(el)->GetPointsKeys();
480
481 // Possible bug: not multiply by jacobian??
482 const SpatialDomains::GeomFactorsSharedPtr metricInfo =
483 m_fields[0]->GetExp(el)->GetGeom()->GetMetricInfo();
484 const Array<TwoD, const NekDouble> &gmat =
485 m_fields[0]
486 ->GetExp(el)
487 ->GetGeom()
488 ->GetMetricInfo()
489 ->GetDerivFactors(ptsKeys);
490
491 int nq = m_fields[0]->GetExp(el)->GetTotPoints();
492
493 for (int i = 0; i < m_spacedim; ++i)
494 {
495 stdVelocity[i] = Array<OneD, NekDouble>(nq, 0.0);
496
497 velocity[i] = Array<OneD, NekDouble>(nq, 0.0);
498 for (int j = 0; j < nq; ++j)
499 {
500 // The total advection velocity is v+c, so we need to scale c by
501 // adding it before we do the transformation.
502 NekDouble c = sqrt(m_bf[0][cnt + j]);
503 velocity[i][j] = m_bf[i + 2][cnt + j] + c;
504 }
505 }
506
507 // scale the velocity components
508 if (metricInfo->GetGtype() == SpatialDomains::eDeformed)
509 {
510 // d xi/ dx = gmat = 1/J * d x/d xi
511 for (int i = 0; i < m_spacedim; ++i)
512 {
513 Vmath::Vmul(nq, gmat[i], 1, velocity[0], 1, stdVelocity[i], 1);
514 for (int j = 1; j < m_spacedim; ++j)
515 {
516 Vmath::Vvtvp(nq, gmat[m_spacedim * j + i], 1, velocity[j],
517 1, stdVelocity[i], 1, stdVelocity[i], 1);
518 }
519 }
520 }
521 else
522 {
523 for (int i = 0; i < m_spacedim; ++i)
524 {
525 Vmath::Smul(nq, gmat[i][0], velocity[0], 1, stdVelocity[i], 1);
526 for (int j = 1; j < m_spacedim; ++j)
527 {
528 Vmath::Svtvp(nq, gmat[m_spacedim * j + i][0], velocity[j],
529 1, stdVelocity[i], 1, stdVelocity[i], 1);
530 }
531 }
532 }
533
534 // compute the max absolute velocity of the element
535 for (int i = 0; i < nq; ++i)
536 {
537 NekDouble pntVelocity = 0.0;
538 for (int j = 0; j < m_spacedim; ++j)
539 {
540 pntVelocity += stdVelocity[j][i] * stdVelocity[j][i];
541 }
542 pntVelocity = sqrt(pntVelocity);
543
544 if (pntVelocity > stdV[el])
545 {
546 stdV[el] = pntVelocity;
547 }
548 }
549
550 cnt += nq;
551 }
552
553 return stdV;
554}
555
557 std::vector<Array<OneD, NekDouble>> &fieldcoeffs,
558 std::vector<std::string> &variables)
559{
560 for (int i = 0; i < m_bfNames.size(); i++)
561 {
562 variables.push_back(m_bfNames[i]);
564 m_fields[0]->FwdTrans(m_bf[i], tmpC);
565 fieldcoeffs.push_back(tmpC);
566 }
567
568 int f = 0;
569 for (auto &x : m_forcing)
570 {
571 for (int i = 0; i < x->GetForces().size(); ++i)
572 {
573 variables.push_back("F_" + std::to_string(f) + "_" +
574 m_session->GetVariable(i));
576 m_fields[0]->FwdTrans(x->GetForces()[i], tmpC);
577 fieldcoeffs.push_back(tmpC);
578 }
579 f++;
580 }
581}
582
584{
585 for (int i = 0; i < m_bfNames.size(); i++)
586 {
587 int j = m_bfNames.size() + i;
588 m_fields[0]->GetFwdBwdTracePhys(m_bf[i], m_bfFwdBwd[i], m_bfFwdBwd[j]);
590 }
591}
592
595{
596 int cnt = 0;
597 // loop over Boundary Regions
598 for (int bcRegion = 0; bcRegion < m_fields[0]->GetBndConditions().size();
599 ++bcRegion)
600 {
601
602 // Copy the forward trace of the field to the backward trace
603 int e, id2, npts;
604
605 for (e = 0;
606 e < m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
607 ++e)
608 {
609 npts = m_fields[0]
610 ->GetBndCondExpansions()[bcRegion]
611 ->GetExp(e)
612 ->GetTotPoints();
613 id2 = m_fields[0]->GetTrace()->GetPhys_Offset(
614 m_fields[0]->GetTraceMap()->GetBndCondIDToGlobalTraceID(cnt +
615 e));
616
617 Vmath::Vcopy(npts, &Fwd[id2], 1, &Bwd[id2], 1);
618 }
619
620 cnt += m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
621 }
622}
623
624} // namespace Nektar
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208
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.
void v_Output() override
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
std::map< int, boost::mt19937 > m_rng
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.
virtual SOLVER_UTILS_EXPORT void v_Output(void)
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.
virtual SOLVER_UTILS_EXPORT bool v_PreIntegrate(int step)
bool m_homoInitialFwd
Flag to determine if simulation should start in homogeneous forward transformed state.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:231
static const NekDouble kNekZeroTol
CouplingFactory & GetCouplingFactory()
Declaration of the Coupling factory singleton.
Definition: Coupling.cpp:40
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
Definition: GeomFactors.h:60
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174
double NekDouble
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:285