69 namespace MultiRegions
105 ::AllocateSharedPtr()),
122 m_comm(pSession->GetComm()),
131 ::AllocateSharedPtr()),
149 m_comm(pSession->GetComm()),
158 ::AllocateSharedPtr()),
173 const std::vector<unsigned int> &eIDs,
174 const bool DeclareCoeffPhysArrays):
176 m_session(in.m_session),
184 ::AllocateSharedPtr()),
192 for (
int i=0; i < eIDs.size(); ++i)
194 (*m_exp).push_back( (*(in.
m_exp))[eIDs[i]]);
196 m_npoints += (*m_exp)[i]->GetTotPoints();
199 if(DeclareCoeffPhysArrays)
213 m_session(in.m_session),
215 m_ncoeffs(in.m_ncoeffs),
216 m_npoints(in.m_npoints),
219 m_collections(in.m_collections),
220 m_coll_coeff_offset(in.m_coll_coeff_offset),
221 m_coll_phys_offset(in.m_coll_phys_offset),
222 m_coeff_offset(in.m_coeff_offset),
223 m_phys_offset(in.m_phys_offset),
224 m_globalOptParam(in.m_globalOptParam),
225 m_blockMat(in.m_blockMat),
230 if(DeclareCoeffPhysArrays)
257 for(i = 0; i <
m_exp->size(); ++i)
261 m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
262 m_npoints += (*m_exp)[i]->GetTotPoints();
305 "local physical space is not true ");
333 for(i = 0; i < (*m_exp).size(); ++i)
357 int nrows = blockmat->GetRows();
358 int ncols = blockmat->GetColumns();
365 out = (*blockmat)*in;
415 for(i = 0; i < (*m_exp).size(); ++i)
417 (*m_exp)[i]->IProductWRTDerivBase(dir,inarray+
m_phys_offset[i],
441 ASSERTL1(inarray.num_elements() >= dim,
"inarray is not of sufficient dimension");
476 ASSERTL0(
false,
"Dimension of inarray not correct");
526 e_out_d0 = out_d0 + offset;
527 e_out_d1 = out_d1 + offset;
528 e_out_d2 = out_d2 + offset;
532 e_out_d0,e_out_d1, e_out_d2);
552 for(i=0; i<(*m_exp).size(); ++i)
555 (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
561 for(i=0; i<(*m_exp).size(); i++)
564 (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
570 int intdir= (int)edir;
576 e_out_d = out_d + offset;
595 bool halfMode =
false;
598 m_session->MatchSolverInfo(
"ModeType",
"HalfMode",
652 ASSERTL0(0,
"Dimension not supported");
674 if(inarray.get() == outarray.get())
722 for(i= 0; i < (*m_exp).size(); ++i)
724 (*m_exp)[i]->FwdTrans_BndConstrained(inarray+
m_phys_offset[i],
750 (*
m_exp)[0]->GetBasisType(0)
752 "Smoothing is currently not allowed unless you are using "
753 "a nodal base for efficiency reasons. The implemented "
754 "smoothing technique requires the mass matrix inversion "
755 "which is trivial just for GLL_LAGRANGE_SEM and "
756 "GAUSS_LAGRANGE_SEMexpansions.");
785 map<int,int> elmt_id;
790 for(i = 0 ; i < (*m_exp).size(); ++i)
792 if((*
m_exp)[i]->DetShapeType()
795 elmt_id[n_exp++] = i;
801 n_exp = (*m_exp).size();
802 for(i = 0; i < n_exp; ++i)
816 for(i = 0; i < n_exp; ++i)
818 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
819 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
826 for(i = 0; i < n_exp; ++i)
828 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
829 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
840 for(i = 0; i < n_exp; ++i)
842 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
843 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
851 for(i = 0; i < n_exp; ++i)
853 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
854 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
862 for(i = 0; i < n_exp; ++i)
864 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
865 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
873 "Global Matrix creation not defined for this type "
886 for(i = cnt1 = 0; i < n_exp; ++i)
894 StdRegions::VarCoeffMap::const_iterator x;
902 (*m_exp)[eid]->DetShapeType(),
907 loc_mat = boost::dynamic_pointer_cast<
LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
908 BlkMatrix->SetBlock(i,i,loc_mat);
925 return matrixIter->second;
942 for(
int n = 0; n < num_elmts.num_elements(); ++n)
962 for(i= 0; i < num_elmts[n]; ++i)
970 StdRegions::VarCoeffMap::const_iterator x;
978 (*m_exp)[eid]->DetShapeType(),
1001 int i,j,n,gid1,gid2,cntdim1,cntdim2;
1005 unsigned int glob_rows;
1006 unsigned int glob_cols;
1007 unsigned int loc_rows;
1008 unsigned int loc_cols;
1010 bool assembleFirstDim;
1011 bool assembleSecondDim;
1018 glob_cols = locToGloMap->GetNumGlobalCoeffs();
1020 assembleFirstDim =
false;
1021 assembleSecondDim =
true;
1026 glob_rows = locToGloMap->GetNumGlobalCoeffs();
1029 assembleFirstDim =
true;
1030 assembleSecondDim =
false;
1038 glob_rows = locToGloMap->GetNumGlobalCoeffs();
1039 glob_cols = locToGloMap->GetNumGlobalCoeffs();
1041 assembleFirstDim =
true;
1042 assembleSecondDim =
true;
1048 "Global Matrix creation not defined for this type "
1060 for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
1068 StdRegions::VarCoeffMap::const_iterator x;
1076 (*m_exp)[eid]->DetShapeType(),
1082 loc_rows = loc_mat->GetRows();
1083 loc_cols = loc_mat->GetColumns();
1085 for(i = 0; i < loc_rows; ++i)
1087 if(assembleFirstDim)
1089 gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
1090 sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
1098 for(j = 0; j < loc_cols; ++j)
1100 if(assembleSecondDim)
1103 ->GetLocalToGlobalMap(cntdim2 + j);
1105 ->GetLocalToGlobalSign(cntdim2 + j);
1114 coord = make_pair(gid1,gid2);
1115 if( spcoomat.count(coord) == 0 )
1117 spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1121 spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1125 cntdim1 += loc_rows;
1126 cntdim2 += loc_cols;
1136 int i,j,n,gid1,gid2,loc_lda,eid;
1140 int totDofs = locToGloMap->GetNumGlobalCoeffs();
1141 int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
1143 unsigned int rows = totDofs - NumDirBCs;
1144 unsigned int cols = totDofs - NumDirBCs;
1148 int bwidth = locToGloMap->GetFullSystemBandWidth();
1160 if( (2*(bwidth+1)) < rows)
1180 for(n = 0; n < (*m_exp).size(); ++n)
1188 StdRegions::VarCoeffMap::const_iterator x;
1196 (*m_exp)[eid]->DetShapeType(),
1203 if(RobinBCInfo.count(n) != 0)
1208 int rows = loc_mat->GetRows();
1209 int cols = loc_mat->GetColumns();
1210 const NekDouble *dat = loc_mat->GetRawPtr();
1212 Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
1215 for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
1217 (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
1225 loc_lda = loc_mat->GetColumns();
1227 for(i = 0; i < loc_lda; ++i)
1229 gid1 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + i) - NumDirBCs;
1230 sign1 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + i);
1233 for(j = 0; j < loc_lda; ++j)
1235 gid2 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + j) - NumDirBCs;
1236 sign2 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + j);
1243 if((matStorage ==
eFULL)||(gid2 >= gid1))
1245 value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
1246 Gmat->SetValue(gid1,gid2,value);
1286 ASSERTL0(
false,
"Matrix solution type not defined");
1291 vExpList, locToGloMap);
1299 const map<int,RobinBCInfoSharedPtr> vRobinBCInfo =
GetRobinBCInfo();
1305 ASSERTL0(
false,
"Matrix solution type not defined");
1310 vExpList,locToGloMap);
1347 for (
int i = 0; i < (*m_exp).size(); ++i)
1349 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1354 ASSERTL0(
false,
"Cannot find element for this point.");
1367 bool returnNearestElmt)
1371 return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1378 bool returnNearestElmt)
1386 std::vector<std::pair<int,NekDouble> > elmtIdDist;
1396 for (
int i = 0; i < (*m_exp).size(); ++i)
1398 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1402 w.
SetX(gloCoords[0]);
1403 w.
SetY(gloCoords[1]);
1404 w.
SetZ(gloCoords[2]);
1407 for (
int j = 0; j < (*m_exp)[i]->GetNverts(); ++j) {
1409 (*
m_exp)[i]->GetGeom()->GetVid(j));
1410 if (j == 0 || dist > v->dist(w))
1415 elmtIdDist.push_back(
1416 std::pair<int, NekDouble>(i, dist));
1421 if (!elmtIdDist.empty())
1423 int min_id = elmtIdDist[0].first;
1426 for (
int i = 1; i < elmtIdDist.size(); ++i)
1428 if (elmtIdDist[i].second < min_d) {
1429 min_id = elmtIdDist[i].first;
1430 min_d = elmtIdDist[i].second;
1435 (*m_exp)[min_id]->GetGeom()->GetLocCoords(gloCoords,
1447 static int start = 0;
1453 for (
int i = start; i < (*m_exp).size(); ++i)
1455 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1464 if(nearpt < nearpt_min)
1467 nearpt_min = nearpt;
1468 Vmath::Vcopy(locCoords.num_elements(),locCoords,1,savLocCoords,1);
1473 for (
int i = 0; i < start; ++i)
1475 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1484 if(nearpt < nearpt_min)
1487 nearpt_min = nearpt;
1489 locCoords,1,savLocCoords,1);
1494 if(returnNearestElmt)
1497 std::string
msg =
"Failed to find point within element to tolerance of "
1498 + boost::lexical_cast<std::string>(tol)
1499 +
" using local point ("
1500 + boost::lexical_cast<std::string>(locCoords[0]) +
","
1501 + boost::lexical_cast<std::string>(locCoords[1]) +
","
1502 + boost::lexical_cast<std::string>(locCoords[1])
1504 + boost::lexical_cast<std::string>(min_id);
1507 Vmath::Vcopy(locCoords.num_elements(),savLocCoords,1,locCoords,1);
1546 for (
int i = 0; i <
m_exp->size(); ++i)
1548 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
1553 for (
int i = 0; i <
m_exp->size(); ++i)
1555 (*m_exp)[i]->Reset();
1572 int coordim =
GetExp(0)->GetCoordim();
1573 char vars[3] = {
'x',
'y',
'z' };
1584 outfile <<
"Variables = x";
1585 for (
int i = 1; i < coordim; ++i)
1587 outfile <<
", " << vars[i];
1592 outfile <<
", " << var;
1595 outfile << std::endl << std::endl;
1608 int nBases = (*m_exp)[0]->GetNumBases();
1613 if (expansion == -1)
1621 GetCoords(coords[0], coords[1], coords[2]);
1623 for (i = 0; i <
m_exp->size(); ++i)
1627 for (j = 0; j < nBases; ++j)
1629 numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1632 numBlocks += numInt;
1637 nPoints = (*m_exp)[expansion]->GetTotPoints();
1643 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1646 for (j = 0; j < nBases; ++j)
1648 numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1656 int nPlanes =
GetZIDs().num_elements();
1657 NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1658 numBlocks = (int)tmp;
1666 outfile <<
"Zone, N=" << nPoints <<
", E="
1667 << numBlocks <<
", F=FEBlock" ;
1672 outfile <<
", ET=QUADRILATERAL" << std::endl;
1675 outfile <<
", ET=BRICK" << std::endl;
1678 ASSERTL0(
false,
"Not set up for this type of output");
1683 for (j = 0; j < coordim; ++j)
1685 for (i = 0; i < nPoints; ++i)
1687 outfile << coords[j][i] <<
" ";
1688 if (i % 1000 == 0 && i)
1690 outfile << std::endl;
1693 outfile << std::endl;
1701 int nbase = (*m_exp)[0]->GetNumBases();
1704 boost::shared_ptr<LocalRegions::ExpansionVector> exp =
m_exp;
1706 if (expansion != -1)
1708 exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1710 (*exp)[0] = (*m_exp)[expansion];
1715 for(i = 0; i < (*exp).size(); ++i)
1717 const int np0 = (*exp)[i]->GetNumPoints(0);
1718 const int np1 = (*exp)[i]->GetNumPoints(1);
1720 for(j = 1; j < np1; ++j)
1722 for(k = 1; k < np0; ++k)
1724 outfile << cnt + (j-1)*np0 + k <<
" ";
1725 outfile << cnt + (j-1)*np0 + k+1 <<
" ";
1726 outfile << cnt + j *np0 + k+1 <<
" ";
1727 outfile << cnt + j *np0 + k << endl;
1734 else if (nbase == 3)
1736 for(i = 0; i < (*exp).size(); ++i)
1738 const int np0 = (*exp)[i]->GetNumPoints(0);
1739 const int np1 = (*exp)[i]->GetNumPoints(1);
1740 const int np2 = (*exp)[i]->GetNumPoints(2);
1741 const int np01 = np0*np1;
1743 for(j = 1; j < np2; ++j)
1745 for(k = 1; k < np1; ++k)
1747 for(l = 1; l < np0; ++l)
1749 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l <<
" ";
1750 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 <<
" ";
1751 outfile << cnt + (j-1)*np01 + k *np0 + l+1 <<
" ";
1752 outfile << cnt + (j-1)*np01 + k *np0 + l <<
" ";
1753 outfile << cnt + j *np01 + (k-1)*np0 + l <<
" ";
1754 outfile << cnt + j *np01 + (k-1)*np0 + l+1 <<
" ";
1755 outfile << cnt + j *np01 + k *np0 + l+1 <<
" ";
1756 outfile << cnt + j *np01 + k *np0 + l << endl;
1765 ASSERTL0(
false,
"Not set up for this dimension");
1776 if (expansion == -1)
1784 for(
int i = 0; i < totpoints; ++i)
1786 outfile <<
m_phys[i] <<
" ";
1787 if(i % 1000 == 0 && i)
1789 outfile << std::endl;
1792 outfile << std::endl;
1797 int nPoints = (*m_exp)[expansion]->GetTotPoints();
1799 for (
int i = 0; i < nPoints; ++i)
1804 outfile << std::endl;
1810 outfile <<
"<?xml version=\"1.0\"?>" << endl;
1811 outfile <<
"<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1812 <<
"byte_order=\"LittleEndian\">" << endl;
1813 outfile <<
" <UnstructuredGrid>" << endl;
1818 outfile <<
" </UnstructuredGrid>" << endl;
1819 outfile <<
"</VTKFile>" << endl;
1824 ASSERTL0(
false,
"Routine not implemented for this expansion.");
1829 outfile <<
" </PointData>" << endl;
1830 outfile <<
" </Piece>" << endl;
1837 int nq = (*m_exp)[expansion]->GetTotPoints();
1840 outfile <<
" <DataArray type=\"Float64\" Name=\""
1841 << var <<
"\">" << endl;
1844 for(i = 0; i < nq; ++i)
1849 outfile <<
" </DataArray>" << endl;
1884 err = max(err, abs(inarray[i] - soln[i]));
1918 for (i = 0; i < (*m_exp).size(); ++i)
1926 for (i = 0; i < (*m_exp).size(); ++i)
1944 for (i = 0; i < (*m_exp).size(); ++i)
1956 "This method is not defined or valid for this class type");
1964 "This method is not defined or valid for this class type");
1972 "This method is not defined or valid for this class type");
1980 "This method is not defined or valid for this class type");
1988 "This method is not defined or valid for this class type");
1997 "This method is not defined or valid for this class type");
2002 "This method is not defined or valid for this class type");
2008 "This method is not defined or valid for this class type");
2012 const std::string &fileName,
2014 const std::string &varName,
2015 const boost::shared_ptr<ExpList> locExpList)
2017 string varString = fileName.substr(0, fileName.find_last_of(
"."));
2018 int j, k, len = varString.length();
2019 varString = varString.substr(len-1, len);
2021 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
2022 std::vector<std::vector<NekDouble> > FieldData;
2028 f->Import(fileName, FieldDef, FieldData);
2031 for (j = 0; j < FieldDef.size(); ++j)
2033 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
2035 if (FieldDef[j]->m_fields[k] == varName)
2038 locExpList->ExtractDataToCoeffs(
2039 FieldDef[j], FieldData[j],
2040 FieldDef[j]->m_fields[k],
2041 locExpList->UpdateCoeffs());
2047 ASSERTL0(found,
"Could not find variable '"+varName+
2048 "' in file boundary condition "+fileName);
2049 locExpList->BwdTrans_IterPerExp(
2050 locExpList->GetCoeffs(),
2051 locExpList->UpdatePhys());
2078 for (i = 0; i < (*m_exp).size(); ++i)
2093 std::vector<NekDouble> &HomoLen,
2095 std::vector<unsigned int> &HomoSIDs,
2096 std::vector<unsigned int> &HomoZIDs,
2097 std::vector<unsigned int> &HomoYIDs)
2104 ASSERTL1(NumHomoDir == HomoBasis.num_elements(),
"Homogeneous basis is not the same length as NumHomoDir");
2105 ASSERTL1(NumHomoDir == HomoLen.size(),
"Homogeneous length vector is not the same length as NumHomDir");
2108 switch((*
m_exp)[0]->GetShapeDimension())
2124 for(s = startenum; s <= endenum; ++s)
2126 std::vector<unsigned int> elementIDs;
2127 std::vector<LibUtilities::BasisType> basis;
2128 std::vector<unsigned int> numModes;
2129 std::vector<std::string> fields;
2132 bool UniOrder =
true;
2137 for(
int i = 0; i < (*m_exp).size(); ++i)
2139 if((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
2141 elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
2144 for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2146 basis.push_back((*
m_exp)[i]->GetBasis(j)->GetBasisType());
2147 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
2151 for(n = 0 ; n < NumHomoDir; ++n)
2153 basis.push_back(HomoBasis[n]->GetBasisType());
2154 numModes.push_back(HomoBasis[n]->GetNumModes());
2161 ASSERTL0((*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
"Routine is not set up for multiple bases definitions");
2163 for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2165 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
2166 if(numModes[j] != (*
m_exp)[i]->GetBasis(j)->GetNumModes())
2172 for(n = 0 ; n < NumHomoDir; ++n)
2174 numModes.push_back(HomoBasis[n]->GetNumModes());
2181 if(elementIDs.size() > 0)
2186 UniOrder, numModes,fields,
2187 NumHomoDir, HomoLen, homoStrips,
2188 HomoSIDs, HomoZIDs, HomoYIDs);
2189 fielddef.push_back(fdef);
2200 std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2224 map<int, int> ElmtID_to_ExpID;
2225 for(i = 0; i < (*m_exp).size(); ++i)
2227 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2230 for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2232 int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2233 int datalen = (*m_exp)[eid]->GetNcoeffs();
2234 fielddata.insert(fielddata.end(),&coeffs[
m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2242 std::vector<NekDouble> &fielddata,
2264 std::vector<NekDouble> &fielddata,
2270 int modes_offset = 0;
2271 int datalen = fielddata.size()/fielddef->m_fields.size();
2274 for(i = 0; i < fielddef->m_fields.size(); ++i)
2276 if(fielddef->m_fields[i] == field)
2283 ASSERTL0(i != fielddef->m_fields.size(),
2284 "Field (" + field +
") not found in file.");
2291 for(i = (*m_exp).size()-1; i >= 0; --i)
2299 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2303 if (fielddef->m_uniOrder ==
true)
2309 fielddef->m_numModes, modes_offset);
2311 const int elmtId = fielddef->m_elementIDs[i];
2317 modes_offset += (*m_exp)[0]->GetNumBases();
2321 expId = eIt->second;
2323 bool sameBasis =
true;
2324 for (
int j = 0; j < fielddef->m_basis.size(); ++j)
2326 if (fielddef->m_basis[j] != (*
m_exp)[expId]->GetBasisType(j))
2333 if (datalen == (*
m_exp)[expId]->GetNcoeffs() && sameBasis)
2340 (*m_exp)[expId]->ExtractDataToCoeffs(
2341 &fielddata[offset], fielddef->m_numModes,
2347 modes_offset += (*m_exp)[0]->GetNumBases();
2358 for(i = 0; i < (*m_exp).size(); ++i)
2360 std::vector<unsigned int> nummodes;
2361 vector<LibUtilities::BasisType> basisTypes;
2362 for(
int j= 0; j < fromExpList->GetExp(i)->GetNumBases(); ++j)
2364 nummodes.push_back(fromExpList->GetExp(i)->GetBasisNumModes(j));
2365 basisTypes.push_back(fromExpList->GetExp(i)->GetBasisType(j));
2368 (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2372 offset += fromExpList->GetExp(i)->GetNcoeffs();
2381 "This method is not defined or valid for this class type");
2389 "This method is not defined or valid for this class type");
2390 static boost::shared_ptr<ExpList> result;
2401 "This method is not defined or valid for this class type");
2411 "This method is not defined or valid for this class type");
2417 "This method is not defined or valid for this class type");
2418 static boost::shared_ptr<ExpList> returnVal;
2425 "This method is not defined or valid for this class type");
2426 static boost::shared_ptr<AssemblyMapDG> result;
2432 return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2439 "This method is not defined or valid for this class type");
2448 "This method is not defined or valid for this class type");
2456 "This method is not defined or valid for this class type");
2465 "This method is not defined or valid for this class type");
2472 "This method is not defined or valid for this class type");
2481 "This method is not defined or valid for this class type");
2487 "This method is not defined or valid for this class type");
2488 static vector<bool> tmp;
2496 "This method is not defined or valid for this class type");
2504 "This method is not defined or valid for this class type");
2513 "This method is not defined or valid for this class type");
2523 const bool PhysSpaceForcing)
2525 ASSERTL0(
false,
"HelmSolve not implemented.");
2537 "This method is not defined or valid for this class type");
2549 "This method is not defined or valid for this class type");
2559 "This method is not defined or valid for this class type");
2569 "This method is not defined or valid for this class type");
2578 "This method is not defined or valid for this class type");
2588 "This method is not defined or valid for this class type");
2596 "This method is not defined or valid for this class type");
2605 "This method is not defined or valid for this class type");
2619 (*m_exp)[i]->NormVectorIProductWRTBase(
2629 (*m_exp)[i]->NormVectorIProductWRTBase(
2640 (*m_exp)[i]->NormVectorIProductWRTBase(
2649 ASSERTL0(
false,
"Dimension not supported");
2657 "This method is not defined or valid for this class type");
2665 "This method is not defined or valid for this class type");
2673 "This method is not defined or valid for this class type");
2679 "This method is not defined or valid for this class type");
2688 "This method is not defined or valid for this class type");
2695 "This method is not defined or valid for this class type");
2703 "This method is not defined or valid for this class type");
2773 for(i= 0; i < (*m_exp).size(); ++i)
2776 (*m_exp)[i]->GetCoords(e_coord_0);
2780 ASSERTL0(coord_1.num_elements() != 0,
2781 "output coord_1 is not defined");
2783 for(i= 0; i < (*m_exp).size(); ++i)
2786 e_coord_1 = coord_1 + m_phys_offset[i];
2787 (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2791 ASSERTL0(coord_1.num_elements() != 0,
2792 "output coord_1 is not defined");
2793 ASSERTL0(coord_2.num_elements() != 0,
2794 "output coord_2 is not defined");
2796 for(i= 0; i < (*m_exp).size(); ++i)
2799 e_coord_1 = coord_1 + m_phys_offset[i];
2800 e_coord_2 = coord_2 + m_phys_offset[i];
2801 (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
2812 "This method is not defined or valid for this class type");
2818 boost::shared_ptr<ExpList> &result,
2819 const bool DeclareCoeffPhysArrays)
2822 "This method is not defined or valid for this class type");
2843 for (cnt = n = 0; n < i; ++n)
2854 elmt =
GetExp(ElmtID[cnt+n]);
2855 elmt->GetTracePhysVals(EdgeID[cnt+n],
2857 tmp1 = element + offsetElmt,
2858 tmp2 = boundary + offsetBnd);
2860 offsetElmt += elmt->GetTotPoints();
2876 for (cnt = n = 0; n < i; ++n)
2885 npoints +=
GetExp(ElmtID[cnt+n])->GetTotPoints();
2896 nq =
GetExp(ElmtID[cnt+n])->GetTotPoints();
2899 &bndElmt[offsetElmt], 1);
2922 for (cnt = n = 0; n < i; ++n)
2934 elmt =
GetExp(ElmtID[cnt+n]);
2935 elmt->GetTracePhysVals(EdgeID[cnt+n],
2937 tmp1 = phys + offsetPhys,
2938 tmp2 = bnd + offsetBnd);
2957 for (j = 0; j < coordim; ++j)
2964 for (cnt = n = 0; n < i; ++n)
2975 elmt =
GetExp(ElmtID[cnt+n]);
2977 = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
2979 for (j = 0; j < coordim; ++j)
2982 tmp = normals[j] + offset, 1);
2993 "This method is not defined or valid for this class type");
3001 "This method is not defined or valid for this class type");
3010 "This method is not defined or valid for this class type");
3021 "This method is not defined or valid for this class type");
3030 const std::string varName,
3035 "This method is not defined or valid for this class type");
3043 "This method is not defined or valid for this class type");
3044 static map<int,RobinBCInfoSharedPtr> result;
3056 "This method is not defined or valid for this class type");
3061 unsigned int regionId,
3062 const std::string& variable)
3064 SpatialDomains::BoundaryConditionCollection::const_iterator collectionIter = collection.find(regionId);
3065 ASSERTL1(collectionIter != collection.end(),
"Unable to locate collection "+boost::lexical_cast<
string>(regionId));
3067 SpatialDomains::BoundaryConditionMap::const_iterator conditionMapIter = boundaryConditionMap->find(variable);
3068 ASSERTL1(conditionMapIter != boundaryConditionMap->end(),
"Unable to locate condition map.");
3070 return boundaryCondition;
3076 "This method is not defined or valid for this class type");
3086 switch(exp->DetShapeType())
3099 exp->GetBasis(1)->GetBasisKey(),
3100 nexp->GetNodalPointsKey().GetPointsType());
3106 exp->GetBasis(1)->GetBasisKey());
3113 exp->GetBasis(1)->GetBasisKey());
3118 exp->GetBasis(1)->GetBasisKey(),
3119 exp->GetBasis(2)->GetBasisKey());
3124 exp->GetBasis(1)->GetBasisKey(),
3125 exp->GetBasis(2)->GetBasisKey());
3130 exp->GetBasis(1)->GetBasisKey(),
3131 exp->GetBasis(2)->GetBasisKey());
3136 exp->GetBasis(1)->GetBasisKey(),
3137 exp->GetBasis(2)->GetBasisKey());
3140 ASSERTL0(
false,
"Shape type not setup");
3154 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
3156 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > >
::iterator it;
3164 bool verbose = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
3165 (
m_comm->GetRank() == 0);
3176 for (
int i = 0; i <
m_exp->size(); ++i)
3178 collections[(*m_exp)[i]->DetShapeType()].push_back(
3179 std::pair<LocalRegions::ExpansionSharedPtr,int> ((*
m_exp)[i],i));
3182 for (it = collections.begin(); it != collections.end(); ++it)
3187 vector<StdRegions::StdExpansionSharedPtr> collExp;
3196 if(it->second.size() == 1)
3198 collExp.push_back(it->second[0].first);
3214 collExp.push_back(it->second[0].first);
3215 int prevnCoeff = it->second[0].first->GetNcoeffs();
3216 int prevnPhys = it->second[0].first->GetTotPoints();
3219 for (
int i = 1; i < it->second.size(); ++i)
3221 int nCoeffs = it->second[i].first->GetNcoeffs();
3222 int nPhys = it->second[i].first->GetTotPoints();
3229 if(prevCoeffOffset + nCoeffs != coeffOffset ||
3230 prevnCoeff != nCoeffs ||
3231 prevPhysOffset + nPhys != physOffset ||
3232 prevnPhys != nPhys || collcnt >= collmax)
3254 collExp.push_back(it->second[i].first);
3259 collExp.push_back(it->second[i].first);
3264 if (i == it->second.size() - 1)
3281 prevCoeffOffset = coeffOffset;
3282 prevPhysOffset = physOffset;
3283 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.
COLLECTIONS_EXPORT OperatorImpMap SetWithTimings(std::vector< StdRegions::StdExpansionSharedPtr > pGeom, OperatorImpMap &impTypes, bool verbose=true)
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)
void ExtractFileBCs(const std::string &fileName, LibUtilities::CommSharedPtr comm, const std::string &varName, const boost::shared_ptr< ExpList > locExpList)
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
boost::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
COLLECTIONS_EXPORT OperatorImpMap GetOperatorImpMap(StdRegions::StdExpansionSharedPtr pExp)
Get Operator Implementation Map from XMl or using default;.
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...
virtual void v_ExtractPhysToBnd(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
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()
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)
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
virtual void v_GetBndElmtExpansion(int i, boost::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
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.
void PhysDeriv(Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
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)
virtual void v_LocalToGlobal(bool UseComm)
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.
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
void ClearGlobalLinSysManager(void)
std::map< OperatorType, ImplementationType > OperatorImpMap
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)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
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.
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 .
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)
void SetCoeffPhysOffsets()
Definition of the total number of degrees of freedom and quadrature points and offsets to access data...
LibUtilities::ShapeType GetShapeType() const
Return the expansion type associated with key.
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
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.
void Neg(int n, T *x, const int incx)
Negate x = -x.
boost::shared_ptr< FieldIO > FieldIOSharedPtr
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()
string msg
print "Adding",units.name, hash(units), units.description(), print "(was",id(_u),"now",id(units),")" Ensure referenced units exist
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)
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)
MultiRegions::Direction const DirCartesianMap[]
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
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)
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_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)
void SetX(typename boost::call_traits< DataType >::const_reference val)
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)
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::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)
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()
ImplementationType GetDefaultImplementationType()
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)