Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Attributes | List of all members
Nektar::Extrapolate Class Referenceabstract

#include <Extrapolate.h>

Inheritance diagram for Nektar::Extrapolate:
Inheritance graph
[legend]
Collaboration diagram for Nektar::Extrapolate:
Collaboration graph
[legend]

Public Member Functions

 Extrapolate (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
 
virtual ~Extrapolate ()
 
void GenerateHOPBCMap (const LibUtilities::SessionReaderSharedPtr &pSsession)
 
void UpdateRobinPrimCoeff (void)
 
void SubSteppingTimeIntegration (const int intMethod, const LibUtilities::TimeIntegrationWrapperSharedPtr &IntegrationScheme)
 
void SubStepSaveFields (const int nstep)
 
void SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, const NekDouble Aii_DT, NekDouble kinvis)
 
void SubStepAdvance (const LibUtilities::TimeIntegrationSolutionSharedPtr &integrationSoln, const int nstep, NekDouble time)
 
void MountHOPBCs (int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection)
 
void EvaluatePressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
void AddDuDt (void)
 
void AddVelBC (void)
 
void ExtrapolatePressureHBCs (void)
 
void CopyPressureHBCsToPbndExp (void)
 
Array< OneD, NekDoubleGetMaxStdVelocity (const Array< OneD, Array< OneD, NekDouble > > inarray)
 
void CorrectPressureBCs (const Array< OneD, NekDouble > &pressure)
 
void IProductNormVelocityOnHBC (const Array< OneD, const Array< OneD, NekDouble > > &Vel, Array< OneD, NekDouble > &IprodVn)
 
void IProductNormVelocityBCOnHBC (Array< OneD, NekDouble > &IprodVn)
 
LibUtilities::TimeIntegrationMethod GetSubStepIntegrationMethod (void)
 
void ExtrapolateArray (Array< OneD, Array< OneD, NekDouble > > &array)
 
void EvaluateBDFArray (Array< OneD, Array< OneD, NekDouble > > &array)
 
void AccelerationBDF (Array< OneD, Array< OneD, NekDouble > > &array)
 
void ExtrapolateArray (Array< OneD, Array< OneD, NekDouble > > &oldarrays, Array< OneD, NekDouble > &newarray, Array< OneD, NekDouble > &outarray)
 
void AddNormVelOnOBC (const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
 
void AddPressureToOutflowBCs (NekDouble kinvis)
 

Protected Member Functions

virtual void v_EvaluatePressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)=0
 
virtual void v_SubSteppingTimeIntegration (int intMethod, const LibUtilities::TimeIntegrationWrapperSharedPtr &IntegrationScheme)=0
 
virtual void v_SubStepSaveFields (int nstep)=0
 
virtual void v_SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, NekDouble Aii_DT, NekDouble kinvis)=0
 
virtual void v_SubStepAdvance (const LibUtilities::TimeIntegrationSolutionSharedPtr &integrationSoln, int nstep, NekDouble time)=0
 
virtual void v_MountHOPBCs (int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection)=0
 
virtual
LibUtilities::TimeIntegrationMethod 
v_GetSubStepIntegrationMethod (void)
 
void CalcNeumannPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
virtual void v_CalcNeumannPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
virtual void v_CorrectPressureBCs (const Array< OneD, NekDouble > &pressure)
 
virtual void v_AddNormVelOnOBC (const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
 
void CalcOutflowBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, NekDouble kinvis)
 
void RollOver (Array< OneD, Array< OneD, NekDouble > > &input)
 

Protected Attributes

LibUtilities::SessionReaderSharedPtr m_session
 
LibUtilities::CommSharedPtr m_comm
 
Array< OneD, HBCTypem_hbcType
 Array of type of high order BCs for splitting shemes. More...
 
Array< OneD,
MultiRegions::ExpListSharedPtr
m_fields
 Velocity fields. More...
 
MultiRegions::ExpListSharedPtr m_pressure
 Pointer to field holding pressure field. More...
 
Array< OneD, int > m_velocity
 int which identifies which components of m_fields contains the velocity (u,v,w); More...
 
SolverUtils::AdvectionSharedPtr m_advObject
 
Array< OneD, Array< OneD,
NekDouble > > 
m_previousVelFields
 
int m_curl_dim
 Curl-curl dimensionality. More...
 
int m_bnd_dim
 bounday dimensionality More...
 
Array< OneD, const
SpatialDomains::BoundaryConditionShPtr
m_PBndConds
 pressure boundary conditions container More...
 
Array< OneD,
MultiRegions::ExpListSharedPtr
m_PBndExp
 pressure boundary conditions expansion container More...
 
int m_pressureCalls
 number of times the high-order pressure BCs have been called More...
 
int m_numHBCDof
 
int m_HBCnumber
 
int m_intSteps
 Maximum points used in pressure BC evaluation. More...
 
NekDouble m_timestep
 
Array< OneD, Array< OneD,
NekDouble > > 
m_pressureHBCs
 Storage for current and previous levels of high order pressure boundary conditions. More...
 
Array< OneD, Array< OneD,
NekDouble > > 
m_iprodnormvel
 Storage for current and previous levels of the inner product of normal velocity. More...
 
Array< OneD, Array< OneD,
NekDouble > > 
m_traceNormals
 
HighOrderOutflowSharedPtr m_houtflow
 

Static Protected Attributes

static NekDouble StifflyStable_Betaq_Coeffs [3][3]
 
static NekDouble StifflyStable_Alpha_Coeffs [3][3]
 
static NekDouble StifflyStable_Gamma0_Coeffs [3]
 

Static Private Attributes

static std::string def
 

Detailed Description

Definition at line 75 of file Extrapolate.h.

Constructor & Destructor Documentation

Nektar::Extrapolate::Extrapolate ( const LibUtilities::SessionReaderSharedPtr  pSession,
Array< OneD, MultiRegions::ExpListSharedPtr pFields,
MultiRegions::ExpListSharedPtr  pPressure,
const Array< OneD, int >  pVel,
const SolverUtils::AdvectionSharedPtr  advObject 
)

Definition at line 59 of file Extrapolate.cpp.

References m_comm, m_session, and m_timestep.

65  : m_session(pSession),
66  m_fields(pFields),
67  m_pressure(pPressure),
68  m_velocity(pVel),
69  m_advObject(advObject)
70  {
71  m_session->LoadParameter("TimeStep", m_timestep, 0.01);
72  m_comm = m_session->GetComm();
73  }
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
Definition: Extrapolate.h:222
LibUtilities::SessionReaderSharedPtr m_session
Definition: Extrapolate.h:211
Array< OneD, int > m_velocity
int which identifies which components of m_fields contains the velocity (u,v,w);
Definition: Extrapolate.h:226
LibUtilities::CommSharedPtr m_comm
Definition: Extrapolate.h:213
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
SolverUtils::AdvectionSharedPtr m_advObject
Definition: Extrapolate.h:228
NekDouble m_timestep
Definition: Extrapolate.h:256
Nektar::Extrapolate::~Extrapolate ( )
virtual

Definition at line 75 of file Extrapolate.cpp.

76  {
77  }

Member Function Documentation

void Nektar::Extrapolate::AccelerationBDF ( Array< OneD, Array< OneD, NekDouble > > &  array)

At the start, the newest value is stored in array[nlevels-1] and the previous values in the first positions At the end, the acceleration from BDF is stored in array[nlevels-1] and the storage has been updated to included the new value

Definition at line 1044 of file Extrapolate.cpp.

References m_intSteps, m_pressureCalls, RollOver(), Vmath::Smul(), StifflyStable_Alpha_Coeffs, StifflyStable_Gamma0_Coeffs, and Vmath::Svtvp().

Referenced by AddDuDt().

1046  {
1047  int nlevels = array.num_elements();
1048  int nPts = array[0].num_elements();
1049 
1050 
1051  if(nPts)
1052  {
1053  // Update array
1054  RollOver(array);
1055 
1056  // Calculate acceleration using Backward Differentiation Formula
1057  Array<OneD, NekDouble> accelerationTerm (nPts, 0.0);
1058  if (m_pressureCalls > 2)
1059  {
1060  int acc_order = min(m_pressureCalls-2,m_intSteps);
1061  Vmath::Smul(nPts,
1062  StifflyStable_Gamma0_Coeffs[acc_order-1],
1063  array[0], 1,
1064  accelerationTerm, 1);
1065 
1066  for(int i = 0; i < acc_order; i++)
1067  {
1068  Vmath::Svtvp(nPts,
1069  -1*StifflyStable_Alpha_Coeffs[acc_order-1][i],
1070  array[i+1], 1,
1071  accelerationTerm, 1,
1072  accelerationTerm, 1);
1073  }
1074  }
1075  array[nlevels-1] = accelerationTerm;
1076  }
1077  }
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.cpp:485
void RollOver(Array< OneD, Array< OneD, NekDouble > > &input)
static NekDouble StifflyStable_Gamma0_Coeffs[3]
Definition: Extrapolate.h:269
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:213
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
int m_pressureCalls
number of times the high-order pressure BCs have been called
Definition: Extrapolate.h:245
static NekDouble StifflyStable_Alpha_Coeffs[3][3]
Definition: Extrapolate.h:268
void Nektar::Extrapolate::AddDuDt ( void  )

Definition at line 86 of file Extrapolate.cpp.

References AccelerationBDF(), IProductNormVelocityBCOnHBC(), m_intSteps, m_iprodnormvel, m_numHBCDof, m_pressureHBCs, m_timestep, and Vmath::Svtvp().

Referenced by Nektar::StandardExtrapolate::v_EvaluatePressureBCs(), and Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs().

87  {
88  if(m_numHBCDof)
89  {
90  // Update velocity BF at n+1 (actually only needs doing if
91  // velocity is time dependent on HBCs)
93 
94  //Calculate acceleration term at level n based on previous steps
96 
97  // Subtract acceleration term off m_pressureHBCs[nlevels-1]
100  m_pressureHBCs[m_intSteps-1], 1,
101  m_pressureHBCs[m_intSteps-1], 1);
102  }
103  }
void AccelerationBDF(Array< OneD, Array< OneD, NekDouble > > &array)
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.cpp:485
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
void IProductNormVelocityBCOnHBC(Array< OneD, NekDouble > &IprodVn)
Array< OneD, Array< OneD, NekDouble > > m_pressureHBCs
Storage for current and previous levels of high order pressure boundary conditions.
Definition: Extrapolate.h:259
Array< OneD, Array< OneD, NekDouble > > m_iprodnormvel
Storage for current and previous levels of the inner product of normal velocity.
Definition: Extrapolate.h:262
NekDouble m_timestep
Definition: Extrapolate.h:256
void Nektar::Extrapolate::AddNormVelOnOBC ( const int  nbcoeffs,
const int  nreg,
Array< OneD, Array< OneD, NekDouble > > &  u 
)
inline

Definition at line 423 of file Extrapolate.h.

References v_AddNormVelOnOBC().

Referenced by CalcOutflowBCs().

425  {
426  v_AddNormVelOnOBC(nbcoeffs,nreg,u);
427  }
virtual void v_AddNormVelOnOBC(const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
void Nektar::Extrapolate::AddPressureToOutflowBCs ( NekDouble  kinvis)

Definition at line 484 of file Extrapolate.cpp.

References Nektar::eConvectiveOBC, m_curl_dim, m_fields, m_hbcType, m_houtflow, m_PBndConds, m_PBndExp, m_pressure, Vmath::Smul(), Vmath::Vadd(), and Vmath::Vmul().

485  {
486  if(!m_houtflow.get())
487  {
488  return;
489  }
490 
491 
492  for(int n = 0; n < m_PBndConds.num_elements(); ++n)
493  {
494  if(m_hbcType[n] == eConvectiveOBC)
495  {
496  int nqb = m_PBndExp[n]->GetTotPoints();
497  int ncb = m_PBndExp[n]->GetNcoeffs();
498 
499  m_pressure->FillBndCondFromField(n);
500  Array<OneD, NekDouble> pbc(nqb);
501 
502  m_PBndExp[n]->BwdTrans(m_PBndExp[n]->GetCoeffs(), pbc);
503 
504  if (m_PBndExp[n]->GetWaveSpace())
505  {
506  m_PBndExp[n]->HomogeneousBwdTrans(pbc, pbc);
507  }
508 
509  Array<OneD, NekDouble> wk(nqb);
510  Array<OneD, NekDouble> wk1(ncb);
511 
512  // Get normal vector
513  Array<OneD, Array<OneD, NekDouble> > normals;
514  m_fields[0]->GetBoundaryNormals(n, normals);
515 
516  // Add 1/kinvis * (pbc n )
517  for(int i = 0; i < m_curl_dim; ++i)
518  {
519  Vmath::Vmul(nqb, normals[i], 1, pbc, 1, wk, 1);
520 
521  Vmath::Smul(nqb, 1.0/kinvis, wk, 1, wk, 1);
522 
523  if (m_houtflow->m_UBndExp[i][n]->GetWaveSpace())
524  {
525  m_houtflow->m_UBndExp[i][n]->
526  HomogeneousFwdTrans(wk, wk);
527  }
528  m_houtflow->m_UBndExp[i][n]->IProductWRTBase(wk,wk1);
529 
530  Vmath::Vadd(ncb, wk1,1,
531  m_houtflow->m_UBndExp[i][n]->GetCoeffs(), 1,
532  m_houtflow->m_UBndExp[i][n]->UpdateCoeffs(),1);
533 
534  }
535  }
536  }
537  }
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
Definition: Extrapolate.h:222
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:242
HighOrderOutflowSharedPtr m_houtflow
Definition: Extrapolate.h:272
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:213
Array< OneD, HBCType > m_hbcType
Array of type of high order BCs for splitting shemes.
Definition: Extrapolate.h:216
int m_curl_dim
Curl-curl dimensionality.
Definition: Extrapolate.h:233
Array< OneD, const SpatialDomains::BoundaryConditionShPtr > m_PBndConds
pressure boundary conditions container
Definition: Extrapolate.h:239
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:299
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:183
void Nektar::Extrapolate::AddVelBC ( void  )

Definition at line 108 of file Extrapolate.cpp.

References IProductNormVelocityBCOnHBC(), m_intSteps, m_iprodnormvel, m_numHBCDof, m_pressureCalls, m_pressureHBCs, m_timestep, StifflyStable_Gamma0_Coeffs, and Vmath::Svtvp().

Referenced by Nektar::WeakPressureExtrapolate::v_EvaluatePressureBCs(), and Nektar::SubSteppingExtrapolateWeakPressure::v_SubStepSetPressureBCs().

109  {
110  if(m_numHBCDof)
111  {
112  int order = std::min(m_pressureCalls,m_intSteps);
113 
114  // Update velocity BF at n+1 (actually only needs doing if
115  // velocity is time dependent on HBCs)
117 
118  // Subtract acceleration term off m_pressureHBCs[nlevels-1]
121  m_iprodnormvel[0], 1,
123  m_pressureHBCs[m_intSteps-1], 1);
124  }
125  }
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.cpp:485
static NekDouble StifflyStable_Gamma0_Coeffs[3]
Definition: Extrapolate.h:269
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
int m_pressureCalls
number of times the high-order pressure BCs have been called
Definition: Extrapolate.h:245
void IProductNormVelocityBCOnHBC(Array< OneD, NekDouble > &IprodVn)
Array< OneD, Array< OneD, NekDouble > > m_pressureHBCs
Storage for current and previous levels of high order pressure boundary conditions.
Definition: Extrapolate.h:259
Array< OneD, Array< OneD, NekDouble > > m_iprodnormvel
Storage for current and previous levels of the inner product of normal velocity.
Definition: Extrapolate.h:262
NekDouble m_timestep
Definition: Extrapolate.h:256
void Nektar::Extrapolate::CalcNeumannPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  fields,
const Array< OneD, const Array< OneD, NekDouble > > &  N,
NekDouble  kinvis 
)
inlineprotected

Definition at line 188 of file Extrapolate.h.

References v_CalcNeumannPressureBCs().

Referenced by Nektar::StandardExtrapolate::v_EvaluatePressureBCs(), Nektar::WeakPressureExtrapolate::v_EvaluatePressureBCs(), Nektar::SubSteppingExtrapolateWeakPressure::v_SubStepSetPressureBCs(), and Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs().

192  {
193  v_CalcNeumannPressureBCs( fields, N, kinvis);
194  }
virtual void v_CalcNeumannPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
void Nektar::Extrapolate::CalcOutflowBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  fields,
NekDouble  kinvis 
)
protected

Definition at line 216 of file Extrapolate.cpp.

References AddNormVelOnOBC(), Nektar::eConvectiveOBC, Nektar::eOBC, EvaluateBDFArray(), ExtrapolateArray(), m_bnd_dim, m_curl_dim, m_fields, m_hbcType, m_houtflow, m_intSteps, m_PBndConds, m_PBndExp, Vmath::Smul(), Vmath::Svtvm(), Vmath::Svtvp(), UpdateRobinPrimCoeff(), Vmath::Vadd(), Vmath::Vmul(), Vmath::Vsub(), and Vmath::Vvtvp().

Referenced by Nektar::StandardExtrapolate::v_EvaluatePressureBCs(), Nektar::WeakPressureExtrapolate::v_EvaluatePressureBCs(), Nektar::SubSteppingExtrapolateWeakPressure::v_SubStepSetPressureBCs(), and Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs().

219  {
220  if(!m_houtflow.get())
221  {
222  return;
223  }
224 
225  Array<OneD, Array<OneD, NekDouble> > Velocity(m_curl_dim);
226 
228  int cnt = 0;
229 
230  // Evaluate robin primitive coefficient here so they can be
231  // updated whem m_int > 1 Currently not using this update
232  // since we only using u^n at outflow instead of BDF rule.
234 
235  for(int n = 0; n < m_PBndConds.num_elements(); ++n)
236  {
237  if((m_hbcType[n] == eOBC)||(m_hbcType[n] == eConvectiveOBC))
238  {
239  // Get expansion with element on this boundary
240  m_fields[0]->GetBndElmtExpansion(n, BndElmtExp, false);
241  int nqb = m_PBndExp[n]->GetTotPoints();
242  int nq = BndElmtExp->GetTotPoints();
243 
244  // Get velocity and extrapolate
245  for(int i = 0; i < m_curl_dim; i++)
246  {
247  m_fields[0]->ExtractPhysToBndElmt(n, fields[i],
248  m_houtflow->m_outflowVel[cnt][i][m_intSteps-1]);
249  ExtrapolateArray(m_houtflow->m_outflowVel[cnt][i]);
250  Velocity[i] = m_houtflow->m_outflowVel[cnt][i][m_intSteps-1];
251 
252  }
253 
254  // Homogeneous case needs conversion to physical space
255  if ( m_fields[0]->GetWaveSpace())
256  {
257  for(int i = 0; i < m_curl_dim; i++)
258  {
259  BndElmtExp->HomogeneousBwdTrans(Velocity[i],
260  Velocity[i]);
261  }
262  BndElmtExp->SetWaveSpace(false);
263  }
264 
265  // Get normal vector
266  Array<OneD, Array<OneD, NekDouble> > normals;
267  m_fields[0]->GetBoundaryNormals(n, normals);
268 
269  // Calculate n.gradU.n, div(U)
270  Array<OneD, NekDouble> nGradUn (nqb, 0.0);
271  Array<OneD, NekDouble> divU (nqb, 0.0);
272  Array<OneD, Array<OneD, NekDouble> > grad(m_curl_dim);
273  Array<OneD, NekDouble> bndVal (nqb, 0.0);
274  for( int i = 0; i < m_curl_dim; i++)
275  {
276  grad[i] = Array<OneD, NekDouble> (nq, 0.0);
277  }
278  for( int i = 0; i < m_curl_dim; i++)
279  {
280  if( m_curl_dim == 2)
281  {
282  BndElmtExp->PhysDeriv(Velocity[i], grad[0], grad[1]);
283  }
284  else
285  {
286  BndElmtExp->PhysDeriv(Velocity[i], grad[0], grad[1],
287  grad[2]);
288  }
289 
290  for( int j = 0; j < m_curl_dim; j++)
291  {
292  m_fields[0]->ExtractElmtToBndPhys(n, grad[j],bndVal);
293  // div(U) = gradU_ii
294  if ( i == j)
295  {
296  Vmath::Vadd(nqb , divU, 1, bndVal, 1, divU, 1);
297  }
298  // n.gradU.n = gradU_ij n_i n_j
299  Vmath::Vmul(nqb , normals[i], 1, bndVal, 1,
300  bndVal, 1);
301  Vmath::Vvtvp(nqb , normals[j], 1, bndVal, 1,
302  nGradUn, 1, nGradUn, 1);
303  }
304  }
305 
306  // Obtain u at the boundary
307  Array<OneD, Array<OneD, NekDouble> > u (m_curl_dim);
308  for( int i = 0; i < m_curl_dim; i++)
309  {
310  u[i] = Array<OneD, NekDouble> (nqb, 0.0);
311  m_fields[0]->ExtractElmtToBndPhys(n, Velocity[i],u[i]);
312  }
313 
314  // Calculate u.n and u^2
315  Array<OneD, NekDouble> un (nqb, 0.0);
316  Array<OneD, NekDouble> u2 (nqb, 0.0);
317  for( int i = 0; i < m_curl_dim; i++)
318  {
319  Vmath::Vvtvp(nqb, normals[i], 1, u[i], 1,
320  un, 1, un, 1);
321  Vmath::Vvtvp(nqb, u[i], 1, u[i], 1,
322  u2, 1, u2, 1);
323  }
324 
325  // Calculate S_0(u.n) = 0.5*(1-tanh(u.n/*U0*delta))
326  Array<OneD, NekDouble> S0 (nqb, 0.0);
327  for( int i = 0; i < nqb; i++)
328  {
329  S0[i] = 0.5*(1.0-tanh(un[i]/(m_houtflow->m_U0*m_houtflow->m_delta)));
330  }
331 
332  // Calculate E(n,u) = ((theta+alpha2)*0.5*(u^2)n +
333  // (1-theta+alpha1)*0.5*(n.u)u ) * S_0(u.n)
334  NekDouble k1 = 0.5*(m_houtflow->m_obcTheta +
335  m_houtflow->m_obcAlpha2);
336  NekDouble k2 = 0.5*(1-m_houtflow->m_obcTheta +
337  m_houtflow->m_obcAlpha1);
338 
339  Array<OneD, Array<OneD, NekDouble> > E (m_curl_dim);
340  for( int i = 0; i < m_curl_dim; i++)
341  {
342  E[i] = Array<OneD, NekDouble> (nqb, 0.0);
343 
344  Vmath::Smul(nqb, k1, u2, 1, E[i], 1);
345  Vmath::Vmul(nqb, E[i], 1, normals[i], 1, E[i], 1);
346  // Use bndVal as a temporary storage
347  Vmath::Smul(nqb, k2, un, 1, bndVal, 1);
348  Vmath::Vvtvp(nqb, u[i], 1, bndVal, 1, E[i], 1, E[i], 1);
349  Vmath::Vmul(nqb, E[i], 1, S0, 1, E[i], 1);
350  }
351 
352  // if non-zero forcing is provided we want to subtract
353  // value if we want to interpret values as being the
354  // desired pressure value. This is now precribed from
355  // the velocity forcing to be consistent with the
356  // paper except f_b = -f_b
357 
358  // Calculate (E(n,u) + f_b).n
359  Array<OneD, NekDouble> En (nqb, 0.0);
360  for( int i = 0; i < m_bnd_dim; i++)
361  {
362  // Use bndVal as temporary
363  Vmath::Vsub(nqb,E[i],1,m_houtflow->
364  m_UBndExp[i][n]->GetPhys(),
365  1, bndVal, 1);
366 
367  Vmath::Vvtvp(nqb, normals[i], 1, bndVal, 1,
368  En, 1, En, 1);
369 
370  }
371 
372  // Calculate pressure bc = kinvis*n.gradU.n - E.n + f_b.n
373  Array<OneD, NekDouble> pbc (nqb, 0.0);
374  Vmath::Svtvm( nqb, kinvis, nGradUn, 1, En, 1, pbc, 1);
375 
376  if(m_hbcType[n] == eOBC)
377  {
378 
379  if ( m_PBndExp[n]->GetWaveSpace())
380  {
381  m_PBndExp[n]->HomogeneousFwdTrans(pbc, bndVal);
382  m_PBndExp[n]->FwdTrans(bndVal,
383  m_PBndExp[n]->UpdateCoeffs());
384  }
385  else
386  {
387  m_PBndExp[n]->FwdTrans(pbc,
388  m_PBndExp[n]->UpdateCoeffs());
389  }
390  }
391  else if(m_hbcType[n] == eConvectiveOBC) // add outflow values to calculation from HBC
392  {
393  int nbcoeffs = m_PBndExp[n]->GetNcoeffs();
394  Array<OneD, NekDouble> bndCoeffs (nbcoeffs, 0.0);
395  if ( m_PBndExp[n]->GetWaveSpace())
396  {
397  m_PBndExp[n]->HomogeneousFwdTrans(pbc, bndVal);
398  m_PBndExp[n]->IProductWRTBase(bndVal,bndCoeffs);
399  }
400  else
401  {
402  m_PBndExp[n]->IProductWRTBase(pbc,bndCoeffs);
403  }
404  // Note we have the negative of what is in the Dong paper in bndVal
405  Vmath::Svtvp(nbcoeffs,m_houtflow->m_pressurePrimCoeff[n],
406  bndCoeffs, 1,m_PBndExp[n]->UpdateCoeffs(),1,
407  m_PBndExp[n]->UpdateCoeffs(),1);
408 
409  // evaluate u^n at outflow boundary for velocity BC
410  for( int i = 0; i < m_curl_dim; i++)
411  {
412  m_fields[0]->ExtractElmtToBndPhys(n,
413  m_houtflow->
414  m_outflowVel[cnt][i][0],
415  m_houtflow->
416  m_outflowVelBnd[cnt][i][m_intSteps-1]);
417 
418  EvaluateBDFArray(m_houtflow->m_outflowVelBnd[cnt][i]);
419 
420  // point u[i] to BDF evalauted value \hat{u}
421  u[i] = m_houtflow->m_outflowVelBnd[cnt][i]
422  [m_intSteps-1];
423  }
424 
425  // Add normal velocity if weak pressure
426  // formulation. In this case there is an
427  // additional \int \hat{u}.n ds on the outflow
428  // boundary since we use the inner product wrt
429  // deriv of basis in pressure solve.
430  AddNormVelOnOBC(cnt, n, u);
431  }
432 
433  // Calculate velocity boundary conditions
434  if(m_hbcType[n] == eOBC)
435  {
436  // = (pbc n - kinvis divU n)
437  Vmath::Smul(nqb, kinvis, divU, 1, divU, 1);
438  Vmath::Vsub(nqb, pbc, 1, divU, 1, bndVal, 1);
439  }
440  else if (m_hbcType[n] == eConvectiveOBC)
441  {
442  // = (-kinvis divU n)
443  Vmath::Smul(nqb, -1.0*kinvis, divU, 1, bndVal, 1);
444 
445  // pbc needs to be added after pressure solve
446  }
447 
448  for(int i = 0; i < m_curl_dim; ++i)
449  {
450  // Reuse divU -> En
451  Vmath::Vvtvp( nqb, normals[i], 1, bndVal, 1, E[i], 1,
452  divU, 1);
453  // - f_b
454  Vmath::Vsub( nqb, divU, 1,
455  m_houtflow->m_UBndExp[i][n]->GetPhys(),
456  1, divU, 1);
457  // * 1/kinvis
458  Vmath::Smul(nqb, 1.0/kinvis, divU, 1, divU, 1);
459 
460  if(m_hbcType[n] == eConvectiveOBC)
461  {
462  Vmath::Svtvp(nqb,m_houtflow->m_velocityPrimCoeff[i][n],
463  u[i], 1,divU,1,divU,1);
464  }
465 
466  if ( m_houtflow->m_UBndExp[i][n]->GetWaveSpace())
467  {
468  m_houtflow->m_UBndExp[i][n]->HomogeneousFwdTrans(divU,
469  divU);
470  }
471 
472  m_houtflow->m_UBndExp[i][n]->IProductWRTBase(divU,
473  m_houtflow->m_UBndExp[i][n]->UpdateCoeffs());
474 
475  }
476 
477  // Get offset for next terms
478  cnt++;
479  }
480  }
481  }
void UpdateRobinPrimCoeff(void)
void ExtrapolateArray(Array< OneD, Array< OneD, NekDouble > > &array)
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:242
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.cpp:485
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.cpp:442
HighOrderOutflowSharedPtr m_houtflow
Definition: Extrapolate.h:272
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
void EvaluateBDFArray(Array< OneD, Array< OneD, NekDouble > > &array)
int m_bnd_dim
bounday dimensionality
Definition: Extrapolate.h:236
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:213
Array< OneD, HBCType > m_hbcType
Array of type of high order BCs for splitting shemes.
Definition: Extrapolate.h:216
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
void Svtvm(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.cpp:518
double NekDouble
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:343
int m_curl_dim
Curl-curl dimensionality.
Definition: Extrapolate.h:233
Array< OneD, const SpatialDomains::BoundaryConditionShPtr > m_PBndConds
pressure boundary conditions container
Definition: Extrapolate.h:239
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:299
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:183
void AddNormVelOnOBC(const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
Definition: Extrapolate.h:423
void Nektar::Extrapolate::CopyPressureHBCsToPbndExp ( void  )

Definition at line 1079 of file Extrapolate.cpp.

References Nektar::eConvectiveOBC, Nektar::eHBCNeumann, m_hbcType, m_intSteps, m_PBndConds, m_PBndExp, m_pressureHBCs, and Vmath::Vcopy().

Referenced by Nektar::StandardExtrapolate::v_EvaluatePressureBCs(), Nektar::WeakPressureExtrapolate::v_EvaluatePressureBCs(), Nektar::SubSteppingExtrapolateWeakPressure::v_SubStepSetPressureBCs(), and Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs().

1080  {
1081  int n, cnt;
1082  for(cnt = n = 0; n < m_PBndConds.num_elements(); ++n)
1083  {
1084  if((m_hbcType[n] == eHBCNeumann)||(m_hbcType[n] == eConvectiveOBC))
1085  {
1086  int nq = m_PBndExp[n]->GetNcoeffs();
1087  Vmath::Vcopy(nq, &(m_pressureHBCs[m_intSteps-1])[cnt], 1,
1088  &(m_PBndExp[n]->UpdateCoeffs()[0]), 1);
1089  cnt += nq;
1090  }
1091  }
1092  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:242
Array< OneD, HBCType > m_hbcType
Array of type of high order BCs for splitting shemes.
Definition: Extrapolate.h:216
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
Array< OneD, Array< OneD, NekDouble > > m_pressureHBCs
Storage for current and previous levels of high order pressure boundary conditions.
Definition: Extrapolate.h:259
Array< OneD, const SpatialDomains::BoundaryConditionShPtr > m_PBndConds
pressure boundary conditions container
Definition: Extrapolate.h:239
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
void Nektar::Extrapolate::CorrectPressureBCs ( const Array< OneD, NekDouble > &  pressure)
inline

Definition at line 413 of file Extrapolate.h.

References v_CorrectPressureBCs().

415  {
416  v_CorrectPressureBCs(pressure);
417  }
virtual void v_CorrectPressureBCs(const Array< OneD, NekDouble > &pressure)
void Nektar::Extrapolate::EvaluateBDFArray ( Array< OneD, Array< OneD, NekDouble > > &  array)

At the start, the newest value is stored in array[nlevels-1] and the previous values in the first positions At the end, the value of the bdf explicit part is stored in array[nlevels-1] and the storage has been updated to included the new value

Definition at line 1015 of file Extrapolate.cpp.

References m_intSteps, m_pressureCalls, RollOver(), Vmath::Smul(), StifflyStable_Alpha_Coeffs, and Vmath::Svtvp().

Referenced by CalcOutflowBCs(), Nektar::SubSteppingExtrapolateWeakPressure::v_AddNormVelOnOBC(), and Nektar::WeakPressureExtrapolate::v_AddNormVelOnOBC().

1017  {
1018  int nint = min(m_pressureCalls,m_intSteps);
1019  int nlevels = array.num_elements();
1020  int nPts = array[0].num_elements();
1021 
1022  // Update array
1023  RollOver(array);
1024 
1025  // Extrapolate to outarray
1026  Vmath::Smul(nPts, StifflyStable_Alpha_Coeffs[nint-1][nint-1],
1027  array[nint-1], 1,
1028  array[nlevels-1], 1);
1029 
1030  for(int n = 0; n < nint-1; ++n)
1031  {
1032  Vmath::Svtvp(nPts, StifflyStable_Alpha_Coeffs[nint-1][n],
1033  array[n],1, array[nlevels-1],1,
1034  array[nlevels-1],1);
1035  }
1036  }
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.cpp:485
void RollOver(Array< OneD, Array< OneD, NekDouble > > &input)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:213
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
int m_pressureCalls
number of times the high-order pressure BCs have been called
Definition: Extrapolate.h:245
static NekDouble StifflyStable_Alpha_Coeffs[3][3]
Definition: Extrapolate.h:268
void Nektar::Extrapolate::EvaluatePressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
const Array< OneD, const Array< OneD, NekDouble > > &  N,
NekDouble  kinvis 
)
inline

Evaluate Pressure Boundary Conditions for Standard Extrapolation

Definition at line 340 of file Extrapolate.h.

References v_EvaluatePressureBCs().

344  {
345  v_EvaluatePressureBCs(inarray,N,kinvis);
346  }
virtual void v_EvaluatePressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)=0
void Nektar::Extrapolate::ExtrapolateArray ( Array< OneD, Array< OneD, NekDouble > > &  array)

At the start, the newest value is stored in array[nlevels-1] and the previous values in the first positions At the end, the extrapolated value is stored in array[nlevels-1] and the storage has been updated to included the new value

Definition at line 985 of file Extrapolate.cpp.

References m_intSteps, m_pressureCalls, RollOver(), Vmath::Smul(), StifflyStable_Betaq_Coeffs, and Vmath::Svtvp().

Referenced by CalcOutflowBCs(), Nektar::WeakPressureExtrapolate::v_EvaluatePressureBCs(), Nektar::StandardExtrapolate::v_EvaluatePressureBCs(), Nektar::SubSteppingExtrapolateWeakPressure::v_SubStepSetPressureBCs(), and Nektar::SubSteppingExtrapolate::v_SubStepSetPressureBCs().

987  {
988  int nint = min(m_pressureCalls,m_intSteps);
989  int nlevels = array.num_elements();
990  int nPts = array[0].num_elements();
991 
992  // Update array
993  RollOver(array);
994 
995  // Extrapolate to outarray
996  Vmath::Smul(nPts, StifflyStable_Betaq_Coeffs[nint-1][nint-1],
997  array[nint-1], 1,
998  array[nlevels-1], 1);
999 
1000  for(int n = 0; n < nint-1; ++n)
1001  {
1002  Vmath::Svtvp(nPts, StifflyStable_Betaq_Coeffs[nint-1][n],
1003  array[n],1, array[nlevels-1],1,
1004  array[nlevels-1],1);
1005  }
1006  }
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.cpp:485
void RollOver(Array< OneD, Array< OneD, NekDouble > > &input)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:213
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
int m_pressureCalls
number of times the high-order pressure BCs have been called
Definition: Extrapolate.h:245
static NekDouble StifflyStable_Betaq_Coeffs[3][3]
Definition: Extrapolate.h:267
void Nektar::Extrapolate::ExtrapolateArray ( Array< OneD, Array< OneD, NekDouble > > &  oldarrays,
Array< OneD, NekDouble > &  newarray,
Array< OneD, NekDouble > &  outarray 
)
void Nektar::Extrapolate::ExtrapolatePressureHBCs ( void  )
void Nektar::Extrapolate::GenerateHOPBCMap ( const LibUtilities::SessionReaderSharedPtr pSession)

Initialize HOBCs

Definition at line 636 of file Extrapolate.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, Nektar::MultiRegions::e2D, Nektar::MultiRegions::e3D, Nektar::MultiRegions::e3DH1D, Nektar::MultiRegions::e3DH2D, Nektar::eConvectiveOBC, Nektar::eHBCNeumann, Nektar::eNOHBC, Nektar::eOBC, Nektar::SpatialDomains::eRobin, Nektar::LibUtilities::Equation::Evaluate(), Nektar::LibUtilities::Equation::GetExpression(), m_bnd_dim, m_curl_dim, m_fields, m_HBCnumber, m_hbcType, m_houtflow, m_intSteps, m_iprodnormvel, m_numHBCDof, m_PBndConds, m_PBndExp, m_pressure, m_pressureCalls, m_pressureHBCs, and m_velocity.

637  {
638  m_PBndConds = m_pressure->GetBndConditions();
639  m_PBndExp = m_pressure->GetBndCondExpansions();
640 
641  int cnt, n;
642 
643  // Storage array for high order pressure BCs
644  m_pressureHBCs = Array<OneD, Array<OneD, NekDouble> > (m_intSteps);
645  m_iprodnormvel = Array<OneD, Array<OneD, NekDouble> > (m_intSteps + 1);
646 
647  // Get useful values for HOBCs
648  m_HBCnumber = 0;
649  m_numHBCDof = 0;
650 
651  int outHBCnumber = 0;
652  int numOutHBCPts = 0;
653 
654  m_hbcType = Array<OneD, HBCType> (m_PBndConds.num_elements(),eNOHBC);
655  for( n = 0; n < m_PBndConds.num_elements(); ++n)
656  {
657  // High order boundary Neumann Condiiton
658  if(boost::iequals(m_PBndConds[n]->GetUserDefined(),"H"))
659  {
660  m_hbcType[n] = eHBCNeumann;
661  m_numHBCDof += m_PBndExp[n]->GetNcoeffs();
662  m_HBCnumber += m_PBndExp[n]->GetExpSize();
663  }
664 
665  // High order outflow convective condition
666  if(m_PBndConds[n]->GetBoundaryConditionType() ==
668  boost::iequals(m_PBndConds[n]->GetUserDefined(),
669  "HOutflow"))
670  {
672  m_numHBCDof += m_PBndExp[n]->GetNcoeffs();
673  m_HBCnumber += m_PBndExp[n]->GetExpSize();
674  numOutHBCPts += m_PBndExp[n]->GetTotPoints();
675  outHBCnumber++;
676  }
677  // High order outflow boundary condition;
678  else if(boost::iequals(m_PBndConds[n]->GetUserDefined(),
679  "HOutflow"))
680  {
681  m_hbcType[n] = eOBC;
682  numOutHBCPts += m_PBndExp[n]->GetTotPoints();
683  outHBCnumber++;
684  }
685  }
686 
687  m_iprodnormvel[0] = Array<OneD, NekDouble>(m_numHBCDof, 0.0);
688  for(n = 0; n < m_intSteps; ++n)
689  {
690  m_pressureHBCs[n] = Array<OneD, NekDouble>(m_numHBCDof, 0.0);
691  m_iprodnormvel[n+1] = Array<OneD, NekDouble>(m_numHBCDof, 0.0);
692  }
693 
694  m_pressureCalls = 0;
695 
696  switch(m_pressure->GetExpType())
697  {
698  case MultiRegions::e2D:
699  {
700  m_curl_dim = 2;
701  m_bnd_dim = 2;
702  }
703  break;
705  {
706  m_curl_dim = 3;
707  m_bnd_dim = 2;
708  }
709  break;
711  {
712  m_curl_dim = 3;
713  m_bnd_dim = 1;
714  }
715  break;
716  case MultiRegions::e3D:
717  {
718  m_curl_dim = 3;
719  m_bnd_dim = 3;
720  }
721  break;
722  default:
723  ASSERTL0(0,"Dimension not supported");
724  break;
725  }
726 
727  // Initialise storage for outflow HOBCs
728  if(numOutHBCPts > 0)
729  {
730  m_houtflow = MemoryManager<HighOrderOutflow>::AllocateSharedPtr(numOutHBCPts, outHBCnumber, m_curl_dim, pSession);
731 
733 
734  // set up boundary expansions link
735  for (int i = 0; i < m_curl_dim; ++i)
736  {
737  m_houtflow->m_UBndExp[i] =
738  m_fields[m_velocity[i]]->GetBndCondExpansions();
739  }
740 
741  for(n = 0, cnt = 0; n < m_PBndConds.num_elements(); ++n)
742  {
743  if(boost::iequals(m_PBndConds[n]->GetUserDefined(),"HOutflow"))
744  {
745  m_houtflow->m_outflowVel[cnt] =
746  Array<OneD, Array<OneD,
747  Array<OneD, NekDouble> > > (m_curl_dim);
748 
749  m_houtflow->m_outflowVelBnd[cnt] =
750  Array<OneD, Array<OneD,
751  Array<OneD, NekDouble> > > (m_curl_dim);
752 
753  m_fields[0]->GetBndElmtExpansion(n, BndElmtExp, false);
754  int nqb = m_PBndExp[n]->GetTotPoints();
755  int nq = BndElmtExp->GetTotPoints();
756  for(int j = 0; j < m_curl_dim; ++j)
757  {
758  m_houtflow->m_outflowVel[cnt][j] =
759  Array<OneD, Array<OneD, NekDouble> > (m_intSteps);
760 
761  m_houtflow->m_outflowVelBnd[cnt][j] =
762  Array<OneD, Array<OneD, NekDouble> > (m_intSteps);
763 
764  for(int k = 0; k < m_intSteps; ++k)
765  {
766  m_houtflow->m_outflowVel[cnt][j][k] =
767  Array<OneD, NekDouble>(nq,0.0);
768  m_houtflow->m_outflowVelBnd[cnt][j][k] =
769  Array<OneD, NekDouble>(nqb,0.0);
770  }
771  }
772  cnt++;
773  }
774 
775  // evaluate convective primitive coefficient if
776  // convective OBCs are used
777  if(m_hbcType[n] == eConvectiveOBC)
778  {
779  // initialise convective members of
780  // HighOrderOutflow struct
781  if(m_houtflow->m_pressurePrimCoeff.num_elements() == 0)
782  {
783  m_houtflow->m_pressurePrimCoeff =
784  Array<OneD, NekDouble>
785  (m_PBndConds.num_elements(),0.0);
786  m_houtflow->m_velocityPrimCoeff =
787  Array<OneD, Array< OneD, NekDouble> >(m_curl_dim);
788 
789 
790  for(int i = 0; i < m_curl_dim; ++i)
791  {
792  m_houtflow->m_velocityPrimCoeff[i] =
793  Array<OneD, NekDouble> (m_PBndConds.
794  num_elements(),0.0);
795  }
796  }
797 
798  LibUtilities::Equation coeff =
799  boost::static_pointer_cast<
800  SpatialDomains::RobinBoundaryCondition
801  >(m_PBndConds[n])->m_robinPrimitiveCoeff;
802 
803  // checkout equation evaluation options!!
804  m_houtflow->m_pressurePrimCoeff[n] = coeff.Evaluate();
805 
806  for (int i = 0; i < m_curl_dim; ++i)
807  {
808  Array<OneD, const SpatialDomains::BoundaryConditionShPtr>
809  UBndConds = m_fields[m_velocity[i]]->GetBndConditions();
810 
811  LibUtilities::Equation coeff1 =
812  boost::static_pointer_cast<
813  SpatialDomains::RobinBoundaryCondition
814  >(UBndConds[n])->m_robinPrimitiveCoeff;
815 
816 
817  m_houtflow->m_defVelPrimCoeff[i] = coeff1.GetExpression();
818 
819  ASSERTL1(UBndConds[n]->GetBoundaryConditionType()
820  == SpatialDomains::eRobin,"Require Velocity "
821  "conditions to be of Robin type when pressure"
822  "outflow is specticied as Robin Boundary type");
823 
824 
825  // checkout equation evaluation options!!
826  m_houtflow->m_velocityPrimCoeff[i][n] = coeff1.Evaluate();
827  }
828  }
829  }
830 
831  }
832  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
MultiRegions::ExpListSharedPtr m_pressure
Pointer to field holding pressure field.
Definition: Extrapolate.h:222
Array< OneD, int > m_velocity
int which identifies which components of m_fields contains the velocity (u,v,w);
Definition: Extrapolate.h:226
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:242
HighOrderOutflowSharedPtr m_houtflow
Definition: Extrapolate.h:272
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
int m_bnd_dim
bounday dimensionality
Definition: Extrapolate.h:236
Array< OneD, HBCType > m_hbcType
Array of type of high order BCs for splitting shemes.
Definition: Extrapolate.h:216
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
int m_pressureCalls
number of times the high-order pressure BCs have been called
Definition: Extrapolate.h:245
Array< OneD, Array< OneD, NekDouble > > m_pressureHBCs
Storage for current and previous levels of high order pressure boundary conditions.
Definition: Extrapolate.h:259
int m_curl_dim
Curl-curl dimensionality.
Definition: Extrapolate.h:233
Array< OneD, Array< OneD, NekDouble > > m_iprodnormvel
Storage for current and previous levels of the inner product of normal velocity.
Definition: Extrapolate.h:262
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
Array< OneD, const SpatialDomains::BoundaryConditionShPtr > m_PBndConds
pressure boundary conditions container
Definition: Extrapolate.h:239
Array< OneD, NekDouble > Nektar::Extrapolate::GetMaxStdVelocity ( const Array< OneD, Array< OneD, NekDouble > >  inarray)

Definition at line 877 of file Extrapolate.cpp.

References ASSERTL0, Nektar::SpatialDomains::eDeformed, m_curl_dim, m_fields, Vmath::Svtvp(), Vmath::Vmax(), Vmath::Vmul(), Vmath::Vvtvp(), and Vmath::Zero().

Referenced by Nektar::SubSteppingExtrapolate::GetSubstepTimeStep().

879  {
880  // Checking if the problem is 2D
881  ASSERTL0(m_curl_dim >= 2, "Method not implemented for 1D");
882 
883  int n_points_0 = m_fields[0]->GetExp(0)->GetTotPoints();
884  int n_element = m_fields[0]->GetExpSize();
885  int nvel = inarray.num_elements();
886  int cnt;
887 
888  NekDouble pntVelocity;
889 
890  // Getting the standard velocity vector
891  Array<OneD, Array<OneD, NekDouble> > stdVelocity(nvel);
892  Array<OneD, NekDouble> tmp;
893  Array<OneD, NekDouble> maxV(n_element, 0.0);
895 
896  for (int i = 0; i < nvel; ++i)
897  {
898  stdVelocity[i] = Array<OneD, NekDouble>(n_points_0);
899  }
900 
901  cnt = 0.0;
902  for (int el = 0; el < n_element; ++el)
903  {
904  int n_points = m_fields[0]->GetExp(el)->GetTotPoints();
905  ptsKeys = m_fields[0]->GetExp(el)->GetPointsKeys();
906 
907  // reset local space
908  if(n_points != n_points_0)
909  {
910  for (int j = 0; j < nvel; ++j)
911  {
912  stdVelocity[j] = Array<OneD, NekDouble>(n_points, 0.0);
913  }
914  n_points_0 = n_points;
915  }
916  else
917  {
918  for (int j = 0; j < nvel; ++j)
919  {
920  Vmath::Zero( n_points, stdVelocity[j], 1);
921  }
922  }
923 
924  Array<TwoD, const NekDouble> gmat =
925  m_fields[0]->GetExp(el)->GetGeom()->GetMetricInfo()->GetDerivFactors(ptsKeys);
926 
927  if (m_fields[0]->GetExp(el)->GetGeom()->GetMetricInfo()->GetGtype()
929  {
930  for(int j = 0; j < nvel; ++j)
931  {
932  for(int k = 0; k < nvel; ++k)
933  {
934  Vmath::Vvtvp( n_points, gmat[k*nvel + j], 1,
935  tmp = inarray[k] + cnt, 1,
936  stdVelocity[j], 1,
937  stdVelocity[j], 1);
938  }
939  }
940  }
941  else
942  {
943  for(int j = 0; j < nvel; ++j)
944  {
945  for(int k = 0; k < nvel; ++k)
946  {
947  Vmath::Svtvp( n_points, gmat[k*nvel + j][0],
948  tmp = inarray[k] + cnt, 1,
949  stdVelocity[j], 1,
950  stdVelocity[j], 1);
951  }
952  }
953  }
954  cnt += n_points;
955 
956  // Calculate total velocity in stdVelocity[0]
957  Vmath::Vmul( n_points, stdVelocity[0], 1, stdVelocity[0], 1,
958  stdVelocity[0], 1);
959  for(int k = 1; k < nvel; ++k)
960  {
961  Vmath::Vvtvp( n_points, stdVelocity[k], 1,
962  stdVelocity[k], 1,
963  stdVelocity[0], 1,
964  stdVelocity[0], 1);
965  }
966  pntVelocity = Vmath::Vmax( n_points, stdVelocity[0], 1);
967  maxV[el] = sqrt(pntVelocity);
968  }
969 
970  return maxV;
971  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:242
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Definition: Vmath.cpp:779
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.cpp:485
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.cpp:442
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
double NekDouble
int m_curl_dim
Curl-curl dimensionality.
Definition: Extrapolate.h:233
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:373
Geometry is curved or has non-constant factors.
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:183
LibUtilities::TimeIntegrationMethod Nektar::Extrapolate::GetSubStepIntegrationMethod ( void  )
inline

Definition at line 405 of file Extrapolate.h.

References v_GetSubStepIntegrationMethod().

406  {
408  }
virtual LibUtilities::TimeIntegrationMethod v_GetSubStepIntegrationMethod(void)
void Nektar::Extrapolate::IProductNormVelocityBCOnHBC ( Array< OneD, NekDouble > &  IprodVn)

Definition at line 568 of file Extrapolate.cpp.

References Nektar::eConvectiveOBC, Nektar::eHBCNeumann, m_bnd_dim, m_fields, m_HBCnumber, m_hbcType, m_PBndConds, m_PBndExp, and m_velocity.

Referenced by AddDuDt(), and AddVelBC().

569  {
570 
571  if(!m_HBCnumber)
572  {
573  return;
574  }
575  int i,n,cnt;
576  Array<OneD, NekDouble> IProdVnTmp;
577  Array<OneD, Array<OneD, NekDouble> > velbc(m_bnd_dim);
578  Array<OneD, Array<OneD, MultiRegions::ExpListSharedPtr> > VelBndExp(m_bnd_dim);
579  for(i = 0; i < m_bnd_dim; ++i)
580  {
581  VelBndExp[i] = m_fields[m_velocity[i]]->GetBndCondExpansions();
582  }
583 
584  for(n = cnt = 0; n < m_PBndConds.num_elements(); ++n)
585  {
586  // High order boundary condition;
587  if(m_hbcType[n] == eHBCNeumann)
588  {
589  for(i = 0; i < m_bnd_dim; ++i)
590  {
591  velbc[i] = Array<OneD, NekDouble>
592  (VelBndExp[i][n]->GetTotPoints(), 0.0);
593  VelBndExp[i][n]->SetWaveSpace(
594  m_fields[m_velocity[i]]->GetWaveSpace());
595  VelBndExp[i][n]->BwdTrans(VelBndExp[i][n]->GetCoeffs(),
596  velbc[i]);
597  }
598  IProdVnTmp = IProdVn + cnt;
599  m_PBndExp[n]->NormVectorIProductWRTBase(velbc, IProdVnTmp);
600  cnt += m_PBndExp[n]->GetNcoeffs();
601  }
602  else if(m_hbcType[n] == eConvectiveOBC)
603  {
604  // skip over convective OBC
605  cnt += m_PBndExp[n]->GetNcoeffs();
606  }
607  }
608  }
Array< OneD, int > m_velocity
int which identifies which components of m_fields contains the velocity (u,v,w);
Definition: Extrapolate.h:226
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:242
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
int m_bnd_dim
bounday dimensionality
Definition: Extrapolate.h:236
Array< OneD, HBCType > m_hbcType
Array of type of high order BCs for splitting shemes.
Definition: Extrapolate.h:216
Array< OneD, const SpatialDomains::BoundaryConditionShPtr > m_PBndConds
pressure boundary conditions container
Definition: Extrapolate.h:239
void Nektar::Extrapolate::IProductNormVelocityOnHBC ( const Array< OneD, const Array< OneD, NekDouble > > &  Vel,
Array< OneD, NekDouble > &  IprodVn 
)

Definition at line 540 of file Extrapolate.cpp.

References Nektar::eConvectiveOBC, Nektar::eHBCNeumann, m_bnd_dim, m_fields, m_hbcType, m_PBndConds, and m_PBndExp.

Referenced by Nektar::SubSteppingExtrapolate::v_SubStepAdvance().

543  {
544  int i,n,cnt;
545  Array<OneD, NekDouble> IProdVnTmp;
546  Array<OneD, Array<OneD, NekDouble> > velbc(m_bnd_dim);
547 
548  for(n = cnt = 0; n < m_PBndConds.num_elements(); ++n)
549  {
550  // High order boundary condition;
551  if(m_hbcType[n] == eHBCNeumann)
552  {
553  for(i = 0; i < m_bnd_dim; ++i)
554  {
555  m_fields[0]->ExtractPhysToBnd(n, Vel[i], velbc[i]);
556  }
557  IProdVnTmp = IProdVn + cnt;
558  m_PBndExp[n]->NormVectorIProductWRTBase(velbc, IProdVnTmp);
559  cnt += m_PBndExp[n]->GetNcoeffs();
560  }
561  else if(m_hbcType[n] == eConvectiveOBC) // skip over conective OBC
562  {
563  cnt += m_PBndExp[n]->GetNcoeffs();
564  }
565  }
566  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:242
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
int m_bnd_dim
bounday dimensionality
Definition: Extrapolate.h:236
Array< OneD, HBCType > m_hbcType
Array of type of high order BCs for splitting shemes.
Definition: Extrapolate.h:216
Array< OneD, const SpatialDomains::BoundaryConditionShPtr > m_PBndConds
pressure boundary conditions container
Definition: Extrapolate.h:239
void Nektar::Extrapolate::MountHOPBCs ( int  HBCdata,
NekDouble  kinvis,
Array< OneD, NekDouble > &  Q,
Array< OneD, const NekDouble > &  Advection 
)
inline

Definition at line 392 of file Extrapolate.h.

References v_MountHOPBCs().

Referenced by Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), and v_CalcNeumannPressureBCs().

397  {
398  v_MountHOPBCs(HBCdata,kinvis,Q,Advection);
399  }
virtual void v_MountHOPBCs(int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection)=0
void Nektar::Extrapolate::RollOver ( Array< OneD, Array< OneD, NekDouble > > &  input)
protected

Function to roll time-level storages to the next step layout. The stored data associated with the oldest time-level (not required anymore) are moved to the top, where they will be overwritten as the solution process progresses.

Definition at line 616 of file Extrapolate.cpp.

Referenced by AccelerationBDF(), EvaluateBDFArray(), and ExtrapolateArray().

617  {
618  int nlevels = input.num_elements();
619 
620  Array<OneD, NekDouble> tmp;
621 
622  tmp = input[nlevels-1];
623 
624  for(int n = nlevels-1; n > 0; --n)
625  {
626  input[n] = input[n-1];
627  }
628 
629  input[0] = tmp;
630  }
void Nektar::Extrapolate::SubStepAdvance ( const LibUtilities::TimeIntegrationSolutionSharedPtr integrationSoln,
const int  nstep,
NekDouble  time 
)
inline

Definition at line 381 of file Extrapolate.h.

References v_SubStepAdvance().

385  {
386  v_SubStepAdvance(integrationSoln,nstep, time);
387  }
virtual void v_SubStepAdvance(const LibUtilities::TimeIntegrationSolutionSharedPtr &integrationSoln, int nstep, NekDouble time)=0
void Nektar::Extrapolate::SubSteppingTimeIntegration ( const int  intMethod,
const LibUtilities::TimeIntegrationWrapperSharedPtr IntegrationScheme 
)
inline

Definition at line 351 of file Extrapolate.h.

References v_SubSteppingTimeIntegration().

354  {
355  v_SubSteppingTimeIntegration(intMethod, IntegrationScheme);
356  }
virtual void v_SubSteppingTimeIntegration(int intMethod, const LibUtilities::TimeIntegrationWrapperSharedPtr &IntegrationScheme)=0
void Nektar::Extrapolate::SubStepSaveFields ( const int  nstep)
inline

Definition at line 361 of file Extrapolate.h.

References v_SubStepSaveFields().

363  {
364  v_SubStepSaveFields(nstep);
365  }
virtual void v_SubStepSaveFields(int nstep)=0
void Nektar::Extrapolate::SubStepSetPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
const NekDouble  Aii_DT,
NekDouble  kinvis 
)
inline

Definition at line 370 of file Extrapolate.h.

References v_SubStepSetPressureBCs().

374  {
375  v_SubStepSetPressureBCs(inarray,Aii_DT,kinvis);
376  }
virtual void v_SubStepSetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, NekDouble Aii_DT, NekDouble kinvis)=0
void Nektar::Extrapolate::UpdateRobinPrimCoeff ( void  )

Definition at line 834 of file Extrapolate.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::eConvectiveOBC, m_curl_dim, m_fields, m_hbcType, m_houtflow, m_intSteps, m_PBndConds, m_pressureCalls, m_session, m_velocity, and StifflyStable_Gamma0_Coeffs.

Referenced by CalcOutflowBCs().

835  {
836 
837  if((m_pressureCalls == 1) || (m_pressureCalls > m_intSteps))
838  {
839  return;
840  }
841 
842  for(int n = 0; n < m_PBndConds.num_elements(); ++n)
843  {
844  // Get expansion with element on this boundary
845  if(m_hbcType[n] == eConvectiveOBC)
846  {
847  for (int i = 0; i < m_curl_dim; ++i)
848  {
849  Array<OneD, SpatialDomains::BoundaryConditionShPtr>
850  UBndConds = m_fields[m_velocity[i]]->UpdateBndConditions();
851 
852  std::string primcoeff = m_houtflow->m_defVelPrimCoeff[i] + "*" +
853  boost::lexical_cast<std::string>(StifflyStable_Gamma0_Coeffs
854  [m_pressureCalls-1]);
855 
857  boost::dynamic_pointer_cast<
858  SpatialDomains::RobinBoundaryCondition >(UBndConds[n]);
859 
862  m_session,rcond->m_robinFunction.GetExpression(),
863  primcoeff,
864  rcond->GetUserDefined(),
865  rcond->m_filename);
866 
867  UBndConds[n] = bcond;
868  }
869 
870  }
871  }
872  }
LibUtilities::SessionReaderSharedPtr m_session
Definition: Extrapolate.h:211
Array< OneD, int > m_velocity
int which identifies which components of m_fields contains the velocity (u,v,w);
Definition: Extrapolate.h:226
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
HighOrderOutflowSharedPtr m_houtflow
Definition: Extrapolate.h:272
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
static NekDouble StifflyStable_Gamma0_Coeffs[3]
Definition: Extrapolate.h:269
Array< OneD, HBCType > m_hbcType
Array of type of high order BCs for splitting shemes.
Definition: Extrapolate.h:216
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
int m_pressureCalls
number of times the high-order pressure BCs have been called
Definition: Extrapolate.h:245
int m_curl_dim
Curl-curl dimensionality.
Definition: Extrapolate.h:233
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:219
Array< OneD, const SpatialDomains::BoundaryConditionShPtr > m_PBndConds
pressure boundary conditions container
Definition: Extrapolate.h:239
boost::shared_ptr< RobinBoundaryCondition > RobinBCShPtr
Definition: Conditions.h:222
void Nektar::Extrapolate::v_AddNormVelOnOBC ( const int  nbcoeffs,
const int  nreg,
Array< OneD, Array< OneD, NekDouble > > &  u 
)
protectedvirtual

Reimplemented in Nektar::WeakPressureExtrapolate, and Nektar::SubSteppingExtrapolateWeakPressure.

Definition at line 211 of file Extrapolate.cpp.

Referenced by AddNormVelOnOBC().

213  {
214  }
void Nektar::Extrapolate::v_CalcNeumannPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  fields,
const Array< OneD, const Array< OneD, NekDouble > > &  N,
NekDouble  kinvis 
)
protectedvirtual

Unified routine for calculation high-oder terms

Reimplemented in Nektar::MappingExtrapolate.

Definition at line 130 of file Extrapolate.cpp.

References Nektar::eConvectiveOBC, Nektar::eHBCNeumann, m_bnd_dim, m_curl_dim, m_fields, m_hbcType, m_intSteps, m_PBndConds, m_PBndExp, m_pressureHBCs, and MountHOPBCs().

Referenced by CalcNeumannPressureBCs(), and Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs().

134  {
135  int n, cnt;
136 
137  Array<OneD, NekDouble> Pvals;
138 
139  Array<OneD, Array<OneD, NekDouble> > Velocity(m_curl_dim);
140  Array<OneD, Array<OneD, NekDouble> > Advection(m_bnd_dim);
141 
142  Array<OneD, Array<OneD, NekDouble> > BndValues(m_bnd_dim);
143  Array<OneD, Array<OneD, NekDouble> > Q(m_curl_dim);
144 
146  for(n = cnt = 0; n < m_PBndConds.num_elements(); ++n)
147  {
148  // High order boundary condition;
149  if((m_hbcType[n] == eHBCNeumann)||(m_hbcType[n] == eConvectiveOBC))
150  {
151  m_fields[0]->GetBndElmtExpansion(n, BndElmtExp, false);
152  int nqb = m_PBndExp[n]->GetTotPoints();
153  int nq = BndElmtExp->GetTotPoints();
154 
155  for(int i = 0; i < m_bnd_dim; i++)
156  {
157  BndValues[i] = Array<OneD, NekDouble> (nqb,0.0);
158  }
159 
160  for(int i = 0; i < m_curl_dim; i++)
161  {
162  Q[i] = Array<OneD, NekDouble> (nq,0.0);
163  }
164 
165  // Obtaining fields on BndElmtExp
166  for(int i = 0; i < m_curl_dim; i++)
167  {
168  m_fields[0]->ExtractPhysToBndElmt(n, fields[i],Velocity[i]);
169  }
170 
171  if(N.num_elements()) // not required for some extrapolation
172  {
173  for(int i = 0; i < m_bnd_dim; i++)
174  {
175  m_fields[0]->ExtractPhysToBndElmt(n, N[i], Advection[i]);
176  }
177  }
178 
179  // CurlCurl
180  BndElmtExp->CurlCurl(Velocity, Q);
181 
182  // Mounting advection component into the high-order condition
183  for(int i = 0; i < m_bnd_dim; i++)
184  {
185  MountHOPBCs(nq, kinvis,Q[i],Advection[i]);
186  }
187 
188  Pvals = (m_pressureHBCs[m_intSteps-1]) + cnt;
189 
190  // Getting values on the boundary and filling the pressure bnd
191  // expansion. Multiplication by the normal is required
192  for(int i = 0; i < m_bnd_dim; i++)
193  {
194  m_fields[0]->ExtractElmtToBndPhys(n, Q[i],BndValues[i]);
195  }
196 
197  m_PBndExp[n]->NormVectorIProductWRTBase(BndValues, Pvals);
198 
199  // Get offset for next terms
200  cnt += m_PBndExp[n]->GetNcoeffs();
201  }
202  }
203  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:242
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Velocity fields.
Definition: Extrapolate.h:219
int m_bnd_dim
bounday dimensionality
Definition: Extrapolate.h:236
void MountHOPBCs(int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection)
Definition: Extrapolate.h:392
Array< OneD, HBCType > m_hbcType
Array of type of high order BCs for splitting shemes.
Definition: Extrapolate.h:216
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
Array< OneD, Array< OneD, NekDouble > > m_pressureHBCs
Storage for current and previous levels of high order pressure boundary conditions.
Definition: Extrapolate.h:259
int m_curl_dim
Curl-curl dimensionality.
Definition: Extrapolate.h:233
Array< OneD, const SpatialDomains::BoundaryConditionShPtr > m_PBndConds
pressure boundary conditions container
Definition: Extrapolate.h:239
void Nektar::Extrapolate::v_CorrectPressureBCs ( const Array< OneD, NekDouble > &  pressure)
protectedvirtual

Reimplemented in Nektar::MappingExtrapolate.

Definition at line 206 of file Extrapolate.cpp.

Referenced by CorrectPressureBCs().

207  {
208  }
virtual void Nektar::Extrapolate::v_EvaluatePressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
const Array< OneD, const Array< OneD, NekDouble > > &  N,
NekDouble  kinvis 
)
protectedpure virtual
LibUtilities::TimeIntegrationMethod Nektar::Extrapolate::v_GetSubStepIntegrationMethod ( void  )
protectedvirtual
virtual void Nektar::Extrapolate::v_MountHOPBCs ( int  HBCdata,
NekDouble  kinvis,
Array< OneD, NekDouble > &  Q,
Array< OneD, const NekDouble > &  Advection 
)
protectedpure virtual
virtual void Nektar::Extrapolate::v_SubStepAdvance ( const LibUtilities::TimeIntegrationSolutionSharedPtr integrationSoln,
int  nstep,
NekDouble  time 
)
protectedpure virtual
virtual void Nektar::Extrapolate::v_SubSteppingTimeIntegration ( int  intMethod,
const LibUtilities::TimeIntegrationWrapperSharedPtr IntegrationScheme 
)
protectedpure virtual
virtual void Nektar::Extrapolate::v_SubStepSaveFields ( int  nstep)
protectedpure virtual
virtual void Nektar::Extrapolate::v_SubStepSetPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
NekDouble  Aii_DT,
NekDouble  kinvis 
)
protectedpure virtual

Member Data Documentation

std::string Nektar::Extrapolate::def
staticprivate
Initial value:
=
"StandardExtrapolate", "StandardExtrapolate")

Definition at line 275 of file Extrapolate.h.

SolverUtils::AdvectionSharedPtr Nektar::Extrapolate::m_advObject
protected

Definition at line 228 of file Extrapolate.h.

Referenced by Nektar::SubSteppingExtrapolate::SubStepAdvection().

int Nektar::Extrapolate::m_bnd_dim
protected
LibUtilities::CommSharedPtr Nektar::Extrapolate::m_comm
protected
int Nektar::Extrapolate::m_curl_dim
protected
Array<OneD, MultiRegions::ExpListSharedPtr> Nektar::Extrapolate::m_fields
protected
int Nektar::Extrapolate::m_HBCnumber
protected
Array<OneD, HBCType> Nektar::Extrapolate::m_hbcType
protected
HighOrderOutflowSharedPtr Nektar::Extrapolate::m_houtflow
protected
int Nektar::Extrapolate::m_intSteps
protected
Array<OneD, Array<OneD, NekDouble> > Nektar::Extrapolate::m_iprodnormvel
protected

Storage for current and previous levels of the inner product of normal velocity.

Definition at line 262 of file Extrapolate.h.

Referenced by AddDuDt(), AddVelBC(), GenerateHOPBCMap(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), and Nektar::SubSteppingExtrapolate::v_SubStepAdvance().

int Nektar::Extrapolate::m_numHBCDof
protected
Array<OneD, const SpatialDomains::BoundaryConditionShPtr> Nektar::Extrapolate::m_PBndConds
protected
Array<OneD, MultiRegions::ExpListSharedPtr> Nektar::Extrapolate::m_PBndExp
protected
MultiRegions::ExpListSharedPtr Nektar::Extrapolate::m_pressure
protected

Pointer to field holding pressure field.

Definition at line 222 of file Extrapolate.h.

Referenced by AddPressureToOutflowBCs(), GenerateHOPBCMap(), and Nektar::MappingExtrapolate::v_CorrectPressureBCs().

int Nektar::Extrapolate::m_pressureCalls
protected
Array<OneD, Array<OneD, NekDouble> > Nektar::Extrapolate::m_pressureHBCs
protected
Array<OneD, Array<OneD, NekDouble> > Nektar::Extrapolate::m_previousVelFields
protected

Definition at line 230 of file Extrapolate.h.

LibUtilities::SessionReaderSharedPtr Nektar::Extrapolate::m_session
protected
NekDouble Nektar::Extrapolate::m_timestep
protected
Array<OneD, Array<OneD, NekDouble> > Nektar::Extrapolate::m_traceNormals
protected
Array<OneD, int> Nektar::Extrapolate::m_velocity
protected
NekDouble Nektar::Extrapolate::StifflyStable_Alpha_Coeffs
staticprotected
Initial value:
= {
{ 1.0, 0.0, 0.0},{ 2.0, -0.5, 0.0},{ 3.0, -1.5, 1.0/3.0}}

Definition at line 268 of file Extrapolate.h.

Referenced by AccelerationBDF(), and EvaluateBDFArray().

NekDouble Nektar::Extrapolate::StifflyStable_Betaq_Coeffs
staticprotected
Initial value:
= {
{ 1.0, 0.0, 0.0},{ 2.0, -1.0, 0.0},{ 3.0, -3.0, 1.0}}

Definition at line 267 of file Extrapolate.h.

Referenced by ExtrapolateArray().

NekDouble Nektar::Extrapolate::StifflyStable_Gamma0_Coeffs
staticprotected
Initial value:
= {
1.0, 1.5, 11.0/6.0}

Definition at line 269 of file Extrapolate.h.

Referenced by AccelerationBDF(), AddVelBC(), and UpdateRobinPrimCoeff().