62 #include <Collections/CollectionOptimisation.h>
63 #include <Collections/Operator.h>
67 namespace MultiRegions
103 ::AllocateSharedPtr()),
121 m_comm(pSession->GetComm()),
130 ::AllocateSharedPtr()),
149 m_comm(pSession->GetComm()),
158 ::AllocateSharedPtr()),
174 const std::vector<unsigned int> &eIDs,
175 const bool DeclareCoeffPhysArrays):
177 m_session(in.m_session),
185 ::AllocateSharedPtr()),
194 for (
int i=0; i < eIDs.size(); ++i)
196 (*m_exp).push_back( (*(in.
m_exp))[eIDs[i]]);
198 m_npoints += (*m_exp)[i]->GetTotPoints();
201 if(DeclareCoeffPhysArrays)
215 m_session(in.m_session),
217 m_ncoeffs(in.m_ncoeffs),
218 m_npoints(in.m_npoints),
221 m_collections(in.m_collections),
222 m_coll_coeff_offset(in.m_coll_coeff_offset),
223 m_coll_phys_offset(in.m_coll_phys_offset),
224 m_coeff_offset(in.m_coeff_offset),
225 m_phys_offset(in.m_phys_offset),
226 m_offset_elmt_id(in.m_offset_elmt_id),
227 m_globalOptParam(in.m_globalOptParam),
228 m_blockMat(in.m_blockMat),
233 if(DeclareCoeffPhysArrays)
279 "local physical space is not true ");
307 for(i = 0; i < (*m_exp).size(); ++i)
331 int nrows = blockmat->GetRows();
332 int ncols = blockmat->GetColumns();
339 out = (*blockmat)*in;
389 for(i = 0; i < (*m_exp).size(); ++i)
391 (*m_exp)[i]->IProductWRTDerivBase(dir,inarray+
m_phys_offset[i],
415 ASSERTL1(inarray.num_elements() >= dim,
"inarray is not of sufficient dimension");
450 ASSERTL0(
false,
"Dimension of inarray not correct");
499 e_out_d0 = out_d0 + offset;
500 e_out_d1 = out_d1 + offset;
501 e_out_d2 = out_d2 + offset;
505 e_out_d0,e_out_d1, e_out_d2);
525 for(i=0; i<(*m_exp).size(); ++i)
528 (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
534 for(i=0; i<(*m_exp).size(); i++)
537 (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
543 int intdir= (int)edir;
545 for(i= 0; i < (*m_exp).size(); ++i)
548 (*m_exp)[i]->PhysDeriv(intdir, inarray+m_phys_offset[i], e_out_d);
572 if(inarray.get() == outarray.get())
620 for(i= 0; i < (*m_exp).size(); ++i)
622 (*m_exp)[i]->FwdTrans_BndConstrained(inarray+
m_phys_offset[i],
648 (*
m_exp)[0]->GetBasisType(0)
650 "Smoothing is currently not allowed unless you are using "
651 "a nodal base for efficiency reasons. The implemented "
652 "smoothing technique requires the mass matrix inversion "
653 "which is trivial just for GLL_LAGRANGE_SEM and "
654 "GAUSS_LAGRANGE_SEMexpansions.");
683 map<int,int> elmt_id;
688 for(i = 0 ; i < (*m_exp).size(); ++i)
699 n_exp = (*m_exp).size();
700 for(i = 0; i < n_exp; ++i)
714 for(i = 0; i < n_exp; ++i)
716 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
717 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
724 for(i = 0; i < n_exp; ++i)
726 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
727 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
738 for(i = 0; i < n_exp; ++i)
740 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
741 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
749 for(i = 0; i < n_exp; ++i)
751 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
752 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
760 for(i = 0; i < n_exp; ++i)
762 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
763 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
771 "Global Matrix creation not defined for this type "
784 for(i = cnt1 = 0; i < n_exp; ++i)
792 StdRegions::VarCoeffMap::const_iterator x;
800 (*m_exp)[eid]->DetShapeType(),
805 loc_mat = boost::dynamic_pointer_cast<
LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
806 BlkMatrix->SetBlock(i,i,loc_mat);
823 return matrixIter->second;
840 for(
int n = 0; n < num_elmts.num_elements(); ++n)
860 for(i= 0; i < num_elmts[n]; ++i)
868 StdRegions::VarCoeffMap::const_iterator x;
876 (*m_exp)[eid]->DetShapeType(),
899 int i,j,n,gid1,gid2,cntdim1,cntdim2;
903 unsigned int glob_rows;
904 unsigned int glob_cols;
905 unsigned int loc_rows;
906 unsigned int loc_cols;
908 bool assembleFirstDim;
909 bool assembleSecondDim;
916 glob_cols = locToGloMap->GetNumGlobalCoeffs();
918 assembleFirstDim =
false;
919 assembleSecondDim =
true;
924 glob_rows = locToGloMap->GetNumGlobalCoeffs();
927 assembleFirstDim =
true;
928 assembleSecondDim =
false;
936 glob_rows = locToGloMap->GetNumGlobalCoeffs();
937 glob_cols = locToGloMap->GetNumGlobalCoeffs();
939 assembleFirstDim =
true;
940 assembleSecondDim =
true;
946 "Global Matrix creation not defined for this type "
958 for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
966 StdRegions::VarCoeffMap::const_iterator x;
974 (*m_exp)[eid]->DetShapeType(),
980 loc_rows = loc_mat->GetRows();
981 loc_cols = loc_mat->GetColumns();
983 for(i = 0; i < loc_rows; ++i)
987 gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
988 sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
996 for(j = 0; j < loc_cols; ++j)
998 if(assembleSecondDim)
1001 ->GetLocalToGlobalMap(cntdim2 + j);
1003 ->GetLocalToGlobalSign(cntdim2 + j);
1012 coord = make_pair(gid1,gid2);
1013 if( spcoomat.count(coord) == 0 )
1015 spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1019 spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1023 cntdim1 += loc_rows;
1024 cntdim2 += loc_cols;
1034 int i,j,n,gid1,gid2,loc_lda,eid;
1038 int totDofs = locToGloMap->GetNumGlobalCoeffs();
1039 int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
1041 unsigned int rows = totDofs - NumDirBCs;
1042 unsigned int cols = totDofs - NumDirBCs;
1046 int bwidth = locToGloMap->GetFullSystemBandWidth();
1058 if( (2*(bwidth+1)) < rows)
1078 for(n = 0; n < (*m_exp).size(); ++n)
1086 StdRegions::VarCoeffMap::const_iterator x;
1094 (*m_exp)[eid]->DetShapeType(),
1101 if(RobinBCInfo.count(n) != 0)
1106 int rows = loc_mat->GetRows();
1107 int cols = loc_mat->GetColumns();
1108 const NekDouble *dat = loc_mat->GetRawPtr();
1110 Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
1113 for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
1115 (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
1123 loc_lda = loc_mat->GetColumns();
1125 for(i = 0; i < loc_lda; ++i)
1127 gid1 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + i) - NumDirBCs;
1128 sign1 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + i);
1131 for(j = 0; j < loc_lda; ++j)
1133 gid2 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + j) - NumDirBCs;
1134 sign2 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + j);
1141 if((matStorage ==
eFULL)||(gid2 >= gid1))
1143 value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
1144 Gmat->SetValue(gid1,gid2,value);
1184 ASSERTL0(
false,
"Matrix solution type not defined");
1189 vExpList, locToGloMap);
1197 const map<int,RobinBCInfoSharedPtr> vRobinBCInfo =
GetRobinBCInfo();
1203 ASSERTL0(
false,
"Matrix solution type not defined");
1208 vExpList,locToGloMap);
1245 for (
int i = 0; i < (*m_exp).size(); ++i)
1247 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1252 ASSERTL0(
false,
"Cannot find element for this point.");
1265 bool returnNearestElmt)
1269 return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1276 bool returnNearestElmt)
1284 std::vector<std::pair<int,NekDouble> > elmtIdDist;
1294 for (
int i = 0; i < (*m_exp).size(); ++i)
1296 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1300 w.
SetX(gloCoords[0]);
1301 w.
SetY(gloCoords[1]);
1302 w.
SetZ(gloCoords[2]);
1305 for (
int j = 0; j < (*m_exp)[i]->GetNverts(); ++j) {
1307 (*
m_exp)[i]->GetGeom()->GetVid(j));
1308 if (j == 0 || dist > v->dist(w))
1313 elmtIdDist.push_back(
1314 std::pair<int, NekDouble>(i, dist));
1319 if (!elmtIdDist.empty())
1321 int min_id = elmtIdDist[0].first;
1324 for (
int i = 1; i < elmtIdDist.size(); ++i)
1326 if (elmtIdDist[i].second < min_d) {
1327 min_id = elmtIdDist[i].first;
1328 min_d = elmtIdDist[i].second;
1333 (*m_exp)[min_id]->GetGeom()->GetLocCoords(gloCoords,
1345 static int start = 0;
1351 for (
int i = start; i < (*m_exp).size(); ++i)
1353 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1362 if(nearpt < nearpt_min)
1365 nearpt_min = nearpt;
1366 Vmath::Vcopy(locCoords.num_elements(),locCoords,1,savLocCoords,1);
1371 for (
int i = 0; i < start; ++i)
1373 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1382 if(nearpt < nearpt_min)
1385 nearpt_min = nearpt;
1387 locCoords,1,savLocCoords,1);
1392 if(returnNearestElmt)
1395 std::string msg =
"Failed to find point within element to tolerance of "
1396 + boost::lexical_cast<std::string>(tol)
1397 +
" using local point ("
1398 + boost::lexical_cast<std::string>(locCoords[0]) +
","
1399 + boost::lexical_cast<std::string>(locCoords[1]) +
","
1400 + boost::lexical_cast<std::string>(locCoords[1])
1402 + boost::lexical_cast<std::string>(min_id);
1405 Vmath::Vcopy(locCoords.num_elements(),savLocCoords,1,locCoords,1);
1444 for (
int i = 0; i <
m_exp->size(); ++i)
1446 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
1451 for (
int i = 0; i <
m_exp->size(); ++i)
1453 (*m_exp)[i]->Reset();
1470 int coordim =
GetExp(0)->GetCoordim();
1471 char vars[3] = {
'x',
'y',
'z' };
1482 outfile <<
"Variables = x";
1483 for (
int i = 1; i < coordim; ++i)
1485 outfile <<
", " << vars[i];
1490 outfile <<
", " << var;
1493 outfile << std::endl << std::endl;
1506 int nBases = (*m_exp)[0]->GetNumBases();
1511 if (expansion == -1)
1519 GetCoords(coords[0], coords[1], coords[2]);
1521 for (i = 0; i <
m_exp->size(); ++i)
1525 for (j = 0; j < nBases; ++j)
1527 numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1530 numBlocks += numInt;
1535 nPoints = (*m_exp)[expansion]->GetTotPoints();
1541 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1544 for (j = 0; j < nBases; ++j)
1546 numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1554 int nPlanes =
GetZIDs().num_elements();
1555 NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1556 numBlocks = (int)tmp;
1564 outfile <<
"Zone, N=" << nPoints <<
", E="
1565 << numBlocks <<
", F=FEBlock" ;
1570 outfile <<
", ET=QUADRILATERAL" << std::endl;
1573 outfile <<
", ET=BRICK" << std::endl;
1576 ASSERTL0(
false,
"Not set up for this type of output");
1581 for (j = 0; j < coordim; ++j)
1583 for (i = 0; i < nPoints; ++i)
1585 outfile << coords[j][i] <<
" ";
1586 if (i % 1000 == 0 && i)
1588 outfile << std::endl;
1591 outfile << std::endl;
1599 int nbase = (*m_exp)[0]->GetNumBases();
1602 boost::shared_ptr<LocalRegions::ExpansionVector> exp =
m_exp;
1604 if (expansion != -1)
1606 exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1608 (*exp)[0] = (*m_exp)[expansion];
1613 for(i = 0; i < (*exp).size(); ++i)
1615 const int np0 = (*exp)[i]->GetNumPoints(0);
1616 const int np1 = (*exp)[i]->GetNumPoints(1);
1618 for(j = 1; j < np1; ++j)
1620 for(k = 1; k < np0; ++k)
1622 outfile << cnt + (j-1)*np0 + k <<
" ";
1623 outfile << cnt + (j-1)*np0 + k+1 <<
" ";
1624 outfile << cnt + j *np0 + k+1 <<
" ";
1625 outfile << cnt + j *np0 + k << endl;
1632 else if (nbase == 3)
1634 for(i = 0; i < (*exp).size(); ++i)
1636 const int np0 = (*exp)[i]->GetNumPoints(0);
1637 const int np1 = (*exp)[i]->GetNumPoints(1);
1638 const int np2 = (*exp)[i]->GetNumPoints(2);
1639 const int np01 = np0*np1;
1641 for(j = 1; j < np2; ++j)
1643 for(k = 1; k < np1; ++k)
1645 for(l = 1; l < np0; ++l)
1647 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l <<
" ";
1648 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 <<
" ";
1649 outfile << cnt + (j-1)*np01 + k *np0 + l+1 <<
" ";
1650 outfile << cnt + (j-1)*np01 + k *np0 + l <<
" ";
1651 outfile << cnt + j *np01 + (k-1)*np0 + l <<
" ";
1652 outfile << cnt + j *np01 + (k-1)*np0 + l+1 <<
" ";
1653 outfile << cnt + j *np01 + k *np0 + l+1 <<
" ";
1654 outfile << cnt + j *np01 + k *np0 + l << endl;
1663 ASSERTL0(
false,
"Not set up for this dimension");
1674 if (expansion == -1)
1682 for(
int i = 0; i < totpoints; ++i)
1684 outfile <<
m_phys[i] <<
" ";
1685 if(i % 1000 == 0 && i)
1687 outfile << std::endl;
1690 outfile << std::endl;
1695 int nPoints = (*m_exp)[expansion]->GetTotPoints();
1697 for (
int i = 0; i < nPoints; ++i)
1702 outfile << std::endl;
1708 outfile <<
"<?xml version=\"1.0\"?>" << endl;
1709 outfile <<
"<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1710 <<
"byte_order=\"LittleEndian\">" << endl;
1711 outfile <<
" <UnstructuredGrid>" << endl;
1716 outfile <<
" </UnstructuredGrid>" << endl;
1717 outfile <<
"</VTKFile>" << endl;
1722 ASSERTL0(
false,
"Routine not implemented for this expansion.");
1727 outfile <<
" </PointData>" << endl;
1728 outfile <<
" </Piece>" << endl;
1735 int nq = (*m_exp)[expansion]->GetTotPoints();
1738 outfile <<
" <DataArray type=\"Float64\" Name=\""
1739 << var <<
"\">" << endl;
1742 for(i = 0; i < nq; ++i)
1747 outfile <<
" </DataArray>" << endl;
1782 err = max(err, abs(inarray[i] - soln[i]));
1816 for (i = 0; i < (*m_exp).size(); ++i)
1824 for (i = 0; i < (*m_exp).size(); ++i)
1842 for (i = 0; i < (*m_exp).size(); ++i)
1854 "This method is not defined or valid for this class type");
1862 "This method is not defined or valid for this class type");
1870 "This method is not defined or valid for this class type");
1878 "This method is not defined or valid for this class type");
1886 "This method is not defined or valid for this class type");
1895 "This method is not defined or valid for this class type");
1900 "This method is not defined or valid for this class type");
1906 "This method is not defined or valid for this class type");
1910 const std::string &fileName,
1911 const std::string &varName,
1912 const boost::shared_ptr<ExpList> locExpList)
1914 string varString = fileName.substr(0, fileName.find_last_of(
"."));
1915 int j, k, len = varString.length();
1916 varString = varString.substr(len-1, len);
1918 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1919 std::vector<std::vector<NekDouble> > FieldData;
1922 f.
Import(fileName, FieldDef, FieldData);
1925 for (j = 0; j < FieldDef.size(); ++j)
1927 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
1929 if (FieldDef[j]->m_fields[k] == varName)
1932 locExpList->ExtractDataToCoeffs(
1933 FieldDef[j], FieldData[j],
1934 FieldDef[j]->m_fields[k],
1935 locExpList->UpdateCoeffs());
1941 ASSERTL0(found,
"Could not find variable '"+varName+
1942 "' in file boundary condition "+fileName);
1943 locExpList->BwdTrans_IterPerExp(
1944 locExpList->GetCoeffs(),
1945 locExpList->UpdatePhys());
1972 for (i = 0; i < (*m_exp).size(); ++i)
1987 std::vector<NekDouble> &HomoLen,
1989 std::vector<unsigned int> &HomoSIDs,
1990 std::vector<unsigned int> &HomoZIDs,
1991 std::vector<unsigned int> &HomoYIDs)
1998 ASSERTL1(NumHomoDir == HomoBasis.num_elements(),
"Homogeneous basis is not the same length as NumHomoDir");
1999 ASSERTL1(NumHomoDir == HomoLen.size(),
"Homogeneous length vector is not the same length as NumHomDir");
2002 switch((*
m_exp)[0]->GetShapeDimension())
2018 for(s = startenum; s <= endenum; ++s)
2020 std::vector<unsigned int> elementIDs;
2021 std::vector<LibUtilities::BasisType> basis;
2022 std::vector<unsigned int> numModes;
2023 std::vector<std::string> fields;
2026 bool UniOrder =
true;
2031 for(
int i = 0; i < (*m_exp).size(); ++i)
2033 if((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
2035 elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
2038 for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2040 basis.push_back((*
m_exp)[i]->GetBasis(j)->GetBasisType());
2041 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
2045 for(n = 0 ; n < NumHomoDir; ++n)
2047 basis.push_back(HomoBasis[n]->GetBasisType());
2048 numModes.push_back(HomoBasis[n]->GetNumModes());
2055 ASSERTL0((*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
"Routine is not set up for multiple bases definitions");
2057 for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2059 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
2060 if(numModes[j] != (*
m_exp)[i]->GetBasis(j)->GetNumModes())
2066 for(n = 0 ; n < NumHomoDir; ++n)
2068 numModes.push_back(HomoBasis[n]->GetNumModes());
2075 if(elementIDs.size() > 0)
2080 UniOrder, numModes,fields,
2081 NumHomoDir, HomoLen, homoStrips,
2082 HomoSIDs, HomoZIDs, HomoYIDs);
2083 fielddef.push_back(fdef);
2094 std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2118 map<int, int> ElmtID_to_ExpID;
2119 for(i = 0; i < (*m_exp).size(); ++i)
2121 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2124 for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2126 int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2127 int datalen = (*m_exp)[eid]->GetNcoeffs();
2128 fielddata.insert(fielddata.end(),&coeffs[
m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2136 std::vector<NekDouble> &fielddata,
2158 std::vector<NekDouble> &fielddata,
2164 int modes_offset = 0;
2165 int datalen = fielddata.size()/fielddef->m_fields.size();
2168 for(i = 0; i < fielddef->m_fields.size(); ++i)
2170 if(fielddef->m_fields[i] == field)
2177 ASSERTL0(i != fielddef->m_fields.size(),
2178 "Field (" + field +
") not found in file.");
2181 map<int, int> elmtToExpId;
2186 for(i = (*m_exp).size()-1; i >= 0; --i)
2188 elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2191 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2195 if (fielddef->m_uniOrder ==
true)
2201 fielddef->m_numModes, modes_offset);
2203 const int elmtId = fielddef->m_elementIDs[i];
2204 if (elmtToExpId.count(elmtId) == 0)
2207 modes_offset += (*m_exp)[0]->GetNumBases();
2211 expId = elmtToExpId[elmtId];
2220 (*m_exp)[expId]->ExtractDataToCoeffs(
2221 &fielddata[offset], fielddef->m_numModes,
2226 modes_offset += (*m_exp)[0]->GetNumBases();
2237 for(i = 0; i < (*m_exp).size(); ++i)
2239 std::vector<unsigned int> nummodes;
2241 for(
int j= 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
2243 nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
2246 (*m_exp)[eid]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2249 offset += fromExpList->GetExp(eid)->GetNcoeffs();
2258 "This method is not defined or valid for this class type");
2266 "This method is not defined or valid for this class type");
2267 static boost::shared_ptr<ExpList> result;
2278 "This method is not defined or valid for this class type");
2288 "This method is not defined or valid for this class type");
2294 "This method is not defined or valid for this class type");
2295 static boost::shared_ptr<ExpList> returnVal;
2302 "This method is not defined or valid for this class type");
2303 static boost::shared_ptr<AssemblyMapDG> result;
2309 return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2316 "This method is not defined or valid for this class type");
2325 "This method is not defined or valid for this class type");
2333 "This method is not defined or valid for this class type");
2342 "This method is not defined or valid for this class type");
2349 "This method is not defined or valid for this class type");
2358 "This method is not defined or valid for this class type");
2364 "This method is not defined or valid for this class type");
2365 vector<bool> returnval;
2373 "This method is not defined or valid for this class type");
2381 "This method is not defined or valid for this class type");
2390 "This method is not defined or valid for this class type");
2401 ASSERTL0(
false,
"HelmSolve not implemented.");
2413 "This method is not defined or valid for this class type");
2425 "This method is not defined or valid for this class type");
2435 "This method is not defined or valid for this class type");
2445 "This method is not defined or valid for this class type");
2451 "This method is not defined or valid for this class type");
2459 "This method is not defined or valid for this class type");
2468 "This method is not defined or valid for this class type");
2482 (*m_exp)[i]->NormVectorIProductWRTBase(
2492 (*m_exp)[i]->NormVectorIProductWRTBase(
2503 (*m_exp)[i]->NormVectorIProductWRTBase(
2512 ASSERTL0(
false,
"Dimension not supported");
2520 "This method is not defined or valid for this class type");
2528 "This method is not defined or valid for this class type");
2534 "This method is not defined or valid for this class type");
2540 "This method is not defined or valid for this class type");
2610 for(i= 0; i < (*m_exp).size(); ++i)
2613 (*m_exp)[i]->GetCoords(e_coord_0);
2617 ASSERTL0(coord_1.num_elements() != 0,
2618 "output coord_1 is not defined");
2620 for(i= 0; i < (*m_exp).size(); ++i)
2623 e_coord_1 = coord_1 + m_phys_offset[i];
2624 (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2628 ASSERTL0(coord_1.num_elements() != 0,
2629 "output coord_1 is not defined");
2630 ASSERTL0(coord_2.num_elements() != 0,
2631 "output coord_2 is not defined");
2633 for(i= 0; i < (*m_exp).size(); ++i)
2636 e_coord_1 = coord_1 + m_phys_offset[i];
2637 e_coord_2 = coord_2 + m_phys_offset[i];
2638 (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
2649 "This method is not defined or valid for this class type");
2655 boost::shared_ptr<ExpList> &result)
2658 "This method is not defined or valid for this class type");
2679 for (cnt = n = 0; n < i; ++n)
2690 elmt =
GetExp(ElmtID[cnt+n]);
2691 elmt->GetTracePhysVals(EdgeID[cnt+n],
2693 tmp1 = element + offsetElmt,
2694 tmp2 = boundary + offsetBnd);
2696 offsetElmt += elmt->GetTotPoints();
2713 for (cnt = n = 0; n < i; ++n)
2722 npoints +=
GetExp(ElmtID[cnt+n])->GetTotPoints();
2733 nq =
GetExp(ElmtID[cnt+n])->GetTotPoints();
2736 tmp2 = bndElmt + offsetElmt, 1);
2756 for (j = 0; j < coordim; ++j)
2763 for (cnt = n = 0; n < i; ++n)
2774 elmt =
GetExp(ElmtID[cnt+n]);
2776 = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
2778 for (j = 0; j < coordim; ++j)
2781 tmp = normals[j] + offset, 1);
2792 "This method is not defined or valid for this class type");
2800 "This method is not defined or valid for this class type");
2809 "This method is not defined or valid for this class type");
2820 "This method is not defined or valid for this class type");
2829 const std::string varName,
2834 "This method is not defined or valid for this class type");
2842 "This method is not defined or valid for this class type");
2843 static map<int,RobinBCInfoSharedPtr> result;
2855 "This method is not defined or valid for this class type");
2860 unsigned int regionId,
2861 const std::string& variable)
2863 SpatialDomains::BoundaryConditionCollection::const_iterator collectionIter = collection.find(regionId);
2864 ASSERTL1(collectionIter != collection.end(),
"Unable to locate collection "+boost::lexical_cast<
string>(regionId));
2866 SpatialDomains::BoundaryConditionMap::const_iterator conditionMapIter = boundaryConditionMap->find(variable);
2867 ASSERTL1(conditionMapIter != boundaryConditionMap->end(),
"Unable to locate condition map.");
2869 return boundaryCondition;
2875 "This method is not defined or valid for this class type");
2885 switch(exp->DetShapeType())
2898 exp->GetBasis(1)->GetBasisKey(),
2899 nexp->GetNodalPointsKey().GetPointsType());
2905 exp->GetBasis(1)->GetBasisKey());
2912 exp->GetBasis(1)->GetBasisKey());
2917 exp->GetBasis(1)->GetBasisKey(),
2918 exp->GetBasis(2)->GetBasisKey());
2923 exp->GetBasis(1)->GetBasisKey(),
2924 exp->GetBasis(2)->GetBasisKey());
2929 exp->GetBasis(1)->GetBasisKey(),
2930 exp->GetBasis(2)->GetBasisKey());
2935 exp->GetBasis(1)->GetBasisKey(),
2936 exp->GetBasis(2)->GetBasisKey());
2939 ASSERTL0(
false,
"Shape type not setup");
2953 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
2955 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > >
::iterator it;
2959 Collections::CollectionOptimisation colOpt(
m_session, ImpType);
2960 ImpType = colOpt.GetDefaultImplementationType();
2962 bool autotuning = colOpt.IsUsingAutotuning();
2963 bool verbose = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
2964 (
m_comm->GetRank() == 0);
2965 int collmax = (colOpt.GetMaxCollectionSize() > 0
2966 ? colOpt.GetMaxCollectionSize()
2975 for (
int i = 0; i <
m_exp->size(); ++i)
2977 collections[(*m_exp)[i]->DetShapeType()].push_back(
2978 std::pair<LocalRegions::ExpansionSharedPtr,int> ((*
m_exp)[i],i));
2981 for (it = collections.begin(); it != collections.end(); ++it)
2985 Collections::OperatorImpMap impTypes = colOpt.GetOperatorImpMap(exp);
2986 vector<StdRegions::StdExpansionSharedPtr> collExp;
2995 if(it->second.size() == 1)
2997 collExp.push_back(it->second[0].first);
3003 impTypes = colOpt.SetWithTimings(collExp,
3007 Collections::Collection tmp(collExp, impTypes);
3013 collExp.push_back(it->second[0].first);
3014 int prevnCoeff = it->second[0].first->GetNcoeffs();
3015 int prevnPhys = it->second[0].first->GetTotPoints();
3018 for (
int i = 1; i < it->second.size(); ++i)
3020 int nCoeffs = it->second[i].first->GetNcoeffs();
3021 int nPhys = it->second[i].first->GetTotPoints();
3028 if(prevCoeffOffset + nCoeffs != coeffOffset ||
3029 prevnCoeff != nCoeffs ||
3030 prevPhysOffset + nPhys != physOffset ||
3031 prevnPhys != nPhys || collcnt >= collmax)
3039 impTypes = colOpt.SetWithTimings(collExp,
3044 Collections::Collection tmp(collExp, impTypes);
3053 collExp.push_back(it->second[i].first);
3058 collExp.push_back(it->second[i].first);
3063 if (i == it->second.size() - 1)
3069 impTypes = colOpt.SetWithTimings(collExp,
3073 Collections::Collection tmp(collExp, impTypes);
3080 prevCoeffOffset = coeffOffset;
3081 prevPhysOffset = physOffset;
3082 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)
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
const StdRegions::VarCoeffMap & GetVarCoeffs() const
GlobalSysSolnType GetGlobalSysSolnType() const
Return the associated solution type.
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.
virtual void v_GetBndElmtExpansion(int i, boost::shared_ptr< ExpList > &result)
void SetY(typename boost::call_traits< DataType >::const_reference val)
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.
boost::shared_ptr< GlobalMatrix > GenGlobalMatrix(const GlobalMatrixKey &mkey, const boost::shared_ptr< AssemblyMapCG > &locToGloMap)
Generates a global matrix from the given key and map.
#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)
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
boost::shared_ptr< Transposition > TranspositionSharedPtr
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
ExpList()
The default constructor.
static ExpListSharedPtr NullExpListSharedPtr
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
static Array< OneD, NekDouble > NullNekDouble1DArray
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
std::map< int, vector< PeriodicEntity > > PeriodicMap
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
boost::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
std::map< CoordType, NekDouble > COOMatType
virtual boost::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
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...
virtual void v_FillBndCondFromField()
void ExtractFileBCs(const std::string &fileName, const std::string &varName, const boost::shared_ptr< ExpList > locExpList)
boost::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
boost::shared_ptr< DNekMat > GenGlobalMatrixFull(const GlobalLinSysKey &mkey, const boost::shared_ptr< AssemblyMapCG > &locToGloMap)
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)
void Import(const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata=NullVectorNekDoubleVector, FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap, const Array< OneD, int > ElementiDs=NullInt1DArray)
Imports an FLD file.
ExpansionType GetExpType(void)
Returns the type of the expansion.
boost::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
StdRegions::StdExpansionSharedPtr GetStdExp(StdRegions::StdExpansionSharedPtr exp)
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 .
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...
map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
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.
virtual const vector< bool > & v_GetLeftAdjacentFaces(void) const
void ApplyGeomInfo()
Apply geometry information to each expansion.
const StdRegions::ConstFactorMap & GetConstFactors() const
Returns all the constants.
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)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
int GetExpSize(void)
This function returns the number of elements in the expansion.
boost::shared_ptr< GlobalMatrix > GlobalMatrixSharedPtr
Shared pointer to a GlobalMatrix object.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
boost::shared_ptr< StdNodalTriExp > StdNodalTriExpSharedPtr
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
boost::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...
virtual void v_ExtractElmtToBndPhys(int i, Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
std::vector< ExpansionSharedPtr > ExpansionVector
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
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="")
virtual NekDouble v_GetHomoLen(void)
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)
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset)
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
map< GlobalMatrixKey, DNekScalBlkMatSharedPtr > BlockMatrixMap
A map between global matrix keys and their associated block matrices.
boost::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
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_ExtractPhysToBndElmt(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
const char *const GlobalSysSolnTypeMap[]
virtual void v_GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
void SetZ(typename boost::call_traits< DataType >::const_reference val)
Base class for all multi-elemental spectral/hp expansions.
void ClearGlobalLinSysManager(void)
static const NekDouble kNekZeroTol
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)
int GetNVarCoeffs() const
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.
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
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
boost::shared_ptr< GlobalLinSys > GenGlobalLinSys(const GlobalLinSysKey &mkey, const boost::shared_ptr< AssemblyMapCG > &locToGloMap)
This operation constructs the global linear system of type mkey.
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
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 .
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
virtual void v_HomogeneousFwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
virtual void v_LocalToGlobal(void)
LibUtilities::ShapeType GetShapeType() const
Return the expansion type associated with key.
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)
LibUtilities::SessionReaderSharedPtr m_session
Session.
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
boost::shared_ptr< Expansion > ExpansionSharedPtr
std::map< int, BoundaryConditionMapShPtr > BoundaryConditionCollection
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
virtual void v_ClearGlobalLinSysManager(void)
Describe a linear system.
void FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual boost::shared_ptr< ExpList > & v_GetTrace()
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
virtual void v_ExtractCoeffsToCoeffs(const boost::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
virtual boost::shared_ptr< ExpList > & v_GetPlane(int n)
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
Describes a matrix with ordering defined by a local to global map.
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
MultiRegions::Direction const DirCartesianMap[]
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
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)
void ExtractCoeffsToCoeffs(const boost::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...
boost::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
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)
virtual map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
#define WARNINGL1(condition, msg)
void SetX(typename boost::call_traits< DataType >::const_reference val)
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)
int GetNcoeffs(void) const
Returns the total number of local degrees of freedom .
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)
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)
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)
Class for operating on FLD files.
static SpatialDomains::BoundaryConditionShPtr GetBoundaryCondition(const SpatialDomains::BoundaryConditionCollection &collection, unsigned int index, const std::string &variable)
boost::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
boost::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
void CreateCollections(Collections::ImplementationType ImpType=Collections::eNoImpType)
Construct collections of elements containing a single element type and polynomial order from the list...
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)
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()
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
boost::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
GlobalLinSysFactory & GetGlobalLinSysFactory()
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
void WriteVtkHeader(std::ostream &outfile)
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...
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
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.
virtual void v_WriteTecplotField(std::ostream &outfile, int expansion)
boost::shared_ptr< PointGeom > PointGeomSharedPtr
Collections::CollectionVector m_collections
virtual void v_ReadGlobalOptimizationParameters()
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_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)