Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DisContField3DHomogeneous1D.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // File DisContField3DHomogeneous1D.cpp
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Field definition for 3D domain with boundary
33 // conditions using LDG flux and a 1D homogeneous direction
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
40 
41 
42 namespace Nektar
43 {
44  namespace MultiRegions
45  {
46 
49  m_bndCondExpansions(),
50  m_bndConditions()
51  {
52  }
53 
56  const LibUtilities::BasisKey &HomoBasis,
57  const NekDouble lhom,
58  const bool useFFT,
59  const bool dealiasing)
60  : ExpList3DHomogeneous1D(pSession,HomoBasis,lhom,useFFT,dealiasing),
61  m_bndCondExpansions(),
62  m_bndConditions()
63  {
64  }
65 
68  const bool DeclarePlanesSetCoeffPhys)
69  : ExpList3DHomogeneous1D (In,false),
70  m_bndCondExpansions (In.m_bndCondExpansions),
71  m_bndConditions (In.m_bndConditions)
72  {
73  if (DeclarePlanesSetCoeffPhys)
74  {
75  DisContField2DSharedPtr zero_plane =
76  boost::dynamic_pointer_cast<DisContField2D> (In.m_planes[0]);
77 
78  for(int n = 0; n < m_planes.num_elements(); ++n)
79  {
80  m_planes[n] =
82  AllocateSharedPtr(*zero_plane, false);
83  }
84 
85  SetCoeffPhys();
86  }
87  }
88 
91  const LibUtilities::BasisKey &HomoBasis,
92  const NekDouble lhom,
93  const bool useFFT,
94  const bool dealiasing,
96  const std::string &variable)
97  : ExpList3DHomogeneous1D(pSession, HomoBasis, lhom, useFFT,
98  dealiasing),
99  m_bndCondExpansions(),
100  m_bndConditions()
101  {
102  int i, n, nel;
103  DisContField2DSharedPtr plane_zero;
105 
106  // note that nzplanes can be larger than nzmodes
107  m_planes[0] = plane_zero = MemoryManager<DisContField2D>::
108  AllocateSharedPtr(pSession, graph2D, variable, true, false);
109 
112 
113  nel = m_planes[0]->GetExpSize();
114 
115  for (i = 0; i < nel; ++i)
116  {
117  (*m_exp).push_back(m_planes[0]->GetExp(i));
118  }
119 
120  for (n = 1; n < m_planes.num_elements(); ++n)
121  {
123  AllocateSharedPtr(*plane_zero, graph2D,
124  variable, true, false);
125  for(i = 0; i < nel; ++i)
126  {
127  (*m_exp).push_back((*m_exp)[i]);
128  }
129  }
130 
131  // Set up trace object.
132  Array<OneD, ExpListSharedPtr> trace(m_planes.num_elements());
133  for (n = 0; n < m_planes.num_elements(); ++n)
134  {
135  trace[n] = m_planes[n]->GetTrace();
136  }
137 
139  pSession, HomoBasis, lhom, useFFT, dealiasing, trace);
140 
141  // Setup default optimisation information
142  nel = GetExpSize();
143 
145  AllocateSharedPtr(nel);
146 
147  SetCoeffPhys();
148 
149  // Do not set up BCs if default variable
150  if(variable.compare("DefaultVar") != 0)
151  {
152  SetupBoundaryConditions(HomoBasis, lhom, bcs, variable);
153  }
154 
155  SetUpDG();
156  }
157 
158  /**
159  * @brief Default destructor
160  */
162  {
163  }
164 
166  const LibUtilities::BasisKey &HomoBasis,
167  const NekDouble lhom,
169  const std::string variable)
170  {
171  int n;
172 
173  // Setup an ExpList2DHomogeneous1D expansion for boundary
174  // conditions and link to class declared in m_planes
176  bcs.GetBoundaryRegions();
178  bcs.GetBoundaryConditions();
179  SpatialDomains::BoundaryRegionCollection::const_iterator it;
180 
181  // count the number of non-periodic boundary regions
182  int cnt = 0;
183  for (it = bregions.begin(); it != bregions.end(); ++it)
184  {
185  SpatialDomains::BoundaryConditionShPtr boundaryCondition =
186  GetBoundaryCondition(bconditions, it->first, variable);
187  if (boundaryCondition->GetBoundaryConditionType()
189  {
190  cnt++;
191  }
192  }
193 
195  ExpListSharedPtr>(cnt);
196  m_bndConditions = m_planes[0]->UpdateBndConditions();
197 
198  int nplanes = m_planes.num_elements();
200  PlanesBndCondExp(nplanes);
201 
202  cnt = 0;
203  for (it = bregions.begin(); it != bregions.end(); ++it)
204  {
205  SpatialDomains::BoundaryConditionShPtr boundaryCondition =
206  GetBoundaryCondition(bconditions, it->first, variable);
207  if(boundaryCondition->GetBoundaryConditionType() !=
209  {
210  for (n = 0; n < nplanes; ++n)
211  {
212  PlanesBndCondExp[n] = m_planes[n]->
214  }
215 
216  m_bndCondExpansions[cnt++] =
218  AllocateSharedPtr(m_session, HomoBasis, lhom,
219  m_useFFT, false,
220  PlanesBndCondExp);
221  }
222  }
223  EvaluateBoundaryConditions(0.0, variable);
224  }
225 
227  const NekDouble time,
228  const std::string varName)
229  {
230  int n;
232  Array<OneD, NekDouble> local_z(m_planes.num_elements());
233 
234  for (n = 0; n < m_planes.num_elements(); n++)
235  {
236  local_z[n] = z[m_transposition->GetPlaneID(n)];
237  }
238 
239  for (n = 0; n < m_planes.num_elements(); ++n)
240  {
241  m_planes[n]->EvaluateBoundaryConditions(
242  time, varName, 0.5*m_lhom*(1.0+local_z[n]));
243  }
244 
245  // Fourier transform coefficient space boundary values
246  // This will only be undertaken for time dependent
247  // boundary conditions unless time == 0.0 which is the
248  // case when the method is called from the constructor.
249  for (n = 0; n < m_bndCondExpansions.num_elements(); ++n)
250  {
251  if (time == 0.0 ||
252  m_bndConditions[n]->IsTimeDependent() ||
253  boost::iequals(m_bndConditions[n]->GetUserDefined(),
254  "MovingBody"))
255  {
256  m_bndCondExpansions[n]->HomogeneousFwdTrans(
259  }
260  }
261  }
262 
264  const Array<OneD, const NekDouble> &inarray,
265  Array<OneD, NekDouble> &outarray,
266  const FlagList &flags,
267  const StdRegions::ConstFactorMap &factors,
268  const StdRegions::VarCoeffMap &varcoeff,
269  const Array<OneD, const NekDouble> &dirForcing,
270  const bool PhysSpaceForcing)
271  {
272  int n;
273  int cnt = 0;
274  int cnt1 = 0;
275  NekDouble beta;
276  StdRegions::ConstFactorMap new_factors;
277 
279  Array<OneD, NekDouble> fce(inarray.num_elements());
281 
282  // Transform forcing function in half-physical space if required
283  if (m_WaveSpace)
284  {
285  fce = inarray;
286  }
287  else
288  {
289  HomogeneousFwdTrans(inarray,fce);
290  }
291 
292  for (n = 0; n < m_planes.num_elements(); ++n)
293  {
294  if (n != 1 || m_transposition->GetK(n) != 0)
295  {
296  beta = 2*M_PI*(m_transposition->GetK(n))/m_lhom;
297  new_factors = factors;
298  // add in Homogeneous Fourier direction and SVV if turned on
299  new_factors[StdRegions::eFactorLambda] +=
300  beta*beta*(1+GetSpecVanVisc(n));
301 
302  wfce = (PhysSpaceForcing)? fce+cnt:fce+cnt1;
303  m_planes[n]->HelmSolve(
304  wfce,
305  e_out = outarray + cnt1,
306  flags, new_factors, varcoeff, dirForcing,
307  PhysSpaceForcing);
308  }
309 
310  cnt += m_planes[n]->GetTotPoints();
311  cnt1 += m_planes[n]->GetNcoeffs();
312  }
313  }
314 
316  const NekDouble time,
317  const std::string varName,
318  const NekDouble x2_in,
319  const NekDouble x3_in)
320  {
321  EvaluateBoundaryConditions(time, varName);
322  }
323 
324  boost::shared_ptr<ExpList> &DisContField3DHomogeneous1D::
326  {
327  return UpdateBndCondExpansion(i);
328  }
329 
332  {
333  return UpdateBndConditions();
334  }
335 
337  Array<OneD, int> &ElmtID,
338  Array<OneD,int> &EdgeID)
339  {
340 
341  if(m_BCtoElmMap.num_elements() == 0)
342  {
343  Array<OneD, int> ElmtID_tmp;
344  Array<OneD, int> EdgeID_tmp;
345 
346  m_planes[0]->GetBoundaryToElmtMap(ElmtID_tmp, EdgeID_tmp);
347  int nel_per_plane = m_planes[0]->GetExpSize();
348  int nplanes = m_planes.num_elements();
349 
350  int MapSize = ElmtID_tmp.num_elements();
351 
352  m_BCtoElmMap = Array<OneD, int>(nplanes*MapSize);
353  m_BCtoEdgMap = Array<OneD, int>(nplanes*MapSize);
354 
355  // If this mesh (or partition) has no BCs, skip this step
356  if (MapSize > 0)
357  {
358  int i ,j, n, cnt;
359  int cntPlane = 0;
360  for (cnt=n=0; n < m_bndCondExpansions.num_elements(); ++n)
361  {
362  int planeExpSize = m_planes[0]
363  ->GetBndCondExpansions()[n]
364  ->GetExpSize();
365  for (i = 0; i < planeExpSize ; ++i, ++cntPlane)
366  {
367  for(j = 0; j < nplanes; j++)
368  {
369  m_BCtoElmMap[cnt+i+j*planeExpSize] =
370  ElmtID_tmp[cntPlane]+j*nel_per_plane;
371  m_BCtoEdgMap[cnt+i+j*planeExpSize] =
372  EdgeID_tmp[cntPlane];
373  }
374  }
375  cnt += m_bndCondExpansions[n]->GetExpSize();
376  }
377  }
378  }
379  ElmtID = m_BCtoElmMap;
380  EdgeID = m_BCtoEdgMap;
381  }
382 
384  boost::shared_ptr<ExpList> &result,
385  const bool DeclareCoeffPhysArrays)
386  {
387  int n, cnt, nq;
388  int offsetOld, offsetNew;
389 
390  std::vector<unsigned int> eIDs;
391  Array<OneD, int> ElmtID,EdgeID;
392  GetBoundaryToElmtMap(ElmtID,EdgeID);
393 
394  // Skip other boundary regions
395  for (cnt = n = 0; n < i; ++n)
396  {
397  cnt += m_bndCondExpansions[n]->GetExpSize();
398  }
399 
400  // Populate eIDs with information from BoundaryToElmtMap
401  for (n = 0; n < m_bndCondExpansions[i]->GetExpSize(); ++n)
402  {
403  eIDs.push_back(ElmtID[cnt+n]);
404  }
405 
406  // Create expansion list
407  result =
409  (*this, eIDs);
410 
411  // Copy phys and coeffs to new explist
412  if ( DeclareCoeffPhysArrays)
413  {
414  Array<OneD, NekDouble> tmp1, tmp2;
415  for (n = 0; n < result->GetExpSize(); ++n)
416  {
417  nq = GetExp(ElmtID[cnt+n])->GetTotPoints();
418  offsetOld = GetPhys_Offset(ElmtID[cnt+n]);
419  offsetNew = result->GetPhys_Offset(n);
420  Vmath::Vcopy(nq, tmp1 = GetPhys()+ offsetOld, 1,
421  tmp2 = result->UpdatePhys()+ offsetNew, 1);
422 
423  nq = GetExp(ElmtID[cnt+n])->GetNcoeffs();
424  offsetOld = GetCoeff_Offset(ElmtID[cnt+n]);
425  offsetNew = result->GetCoeff_Offset(n);
426  Vmath::Vcopy(nq, tmp1 = GetCoeffs()+ offsetOld, 1,
427  tmp2 = result->UpdateCoeffs()+ offsetNew, 1);
428  }
429  }
430 
431  // Set wavespace value
432  result->SetWaveSpace(GetWaveSpace());
433  }
434 
436  Array<OneD, NekDouble> &BndVals,
437  const Array<OneD, NekDouble> &TotField,
438  int BndID)
439  {
442 
444  Array<OneD, NekDouble> tmp_BC;
445 
446  int cnt = 0;
447  int pos = 0;
448  int exp_size, exp_size_per_plane, elmtID, boundaryID;
449  int offset, exp_dim;
450 
451  for (int k = 0; k < m_planes.num_elements(); k++)
452  {
453  for (int n = 0; n < m_bndConditions.num_elements(); ++n)
454  {
455  exp_size = m_bndCondExpansions[n]->GetExpSize();
456  exp_size_per_plane = exp_size/m_planes.num_elements();
457 
458  for (int i = 0; i < exp_size_per_plane; i++)
459  {
460  if(n == BndID)
461  {
462  elmtID = m_BCtoElmMap[cnt];
463  boundaryID = m_BCtoEdgMap[cnt];
464  exp_dim = m_bndCondExpansions[n]->
465  GetExp(i+k*exp_size_per_plane)->GetTotPoints();
466  offset = GetPhys_Offset(elmtID);
467  elmt = GetExp(elmtID);
468  temp_BC_exp = boost::dynamic_pointer_cast<
470  m_bndCondExpansions[n]->GetExp(
471  i+k*exp_size_per_plane));
472 
473  elmt->GetEdgePhysVals(boundaryID, temp_BC_exp,
474  tmp_Tot = TotField + offset,
475  tmp_BC = BndVals + pos);
476  pos += exp_dim;
477  }
478  cnt++;
479  }
480  }
481  }
482  }
483 
487  Array<OneD, NekDouble> &outarray,
488  int BndID)
489  {
492 
493  Array<OneD, NekDouble> tmp_V1;
494  Array<OneD, NekDouble> tmp_V2;
495  Array<OneD, NekDouble> tmp_outarray;
496 
497  int cnt = 0;
498  int exp_size, exp_size_per_plane, elmtID, Phys_offset, Coef_offset;
499 
500  for(int k = 0; k < m_planes.num_elements(); k++)
501  {
502  for(int n = 0; n < m_bndConditions.num_elements(); ++n)
503  {
504  exp_size = m_bndCondExpansions[n]->GetExpSize();
505  exp_size_per_plane = exp_size/m_planes.num_elements();
506 
507  for(int i = 0; i < exp_size_per_plane; i++)
508  {
509  if(n == BndID)
510  {
511  elmtID = m_BCtoElmMap[cnt];
512 
513  Phys_offset = m_bndCondExpansions[n]->
514  GetPhys_Offset(i+k*exp_size_per_plane);
515  Coef_offset = m_bndCondExpansions[n]->
516  GetCoeff_Offset(i+k*exp_size_per_plane);
517 
518  elmt = GetExp(elmtID);
519  temp_BC_exp = boost::dynamic_pointer_cast<
521  m_bndCondExpansions[n]->GetExp(
522  i+k*exp_size_per_plane));
523 
524  temp_BC_exp->NormVectorIProductWRTBase(
525  tmp_V1 = V1 + Phys_offset,
526  tmp_V2 = V2 + Phys_offset,
527  tmp_outarray = outarray + Coef_offset);
528  }
529  cnt++;
530  }
531  }
532  }
533  }
534 
536  Array<OneD, NekDouble> &outarray)
537  {
538  ASSERTL1(m_physState == true,
539  "Field must be in physical state to extract trace space.");
540 
541  v_ExtractTracePhys(m_phys, outarray);
542  }
543 
544  /**
545  * @brief This method extracts the trace (edges in 2D) for each plane
546  * from the field @a inarray and puts the values in @a outarray.
547  *
548  * It assumes the field is C0 continuous so that it can overwrite the
549  * edge data when visited by the two adjacent elements.
550  *
551  * @param inarray An array containing the 2D data from which we wish
552  * to extract the edge data.
553  * @param outarray The resulting edge information.
554  */
556  const Array<OneD, const NekDouble> &inarray,
557  Array<OneD, NekDouble> &outarray)
558  {
559  int nPoints_plane = m_planes[0]->GetTotPoints();
560  int nTracePts = m_planes[0]->GetTrace()->GetTotPoints();
561 
562  for (int i = 0; i < m_planes.num_elements(); ++i)
563  {
564  Array<OneD, NekDouble> inarray_plane(nPoints_plane, 0.0);
565  Array<OneD, NekDouble> outarray_plane(nPoints_plane, 0.0);
566 
567  Vmath::Vcopy(nPoints_plane,
568  &inarray[i*nPoints_plane], 1,
569  &inarray_plane[0], 1);
570 
571  m_planes[i]->ExtractTracePhys(inarray_plane, outarray_plane);
572 
573  Vmath::Vcopy(nTracePts,
574  &outarray_plane[0], 1,
575  &outarray[i*nTracePts], 1);
576  }
577  }
578 
579  /**
580  */
582  Array<OneD, Array<OneD, NekDouble> > &normals)
583  {
584  int j, n, cnt, nq;
585  int expdim = GetCoordim(0);
586  int coordim = 3;
589 
590  Array<OneD, int> ElmtID,EdgeID;
591  GetBoundaryToElmtMap(ElmtID,EdgeID);
592 
593  // Initialise result
594  normals = Array<OneD, Array<OneD, NekDouble> > (coordim);
595  for (j = 0; j < coordim; ++j)
596  {
597  normals[j] = Array<OneD, NekDouble> (
598  GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
599  }
600 
601  // Skip other boundary regions
602  for (cnt = n = 0; n < i; ++n)
603  {
604  cnt += GetBndCondExpansions()[n]->GetExpSize();
605  }
606 
607  int offset;
608  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
609  {
610  offset = GetBndCondExpansions()[i]->GetPhys_Offset(n);
611  nq = GetBndCondExpansions()[i]->GetExp(n)->GetTotPoints();
612 
613  elmt = GetExp(ElmtID[cnt+n]);
614  const Array<OneD, const Array<OneD, NekDouble> > normalsElmt
615  = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
616  // Copy to result
617  for (j = 0; j < expdim; ++j)
618  {
619  Vmath::Vcopy(nq, normalsElmt[j], 1,
620  tmp = normals[j] + offset, 1);
621  }
622  }
623  }
624 
625  /**
626  * @brief Set up all DG member variables and maps.
627  */
629  {
630  const int nPlanes = m_planes.num_elements();
631  const int nTracePlane = m_planes[0]->GetTrace()->GetExpSize();
632 
633  // Get trace map from first plane.
634  AssemblyMapDGSharedPtr traceMap = m_planes[0]->GetTraceMap();
635  const Array<OneD, const int> &traceBndMap
636  = traceMap->GetBndCondTraceToGlobalTraceMap();
637  int mapSize = traceBndMap.num_elements();
638 
639  // Set up trace boundary map
640  m_traceBndMap = Array<OneD, int>(nPlanes * mapSize);
641 
642  int i, n, e, cnt = 0, cnt1 = 0;
643 
644  for (i = 0; i < m_bndCondExpansions.num_elements(); ++i)
645  {
646  int nExp = m_bndCondExpansions[i]->GetExpSize();
647  int nPlaneExp = nExp / nPlanes;
648 
649  for (n = 0; n < nPlanes; ++n)
650  {
651  const int offset = n * nTracePlane;
652  for (e = 0; e < nPlaneExp; ++e)
653  {
654  m_traceBndMap[cnt++] = offset + traceBndMap[cnt1+e];
655  }
656  }
657 
658  cnt1 += nPlaneExp;
659  }
660  }
661  } // end of namespace
662 } //end of namespace
boost::shared_ptr< AssemblyMapDG > AssemblyMapDGSharedPtr
Definition: AssemblyMapDG.h:49
const Array< OneD, const NekDouble > & GetCoeffs() const
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
Definition: ExpList.h:1946
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
Definition: ExpList.h:2084
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1060
LibUtilities::TranspositionSharedPtr m_transposition
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
Definition: ExpList.h:2092
const BoundaryConditionCollection & GetBoundaryConditions(void) const
Definition: Conditions.h:248
Array< OneD, NekDouble > & UpdateCoeffs()
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
Definition: ExpList.h:2111
void SetUpDG()
Set up all DG member variables and maps.
boost::shared_ptr< ExpList > & UpdateBndCondExpansion(int i)
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2075
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
Definition: StdExpansion.h:733
Array< OneD, int > m_BCtoElmMap
Storage space for the boundary to element and boundary to trace map. This member variable is really a...
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:252
NekDouble m_lhom
Width of homogeneous direction.
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
int GetExpSize(void)
This function returns the number of elements in the expansion.
Definition: ExpList.h:2054
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
virtual void v_ExtractTracePhys(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This method extracts the trace (edges in 2D) for each plane from the field inarray and puts the value...
Array< OneD, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
An object which contains the discretised boundary conditions.
virtual void v_GetBndElmtExpansion(int i, boost::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
LibUtilities::BasisSharedPtr m_homogeneousBasis
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
Definition: Conditions.h:217
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
boost::shared_ptr< DisContField2D > DisContField2DSharedPtr
boost::shared_ptr< StdExpansion1D > StdExpansion1DSharedPtr
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
Array< OneD, ExpListSharedPtr > m_planes
double NekDouble
Defines a list of flags.
void HomogeneousFwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
std::map< int, BoundaryConditionMapShPtr > BoundaryConditionCollection
Definition: Conditions.h:226
void SetupBoundaryConditions(const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom, SpatialDomains::BoundaryConditions &bcs, const std::string variable)
const Array< OneD, const NekDouble > & GetPhys() const
This function returns (a reference to) the array (implemented as m_phys) containing the function ev...
Definition: ExpList.h:2045
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & UpdateBndConditions()
const Array< OneD, const MultiRegions::ExpListSharedPtr > & GetBndCondExpansions()
void GetEdgePhysVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Extract the physical values along edge edge from inarray into outarray following the local edge orien...
Definition: StdExpansion.h:876
virtual void v_EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="", const NekDouble x2_in=NekConstants::kNekUnsetDouble, const NekDouble x3_in=NekConstants::kNekUnsetDouble)
void GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
This funtion extract form a vector containing a full 3D-homogenous-1D field the value associated with...
void NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
This function calculate the inner product of two vectors (V1 and V2) respect to the basis along a bou...
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Set up a list of element ids and edge ids the link to the boundary conditions.
static SpatialDomains::BoundaryConditionShPtr GetBoundaryCondition(const SpatialDomains::BoundaryConditionCollection &collection, unsigned int index, const std::string &variable)
Definition: ExpList.cpp:3037
const BoundaryRegionCollection & GetBoundaryRegions(void) const
Definition: Conditions.h:238
bool GetWaveSpace(void) const
This function returns the third direction expansion condition, which can be in wave space (coefficien...
Definition: ExpList.h:1592
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1906
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:219
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="")
This function evaluates the boundary conditions at a certaintime-level.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:442
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
Describes the specification for a Basis.
Definition: Basis.h:50
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
An array which contains the information about the boundary condition on the different boundary region...