44 namespace MultiRegions
49 m_bndCondExpansions(),
59 const bool dealiasing)
61 m_bndCondExpansions(),
68 const bool DeclarePlanesSetCoeffPhys)
70 m_bndCondExpansions (In.m_bndCondExpansions),
71 m_bndConditions (In.m_bndConditions)
73 if (DeclarePlanesSetCoeffPhys)
78 for(
int n = 0; n <
m_planes.num_elements(); ++n)
94 const bool dealiasing,
96 const std::string &variable)
99 m_bndCondExpansions(),
115 for (i = 0; i < nel; ++i)
120 for (n = 1; n <
m_planes.num_elements(); ++n)
124 variable,
true,
false);
125 for(i = 0; i < nel; ++i)
127 (*m_exp).push_back((*
m_exp)[i]);
132 Array<OneD, ExpListSharedPtr> trace(
m_planes.num_elements());
133 for (n = 0; n <
m_planes.num_elements(); ++n)
139 pSession, HomoBasis, lhom, useFFT, dealiasing, trace);
150 if(variable.compare(
"DefaultVar") != 0)
169 const std::string variable)
179 SpatialDomains::BoundaryRegionCollection::const_iterator it;
183 for (it = bregions.begin(); it != bregions.end(); ++it)
187 if (boundaryCondition->GetBoundaryConditionType()
198 int nplanes =
m_planes.num_elements();
199 Array<OneD, MultiRegions::ExpListSharedPtr>
200 PlanesBndCondExp(nplanes);
203 for (it = bregions.begin(); it != bregions.end(); ++it)
207 if(boundaryCondition->GetBoundaryConditionType() !=
210 for (n = 0; n < nplanes; ++n)
228 const std::string varName)
232 Array<OneD, NekDouble> local_z(
m_planes.num_elements());
234 for (n = 0; n <
m_planes.num_elements(); n++)
239 for (n = 0; n <
m_planes.num_elements(); ++n)
241 m_planes[n]->EvaluateBoundaryConditions(
242 time, varName, 0.5*
m_lhom*(1.0+local_z[n]));
262 const Array<OneD, const NekDouble> &inarray,
263 Array<OneD, NekDouble> &outarray,
267 const Array<OneD, const NekDouble> &dirForcing)
275 Array<OneD, NekDouble> e_out;
276 Array<OneD, NekDouble> fce(inarray.num_elements());
288 for (n = 0; n <
m_planes.num_elements(); ++n)
293 new_factors = factors;
299 e_out = outarray + cnt1,
300 flags, new_factors, varcoeff, dirForcing);
310 const std::string varName,
323 Array<OneD, SpatialDomains::BoundaryConditionShPtr>
330 Array<OneD, int> &ElmtID,
331 Array<OneD,int> &EdgeID)
336 Array<OneD, int> ElmtID_tmp;
337 Array<OneD, int> EdgeID_tmp;
339 m_planes[0]->GetBoundaryToElmtMap(ElmtID_tmp, EdgeID_tmp);
340 int nel_per_plane =
m_planes[0]->GetExpSize();
341 int nplanes =
m_planes.num_elements();
343 int MapSize = ElmtID_tmp.num_elements();
345 ElmtID = Array<OneD, int>(nplanes*MapSize);
346 EdgeID = Array<OneD, int>(nplanes*MapSize);
351 for(
int i = 0; i < nplanes; i++)
353 for(
int j = 0; j < MapSize; j++)
355 ElmtID[j+i*MapSize] = ElmtID_tmp[j]+i*nel_per_plane;
356 EdgeID[j+i*MapSize] = EdgeID_tmp[j];
370 ElmtID = Array<OneD, int>(MapSize);
371 EdgeID = Array<OneD, int>(MapSize);
379 Array<OneD, NekDouble> &BndVals,
380 const Array<OneD, NekDouble> &TotField,
386 Array<OneD, const NekDouble> tmp_Tot;
387 Array<OneD, NekDouble> tmp_BC;
391 int exp_size, exp_size_per_plane, elmtID, boundaryID;
394 for (
int k = 0; k <
m_planes.num_elements(); k++)
399 exp_size_per_plane = exp_size/
m_planes.num_elements();
401 for (
int i = 0; i < exp_size_per_plane; i++)
408 GetExp(i+k*exp_size_per_plane)->GetTotPoints();
411 temp_BC_exp = boost::dynamic_pointer_cast<
414 i+k*exp_size_per_plane));
417 tmp_Tot = TotField + offset,
418 tmp_BC = BndVals + pos);
428 Array<OneD, const NekDouble> &V1,
429 Array<OneD, const NekDouble> &V2,
430 Array<OneD, NekDouble> &outarray,
436 Array<OneD, NekDouble> tmp_V1;
437 Array<OneD, NekDouble> tmp_V2;
438 Array<OneD, NekDouble> tmp_outarray;
441 int exp_size, exp_size_per_plane, elmtID, Phys_offset, Coef_offset;
443 for(
int k = 0; k <
m_planes.num_elements(); k++)
448 exp_size_per_plane = exp_size/
m_planes.num_elements();
450 for(
int i = 0; i < exp_size_per_plane; i++)
462 temp_BC_exp = boost::dynamic_pointer_cast<
465 i+k*exp_size_per_plane));
468 tmp_V1 = V1 + Phys_offset,
469 tmp_V2 = V2 + Phys_offset,
470 tmp_outarray = outarray + Coef_offset);
479 Array<OneD, NekDouble> &outarray)
482 "Field must be in physical state to extract trace space.");
499 const Array<OneD, const NekDouble> &inarray,
500 Array<OneD, NekDouble> &outarray)
502 int nPoints_plane =
m_planes[0]->GetTotPoints();
503 int nTracePts =
m_planes[0]->GetTrace()->GetTotPoints();
505 for (
int i = 0; i <
m_planes.num_elements(); ++i)
507 Array<OneD, NekDouble> inarray_plane(nPoints_plane, 0.0);
508 Array<OneD, NekDouble> outarray_plane(nPoints_plane, 0.0);
511 &inarray[i*nPoints_plane], 1,
512 &inarray_plane[0], 1);
514 m_planes[i]->ExtractTracePhys(inarray_plane, outarray_plane);
517 &outarray_plane[0], 1,
518 &outarray[i*nTracePts], 1);
527 const int nPlanes =
m_planes.num_elements();
528 const int nTracePlane =
m_planes[0]->GetTrace()->GetExpSize();
532 const Array<OneD, const int> &traceBndMap
533 = traceMap->GetBndCondTraceToGlobalTraceMap();
534 int mapSize = traceBndMap.num_elements();
539 int i, n, e, cnt = 0, cnt1 = 0;
544 int nPlaneExp = nExp / nPlanes;
546 for (n = 0; n < nPlanes; ++n)
548 const int offset = n * nTracePlane;
549 for (e = 0; e < nPlaneExp; ++e)