Nektar++
SmoothedProfileMethod.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File SmoothedProfileMethod.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 // License for the specific language governing rights and limitations under
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: Smoothed Profile Method for the Incompressible
33 // Navier Stokes equations
34 ///////////////////////////////////////////////////////////////////////////////
35 
38 #include <MultiRegions/ContField.h>
41 
42 using namespace std;
43 
44 namespace Nektar
45 {
46  using namespace MultiRegions;
47 
48  string SmoothedProfileMethod::className =
50  "SmoothedProfileMethod",
51  SmoothedProfileMethod::create);
52 
53  /**
54  * @brief Construct a new Smoothed Profile Method object
55  *
56  * @param pSession
57  * @param pGraph
58  */
59  SmoothedProfileMethod::SmoothedProfileMethod(
62  : UnsteadySystem(pSession, pGraph),
63  VelocityCorrectionScheme(pSession, pGraph)
64  {
65 
66  }
67 
68  /**
69  * @brief Destroy the Smoothed Profile Method object
70  *
71  */
73  {
74 
75  }
76 
78  {
80 
81  // Update implicit time-intregration class operators
84 
85  // Number of dims as number of velocity vectors
86  int nvel = m_velocity.size();
87 
88  // Initialization of correction pressure and shape function
89  switch (nvel)
90  {
91  case 1:
93  {
94  SetUpExpansions<ContField>(nvel);
95  }
96  else if (m_projectionType == eDiscontinuous)
97  {
98  SetUpExpansions<DisContField>(nvel);
99  }
100  break;
101 
102  case 2:
104  {
105  SetUpExpansions<ContField>(nvel);
106  }
107  else if (m_projectionType == eDiscontinuous)
108  {
109  SetUpExpansions<DisContField>(nvel);
110  }
111  break;
112 
113  case 3:
115  {
117  {
118  SetUpExpansions<ContField>(nvel);
119  }
120  else if (m_HomogeneousType ==
122  {
123  SetUpExpansions<ContField3DHomogeneous1D>(nvel);
124  }
125  else if (m_HomogeneousType ==
129  {
130  SetUpExpansions<ContField3DHomogeneous2D>(nvel);
131  }
132  }
133  else if (m_projectionType == eDiscontinuous)
134  {
136  {
137  SetUpExpansions<DisContField>(nvel);
138  }
139  else if (m_HomogeneousType ==
141  {
142  SetUpExpansions<DisContField3DHomogeneous1D>(nvel);
143  }
144  else if (m_HomogeneousType ==
148  {
149  SetUpExpansions<DisContField3DHomogeneous2D>(nvel);
150  }
151  }
152  break;
153  }
154 
155  // Read 'm_phi' and its velocity
156  ASSERTL0(m_session->DefinesFunction("ShapeFunction"),
157  "ShapeFunction must be defined in the session file.")
158  ReadPhi();
159 
160  // Allocate the vector 'm_up'
161  int physTot = m_phi->GetTotPoints();
162  m_velName.push_back("Up");
163  if (nvel > 1)
164  {
165  m_velName.push_back("Vp");
166  }
167  if (nvel == 3)
168  {
169  m_velName.push_back("Wp");
170  }
171 
173  for (int i = 0; i < nvel; ++i)
174  {
175  m_up[i] = Array<OneD, NekDouble>(physTot, 0.0);
176  }
177 
178  // Make sure that m_phi and m_up are defined
179  UpdatePhiUp(0.0);
180 
181  // Get the time integration scheme.
183  if (m_session->DefinesTimeIntScheme())
184  {
185  timeInt = m_session->GetTimeIntScheme();
186  }
187  else
188  {
189  timeInt.method = m_session->GetSolverInfo("TimeIntegrationMethod");
190  timeInt.order = timeInt.method.back() - '0';
191 
192  // Remove everything past the IMEX.
193  timeInt.method = timeInt.method.substr(0,4);
194  }
195 
196  // Select 'm_gamma0' depending on IMEX order
197  ASSERTL0(boost::iequals(timeInt.method, "IMEX") &&
198  1 <= timeInt.order && timeInt.order <= 4,
199  "The TimeIntegrationMethod scheme must be IMEX with order '1' to '4'.")
200 
201  switch (timeInt.order)
202  {
203  case 1:
204  m_gamma0 = 1.0;
205  break;
206 
207  case 2:
208  m_gamma0 = 3.0/2.0;
209  break;
210 
211  case 3:
212  m_gamma0 = 11.0/6.0;
213  break;
214 
215  case 4:
216  m_gamma0 = 25.0/12.0;
217  break;
218  }
219 
220  // Check if the aeroforces filter is active, negative if inactive
221  m_forcesFilter = -1;
222  for (int i = 0; i < m_session->GetFilters().size(); ++i)
223  {
224  if (boost::iequals(m_session->GetFilters()[i].first,
225  "AeroForcesSPM"))
226  {
227  m_forcesFilter = i;
228  break;
229  }
230  }
231  }
232 
233  /**
234  * @brief Generates the summary of the current simulation
235  *
236  * @param s
237  */
239  {
241  SolverUtils::AddSummaryItem(s, "IB formulation",
242  "Smoothed Profile Method (SPM)");
243  }
244 
245  /**
246  * @brief Linear terms due to pressure and visosity are calculated here.
247  * After solving the velocity filed without taking into account the
248  * immersed boundaries, a new correction is applied through the force
249  * \f$f_s\f$:
250  *
251  * \f[ \mathbf{f_s} = \frac{\Phi^{n+1}(\mathbf{u_p}-\mathbf{u^*})}
252  * {\Delta t} \f]
253  *
254  * @param inarray
255  * @param outarray
256  * @param time
257  * @param a_iixDt
258  */
260  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
261  Array<OneD, Array<OneD, NekDouble> > &outarray,
262  const NekDouble time,
263  const NekDouble a_iixDt)
264  {
266  outarray,
267  time,
268  a_iixDt);
269 
270  int physTot = m_pressureP->GetNpoints();
271 
272  /* SPM correction of velocity */
273  // Update 'm_phi' and 'm_up' if needed (evaluated at next time step)
274  UpdatePhiUp(time + a_iixDt);
275  // Update calculation of IB forcing 'm_fs'
276  UpdateForcing(outarray, a_iixDt);
277  // Estimate forces only if requested
278  if (m_forcesFilter >= 0)
279  {
280  static_pointer_cast<FilterAeroForcesSPM>(
281  m_filters[m_forcesFilter].second)->CalculateForces(
282  outarray, m_upPrev, m_phi, time, a_iixDt);
283  }
284  // Set BC conditions for pressure p_p
285  SetUpCorrectionPressure(outarray, m_F);
286  // Solve Poisson equation for pressure p_p
288  // Solve velocity in the next step with IB
289  SolveCorrectedVelocity(m_F, outarray, a_iixDt);
290 
291  // Add pressures to get final value
292  Vmath::Vadd(physTot, m_pressure->GetPhys(), 1,
293  m_pressureP->GetPhys(), 1,
294  m_pressure->UpdatePhys(), 1);
295  m_pressure->FwdTrans(m_pressure->GetPhys(),
296  m_pressure->UpdateCoeffs());
297 
298  // Add presure to outflow bc if using convective like BCs
299  m_extrapolation->AddPressureToOutflowBCs(m_kinvis);
300  }
301 
302  /**
303  * @brief Sets the forcing term of the equation for the correction pressure
304  * \f$p_p\f$:
305  *
306  * \f[ \nabla\cdot\mathbf{f_s} \f]
307  *
308  * @param fields
309  * @param Forcing
310  */
312  const Array<OneD, const Array<OneD, NekDouble> > &fields,
314  {
315  int physTot = m_fs[0]->GetNpoints();
316  int nvel = m_velocity.size();
317 
318  // Set boundary conditions
320 
321  // Divergence of 'fs'
322  m_fields[m_velocity[0]]->PhysDeriv(eX, m_fs[0]->GetPhys(), Forcing[0]);
323 
324  // Using 'Forcing[1]' as storage
325  for (int i = 1; i < nvel; ++i)
326  {
327  int ind = m_velocity[i];
328  m_fields[ind]->PhysDeriv(DirCartesianMap[i],
329  m_fs[i]->GetPhys(), Forcing[1]);
330  Vmath::Vadd(physTot, Forcing[1], 1, Forcing[0], 1, Forcing[0], 1);
331  }
332  }
333 
334  /**
335  * @brief Solves the Poisson equation for the correction pressure
336  * \f$p_p\f$:
337  *
338  * \f[ \nabla^2 p_p = \nabla\cdot\mathbf{f_s} \f]
339  *
340  * @param Forcing
341  */
344  {
346  // Factor 'lambda=0' in Helmholtz equation to get the Poisson form
347  factors[StdRegions::eFactorLambda] = 0.0;
348 
349  // Solve the Poisson equation
350  m_pressureP->HelmSolve(Forcing, m_pressureP->UpdateCoeffs(), factors);
351 
352  // Update node values from coefficients
353  m_pressureP->BwdTrans(m_pressureP->GetCoeffs(),
354  m_pressureP->UpdatePhys());
355  }
356 
357  /**
358  * @brief Corrects the velocity field so that the IBs are taken into
359  * account. Solves the explicit equation:
360  *
361  * \f[ \frac{\gamma_0(\mathbf{u_p}^{n+1} - \mathbf{u}^*)}{\Delta t} =
362  * \mathbf{f_s} - \nabla p_p \f]
363  *
364  * @param Forcing
365  * @param fields
366  * @param dt
367  */
370  Array<OneD, Array<OneD, NekDouble> > &fields,
371  NekDouble dt)
372  {
373  int physTot = m_phi->GetNpoints();
374 
375  // Gradient of p_p
376  int nvel = m_velocity.size();
377  if (nvel == 2)
378  {
379  m_pressureP->PhysDeriv(m_pressureP->GetPhys(),
380  Forcing[0],
381  Forcing[1]);
382  }
383  else
384  {
385  m_pressureP->PhysDeriv(m_pressureP->GetPhys(),
386  Forcing[0],
387  Forcing[1],
388  Forcing[2]);
389  }
390 
391  // Velocity correction
392  for (int i = 0; i < nvel; ++i)
393  {
394  // Adding -(1-m_phi)*grad(p_p) instead of -grad(p_p) reduces the
395  // flux through the walls, but the flow is not incompressible
396  if (m_session->DefinesSolverInfo("ForceBoundary") &&
397  boost::iequals(m_session->GetSolverInfo("ForceBoundary"),
398  "True"))
399  {
400  Vmath::Vvtvm(physTot, m_phi->GetPhys(), 1, Forcing[i], 1,
401  Forcing[i], 1, Forcing[i], 1);
402  Vmath::Vadd(physTot, m_fs[i]->GetPhys(), 1, Forcing[i], 1,
403  Forcing[i], 1);
404  }
405  else
406  {
407  Vmath::Vsub(physTot, m_fs[i]->GetPhys(), 1, Forcing[i], 1,
408  Forcing[i], 1);
409  }
410  Blas::Daxpy(physTot, dt/m_gamma0, Forcing[i], 1, fields[i], 1);
411  }
412  }
413 
414  /**
415  * @brief Updates the BCs for boundaries with Neumann or periodic BCs in
416  * the pressure:
417  *
418  * \f[ \frac{\partial p_p}{\partial\mathbf{n}} =
419  * \mathbf{f_s}\cdot\mathbf{n} \f]
420  */
422  {
423  int nvel = m_velocity.size();
426 
427  // Get the BC expansions
428  BndExp = m_pressureP->GetBndCondExpansions();
429  BndCond = m_pressureP->GetBndConditions();
430 
431  // For each boundary...
432  for (int b = 0; b < BndExp.size(); ++b)
433  {
434  // Only for BCs based on the derivative
435  if (BndCond[b]->GetBoundaryConditionType() ==
437  BndCond[b]->GetBoundaryConditionType() ==
439  {
440  // Calculate f_s values
442  for (int i = 0; i < nvel; ++i)
443  {
444  f_s[i] = m_fs[0]->GetBndCondExpansions()[b]->GetPhys();
445  }
446 
447  // BC is f_s * n
448  BndExp[b]->NormVectorIProductWRTBase(f_s,
449  BndExp[b]->UpdatePhys());
450  }
451  }
452  }
453 
454  /**
455  * @brief Calculates the values of the shape function
456  *
457  * @param t
458  */
460  {
461  // Initialise 'm_up' and 'm_phi' during first step
462  if (t <= 0.0)
463  {
464  if (!m_filePhi)
465  {
466  // Update 'm_phi' only if it was provided as a function
467  m_phiEvaluator->Evaluate("Phi", m_phi->UpdatePhys(), t);
468  }
469 
470  // Initialize both variables for the first step
471  m_phiEvaluator->Evaluate(m_velName, m_up, t);
472 
473  // Initialise 'm_upPrev' in all cases
474  m_upPrev = m_up;
475  }
476  // If timedependent 'm_phi'
477  // Phi functions from files are not timedependent
478  else if (m_timeDependentPhi)
479  {
480  m_phiEvaluator->Evaluate("Phi", m_phi->UpdatePhys(), t);
481 
482  // And if velocities are timedependent as well
483  if (m_timeDependentUp)
484  {
485  // Store previous value of u_p during simulation
486  m_upPrev = m_up;
487  m_phiEvaluator->Evaluate(m_velName, m_up, t);
488  }
489  }
490  }
491 
492  /**
493  * @brief For a body with a velocity \f$\mathbf{u_p}\f$, the force
494  * \f$\mathbf{f_s}\f$ applied to the fluid ensures that the IBC are met:
495  *
496  * \f[ \mathbf{f_s} = \frac{\Phi^{n+1}\left(\mathbf{u_p}^{n+1} -
497  * \mathbf{u^*}\right)}{\Delta t} \f]
498  *
499  * @param fields
500  * @param dt
501  * @param f_s
502  */
504  const Array<OneD, const Array<OneD, NekDouble> > &fields,
505  NekDouble dt)
506  {
507  int nvel = m_velocity.size();
508  int nq = m_phi->GetNpoints();
509 
510  for (int i = 0; i < nvel; ++i)
511  {
512  // In homogeneous cases, switch out of wave space
513  Array<OneD, NekDouble> tmpField(nq);
514  int ind = m_velocity[i];
515 
517  m_fields[ind]->GetWaveSpace())
518  {
519  m_fields[ind]->HomogeneousBwdTrans(fields[i], tmpField);
520  m_fs[i]->HomogeneousBwdTrans(m_fs[i]->GetPhys(),
521  m_fs[i]->UpdatePhys());
522  }
523  else
524  {
525  tmpField = fields[i];
526  }
527 
528  Vmath::Vsub(nq, m_up[i], 1, tmpField, 1, m_fs[i]->UpdatePhys(), 1);
529  Vmath::Vmul(nq, m_phi->GetPhys(), 1, m_fs[i]->GetPhys(), 1,
530  m_fs[i]->UpdatePhys(), 1);
531  Vmath::Smul(nq, m_gamma0/dt, m_fs[i]->GetPhys(), 1,
532  m_fs[i]->UpdatePhys(), 1);
533 
534  // And go back to wave space if the 'if' was executed
536  m_fields[ind]->GetWaveSpace())
537  {
538  m_fs[i]->HomogeneousFwdTrans(m_fs[i]->GetPhys(),
539  m_fs[i]->UpdatePhys());
540  }
541  }
542  }
543 
544  /**
545  * @brief True if the function is timedependent, false otherwise
546  *
547  * @param name
548  * @param type
549  * @param attribute
550  * @return string
551  */
553  string elemName)
554  {
555  // Get the handler of the function
556  TiXmlElement *function = GetFunctionHdl(funcName);
557 
558  // Go to the first element
559  TiXmlElement *functionDef = function->FirstChildElement();
560  ASSERTL0(functionDef, "At least one element must be defined in " +
561  funcName)
562 
563  // And search the element with name 'elemName'
564  string varName = functionDef->Attribute("VAR");
565  while(functionDef && !boost::iequals(varName, elemName))
566  {
567  functionDef = functionDef->NextSiblingElement();
568  varName = functionDef->Attribute("VAR");
569  }
570 
571  ASSERTL0(functionDef, "Variable " + elemName + " must be defined in " +
572  funcName + ".");
573 
574  // And return the value of USERDEFINEDTYPE
575  string attr;
576  int err = functionDef->QueryStringAttribute("USERDEFINEDTYPE", &attr);
577  bool output = boost::iequals(attr, "TimeDependent");
578 
579  ASSERTL0((err == TIXML_NO_ATTRIBUTE) ||
580  (err == TIXML_SUCCESS && output), "USERDEFINEDTYPE in " +
581  elemName + " must be TimeDependent if defined");
582 
583  return output;
584  }
585 
586  /**
587  * @brief Returns a handle to the requested function. Returns NULL if it
588  * does not exist
589  *
590  * @param functionName
591  * @return TiXmlElement*
592  */
593  TiXmlElement* SmoothedProfileMethod::GetFunctionHdl(string functionName)
594  {
595  // Get the handler of first function block
596  TiXmlElement *conds = m_session->GetElement("Nektar/Conditions");
597  TiXmlElement *function = conds->FirstChildElement("FUNCTION");
598 
599  // Loop over functions until the block 'name' is found
600  string functionType = function->Attribute("NAME");
601  while (function && !boost::iequals(functionType, functionName))
602  {
603  function = function->NextSiblingElement("FUNCTION");
604  functionType = function->Attribute("NAME");
605  }
606 
607  return function;
608  }
609 
611  {
612  // Function evaluator for Phi and Up
613  m_phiEvaluator = GetFunction("ShapeFunction");
614 
615  TiXmlElement *function = GetFunctionHdl("ShapeFunction");
616  TiXmlElement *child = function->FirstChildElement();
617  m_filePhi = false;
618 
619  // If defined by using a file
620  if (boost::iequals(child->ValueStr(), "F"))
621  {
622  // Get name of STL file
623  string fileName;
624  int status = child->QueryStringAttribute("FILE", &fileName);
625  ASSERTL0(status == TIXML_SUCCESS, "An FLD file with the values "
626  "of the phi function has to be supplied.")
627  ASSERTL0(boost::iequals(fileName.substr(fileName.length()-4),
628  ".fld"), "A valid FLD file must be supplied in the "
629  "'ShapeFunction' field.")
630 
631  // Get phi values from XML file (after "FieldConvert" the STL file)
632  // First, load the data
633  std::vector<LibUtilities::FieldDefinitionsSharedPtr> fieldDef;
634  std::vector<std::vector<NekDouble> > fieldData;
635  LibUtilities::FieldMetaDataMap fieldMetaData;
638  phiFile->Import(fileName, fieldDef, fieldData, fieldMetaData);
639 
640  // Only Phi field should be defined in the file
641  ASSERTL0(fieldData.size() == 1, "Only one field (phi) must be "
642  "defined in the FLD file.")
643 
644  // Extract Phi field to output
645  string tmp("phi");
646  m_phi->ExtractDataToCoeffs(fieldDef[0], fieldData[0],
647  tmp, m_phi->UpdateCoeffs());
648  m_phi->BwdTrans(m_phi->GetCoeffs(), m_phi->UpdatePhys());
649  m_filePhi = true;
650  m_timeDependentPhi = false;
651  m_timeDependentUp = false;
652  }
653  else
654  {
655  // Check if Phi is timedependent
656  m_timeDependentPhi = GetVarTimeDependence("ShapeFunction", "Phi");
657 
658  // If so, check if its velocity changes as well
659  m_timeDependentUp = GetVarTimeDependence("ShapeFunction", "Up");
660  switch (m_velocity.size())
661  {
662  case 3:
664  GetVarTimeDependence("ShapeFunction", "Wp");
665  case 2:
667  GetVarTimeDependence("ShapeFunction", "Vp");
668  }
669  }
670  }
671 
672 } // end of namespace
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
NekDouble m_kinvis
Kinematic viscosity.
ExtrapolateSharedPtr m_extrapolation
Array< OneD, int > m_velocity
int which identifies which components of m_fields contains the velocity (u,v,w);
static std::shared_ptr< FieldIO > CreateForFile(const LibUtilities::SessionReaderSharedPtr session, const std::string &filename)
Construct a FieldIO object for a given input filename.
Definition: FieldIO.cpp:226
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:200
void DefineImplicitSolve(FuncPointerT func, ObjectPointerT obj)
void UpdateForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, NekDouble dt)
For a body with a velocity , the force applied to the fluid ensures that the IBC are met:
bool m_filePhi
Flag indicating that phi was defined in a file.
void SetCorrectionPressureBCs()
Updates the BCs for boundaries with Neumann or periodic BCs in the pressure:
Array< OneD, Array< OneD, NekDouble > > m_up
Velocity of the immersed body(ies)
virtual void v_InitObject()
Init object for UnsteadySystem class.
std::vector< std::string > m_velName
Vector storing the names of the components of \u_p.
NekDouble m_gamma0
Stiffly-stable scheme coefficient.
int m_forcesFilter
Position of "AeroForcesSPM" filter in 'm_session->GetFilters()'.
virtual ~SmoothedProfileMethod()
Destroy the Smoothed Profile Method object.
bool m_timeDependentPhi
Flag that is true when phi depends on time.
void UpdatePhiUp(NekDouble time)
Calculates the values of the shape function.
SolverUtils::SessionFunctionSharedPtr m_phiEvaluator
Function that evaluates the values of \Phi.
void SolveCorrectedVelocity(Array< OneD, Array< OneD, NekDouble > > &Forcing, Array< OneD, Array< OneD, NekDouble > > &fields, NekDouble dt)
Corrects the velocity field so that the IBs are taken into account. Solves the explicit equation:
TiXmlElement * GetFunctionHdl(std::string functionName)
Returns a handle to the requested function. Returns NULL if it does not exist.
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Generates the summary of the current simulation.
virtual void v_SolveUnsteadyStokesSystem(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, NekDouble time, NekDouble a_iixDt)
Linear terms due to pressure and visosity are calculated here. After solving the velocity filed witho...
bool m_timeDependentUp
Flag signaling if depends on time.
MultiRegions::ExpListSharedPtr m_pressureP
Correction pressure field for SPM.
bool GetVarTimeDependence(std::string funcName, std::string attrName)
True if the function is timedependent, false otherwise.
Array< OneD, Array< OneD, NekDouble > > m_upPrev
void SolveUnsteadyStokesSystem(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt)
Array< OneD, MultiRegions::ExpListSharedPtr > m_fs
Forcing function 'f_s'.
MultiRegions::ExpListSharedPtr m_phi
Shape function 'phi' as expansion list.
void SolveCorrectionPressure(const Array< OneD, NekDouble > &Forcing)
Solves the Poisson equation for the correction pressure :
void SetUpCorrectionPressure(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing)
Sets the forcing term of the equation for the correction pressure :
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
enum HomogeneousType m_HomogeneousType
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
Defines a forcing term to be explicitly applied.
Definition: Forcing.h:73
Base class for unsteady solvers.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
std::vector< std::pair< std::string, FilterSharedPtr > > m_filters
virtual void v_InitObject()
Init object for UnsteadySystem class.
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
void SolveUnsteadyStokesSystem(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt)
Array< OneD, Array< OneD, NekDouble > > m_F
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
Definition: Blas.hpp:167
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:306
std::map< std::string, std::string > FieldMetaDataMap
Definition: FieldIO.h:52
std::shared_ptr< SessionReader > SessionReaderSharedPtr
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:90
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:46
EquationSystemFactory & GetEquationSystemFactory()
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
Definition: Misc.cpp:47
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:314
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
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.cpp:192
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.cpp:322
void Vvtvm(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)
vvtvm (vector times vector plus vector): z = w*x - y
Definition: Vmath.cpp:541
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.cpp:225
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.cpp:372