35 #include <boost/core/ignore_unused.hpp>    70     namespace MultiRegions
   106                       ::AllocateSharedPtr()),
   132                       ::AllocateSharedPtr()),
   159                       ::AllocateSharedPtr()),
   174                          const std::vector<unsigned int> &eIDs,
   175                          const bool DeclareCoeffPhysArrays):
   185                       ::AllocateSharedPtr()),
   193             for (
int i=0; i < eIDs.size(); ++i)
   195                 (*m_exp).push_back( (*(in.
m_exp))[eIDs[i]]);
   197                 m_npoints += (*m_exp)[i]->GetTotPoints();
   200             if(DeclareCoeffPhysArrays)
   232             if(DeclareCoeffPhysArrays)
   259             for(i = 0; i < 
m_exp->size(); ++i)
   263                 m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
   264                 m_npoints += (*m_exp)[i]->GetTotPoints();
   307                      "local physical space is not true ");
   335             for(i = 0; i < (*m_exp).size(); ++i)
   359             int nrows = blockmat->GetRows();
   360             int ncols = blockmat->GetColumns();
   367             out = (*blockmat)*in;
   417             for(i = 0; i < (*m_exp).size(); ++i)
   419                 (*m_exp)[i]->IProductWRTDerivBase(dir,inarray+
m_phys_offset[i],
   435             int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
   436             int nq      = direction.num_elements()/coordim;
   443             for(
int i = 0; i < (*m_exp).size(); ++i)
   445                 npts_e = (*m_exp)[i]->GetTotPoints();
   448                 for (
int k = 0; k<coordim; ++k)
   451                                          &locdir[k*npts_e],                 1);
   454                 (*m_exp)[i]->IProductWRTDirectionalDerivBase(
   480             ASSERTL1(inarray.num_elements() >= dim,
"inarray is not of sufficient dimension");
   515                 ASSERTL0(
false,
"Dimension of inarray not correct");
   565                 e_out_d0 = out_d0  + offset;
   566                 e_out_d1 = out_d1  + offset;
   567                 e_out_d2 = out_d2  + offset;
   571                                                e_out_d0,e_out_d1, e_out_d2);
   591                 for(i=0; i<(*m_exp).size(); ++i)
   594                     (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
   600                 for(i=0; i<(*m_exp).size(); i++)
   603                     (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
   609                 int intdir= (int)edir;
   615                     e_out_d  = out_d  + offset;
   634             bool halfMode = 
false;
   637                 m_session->MatchSolverInfo(
"ModeType", 
"HalfMode",
   691                     ASSERTL0(0,
"Dimension not supported");
   703             int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
   704             int nq      = direction.num_elements() / coordim;
   710             for(
int i = 0; i < (*m_exp).size(); ++i)
   712                 npts_e = (*m_exp)[i]->GetTotPoints();
   715                 for (
int k = 0; k<coordim; ++k)
   718                                          &locdir[k*npts_e],                 1);
   721                 (*m_exp)[i]->PhysDirectionalDeriv(
   737             for(
int i = 0; i < (*m_exp).size(); ++i)
   739                 (*m_exp)[i]->ExponentialFilter(
   764             if(inarray.get() == outarray.get())
   812             for(i= 0; i < (*m_exp).size(); ++i)
   814                 (*m_exp)[i]->FwdTrans_BndConstrained(inarray+
m_phys_offset[i],
   828             boost::ignore_unused(field);
   841                      (*
m_exp)[0]->GetBasisType(0)
   843                      "Smoothing is currently not allowed unless you are using "   844                      "a nodal base for efficiency reasons. The implemented "   845                      "smoothing technique requires the mass matrix inversion "   846                      "which is trivial just for GLL_LAGRANGE_SEM and "   847                      "GAUSS_LAGRANGE_SEMexpansions.");
   876             map<int,int> elmt_id;
   881                 for(i = 0 ; i < (*m_exp).size(); ++i)
   883                     if((*
m_exp)[i]->DetShapeType()
   886                         elmt_id[n_exp++] = i;
   892                 n_exp = (*m_exp).size();
   893                 for(i = 0; i < n_exp; ++i)
   907                     for(i = 0; i < n_exp; ++i)
   909                         nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
   910                         ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
   917                     for(i = 0; i < n_exp; ++i)
   919                         nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
   920                         ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
   931                     for(i = 0; i < n_exp; ++i)
   933                         nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
   934                         ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
   942                     for(i = 0; i < n_exp; ++i)
   944                         nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
   945                         ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
   953                     for(i = 0; i < n_exp; ++i)
   955                         nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
   956                         ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
   964                              "Global Matrix creation not defined for this type "   977             for(i = cnt1 = 0; i < n_exp; ++i)
   992                                                (*m_exp)[eid]->DetShapeType(),
   997                 loc_mat = std::dynamic_pointer_cast<
LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
   998                 BlkMatrix->SetBlock(i,i,loc_mat);
  1015                 return matrixIter->second;
  1032             for(
int n = 0; n < num_elmts.num_elements(); ++n)
  1044                         cnt += num_elmts[n];
  1052                     for(i= 0; i < num_elmts[n]; ++i)
  1067                                                       (*m_exp)[eid]->DetShapeType(),
  1090             int i,j,n,gid1,gid2,cntdim1,cntdim2;
  1094             unsigned int glob_rows = 0;
  1095             unsigned int glob_cols = 0;
  1096             unsigned int loc_rows  = 0;
  1097             unsigned int loc_cols  = 0;
  1099             bool assembleFirstDim  = 
false;
  1100             bool assembleSecondDim = 
false;
  1107                     glob_cols = locToGloMap->GetNumGlobalCoeffs();
  1109                     assembleFirstDim  = 
false;
  1110                     assembleSecondDim = 
true;
  1115                     glob_rows = locToGloMap->GetNumGlobalCoeffs();
  1118                     assembleFirstDim  = 
true;
  1119                     assembleSecondDim = 
false;
  1127                     glob_rows = locToGloMap->GetNumGlobalCoeffs();
  1128                     glob_cols = locToGloMap->GetNumGlobalCoeffs();
  1130                     assembleFirstDim  = 
true;
  1131                     assembleSecondDim = 
true;
  1137                              "Global Matrix creation not defined for this type "  1149             for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
  1164                                               (*m_exp)[eid]->DetShapeType(),
  1170                 loc_rows = loc_mat->GetRows();
  1171                 loc_cols = loc_mat->GetColumns();
  1173                 for(i = 0; i < loc_rows; ++i)
  1175                     if(assembleFirstDim)
  1177                         gid1  = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
  1178                         sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
  1186                     for(j = 0; j < loc_cols; ++j)
  1188                         if(assembleSecondDim)
  1191                                 ->GetLocalToGlobalMap(cntdim2 + j);
  1193                                 ->GetLocalToGlobalSign(cntdim2 + j);
  1202                         coord = make_pair(gid1,gid2);
  1203                         if( spcoomat.count(coord) == 0 )
  1205                             spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
  1209                             spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
  1213                 cntdim1 += loc_rows;
  1214                 cntdim2 += loc_cols;
  1224             int i,j,n,gid1,gid2,loc_lda,eid;
  1228             int totDofs     = locToGloMap->GetNumGlobalCoeffs();
  1229             int NumDirBCs   = locToGloMap->GetNumGlobalDirBndCoeffs();
  1231             unsigned int rows = totDofs - NumDirBCs;
  1232             unsigned int cols = totDofs - NumDirBCs;
  1236             int bwidth = locToGloMap->GetFullSystemBandWidth();
  1248                 if( (2*(bwidth+1)) < rows)
  1268             for(n = 0; n < (*m_exp).size(); ++n)
  1283                                               (*m_exp)[eid]->DetShapeType(),
  1290                 if(RobinBCInfo.count(n) != 0) 
  1295                     int rows = loc_mat->GetRows();
  1296                     int cols = loc_mat->GetColumns();
  1297                     const NekDouble *dat = loc_mat->GetRawPtr();
  1299                     Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
  1302                     for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
  1304                         (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
  1312                 loc_lda = loc_mat->GetColumns();
  1314                 for(i = 0; i < loc_lda; ++i)
  1316                     gid1 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + i) - NumDirBCs;
  1317                     sign1 =  locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + i);
  1320                         for(j = 0; j < loc_lda; ++j)
  1322                             gid2 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + j) - NumDirBCs;
  1323                             sign2 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + j);
  1330                                 if((matStorage == 
eFULL)||(gid2 >= gid1))
  1332                                     value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
  1333                                     Gmat->SetValue(gid1,gid2,value);
  1373                 ASSERTL0(
false,
"Matrix solution type not defined");
  1378                                                         vExpList,  locToGloMap);
  1386             const map<int,RobinBCInfoSharedPtr> vRobinBCInfo = 
GetRobinBCInfo();
  1392                 ASSERTL0(
false,
"Matrix solution type not defined");
  1397                                                         vExpList,locToGloMap);
  1445                                  bool returnNearestElmt)
  1449             return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
  1457                 bool returnNearestElmt)
  1469                 for(
int i = (*m_exp).size()-1; i >= 0; --i)
  1475             NekDouble x = (gloCoords.num_elements() > 0 ? gloCoords[0] : 0.0);
  1476             NekDouble y = (gloCoords.num_elements() > 1 ? gloCoords[1] : 0.0);
  1477             NekDouble z = (gloCoords.num_elements() > 2 ? gloCoords[2] : 0.0);
  1484             std::vector<int> elmts = 
m_graph->GetElementsContainingPoint(p);
  1492             for (
int i = 0; i < elmts.size(); ++i)
  1495                             GetGeom()->ContainsPoint(gloCoords,
  1505                     if(nearpt < nearpt_min)
  1508                         nearpt_min = nearpt;
  1517             if(returnNearestElmt)
  1520                 std::string 
msg = 
"Failed to find point within element to "  1522                         + boost::lexical_cast<std::string>(tol)
  1523                         + 
" using local point ("  1524                         + boost::lexical_cast<std::string>(locCoords[0]) +
","  1525                         + boost::lexical_cast<std::string>(locCoords[1]) +
","  1526                         + boost::lexical_cast<std::string>(locCoords[1])
  1528                         + boost::lexical_cast<std::string>(min_id);
  1550             ASSERTL0(dim == coords.num_elements(),
  1551                      "Invalid coordinate dimension.");
  1556             ASSERTL0(elmtIdx > 0, 
"Unable to find element containing point.");
  1562             return (*
m_exp)[elmtIdx]->StdPhysEvaluate(xi, elmtPhys);
  1592             for (
int i = 0; i < 
m_exp->size(); ++i)
  1594                 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
  1599             for (
int i = 0; i < 
m_exp->size(); ++i)
  1601                 (*m_exp)[i]->Reset();
  1618             int coordim  = 
GetExp(0)->GetCoordim();
  1619             char vars[3] = { 
'x', 
'y', 
'z' };
  1630             outfile << 
"Variables = x";
  1631             for (
int i = 1; i < coordim; ++i)
  1633                 outfile << 
", " << vars[i];
  1638                 outfile << 
", " << var;
  1641             outfile << std::endl << std::endl;
  1654             int nBases  = (*m_exp)[0]->GetNumBases();
  1659             if (expansion == -1)
  1667                 GetCoords(coords[0], coords[1], coords[2]);
  1669                 for (i = 0; i < 
m_exp->size(); ++i)
  1673                     for (j = 0; j < nBases; ++j)
  1675                         numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
  1678                     numBlocks += numInt;
  1683                 nPoints = (*m_exp)[expansion]->GetTotPoints();
  1689                 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
  1692                 for (j = 0; j < nBases; ++j)
  1694                     numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
  1702                 int nPlanes = 
GetZIDs().num_elements();
  1703                 NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
  1704                 numBlocks = (int)tmp;
  1712             outfile << 
"Zone, N=" << nPoints << 
", E="  1713                     << numBlocks << 
", F=FEBlock" ;
  1718                     outfile << 
", ET=QUADRILATERAL" << std::endl;
  1721                     outfile << 
", ET=BRICK" << std::endl;
  1724                     ASSERTL0(
false,
"Not set up for this type of output");
  1729             for (j = 0; j < coordim; ++j)
  1731                 for (i = 0; i < nPoints; ++i)
  1733                     outfile << coords[j][i] << 
" ";
  1734                     if (i % 1000 == 0 && i)
  1736                         outfile << std::endl;
  1739                 outfile << std::endl;
  1747             int nbase = (*m_exp)[0]->GetNumBases();
  1750             std::shared_ptr<LocalRegions::ExpansionVector> exp = 
m_exp;
  1752             if (expansion != -1)
  1754                 exp = std::shared_ptr<LocalRegions::ExpansionVector>(
  1756                 (*exp)[0] = (*m_exp)[expansion];
  1761                 for(i = 0; i < (*exp).size(); ++i)
  1763                     const int np0 = (*exp)[i]->GetNumPoints(0);
  1764                     const int np1 = (*exp)[i]->GetNumPoints(1);
  1766                     for(j = 1; j < np1; ++j)
  1768                         for(k = 1; k < np0; ++k)
  1770                             outfile << cnt + (j-1)*np0 + k   << 
" ";
  1771                             outfile << cnt + (j-1)*np0 + k+1 << 
" ";
  1772                             outfile << cnt +  j   *np0 + k+1 << 
" ";
  1773                             outfile << cnt +  j   *np0 + k   << endl;
  1780             else if (nbase == 3)
  1782                 for(i = 0; i < (*exp).size(); ++i)
  1784                     const int np0 = (*exp)[i]->GetNumPoints(0);
  1785                     const int np1 = (*exp)[i]->GetNumPoints(1);
  1786                     const int np2 = (*exp)[i]->GetNumPoints(2);
  1787                     const int np01 = np0*np1;
  1789                     for(j = 1; j < np2; ++j)
  1791                         for(k = 1; k < np1; ++k)
  1793                             for(l = 1; l < np0; ++l)
  1795                                 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l   << 
" ";
  1796                                 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 << 
" ";
  1797                                 outfile << cnt + (j-1)*np01 +  k   *np0 + l+1 << 
" ";
  1798                                 outfile << cnt + (j-1)*np01 +  k   *np0 + l   << 
" ";
  1799                                 outfile << cnt +  j   *np01 + (k-1)*np0 + l   << 
" ";
  1800                                 outfile << cnt +  j   *np01 + (k-1)*np0 + l+1 << 
" ";
  1801                                 outfile << cnt +  j   *np01 +  k   *np0 + l+1 << 
" ";
  1802                                 outfile << cnt +  j   *np01 +  k   *np0 + l   << endl;
  1811                 ASSERTL0(
false,
"Not set up for this dimension");
  1822             if (expansion == -1)
  1830                 for(
int i = 0; i < totpoints; ++i)
  1832                     outfile << 
m_phys[i] << 
" ";
  1833                     if(i % 1000 == 0 && i)
  1835                         outfile << std::endl;
  1838                 outfile << std::endl;
  1843                 int nPoints = (*m_exp)[expansion]->GetTotPoints();
  1845                 for (
int i = 0; i < nPoints; ++i)
  1850                 outfile << std::endl;
  1856             outfile << 
"<?xml version=\"1.0\"?>" << endl;
  1857             outfile << 
"<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "  1858                     << 
"byte_order=\"LittleEndian\">" << endl;
  1859             outfile << 
"  <UnstructuredGrid>" << endl;
  1864             outfile << 
"  </UnstructuredGrid>" << endl;
  1865             outfile << 
"</VTKFile>" << endl;
  1870             boost::ignore_unused(outfile, expansion, istrip);
  1872                      "Routine not implemented for this expansion.");
  1877             boost::ignore_unused(expansion);
  1878             outfile << 
"      </PointData>" << endl;
  1879             outfile << 
"    </Piece>" << endl;
  1886             int nq = (*m_exp)[expansion]->GetTotPoints();
  1889             outfile << 
"        <DataArray type=\"Float64\" Name=\""  1890                     << var << 
"\">" << endl;
  1893             for(i = 0; i < nq; ++i)
  1898             outfile << 
"        </DataArray>" << endl;
  1933                     err = max(err, abs(inarray[i] - soln[i]));
  1967                 for (i = 0; i < (*m_exp).size(); ++i)
  1975                 for (i = 0; i < (*m_exp).size(); ++i)
  1993             for (i = 0; i < (*m_exp).size(); ++i)
  2008             for (i = 0; i < (*m_exp).size(); ++i)
  2011                 for (j = 0; j < inarray.num_elements(); ++j)
  2015                 flux += (*m_exp)[i]->VectorFlux(tmp);
  2024                      "This method is not defined or valid for this class type");
  2032                      "This method is not defined or valid for this class type");
  2040                      "This method is not defined or valid for this class type");
  2047             boost::ignore_unused(lhom);
  2049                      "This method is not defined or valid for this class type");
  2055                      "This method is not defined or valid for this class type");
  2063                      "This method is not defined or valid for this class type");
  2074             boost::ignore_unused(scale, inarray, outarray);
  2076                      "This method is not defined or valid for this class type");
  2084             boost::ignore_unused(scale, inarray, outarray);
  2086                      "This method is not defined or valid for this class type");
  2092                      "This method is not defined or valid for this class type");
  2096             const std::string               &fileName,
  2098             const std::string               &varName,
  2099             const std::shared_ptr<ExpList> locExpList)
  2101             string varString = fileName.substr(0, fileName.find_last_of(
"."));
  2102             int j, k, len = varString.length();
  2103             varString = varString.substr(len-1, len);
  2105             std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
  2106             std::vector<std::vector<NekDouble> > FieldData;
  2112             f->Import(fileName, FieldDef, FieldData);
  2115             for (j = 0; j < FieldDef.size(); ++j)
  2117                 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
  2119                     if (FieldDef[j]->m_fields[k] == varName)
  2122                         locExpList->ExtractDataToCoeffs(
  2123                             FieldDef[j], FieldData[j],
  2124                             FieldDef[j]->m_fields[k],
  2125                             locExpList->UpdateCoeffs());
  2131             ASSERTL0(found, 
"Could not find variable '"+varName+
  2132                             "' in file boundary condition "+fileName);
  2133             locExpList->BwdTrans_IterPerExp(
  2134                 locExpList->GetCoeffs(),
  2135                 locExpList->UpdatePhys());
  2162             for (i = 0; i < (*m_exp).size(); ++i)
  2177                                                   std::vector<NekDouble> &HomoLen,
  2179                                                   std::vector<unsigned int> &HomoSIDs,
  2180                                                   std::vector<unsigned int> &HomoZIDs,
  2181                                                   std::vector<unsigned int> &HomoYIDs)
  2188             ASSERTL1(NumHomoDir == HomoBasis.num_elements(),
"Homogeneous basis is not the same length as NumHomoDir");
  2189             ASSERTL1(NumHomoDir == HomoLen.size(),
"Homogeneous length vector is not the same length as NumHomDir");
  2192             switch((*
m_exp)[0]->GetShapeDimension())
  2208             for(s = startenum; s <= endenum; ++s)
  2210                 std::vector<unsigned int>             elementIDs;
  2211                 std::vector<LibUtilities::BasisType>  basis;
  2212                 std::vector<unsigned int>             numModes;
  2213                 std::vector<std::string>              fields;
  2216                 bool UniOrder = 
true;
  2221                 for(
int i = 0; i < (*m_exp).size(); ++i)
  2223                     if((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
  2225                         elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
  2228                             for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
  2230                                 basis.push_back((*
m_exp)[i]->GetBasis(j)->GetBasisType());
  2231                                 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
  2235                             for(n = 0 ; n < NumHomoDir; ++n)
  2237                                 basis.push_back(HomoBasis[n]->GetBasisType());
  2238                                 numModes.push_back(HomoBasis[n]->GetNumModes());
  2245                             ASSERTL0((*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
"Routine is not set up for multiple bases definitions");
  2247                             for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
  2249                                 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
  2250                                 if(numModes[j] != (*
m_exp)[i]->GetBasis(j)->GetNumModes())
  2256                             for(n = 0 ; n < NumHomoDir; ++n)
  2258                                 numModes.push_back(HomoBasis[n]->GetNumModes());
  2265                 if(elementIDs.size() > 0)
  2270                                             UniOrder, numModes,fields,
  2271                                             NumHomoDir, HomoLen, homoStrips,
  2272                                             HomoSIDs, HomoZIDs, HomoYIDs);
  2273                     fielddef.push_back(fdef);
  2284             std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
  2308             map<int, int> ElmtID_to_ExpID;
  2309             for(i = 0; i < (*m_exp).size(); ++i)
  2311                 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
  2314             for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
  2316                 int eid     = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
  2317                 int datalen = (*m_exp)[eid]->GetNcoeffs();
  2318                 fielddata.insert(fielddata.end(),&coeffs[
m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
  2326                                    std::vector<NekDouble> &fielddata,
  2348             std::vector<NekDouble>                    &fielddata,
  2354             int modes_offset = 0;
  2355             int datalen      = fielddata.size()/fielddef->m_fields.size();
  2358             for(i = 0; i < fielddef->m_fields.size(); ++i)
  2360                 if(fielddef->m_fields[i] == field)
  2367             ASSERTL0(i != fielddef->m_fields.size(),
  2368                      "Field (" + field + 
") not found in file.");
  2375                 for(i = (*m_exp).size()-1; i >= 0; --i)
  2381             for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
  2385                 if (fielddef->m_uniOrder == 
true)
  2391                     fielddef->m_shapeType, fielddef->m_numModes, modes_offset);
  2393                 const int elmtId = fielddef->m_elementIDs[i];
  2399                     modes_offset += (*m_exp)[0]->GetNumBases();
  2403                 expId = eIt->second;
  2405                 bool sameBasis = 
true;
  2406                 for (
int j = 0; j < fielddef->m_basis.size(); ++j)
  2408                     if (fielddef->m_basis[j] != (*
m_exp)[expId]->GetBasisType(j))
  2415                 if (datalen == (*
m_exp)[expId]->GetNcoeffs() && sameBasis)
  2422                     (*m_exp)[expId]->ExtractDataToCoeffs(
  2423                         &fielddata[offset], fielddef->m_numModes,
  2429                 modes_offset += (*m_exp)[0]->GetNumBases();
  2440             for(i = 0; i < (*m_exp).size(); ++i)
  2442                 std::vector<unsigned int> nummodes;
  2443                 vector<LibUtilities::BasisType> basisTypes;
  2444                 for(
int j= 0; j < fromExpList->GetExp(i)->GetNumBases(); ++j)
  2446                     nummodes.push_back(fromExpList->GetExp(i)->GetBasisNumModes(j));
  2447                     basisTypes.push_back(fromExpList->GetExp(i)->GetBasisType(j));
  2450                 (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
  2454                 offset += fromExpList->GetExp(i)->GetNcoeffs();
  2467             int nq = outarray[0].num_elements()/MFdim;
  2470             int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
  2474             for(
int i = 0; i < 
m_exp->size(); ++i)
  2476                 npts  = (*m_exp)[i]->GetTotPoints();
  2478                 for (
int j=0; j< MFdim*coordim; ++j)
  2484                 (*m_exp)[i]->GetMetricInfo()->GetMovingFrames(
  2485                                         (*
m_exp)[i]->GetPointsKeys(),
  2491                 for (
int j = 0; j < MFdim; ++j)
  2493                     for (
int k = 0; k < coordim; ++k)
  2496                                      &MFloc[j*coordim+k][0],              1,
  2512             const int ElementID,
  2522             for(
int i = 0 ; i < (*m_exp).size(); ++i)
  2524                 npoints_e = (*m_exp)[i]->GetTotPoints();
  2545                      "This method is not defined or valid for this class type");
  2552             boost::ignore_unused(i);
  2554                      "This method is not defined or valid for this class type");
  2555             static std::shared_ptr<ExpList> result;
  2565             boost::ignore_unused(Vec, Fwd, Bwd, Upwind);
  2567                      "This method is not defined or valid for this class type");
  2576             boost::ignore_unused(Vn, Fwd, Bwd, Upwind);
  2578                      "This method is not defined or valid for this class type");
  2584                      "This method is not defined or valid for this class type");
  2585             static std::shared_ptr<ExpList> returnVal;
  2592                      "This method is not defined or valid for this class type");
  2593             static std::shared_ptr<AssemblyMapDG> result;
  2599             return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
  2605             boost::ignore_unused(normals);
  2607                      "This method is not defined or valid for this class type");
  2615             boost::ignore_unused(Fx, Fy, outarray);
  2617                      "This method is not defined or valid for this class type");
  2624             boost::ignore_unused(Fn, outarray);
  2626                      "This method is not defined or valid for this class type");
  2634             boost::ignore_unused(Fwd, Bwd, outarray);
  2636                      "This method is not defined or valid for this class type");
  2642             boost::ignore_unused(Fwd, Bwd);
  2644                      "This method is not defined or valid for this class type");
  2652             boost::ignore_unused(field, Fwd, Bwd);
  2654                      "This method is not defined or valid for this class type");
  2660                      "This method is not defined or valid for this class type");
  2661             static vector<bool> tmp;
  2668             boost::ignore_unused(outarray);
  2670                      "This method is not defined or valid for this class type");
  2677             boost::ignore_unused(inarray, outarray);
  2679                      "This method is not defined or valid for this class type");
  2687             boost::ignore_unused(inarray, outarray, coeffstate);
  2689                      "This method is not defined or valid for this class type");
  2700                 const bool PhysSpaceForcing)
  2702             boost::ignore_unused(inarray, outarray, flags, factors, varcoeff,
  2703                                  varfactors, dirForcing, PhysSpaceForcing);
  2715             boost::ignore_unused(velocity, inarray, outarray, lambda,
  2716                                  coeffstate, dirForcing);
  2718                      "This method is not defined or valid for this class type");
  2729             boost::ignore_unused(velocity, inarray, outarray, lambda,
  2730                                  coeffstate, dirForcing);
  2732                      "This method is not defined or valid for this class type");
  2741             boost::ignore_unused(inarray, outarray, coeffstate, Shuff, UnShuff);
  2743                      "This method is not defined or valid for this class type");
  2752             boost::ignore_unused(inarray, outarray, coeffstate, Shuff, UnShuff);
  2754                      "This method is not defined or valid for this class type");
  2762             boost::ignore_unused(inarray1, inarray2, outarray, coeffstate);
  2764                      "This method is not defined or valid for this class type");
  2773             boost::ignore_unused(inarray1, inarray2, outarray, coeffstate);
  2775                      "This method is not defined or valid for this class type");
  2782             boost::ignore_unused(BndVals, TotField, BndID);
  2784                      "This method is not defined or valid for this class type");
  2792             boost::ignore_unused(V1, V2, outarray, BndID);
  2794                      "This method is not defined or valid for this class type");
  2808                         (*m_exp)[i]->NormVectorIProductWRTBase(
  2818                         (*m_exp)[i]->NormVectorIProductWRTBase(
  2829                         (*m_exp)[i]->NormVectorIProductWRTBase(
  2838                     ASSERTL0(
false,
"Dimension not supported");
  2845             boost::ignore_unused(outarray);
  2847                      "This method is not defined or valid for this class type");
  2855                      "This method is not defined or valid for this class type");
  2862             boost::ignore_unused(nreg);
  2864                      "This method is not defined or valid for this class type");
  2869             boost::ignore_unused(useComm);
  2871                      "This method is not defined or valid for this class type");
  2879             boost::ignore_unused(inarray, outarray, useComm);
  2881                      "This method is not defined or valid for this class type");
  2888                      "This method is not defined or valid for this class type");
  2895             boost::ignore_unused(inarray, outarray);
  2897                      "This method is not defined or valid for this class type");
  2905             boost::ignore_unused(coeffstate);
  2913             boost::ignore_unused(coeffstate);
  2922             boost::ignore_unused(coeffstate);
  2939             boost::ignore_unused(coeffstate);
  2971                 for(i= 0; i < (*m_exp).size(); ++i)
  2974                     (*m_exp)[i]->GetCoords(e_coord_0);
  2978                 ASSERTL0(coord_1.num_elements() != 0,
  2979                          "output coord_1 is not defined");
  2981                 for(i= 0; i < (*m_exp).size(); ++i)
  2984                     e_coord_1 = coord_1 + m_phys_offset[i];
  2985                     (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
  2989                 ASSERTL0(coord_1.num_elements() != 0,
  2990                          "output coord_1 is not defined");
  2991                 ASSERTL0(coord_2.num_elements() != 0,
  2992                          "output coord_2 is not defined");
  2994                 for(i= 0; i < (*m_exp).size(); ++i)
  2997                     e_coord_1 = coord_1 + m_phys_offset[i];
  2998                     e_coord_2 = coord_2 + m_phys_offset[i];
  2999                     (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
  3010                      "This method is not defined or valid for this class type");
  3016                             std::shared_ptr<ExpList> &result,
  3017                             const bool DeclareCoeffPhysArrays)
  3019             boost::ignore_unused(i, result, DeclareCoeffPhysArrays);
  3021                      "This method is not defined or valid for this class type");
  3042             for (cnt = n = 0; n < i; ++n)
  3053                 elmt   = 
GetExp(ElmtID[cnt+n]);
  3054                 elmt->GetTracePhysVals(EdgeID[cnt+n],
  3056                                       tmp1 = element + offsetElmt,
  3057                                       tmp2 = boundary + offsetBnd);
  3059                 offsetElmt += elmt->GetTotPoints();
  3075             for (cnt = n = 0; n < i; ++n)
  3084                 npoints += 
GetExp(ElmtID[cnt+n])->GetTotPoints();
  3095                 nq = 
GetExp(ElmtID[cnt+n])->GetTotPoints();
  3098                                  &bndElmt[offsetElmt], 1);
  3121             for (cnt = n = 0; n < i; ++n)
  3133                 elmt   = 
GetExp(ElmtID[cnt+n]);
  3134                 elmt->GetTracePhysVals(EdgeID[cnt+n],
  3137                                       tmp1 = bnd + offsetBnd);
  3156             for (j = 0; j < coordim; ++j)
  3163             for (cnt = n = 0; n < i; ++n)
  3174                 elmt   = 
GetExp(ElmtID[cnt+n]);
  3176                             = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
  3178                 for (j = 0; j < coordim; ++j)
  3181                                      tmp = normals[j] + offset, 1);
  3191             boost::ignore_unused(ElmtID, EdgeID);
  3193                      "This method is not defined or valid for this class type");
  3201                      "This method is not defined or valid for this class type");
  3210                      "This method is not defined or valid for this class type");
  3221                      "This method is not defined or valid for this class type");
  3230             const std::string varName,
  3234             boost::ignore_unused(time, varName, x2_in, x3_in);
  3236                      "This method is not defined or valid for this class type");
  3244                      "This method is not defined or valid for this class type");
  3245             static map<int,RobinBCInfoSharedPtr> result;
  3256             boost::ignore_unused(periodicVerts, periodicEdges, periodicFaces);
  3258                      "This method is not defined or valid for this class type");
  3263             unsigned int regionId,
  3264             const std::string& variable)
  3266             auto collectionIter = collection.find(regionId);
  3267             ASSERTL1(collectionIter != collection.end(),
  3268                      "Unable to locate collection " +
  3269                      boost::lexical_cast<
string>(regionId));
  3272                 = (*collectionIter).second;
  3273             auto conditionMapIter = bndCondMap->find(variable);
  3274             ASSERTL1(conditionMapIter != bndCondMap->end(),
  3275                      "Unable to locate condition map.");
  3278                 = (*conditionMapIter).second;
  3280             return boundaryCondition;
  3285             boost::ignore_unused(n);
  3287                      "This method is not defined or valid for this class type");
  3298                 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
  3306             bool verbose    = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
  3307                               (
m_comm->GetRank() == 0);
  3318             for (
int i = 0; i < 
m_exp->size(); ++i)
  3320                 collections[(*m_exp)[i]->DetShapeType()].push_back(
  3321                     std::pair<LocalRegions::ExpansionSharedPtr,int> ((*
m_exp)[i],i));
  3324             for (
auto &it : collections)
  3329                 vector<StdRegions::StdExpansionSharedPtr> collExp;
  3338                 if(it.second.size() == 1) 
  3340                     collExp.push_back(it.second[0].first);
  3356                     collExp.push_back(it.second[0].first);
  3357                     int prevnCoeff = it.second[0].first->GetNcoeffs();
  3358                     int prevnPhys  = it.second[0].first->GetTotPoints();
  3361                     for (
int i = 1; i < it.second.size(); ++i)
  3363                         int nCoeffs     = it.second[i].first->GetNcoeffs();
  3364                         int nPhys       = it.second[i].first->GetTotPoints();
  3371                         if(prevCoeffOffset + nCoeffs != coeffOffset ||
  3372                            prevnCoeff != nCoeffs ||
  3373                            prevPhysOffset + nPhys != physOffset ||
  3374                            prevnPhys != nPhys || collcnt >= collmax)
  3396                             collExp.push_back(it.second[i].first);
  3401                             collExp.push_back(it.second[i].first);
  3406                         if (i == it.second.size() - 1)
  3423                         prevCoeffOffset = coeffOffset;
  3424                         prevPhysOffset  = physOffset;
  3425                         prevnCoeff      = nCoeffs;
 virtual NekDouble v_L2(const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
virtual void v_GlobalToLocal(void)
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
void GenerateElementVector(const int ElementID, const NekDouble scalar1, const NekDouble scalar2, Array< OneD, NekDouble > &outarray)
Generate vector v such that v[i] = scalar1 if i is in the element < ElementID. Otherwise, v[i] = scalar2. 
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
virtual void v_ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
Extract data from raw field data into expansion list. 
COLLECTIONS_EXPORT OperatorImpMap SetWithTimings(std::vector< StdRegions::StdExpansionSharedPtr > pGeom, OperatorImpMap &impTypes, bool verbose=true)
void IProductWRTDirectionalDerivBase(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Directional derivative along a given direction. 
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
#define ASSERTL0(condition, msg)
virtual void v_Reset()
Reset geometry information, metrics, matrix managers and geometry information. 
void ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Extract the data from fromField using fromExpList the coeffs using the basic ExpList Elemental expans...
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
virtual std::shared_ptr< ExpList > & v_GetTrace()
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
ExpList()
The default constructor. 
static ExpListSharedPtr NullExpListSharedPtr
std::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions. 
COLLECTIONS_EXPORT OperatorImpMap GetOperatorImpMap(StdRegions::StdExpansionSharedPtr pExp)
Get Operator Implementation Map from XMl or using default;. 
virtual void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object. 
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::map< CoordType, NekDouble > COOMatType
std::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object. 
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max. 
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
virtual void v_FillBndCondFromField()
void ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
NekDouble PhysIntegral(void)
This function integrates a function  over the domain consisting of all the elements of the expansion...
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
ExpansionType GetExpType(void)
Returns the type of the expansion. 
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object. 
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
const StdRegions::ConstFactorMap & GetConstFactors() const
Returns all the constants. 
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void GeneralGetFieldDefinitions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, int NumHomoDir=0, Array< OneD, LibUtilities::BasisSharedPtr > &HomoBasis=LibUtilities::NullBasisSharedPtr1DArray, std::vector< NekDouble > &HomoLen=LibUtilities::NullNekDoubleVector, bool homoStrips=false, std::vector< unsigned int > &HomoSIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoZIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoYIDs=LibUtilities::NullUnsignedIntVector)
Lagrange Polynomials using the Gauss points . 
std::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object. 
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Array< OneD, const unsigned int > GetZIDs(void)
This function returns a vector containing the wave numbers in z-direction associated with the 3D homo...
std::map< ConstFactorType, NekDouble > ConstFactorMap
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
BlockMatrixMapShPtr m_blockMat
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points. 
std::shared_ptr< DNekMat > DNekMatSharedPtr
GeomMMF
Principle direction for MMF. 
void ApplyGeomInfo()
Apply geometry information to each expansion. 
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients. 
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition(void)
int GetExpSize(void)
This function returns the number of elements in the expansion. 
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void PhysDeriv(Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory. 
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion. 
std::shared_ptr< GlobalLinSys > GenGlobalBndLinSys(const GlobalLinSysKey &mkey, const AssemblyMapSharedPtr &locToGloMap)
Generate a GlobalLinSys from information provided by the key "mkey" and the mapping provided in LocTo...
std::vector< ExpansionSharedPtr > ExpansionVector
virtual void v_ExtractPhysToBndElmt(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
void MultiplyByElmtInvMass(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function elementally mulplies the coefficient space of Sin my the elemental inverse of the mass ...
virtual void v_WriteTecplotHeader(std::ostream &outfile, std::string var="")
int GetNVarCoeffs() const
virtual NekDouble v_GetHomoLen(void)
virtual void v_ExtractPhysToBnd(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
void WriteVtkFooter(std::ostream &outfile)
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset)
void Upwind(const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
virtual const Array< OneD, const int > & v_GetTraceBndMap()
virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, std::string var)
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
const char *const GlobalSysSolnTypeMap[]
virtual void v_GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
std::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
virtual NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &inarray)
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
virtual void v_LocalToGlobal(bool UseComm)
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs. 
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey. 
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Base class for all multi-elemental spectral/hp expansions. 
void ClearGlobalLinSysManager(void)
std::map< OperatorType, ImplementationType > OperatorImpMap
static const NekDouble kNekZeroTol
std::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
void GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
This function calculates the coordinates of all the elemental quadrature points . ...
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y. 
StdRegions::MatrixType GetMatrixType() const
Return the matrix type. 
virtual void v_Upwind(const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
NekDouble Linf(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
This function calculates the  error of the global spectral/hp element approximation. 
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
std::shared_ptr< GlobalMatrix > GenGlobalMatrix(const GlobalMatrixKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
Generates a global matrix from the given key and map. 
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual ~ExpList()
The default destructor. 
void IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function calculates the inner product of a function  with respect to the derivative (in directio...
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
std::shared_ptr< GlobalMatrix > GlobalMatrixSharedPtr
Shared pointer to a GlobalMatrix object. 
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys. 
static const std::string GetFileType(const std::string &filename, CommSharedPtr comm)
Determine file type of given input file. 
void IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function calculates the inner product of a function  with respect to all local expansion modes ...
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
bool m_physState
The state of the array m_phys. 
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs . 
virtual void v_HomogeneousFwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
void SetCoeffPhysOffsets()
Definition of the total number of degrees of freedom and quadrature points and offsets to access data...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool. 
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list. 
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)
NekDouble PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &phys)
LibUtilities::SessionReaderSharedPtr m_session
Session. 
virtual void v_ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
LibUtilities::ShapeType GetShapeType() const
Return the expansion type associated with key. 
virtual void v_GetMovingFrames(const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &outarray)
void Neg(int n, T *x, const int incx)
Negate x = -x. 
virtual std::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
virtual void v_SetHomoLen(const NekDouble lhom)
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype. 
std::map< int, BoundaryConditionMapShPtr > BoundaryConditionCollection
std::shared_ptr< PointGeom > PointGeomSharedPtr
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
void ExtractFileBCs(const std::string &fileName, LibUtilities::CommSharedPtr comm, const std::string &varName, const std::shared_ptr< ExpList > locExpList)
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
virtual void v_ClearGlobalLinSysManager(void)
Describe a linear system. 
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
virtual std::shared_ptr< ExpList > & v_GetPlane(int n)
Describes a matrix with ordering defined by a local to global map. 
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
const StdRegions::VarCoeffMap & GetVarCoeffs() const
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
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. 
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions()
std::shared_ptr< Expansion > ExpansionSharedPtr
MultiRegions::Direction const DirCartesianMap[]
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x. 
unsigned int GetMaxCollectionSize()
LibUtilities::CommSharedPtr m_comm
Communicator. 
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
virtual void v_CurlCurl(Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
virtual void v_LinearAdvectionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
std::map< GlobalMatrixKey, DNekScalBlkMatSharedPtr > BlockMatrixMap
A map between global matrix keys and their associated block matrices. 
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
#define WARNINGL1(condition, msg)
virtual void v_DealiasedDotProd(const Array< OneD, Array< OneD, NekDouble > > &inarray1, const Array< OneD, Array< OneD, NekDouble > > &inarray2, Array< OneD, Array< OneD, NekDouble > > &outarray, CoeffState coeffstate=eLocal)
NekDouble H1(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Calculates the  error of the global spectral/hp element approximation. 
virtual void v_IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void WriteVtkPieceFooter(std::ostream &outfile, int expansion)
std::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
virtual const std::vector< bool > & v_GetLeftAdjacentFaces(void) const
virtual void v_LinearAdvectionDiffusionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
std::shared_ptr< GlobalLinSys > GenGlobalLinSys(const GlobalLinSysKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
This operation constructs the global linear system of type mkey. 
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys. 
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
static SpatialDomains::BoundaryConditionShPtr GetBoundaryCondition(const SpatialDomains::BoundaryConditionCollection &collection, unsigned int index, const std::string &variable)
void CreateCollections(Collections::ImplementationType ImpType=Collections::eNoImpType)
Construct collections of elements containing a single element type and polynomial order from the list...
GlobalSysSolnType GetGlobalSysSolnType() const
Return the associated solution type. 
std::shared_ptr< DNekMat > GenGlobalMatrixFull(const GlobalLinSysKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
void MultiplyByBlockMatrix(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
std::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp. 
virtual void v_GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Used to lookup the create function in NekManager. 
virtual void v_SetUpPhysNormals()
ImplementationType GetDefaultImplementationType()
std::shared_ptr< Transposition > TranspositionSharedPtr
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid. 
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
virtual std::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
void SetExpType(ExpansionType Type)
Returns the type of the expansion. 
virtual void v_ExtractElmtToBndPhys(const int i, const Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints . 
GlobalLinSysFactory & GetGlobalLinSysFactory()
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs. 
void WriteVtkHeader(std::ostream &outfile)
std::shared_ptr< FieldIO > FieldIOSharedPtr
std::pair< IndexType, IndexType > CoordType
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
std::shared_ptr< LibUtilities::Comm > GetComm()
Returns the comm object. 
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
void ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
Extract the data in fielddata into the coeffs. 
std::shared_ptr< SessionReader > SessionReaderSharedPtr
virtual void v_WriteTecplotField(std::ostream &outfile, int expansion)
Collections::CollectionVector m_collections
virtual void v_ReadGlobalOptimizationParameters()
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
virtual void v_HomogeneousBwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
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 MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)