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 1042 of file Extrapolate.cpp.

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

Referenced by AddDuDt().

1044  {
1045  int nlevels = array.num_elements();
1046  int nPts = array[0].num_elements();
1047 
1048 
1049  if(nPts)
1050  {
1051  // Update array
1052  RollOver(array);
1053 
1054  // Calculate acceleration using Backward Differentiation Formula
1055  Array<OneD, NekDouble> accelerationTerm (nPts, 0.0);
1056  if (m_pressureCalls > 2)
1057  {
1058  int acc_order = min(m_pressureCalls-2,m_intSteps);
1059  Vmath::Smul(nPts,
1060  StifflyStable_Gamma0_Coeffs[acc_order-1],
1061  array[0], 1,
1062  accelerationTerm, 1);
1063 
1064  for(int i = 0; i < acc_order; i++)
1065  {
1066  Vmath::Svtvp(nPts,
1067  -1*StifflyStable_Alpha_Coeffs[acc_order-1][i],
1068  array[i+1], 1,
1069  accelerationTerm, 1,
1070  accelerationTerm, 1);
1071  }
1072  }
1073  array[nlevels-1] = accelerationTerm;
1074  }
1075  }
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 1077 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().

1078  {
1079  int n, cnt;
1080  for(cnt = n = 0; n < m_PBndConds.num_elements(); ++n)
1081  {
1082  if((m_hbcType[n] == eHBCNeumann)||(m_hbcType[n] == eConvectiveOBC))
1083  {
1084  int nq = m_PBndExp[n]->GetNcoeffs();
1085  Vmath::Vcopy(nq, &(m_pressureHBCs[m_intSteps-1])[cnt], 1,
1086  &(m_PBndExp[n]->UpdateCoeffs()[0]), 1);
1087  cnt += nq;
1088  }
1089  }
1090  }
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 1013 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().

1015  {
1016  int nint = min(m_pressureCalls,m_intSteps);
1017  int nlevels = array.num_elements();
1018  int nPts = array[0].num_elements();
1019 
1020  // Update array
1021  RollOver(array);
1022 
1023  // Extrapolate to outarray
1024  Vmath::Smul(nPts, StifflyStable_Alpha_Coeffs[nint-1][nint-1],
1025  array[nint-1], 1,
1026  array[nlevels-1], 1);
1027 
1028  for(int n = 0; n < nint-1; ++n)
1029  {
1030  Vmath::Svtvp(nPts, StifflyStable_Alpha_Coeffs[nint-1][n],
1031  array[n],1, array[nlevels-1],1,
1032  array[nlevels-1],1);
1033  }
1034  }
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 983 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().

985  {
986  int nint = min(m_pressureCalls,m_intSteps);
987  int nlevels = array.num_elements();
988  int nPts = array[0].num_elements();
989 
990  // Update array
991  RollOver(array);
992 
993  // Extrapolate to outarray
994  Vmath::Smul(nPts, StifflyStable_Betaq_Coeffs[nint-1][nint-1],
995  array[nint-1], 1,
996  array[nlevels-1], 1);
997 
998  for(int n = 0; n < nint-1; ++n)
999  {
1000  Vmath::Svtvp(nPts, StifflyStable_Betaq_Coeffs[nint-1][n],
1001  array[n],1, array[nlevels-1],1,
1002  array[nlevels-1],1);
1003  }
1004  }
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 634 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.

635  {
636  m_PBndConds = m_pressure->GetBndConditions();
637  m_PBndExp = m_pressure->GetBndCondExpansions();
638 
639  int cnt, n;
640 
641  // Storage array for high order pressure BCs
642  m_pressureHBCs = Array<OneD, Array<OneD, NekDouble> > (m_intSteps);
643  m_iprodnormvel = Array<OneD, Array<OneD, NekDouble> > (m_intSteps + 1);
644 
645  // Get useful values for HOBCs
646  m_HBCnumber = 0;
647  m_numHBCDof = 0;
648 
649  int outHBCnumber = 0;
650  int numOutHBCPts = 0;
651 
652  m_hbcType = Array<OneD, HBCType> (m_PBndConds.num_elements(),eNOHBC);
653  for( n = 0; n < m_PBndConds.num_elements(); ++n)
654  {
655  // High order boundary Neumann Condiiton
656  if(boost::iequals(m_PBndConds[n]->GetUserDefined(),"H"))
657  {
658  m_hbcType[n] = eHBCNeumann;
659  m_numHBCDof += m_PBndExp[n]->GetNcoeffs();
660  m_HBCnumber += m_PBndExp[n]->GetExpSize();
661  }
662 
663  // High order outflow convective condition
664  if(m_PBndConds[n]->GetBoundaryConditionType() ==
666  boost::iequals(m_PBndConds[n]->GetUserDefined(),
667  "HOutflow"))
668  {
670  m_numHBCDof += m_PBndExp[n]->GetNcoeffs();
671  m_HBCnumber += m_PBndExp[n]->GetExpSize();
672  numOutHBCPts += m_PBndExp[n]->GetTotPoints();
673  outHBCnumber++;
674  }
675  // High order outflow boundary condition;
676  else if(boost::iequals(m_PBndConds[n]->GetUserDefined(),
677  "HOutflow"))
678  {
679  m_hbcType[n] = eOBC;
680  numOutHBCPts += m_PBndExp[n]->GetTotPoints();
681  outHBCnumber++;
682  }
683  }
684 
685  m_iprodnormvel[0] = Array<OneD, NekDouble>(m_numHBCDof, 0.0);
686  for(n = 0; n < m_intSteps; ++n)
687  {
688  m_pressureHBCs[n] = Array<OneD, NekDouble>(m_numHBCDof, 0.0);
689  m_iprodnormvel[n+1] = Array<OneD, NekDouble>(m_numHBCDof, 0.0);
690  }
691 
692  m_pressureCalls = 0;
693 
694  switch(m_pressure->GetExpType())
695  {
696  case MultiRegions::e2D:
697  {
698  m_curl_dim = 2;
699  m_bnd_dim = 2;
700  }
701  break;
703  {
704  m_curl_dim = 3;
705  m_bnd_dim = 2;
706  }
707  break;
709  {
710  m_curl_dim = 3;
711  m_bnd_dim = 1;
712  }
713  break;
714  case MultiRegions::e3D:
715  {
716  m_curl_dim = 3;
717  m_bnd_dim = 3;
718  }
719  break;
720  default:
721  ASSERTL0(0,"Dimension not supported");
722  break;
723  }
724 
725  // Initialise storage for outflow HOBCs
726  if(numOutHBCPts > 0)
727  {
728  m_houtflow = MemoryManager<HighOrderOutflow>::AllocateSharedPtr(numOutHBCPts, outHBCnumber, m_curl_dim, pSession);
729 
731 
732  // set up boundary expansions link
733  for (int i = 0; i < m_curl_dim; ++i)
734  {
735  m_houtflow->m_UBndExp[i] =
736  m_fields[m_velocity[i]]->GetBndCondExpansions();
737  }
738 
739  for(n = 0, cnt = 0; n < m_PBndConds.num_elements(); ++n)
740  {
741  if(boost::iequals(m_PBndConds[n]->GetUserDefined(),"HOutflow"))
742  {
743  m_houtflow->m_outflowVel[cnt] =
744  Array<OneD, Array<OneD,
745  Array<OneD, NekDouble> > > (m_curl_dim);
746 
747  m_houtflow->m_outflowVelBnd[cnt] =
748  Array<OneD, Array<OneD,
749  Array<OneD, NekDouble> > > (m_curl_dim);
750 
751  m_fields[0]->GetBndElmtExpansion(n, BndElmtExp, false);
752  int nqb = m_PBndExp[n]->GetTotPoints();
753  int nq = BndElmtExp->GetTotPoints();
754  for(int j = 0; j < m_curl_dim; ++j)
755  {
756  m_houtflow->m_outflowVel[cnt][j] =
757  Array<OneD, Array<OneD, NekDouble> > (m_intSteps);
758 
759  m_houtflow->m_outflowVelBnd[cnt][j] =
760  Array<OneD, Array<OneD, NekDouble> > (m_intSteps);
761 
762  for(int k = 0; k < m_intSteps; ++k)
763  {
764  m_houtflow->m_outflowVel[cnt][j][k] =
765  Array<OneD, NekDouble>(nq,0.0);
766  m_houtflow->m_outflowVelBnd[cnt][j][k] =
767  Array<OneD, NekDouble>(nqb,0.0);
768  }
769  }
770  cnt++;
771  }
772 
773  // evaluate convective primitive coefficient if
774  // convective OBCs are used
775  if(m_hbcType[n] == eConvectiveOBC)
776  {
777  // initialise convective members of
778  // HighOrderOutflow struct
779  if(m_houtflow->m_pressurePrimCoeff.num_elements() == 0)
780  {
781  m_houtflow->m_pressurePrimCoeff =
782  Array<OneD, NekDouble>
783  (m_PBndConds.num_elements(),0.0);
784  m_houtflow->m_velocityPrimCoeff =
785  Array<OneD, Array< OneD, NekDouble> >(m_curl_dim);
786 
787 
788  for(int i = 0; i < m_curl_dim; ++i)
789  {
790  m_houtflow->m_velocityPrimCoeff[i] =
791  Array<OneD, NekDouble> (m_PBndConds.
792  num_elements(),0.0);
793  }
794  }
795 
796  LibUtilities::Equation coeff =
797  boost::static_pointer_cast<
798  SpatialDomains::RobinBoundaryCondition
799  >(m_PBndConds[n])->m_robinPrimitiveCoeff;
800 
801  // checkout equation evaluation options!!
802  m_houtflow->m_pressurePrimCoeff[n] = coeff.Evaluate();
803 
804  for (int i = 0; i < m_curl_dim; ++i)
805  {
806  Array<OneD, const SpatialDomains::BoundaryConditionShPtr>
807  UBndConds = m_fields[m_velocity[i]]->GetBndConditions();
808 
809  LibUtilities::Equation coeff1 =
810  boost::static_pointer_cast<
811  SpatialDomains::RobinBoundaryCondition
812  >(UBndConds[n])->m_robinPrimitiveCoeff;
813 
814 
815  m_houtflow->m_defVelPrimCoeff[i] = coeff1.GetExpression();
816 
817  ASSERTL1(UBndConds[n]->GetBoundaryConditionType()
818  == SpatialDomains::eRobin,"Require Velocity "
819  "conditions to be of Robin type when pressure"
820  "outflow is specticied as Robin Boundary type");
821 
822 
823  // checkout equation evaluation options!!
824  m_houtflow->m_velocityPrimCoeff[i][n] = coeff1.Evaluate();
825  }
826  }
827  }
828 
829  }
830  }
#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 875 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().

877  {
878  // Checking if the problem is 2D
879  ASSERTL0(m_curl_dim >= 2, "Method not implemented for 1D");
880 
881  int n_points_0 = m_fields[0]->GetExp(0)->GetTotPoints();
882  int n_element = m_fields[0]->GetExpSize();
883  int nvel = inarray.num_elements();
884  int cnt;
885 
886  NekDouble pntVelocity;
887 
888  // Getting the standard velocity vector
889  Array<OneD, Array<OneD, NekDouble> > stdVelocity(nvel);
890  Array<OneD, NekDouble> tmp;
891  Array<OneD, NekDouble> maxV(n_element, 0.0);
893 
894  for (int i = 0; i < nvel; ++i)
895  {
896  stdVelocity[i] = Array<OneD, NekDouble>(n_points_0);
897  }
898 
899  cnt = 0.0;
900  for (int el = 0; el < n_element; ++el)
901  {
902  int n_points = m_fields[0]->GetExp(el)->GetTotPoints();
903  ptsKeys = m_fields[0]->GetExp(el)->GetPointsKeys();
904 
905  // reset local space
906  if(n_points != n_points_0)
907  {
908  for (int j = 0; j < nvel; ++j)
909  {
910  stdVelocity[j] = Array<OneD, NekDouble>(n_points, 0.0);
911  }
912  n_points_0 = n_points;
913  }
914  else
915  {
916  for (int j = 0; j < nvel; ++j)
917  {
918  Vmath::Zero( n_points, stdVelocity[j], 1);
919  }
920  }
921 
922  Array<TwoD, const NekDouble> gmat =
923  m_fields[0]->GetExp(el)->GetGeom()->GetMetricInfo()->GetDerivFactors(ptsKeys);
924 
925  if (m_fields[0]->GetExp(el)->GetGeom()->GetMetricInfo()->GetGtype()
927  {
928  for(int j = 0; j < nvel; ++j)
929  {
930  for(int k = 0; k < nvel; ++k)
931  {
932  Vmath::Vvtvp( n_points, gmat[k*nvel + j], 1,
933  tmp = inarray[k] + cnt, 1,
934  stdVelocity[j], 1,
935  stdVelocity[j], 1);
936  }
937  }
938  }
939  else
940  {
941  for(int j = 0; j < nvel; ++j)
942  {
943  for(int k = 0; k < nvel; ++k)
944  {
945  Vmath::Svtvp( n_points, gmat[k*nvel + j][0],
946  tmp = inarray[k] + cnt, 1,
947  stdVelocity[j], 1,
948  stdVelocity[j], 1);
949  }
950  }
951  }
952  cnt += n_points;
953 
954  // Calculate total velocity in stdVelocity[0]
955  Vmath::Vmul( n_points, stdVelocity[0], 1, stdVelocity[0], 1,
956  stdVelocity[0], 1);
957  for(int k = 1; k < nvel; ++k)
958  {
959  Vmath::Vvtvp( n_points, stdVelocity[k], 1,
960  stdVelocity[k], 1,
961  stdVelocity[0], 1,
962  stdVelocity[0], 1);
963  }
964  pntVelocity = Vmath::Vmax( n_points, stdVelocity[0], 1);
965  maxV[el] = sqrt(pntVelocity);
966  }
967 
968  return maxV;
969  }
#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]->BwdTrans(VelBndExp[i][n]->GetCoeffs(),
594  velbc[i]);
595  }
596  IProdVnTmp = IProdVn + cnt;
597  m_PBndExp[n]->NormVectorIProductWRTBase(velbc, IProdVnTmp);
598  cnt += m_PBndExp[n]->GetNcoeffs();
599  }
600  else if(m_hbcType[n] == eConvectiveOBC)
601  {
602  // skip over convective OBC
603  cnt += m_PBndExp[n]->GetNcoeffs();
604  }
605  }
606  }
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 614 of file Extrapolate.cpp.

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

615  {
616  int nlevels = input.num_elements();
617 
618  Array<OneD, NekDouble> tmp;
619 
620  tmp = input[nlevels-1];
621 
622  for(int n = nlevels-1; n > 0; --n)
623  {
624  input[n] = input[n-1];
625  }
626 
627  input[0] = tmp;
628  }
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 832 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().

833  {
834 
835  if((m_pressureCalls == 1) || (m_pressureCalls > m_intSteps))
836  {
837  return;
838  }
839 
840  for(int n = 0; n < m_PBndConds.num_elements(); ++n)
841  {
842  // Get expansion with element on this boundary
843  if(m_hbcType[n] == eConvectiveOBC)
844  {
845  for (int i = 0; i < m_curl_dim; ++i)
846  {
847  Array<OneD, SpatialDomains::BoundaryConditionShPtr>
848  UBndConds = m_fields[m_velocity[i]]->UpdateBndConditions();
849 
850  std::string primcoeff = m_houtflow->m_defVelPrimCoeff[i] + "*" +
851  boost::lexical_cast<std::string>(StifflyStable_Gamma0_Coeffs
852  [m_pressureCalls-1]);
853 
855  boost::dynamic_pointer_cast<
856  SpatialDomains::RobinBoundaryCondition >(UBndConds[n]);
857 
860  m_session,rcond->m_robinFunction.GetExpression(),
861  primcoeff,
862  rcond->GetUserDefined(),
863  rcond->m_filename);
864 
865  UBndConds[n] = bcond;
866  }
867 
868  }
869  }
870  }
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().