62 #include <Collections/CollectionOptimisation.h>
63 #include <Collections/Operator.h>
69 namespace MultiRegions
105 ::AllocateSharedPtr()),
123 m_comm(pSession->GetComm()),
132 ::AllocateSharedPtr()),
151 m_comm(pSession->GetComm()),
160 ::AllocateSharedPtr()),
176 const std::vector<unsigned int> &eIDs,
177 const bool DeclareCoeffPhysArrays):
179 m_session(in.m_session),
187 ::AllocateSharedPtr()),
196 for (
int i=0; i < eIDs.size(); ++i)
198 (*m_exp).push_back( (*(in.
m_exp))[eIDs[i]]);
200 m_npoints += (*m_exp)[i]->GetTotPoints();
203 if(DeclareCoeffPhysArrays)
217 m_session(in.m_session),
219 m_ncoeffs(in.m_ncoeffs),
220 m_npoints(in.m_npoints),
223 m_collections(in.m_collections),
224 m_coll_coeff_offset(in.m_coll_coeff_offset),
225 m_coll_phys_offset(in.m_coll_phys_offset),
226 m_coeff_offset(in.m_coeff_offset),
227 m_phys_offset(in.m_phys_offset),
228 m_offset_elmt_id(in.m_offset_elmt_id),
229 m_globalOptParam(in.m_globalOptParam),
230 m_blockMat(in.m_blockMat),
235 if(DeclareCoeffPhysArrays)
281 "local physical space is not true ");
309 for(i = 0; i < (*m_exp).size(); ++i)
333 int nrows = blockmat->GetRows();
334 int ncols = blockmat->GetColumns();
341 out = (*blockmat)*in;
391 for(i = 0; i < (*m_exp).size(); ++i)
393 (*m_exp)[i]->IProductWRTDerivBase(dir,inarray+
m_phys_offset[i],
417 ASSERTL1(inarray.num_elements() >= dim,
"inarray is not of sufficient dimension");
452 ASSERTL0(
false,
"Dimension of inarray not correct");
501 e_out_d0 = out_d0 + offset;
502 e_out_d1 = out_d1 + offset;
503 e_out_d2 = out_d2 + offset;
507 e_out_d0,e_out_d1, e_out_d2);
527 for(i=0; i<(*m_exp).size(); ++i)
530 (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
536 for(i=0; i<(*m_exp).size(); i++)
539 (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
545 int intdir= (int)edir;
547 for(i= 0; i < (*m_exp).size(); ++i)
550 (*m_exp)[i]->PhysDeriv(intdir, inarray+m_phys_offset[i], e_out_d);
574 if(inarray.get() == outarray.get())
622 for(i= 0; i < (*m_exp).size(); ++i)
624 (*m_exp)[i]->FwdTrans_BndConstrained(inarray+
m_phys_offset[i],
650 (*
m_exp)[0]->GetBasisType(0)
652 "Smoothing is currently not allowed unless you are using "
653 "a nodal base for efficiency reasons. The implemented "
654 "smoothing technique requires the mass matrix inversion "
655 "which is trivial just for GLL_LAGRANGE_SEM and "
656 "GAUSS_LAGRANGE_SEMexpansions.");
685 map<int,int> elmt_id;
690 for(i = 0 ; i < (*m_exp).size(); ++i)
701 n_exp = (*m_exp).size();
702 for(i = 0; i < n_exp; ++i)
716 for(i = 0; i < n_exp; ++i)
718 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
719 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
726 for(i = 0; i < n_exp; ++i)
728 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
729 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
740 for(i = 0; i < n_exp; ++i)
742 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
743 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
751 for(i = 0; i < n_exp; ++i)
753 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
754 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
762 for(i = 0; i < n_exp; ++i)
764 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
765 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
773 "Global Matrix creation not defined for this type "
786 for(i = cnt1 = 0; i < n_exp; ++i)
794 StdRegions::VarCoeffMap::const_iterator x;
802 (*m_exp)[eid]->DetShapeType(),
807 loc_mat = boost::dynamic_pointer_cast<
LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
808 BlkMatrix->SetBlock(i,i,loc_mat);
825 return matrixIter->second;
842 for(
int n = 0; n < num_elmts.num_elements(); ++n)
862 for(i= 0; i < num_elmts[n]; ++i)
870 StdRegions::VarCoeffMap::const_iterator x;
878 (*m_exp)[eid]->DetShapeType(),
901 int i,j,n,gid1,gid2,cntdim1,cntdim2;
905 unsigned int glob_rows;
906 unsigned int glob_cols;
907 unsigned int loc_rows;
908 unsigned int loc_cols;
910 bool assembleFirstDim;
911 bool assembleSecondDim;
918 glob_cols = locToGloMap->GetNumGlobalCoeffs();
920 assembleFirstDim =
false;
921 assembleSecondDim =
true;
926 glob_rows = locToGloMap->GetNumGlobalCoeffs();
929 assembleFirstDim =
true;
930 assembleSecondDim =
false;
938 glob_rows = locToGloMap->GetNumGlobalCoeffs();
939 glob_cols = locToGloMap->GetNumGlobalCoeffs();
941 assembleFirstDim =
true;
942 assembleSecondDim =
true;
948 "Global Matrix creation not defined for this type "
960 for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
968 StdRegions::VarCoeffMap::const_iterator x;
976 (*m_exp)[eid]->DetShapeType(),
982 loc_rows = loc_mat->GetRows();
983 loc_cols = loc_mat->GetColumns();
985 for(i = 0; i < loc_rows; ++i)
989 gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
990 sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
998 for(j = 0; j < loc_cols; ++j)
1000 if(assembleSecondDim)
1003 ->GetLocalToGlobalMap(cntdim2 + j);
1005 ->GetLocalToGlobalSign(cntdim2 + j);
1014 coord = make_pair(gid1,gid2);
1015 if( spcoomat.count(coord) == 0 )
1017 spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1021 spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1025 cntdim1 += loc_rows;
1026 cntdim2 += loc_cols;
1036 int i,j,n,gid1,gid2,loc_lda,eid;
1040 int totDofs = locToGloMap->GetNumGlobalCoeffs();
1041 int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
1043 unsigned int rows = totDofs - NumDirBCs;
1044 unsigned int cols = totDofs - NumDirBCs;
1048 int bwidth = locToGloMap->GetFullSystemBandWidth();
1060 if( (2*(bwidth+1)) < rows)
1080 for(n = 0; n < (*m_exp).size(); ++n)
1088 StdRegions::VarCoeffMap::const_iterator x;
1096 (*m_exp)[eid]->DetShapeType(),
1103 if(RobinBCInfo.count(n) != 0)
1108 int rows = loc_mat->GetRows();
1109 int cols = loc_mat->GetColumns();
1110 const NekDouble *dat = loc_mat->GetRawPtr();
1112 Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
1115 for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
1117 (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
1125 loc_lda = loc_mat->GetColumns();
1127 for(i = 0; i < loc_lda; ++i)
1129 gid1 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + i) - NumDirBCs;
1130 sign1 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + i);
1133 for(j = 0; j < loc_lda; ++j)
1135 gid2 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + j) - NumDirBCs;
1136 sign2 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + j);
1143 if((matStorage ==
eFULL)||(gid2 >= gid1))
1145 value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
1146 Gmat->SetValue(gid1,gid2,value);
1186 ASSERTL0(
false,
"Matrix solution type not defined");
1191 vExpList, locToGloMap);
1199 const map<int,RobinBCInfoSharedPtr> vRobinBCInfo =
GetRobinBCInfo();
1205 ASSERTL0(
false,
"Matrix solution type not defined");
1210 vExpList,locToGloMap);
1247 for (
int i = 0; i < (*m_exp).size(); ++i)
1249 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1254 ASSERTL0(
false,
"Cannot find element for this point.");
1267 bool returnNearestElmt)
1271 return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1278 bool returnNearestElmt)
1286 std::vector<std::pair<int,NekDouble> > elmtIdDist;
1296 for (
int i = 0; i < (*m_exp).size(); ++i)
1298 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1302 w.
SetX(gloCoords[0]);
1303 w.
SetY(gloCoords[1]);
1304 w.
SetZ(gloCoords[2]);
1307 for (
int j = 0; j < (*m_exp)[i]->GetNverts(); ++j) {
1309 (*
m_exp)[i]->GetGeom()->GetVid(j));
1310 if (j == 0 || dist > v->dist(w))
1315 elmtIdDist.push_back(
1316 std::pair<int, NekDouble>(i, dist));
1321 if (!elmtIdDist.empty())
1323 int min_id = elmtIdDist[0].first;
1326 for (
int i = 1; i < elmtIdDist.size(); ++i)
1328 if (elmtIdDist[i].second < min_d) {
1329 min_id = elmtIdDist[i].first;
1330 min_d = elmtIdDist[i].second;
1335 (*m_exp)[min_id]->GetGeom()->GetLocCoords(gloCoords,
1347 static int start = 0;
1353 for (
int i = start; i < (*m_exp).size(); ++i)
1355 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1364 if(nearpt < nearpt_min)
1367 nearpt_min = nearpt;
1368 Vmath::Vcopy(locCoords.num_elements(),locCoords,1,savLocCoords,1);
1373 for (
int i = 0; i < start; ++i)
1375 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1384 if(nearpt < nearpt_min)
1387 nearpt_min = nearpt;
1389 locCoords,1,savLocCoords,1);
1394 if(returnNearestElmt)
1397 std::string msg =
"Failed to find point within element to tolerance of "
1398 + boost::lexical_cast<std::string>(tol)
1399 +
" using local point ("
1400 + boost::lexical_cast<std::string>(locCoords[0]) +
","
1401 + boost::lexical_cast<std::string>(locCoords[1]) +
","
1402 + boost::lexical_cast<std::string>(locCoords[1])
1404 + boost::lexical_cast<std::string>(min_id);
1407 Vmath::Vcopy(locCoords.num_elements(),savLocCoords,1,locCoords,1);
1446 for (
int i = 0; i <
m_exp->size(); ++i)
1448 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
1453 for (
int i = 0; i <
m_exp->size(); ++i)
1455 (*m_exp)[i]->Reset();
1472 int coordim =
GetExp(0)->GetCoordim();
1473 char vars[3] = {
'x',
'y',
'z' };
1484 outfile <<
"Variables = x";
1485 for (
int i = 1; i < coordim; ++i)
1487 outfile <<
", " << vars[i];
1492 outfile <<
", " << var;
1495 outfile << std::endl << std::endl;
1508 int nBases = (*m_exp)[0]->GetNumBases();
1513 if (expansion == -1)
1521 GetCoords(coords[0], coords[1], coords[2]);
1523 for (i = 0; i <
m_exp->size(); ++i)
1527 for (j = 0; j < nBases; ++j)
1529 numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1532 numBlocks += numInt;
1537 nPoints = (*m_exp)[expansion]->GetTotPoints();
1543 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1546 for (j = 0; j < nBases; ++j)
1548 numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1556 int nPlanes =
GetZIDs().num_elements();
1557 NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1558 numBlocks = (int)tmp;
1566 outfile <<
"Zone, N=" << nPoints <<
", E="
1567 << numBlocks <<
", F=FEBlock" ;
1572 outfile <<
", ET=QUADRILATERAL" << std::endl;
1575 outfile <<
", ET=BRICK" << std::endl;
1578 ASSERTL0(
false,
"Not set up for this type of output");
1583 for (j = 0; j < coordim; ++j)
1585 for (i = 0; i < nPoints; ++i)
1587 outfile << coords[j][i] <<
" ";
1588 if (i % 1000 == 0 && i)
1590 outfile << std::endl;
1593 outfile << std::endl;
1601 int nbase = (*m_exp)[0]->GetNumBases();
1604 boost::shared_ptr<LocalRegions::ExpansionVector> exp =
m_exp;
1606 if (expansion != -1)
1608 exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1610 (*exp)[0] = (*m_exp)[expansion];
1615 for(i = 0; i < (*exp).size(); ++i)
1617 const int np0 = (*exp)[i]->GetNumPoints(0);
1618 const int np1 = (*exp)[i]->GetNumPoints(1);
1620 for(j = 1; j < np1; ++j)
1622 for(k = 1; k < np0; ++k)
1624 outfile << cnt + (j-1)*np0 + k <<
" ";
1625 outfile << cnt + (j-1)*np0 + k+1 <<
" ";
1626 outfile << cnt + j *np0 + k+1 <<
" ";
1627 outfile << cnt + j *np0 + k << endl;
1634 else if (nbase == 3)
1636 for(i = 0; i < (*exp).size(); ++i)
1638 const int np0 = (*exp)[i]->GetNumPoints(0);
1639 const int np1 = (*exp)[i]->GetNumPoints(1);
1640 const int np2 = (*exp)[i]->GetNumPoints(2);
1641 const int np01 = np0*np1;
1643 for(j = 1; j < np2; ++j)
1645 for(k = 1; k < np1; ++k)
1647 for(l = 1; l < np0; ++l)
1649 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l <<
" ";
1650 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 <<
" ";
1651 outfile << cnt + (j-1)*np01 + k *np0 + l+1 <<
" ";
1652 outfile << cnt + (j-1)*np01 + k *np0 + l <<
" ";
1653 outfile << cnt + j *np01 + (k-1)*np0 + l <<
" ";
1654 outfile << cnt + j *np01 + (k-1)*np0 + l+1 <<
" ";
1655 outfile << cnt + j *np01 + k *np0 + l+1 <<
" ";
1656 outfile << cnt + j *np01 + k *np0 + l << endl;
1665 ASSERTL0(
false,
"Not set up for this dimension");
1676 if (expansion == -1)
1684 for(
int i = 0; i < totpoints; ++i)
1686 outfile <<
m_phys[i] <<
" ";
1687 if(i % 1000 == 0 && i)
1689 outfile << std::endl;
1692 outfile << std::endl;
1697 int nPoints = (*m_exp)[expansion]->GetTotPoints();
1699 for (
int i = 0; i < nPoints; ++i)
1704 outfile << std::endl;
1710 outfile <<
"<?xml version=\"1.0\"?>" << endl;
1711 outfile <<
"<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1712 <<
"byte_order=\"LittleEndian\">" << endl;
1713 outfile <<
" <UnstructuredGrid>" << endl;
1718 outfile <<
" </UnstructuredGrid>" << endl;
1719 outfile <<
"</VTKFile>" << endl;
1724 ASSERTL0(
false,
"Routine not implemented for this expansion.");
1729 outfile <<
" </PointData>" << endl;
1730 outfile <<
" </Piece>" << endl;
1737 int nq = (*m_exp)[expansion]->GetTotPoints();
1740 outfile <<
" <DataArray type=\"Float64\" Name=\""
1741 << var <<
"\">" << endl;
1744 for(i = 0; i < nq; ++i)
1749 outfile <<
" </DataArray>" << endl;
1784 err = max(err, abs(inarray[i] - soln[i]));
1818 for (i = 0; i < (*m_exp).size(); ++i)
1826 for (i = 0; i < (*m_exp).size(); ++i)
1844 for (i = 0; i < (*m_exp).size(); ++i)
1856 "This method is not defined or valid for this class type");
1864 "This method is not defined or valid for this class type");
1872 "This method is not defined or valid for this class type");
1880 "This method is not defined or valid for this class type");
1888 "This method is not defined or valid for this class type");
1897 "This method is not defined or valid for this class type");
1902 "This method is not defined or valid for this class type");
1908 "This method is not defined or valid for this class type");
1912 const std::string &fileName,
1913 const std::string &varName,
1914 const boost::shared_ptr<ExpList> locExpList)
1916 string varString = fileName.substr(0, fileName.find_last_of(
"."));
1917 int j, k, len = varString.length();
1918 varString = varString.substr(len-1, len);
1920 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1921 std::vector<std::vector<NekDouble> > FieldData;
1924 f.
Import(fileName, FieldDef, FieldData);
1927 for (j = 0; j < FieldDef.size(); ++j)
1929 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
1931 if (FieldDef[j]->m_fields[k] == varName)
1934 locExpList->ExtractDataToCoeffs(
1935 FieldDef[j], FieldData[j],
1936 FieldDef[j]->m_fields[k],
1937 locExpList->UpdateCoeffs());
1943 ASSERTL0(found,
"Could not find variable '"+varName+
1944 "' in file boundary condition "+fileName);
1945 locExpList->BwdTrans_IterPerExp(
1946 locExpList->GetCoeffs(),
1947 locExpList->UpdatePhys());
1974 for (i = 0; i < (*m_exp).size(); ++i)
1989 std::vector<NekDouble> &HomoLen,
1991 std::vector<unsigned int> &HomoSIDs,
1992 std::vector<unsigned int> &HomoZIDs,
1993 std::vector<unsigned int> &HomoYIDs)
2000 ASSERTL1(NumHomoDir == HomoBasis.num_elements(),
"Homogeneous basis is not the same length as NumHomoDir");
2001 ASSERTL1(NumHomoDir == HomoLen.size(),
"Homogeneous length vector is not the same length as NumHomDir");
2004 switch((*
m_exp)[0]->GetShapeDimension())
2020 for(s = startenum; s <= endenum; ++s)
2022 std::vector<unsigned int> elementIDs;
2023 std::vector<LibUtilities::BasisType> basis;
2024 std::vector<unsigned int> numModes;
2025 std::vector<std::string> fields;
2028 bool UniOrder =
true;
2033 for(
int i = 0; i < (*m_exp).size(); ++i)
2035 if((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
2037 elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
2040 for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2042 basis.push_back((*
m_exp)[i]->GetBasis(j)->GetBasisType());
2043 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
2047 for(n = 0 ; n < NumHomoDir; ++n)
2049 basis.push_back(HomoBasis[n]->GetBasisType());
2050 numModes.push_back(HomoBasis[n]->GetNumModes());
2057 ASSERTL0((*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
"Routine is not set up for multiple bases definitions");
2059 for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2061 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
2062 if(numModes[j] != (*
m_exp)[i]->GetBasis(j)->GetNumModes())
2068 for(n = 0 ; n < NumHomoDir; ++n)
2070 numModes.push_back(HomoBasis[n]->GetNumModes());
2077 if(elementIDs.size() > 0)
2082 UniOrder, numModes,fields,
2083 NumHomoDir, HomoLen, homoStrips,
2084 HomoSIDs, HomoZIDs, HomoYIDs);
2085 fielddef.push_back(fdef);
2096 std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2120 map<int, int> ElmtID_to_ExpID;
2121 for(i = 0; i < (*m_exp).size(); ++i)
2123 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2126 for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2128 int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2129 int datalen = (*m_exp)[eid]->GetNcoeffs();
2130 fielddata.insert(fielddata.end(),&coeffs[
m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2138 std::vector<NekDouble> &fielddata,
2160 std::vector<NekDouble> &fielddata,
2166 int modes_offset = 0;
2167 int datalen = fielddata.size()/fielddef->m_fields.size();
2170 for(i = 0; i < fielddef->m_fields.size(); ++i)
2172 if(fielddef->m_fields[i] == field)
2179 ASSERTL0(i != fielddef->m_fields.size(),
2180 "Field (" + field +
") not found in file.");
2183 map<int, int> elmtToExpId;
2188 for(i = (*m_exp).size()-1; i >= 0; --i)
2190 elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2193 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2197 if (fielddef->m_uniOrder ==
true)
2203 fielddef->m_numModes, modes_offset);
2205 const int elmtId = fielddef->m_elementIDs[i];
2206 if (elmtToExpId.count(elmtId) == 0)
2209 modes_offset += (*m_exp)[0]->GetNumBases();
2213 expId = elmtToExpId[elmtId];
2222 (*m_exp)[expId]->ExtractDataToCoeffs(
2223 &fielddata[offset], fielddef->m_numModes,
2228 modes_offset += (*m_exp)[0]->GetNumBases();
2239 for(i = 0; i < (*m_exp).size(); ++i)
2241 std::vector<unsigned int> nummodes;
2243 for(
int j= 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
2245 nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
2248 (*m_exp)[eid]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2251 offset += fromExpList->GetExp(eid)->GetNcoeffs();
2260 "This method is not defined or valid for this class type");
2268 "This method is not defined or valid for this class type");
2269 static boost::shared_ptr<ExpList> result;
2280 "This method is not defined or valid for this class type");
2290 "This method is not defined or valid for this class type");
2296 "This method is not defined or valid for this class type");
2297 static boost::shared_ptr<ExpList> returnVal;
2304 "This method is not defined or valid for this class type");
2305 static boost::shared_ptr<AssemblyMapDG> result;
2311 return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2318 "This method is not defined or valid for this class type");
2327 "This method is not defined or valid for this class type");
2335 "This method is not defined or valid for this class type");
2344 "This method is not defined or valid for this class type");
2351 "This method is not defined or valid for this class type");
2360 "This method is not defined or valid for this class type");
2366 "This method is not defined or valid for this class type");
2367 vector<bool> returnval;
2375 "This method is not defined or valid for this class type");
2383 "This method is not defined or valid for this class type");
2392 "This method is not defined or valid for this class type");
2403 ASSERTL0(
false,
"HelmSolve not implemented.");
2415 "This method is not defined or valid for this class type");
2427 "This method is not defined or valid for this class type");
2437 "This method is not defined or valid for this class type");
2447 "This method is not defined or valid for this class type");
2453 "This method is not defined or valid for this class type");
2461 "This method is not defined or valid for this class type");
2470 "This method is not defined or valid for this class type");
2484 (*m_exp)[i]->NormVectorIProductWRTBase(
2494 (*m_exp)[i]->NormVectorIProductWRTBase(
2505 (*m_exp)[i]->NormVectorIProductWRTBase(
2514 ASSERTL0(
false,
"Dimension not supported");
2522 "This method is not defined or valid for this class type");
2530 "This method is not defined or valid for this class type");
2536 "This method is not defined or valid for this class type");
2542 "This method is not defined or valid for this class type");
2612 for(i= 0; i < (*m_exp).size(); ++i)
2615 (*m_exp)[i]->GetCoords(e_coord_0);
2619 ASSERTL0(coord_1.num_elements() != 0,
2620 "output coord_1 is not defined");
2622 for(i= 0; i < (*m_exp).size(); ++i)
2625 e_coord_1 = coord_1 + m_phys_offset[i];
2626 (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2630 ASSERTL0(coord_1.num_elements() != 0,
2631 "output coord_1 is not defined");
2632 ASSERTL0(coord_2.num_elements() != 0,
2633 "output coord_2 is not defined");
2635 for(i= 0; i < (*m_exp).size(); ++i)
2638 e_coord_1 = coord_1 + m_phys_offset[i];
2639 e_coord_2 = coord_2 + m_phys_offset[i];
2640 (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
2651 "This method is not defined or valid for this class type");
2657 boost::shared_ptr<ExpList> &result)
2660 "This method is not defined or valid for this class type");
2681 for (cnt = n = 0; n < i; ++n)
2692 elmt =
GetExp(ElmtID[cnt+n]);
2693 elmt->GetTracePhysVals(EdgeID[cnt+n],
2695 tmp1 = element + offsetElmt,
2696 tmp2 = boundary + offsetBnd);
2698 offsetElmt += elmt->GetTotPoints();
2715 for (cnt = n = 0; n < i; ++n)
2724 npoints +=
GetExp(ElmtID[cnt+n])->GetTotPoints();
2735 nq =
GetExp(ElmtID[cnt+n])->GetTotPoints();
2738 tmp2 = bndElmt + offsetElmt, 1);
2758 for (j = 0; j < coordim; ++j)
2765 for (cnt = n = 0; n < i; ++n)
2776 elmt =
GetExp(ElmtID[cnt+n]);
2778 = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
2780 for (j = 0; j < coordim; ++j)
2783 tmp = normals[j] + offset, 1);
2794 "This method is not defined or valid for this class type");
2802 "This method is not defined or valid for this class type");
2811 "This method is not defined or valid for this class type");
2822 "This method is not defined or valid for this class type");
2831 const std::string varName,
2836 "This method is not defined or valid for this class type");
2844 "This method is not defined or valid for this class type");
2845 static map<int,RobinBCInfoSharedPtr> result;
2857 "This method is not defined or valid for this class type");
2862 unsigned int regionId,
2863 const std::string& variable)
2865 SpatialDomains::BoundaryConditionCollection::const_iterator collectionIter = collection.find(regionId);
2866 ASSERTL1(collectionIter != collection.end(),
"Unable to locate collection "+boost::lexical_cast<
string>(regionId));
2868 SpatialDomains::BoundaryConditionMap::const_iterator conditionMapIter = boundaryConditionMap->find(variable);
2869 ASSERTL1(conditionMapIter != boundaryConditionMap->end(),
"Unable to locate condition map.");
2871 return boundaryCondition;
2877 "This method is not defined or valid for this class type");
2887 switch(exp->DetShapeType())
2900 exp->GetBasis(1)->GetBasisKey(),
2901 nexp->GetNodalPointsKey().GetPointsType());
2907 exp->GetBasis(1)->GetBasisKey());
2914 exp->GetBasis(1)->GetBasisKey());
2919 exp->GetBasis(1)->GetBasisKey(),
2920 exp->GetBasis(2)->GetBasisKey());
2925 exp->GetBasis(1)->GetBasisKey(),
2926 exp->GetBasis(2)->GetBasisKey());
2931 exp->GetBasis(1)->GetBasisKey(),
2932 exp->GetBasis(2)->GetBasisKey());
2937 exp->GetBasis(1)->GetBasisKey(),
2938 exp->GetBasis(2)->GetBasisKey());
2941 ASSERTL0(
false,
"Shape type not setup");
2955 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
2957 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > >
::iterator it;
2961 Collections::CollectionOptimisation colOpt(
m_session, ImpType);
2962 ImpType = colOpt.GetDefaultImplementationType();
2964 bool autotuning = colOpt.IsUsingAutotuning();
2965 bool verbose = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
2966 (
m_comm->GetRank() == 0);
2967 int collmax = (colOpt.GetMaxCollectionSize() > 0
2968 ? colOpt.GetMaxCollectionSize()
2977 for (
int i = 0; i <
m_exp->size(); ++i)
2979 collections[(*m_exp)[i]->DetShapeType()].push_back(
2980 std::pair<LocalRegions::ExpansionSharedPtr,int> ((*
m_exp)[i],i));
2983 for (it = collections.begin(); it != collections.end(); ++it)
2987 Collections::OperatorImpMap impTypes = colOpt.GetOperatorImpMap(exp);
2988 vector<StdRegions::StdExpansionSharedPtr> collExp;
2997 if(it->second.size() == 1)
2999 collExp.push_back(it->second[0].first);
3005 impTypes = colOpt.SetWithTimings(collExp,
3009 Collections::Collection tmp(collExp, impTypes);
3015 collExp.push_back(it->second[0].first);
3016 int prevnCoeff = it->second[0].first->GetNcoeffs();
3017 int prevnPhys = it->second[0].first->GetTotPoints();
3020 for (
int i = 1; i < it->second.size(); ++i)
3022 int nCoeffs = it->second[i].first->GetNcoeffs();
3023 int nPhys = it->second[i].first->GetTotPoints();
3030 if(prevCoeffOffset + nCoeffs != coeffOffset ||
3031 prevnCoeff != nCoeffs ||
3032 prevPhysOffset + nPhys != physOffset ||
3033 prevnPhys != nPhys || collcnt >= collmax)
3041 impTypes = colOpt.SetWithTimings(collExp,
3046 Collections::Collection tmp(collExp, impTypes);
3055 collExp.push_back(it->second[i].first);
3060 collExp.push_back(it->second[i].first);
3065 if (i == it->second.size() - 1)
3071 impTypes = colOpt.SetWithTimings(collExp,
3075 Collections::Collection tmp(collExp, impTypes);
3082 prevCoeffOffset = coeffOffset;
3083 prevPhysOffset = physOffset;
3084 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.
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...
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 std::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()
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()
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
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.
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
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)
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)
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)