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");
502 e_out_d0 = out_d0 + offset;
503 e_out_d1 = out_d1 + offset;
504 e_out_d2 = out_d2 + offset;
508 e_out_d0,e_out_d1, e_out_d2);
528 for(i=0; i<(*m_exp).size(); ++i)
531 (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
537 for(i=0; i<(*m_exp).size(); i++)
540 (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
546 int intdir= (int)edir;
552 e_out_d = out_d + offset;
571 bool halfMode =
false;
574 m_session->MatchSolverInfo(
"ModeType",
"HalfMode",
628 ASSERTL0(0,
"Dimension not supported");
650 if(inarray.get() == outarray.get())
698 for(i= 0; i < (*m_exp).size(); ++i)
700 (*m_exp)[i]->FwdTrans_BndConstrained(inarray+
m_phys_offset[i],
726 (*
m_exp)[0]->GetBasisType(0)
728 "Smoothing is currently not allowed unless you are using "
729 "a nodal base for efficiency reasons. The implemented "
730 "smoothing technique requires the mass matrix inversion "
731 "which is trivial just for GLL_LAGRANGE_SEM and "
732 "GAUSS_LAGRANGE_SEMexpansions.");
761 map<int,int> elmt_id;
766 for(i = 0 ; i < (*m_exp).size(); ++i)
777 n_exp = (*m_exp).size();
778 for(i = 0; i < n_exp; ++i)
792 for(i = 0; i < n_exp; ++i)
794 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
795 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
802 for(i = 0; i < n_exp; ++i)
804 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
805 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
816 for(i = 0; i < n_exp; ++i)
818 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
819 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
827 for(i = 0; i < n_exp; ++i)
829 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
830 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
838 for(i = 0; i < n_exp; ++i)
840 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
841 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
849 "Global Matrix creation not defined for this type "
862 for(i = cnt1 = 0; i < n_exp; ++i)
870 StdRegions::VarCoeffMap::const_iterator x;
878 (*m_exp)[eid]->DetShapeType(),
883 loc_mat = boost::dynamic_pointer_cast<
LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
884 BlkMatrix->SetBlock(i,i,loc_mat);
901 return matrixIter->second;
918 for(
int n = 0; n < num_elmts.num_elements(); ++n)
938 for(i= 0; i < num_elmts[n]; ++i)
946 StdRegions::VarCoeffMap::const_iterator x;
954 (*m_exp)[eid]->DetShapeType(),
977 int i,j,n,gid1,gid2,cntdim1,cntdim2;
981 unsigned int glob_rows;
982 unsigned int glob_cols;
983 unsigned int loc_rows;
984 unsigned int loc_cols;
986 bool assembleFirstDim;
987 bool assembleSecondDim;
994 glob_cols = locToGloMap->GetNumGlobalCoeffs();
996 assembleFirstDim =
false;
997 assembleSecondDim =
true;
1002 glob_rows = locToGloMap->GetNumGlobalCoeffs();
1005 assembleFirstDim =
true;
1006 assembleSecondDim =
false;
1014 glob_rows = locToGloMap->GetNumGlobalCoeffs();
1015 glob_cols = locToGloMap->GetNumGlobalCoeffs();
1017 assembleFirstDim =
true;
1018 assembleSecondDim =
true;
1024 "Global Matrix creation not defined for this type "
1036 for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
1044 StdRegions::VarCoeffMap::const_iterator x;
1052 (*m_exp)[eid]->DetShapeType(),
1058 loc_rows = loc_mat->GetRows();
1059 loc_cols = loc_mat->GetColumns();
1061 for(i = 0; i < loc_rows; ++i)
1063 if(assembleFirstDim)
1065 gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
1066 sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
1074 for(j = 0; j < loc_cols; ++j)
1076 if(assembleSecondDim)
1079 ->GetLocalToGlobalMap(cntdim2 + j);
1081 ->GetLocalToGlobalSign(cntdim2 + j);
1090 coord = make_pair(gid1,gid2);
1091 if( spcoomat.count(coord) == 0 )
1093 spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1097 spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1101 cntdim1 += loc_rows;
1102 cntdim2 += loc_cols;
1112 int i,j,n,gid1,gid2,loc_lda,eid;
1116 int totDofs = locToGloMap->GetNumGlobalCoeffs();
1117 int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
1119 unsigned int rows = totDofs - NumDirBCs;
1120 unsigned int cols = totDofs - NumDirBCs;
1124 int bwidth = locToGloMap->GetFullSystemBandWidth();
1136 if( (2*(bwidth+1)) < rows)
1156 for(n = 0; n < (*m_exp).size(); ++n)
1164 StdRegions::VarCoeffMap::const_iterator x;
1172 (*m_exp)[eid]->DetShapeType(),
1179 if(RobinBCInfo.count(n) != 0)
1184 int rows = loc_mat->GetRows();
1185 int cols = loc_mat->GetColumns();
1186 const NekDouble *dat = loc_mat->GetRawPtr();
1188 Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
1191 for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
1193 (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
1201 loc_lda = loc_mat->GetColumns();
1203 for(i = 0; i < loc_lda; ++i)
1205 gid1 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + i) - NumDirBCs;
1206 sign1 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + i);
1209 for(j = 0; j < loc_lda; ++j)
1211 gid2 = locToGloMap->GetLocalToGlobalMap(
m_coeff_offset[n] + j) - NumDirBCs;
1212 sign2 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + j);
1219 if((matStorage ==
eFULL)||(gid2 >= gid1))
1221 value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
1222 Gmat->SetValue(gid1,gid2,value);
1262 ASSERTL0(
false,
"Matrix solution type not defined");
1267 vExpList, locToGloMap);
1275 const map<int,RobinBCInfoSharedPtr> vRobinBCInfo =
GetRobinBCInfo();
1281 ASSERTL0(
false,
"Matrix solution type not defined");
1286 vExpList,locToGloMap);
1323 for (
int i = 0; i < (*m_exp).size(); ++i)
1325 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1330 ASSERTL0(
false,
"Cannot find element for this point.");
1343 bool returnNearestElmt)
1347 return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1354 bool returnNearestElmt)
1362 std::vector<std::pair<int,NekDouble> > elmtIdDist;
1372 for (
int i = 0; i < (*m_exp).size(); ++i)
1374 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1378 w.
SetX(gloCoords[0]);
1379 w.
SetY(gloCoords[1]);
1380 w.
SetZ(gloCoords[2]);
1383 for (
int j = 0; j < (*m_exp)[i]->GetNverts(); ++j) {
1385 (*
m_exp)[i]->GetGeom()->GetVid(j));
1386 if (j == 0 || dist > v->dist(w))
1391 elmtIdDist.push_back(
1392 std::pair<int, NekDouble>(i, dist));
1397 if (!elmtIdDist.empty())
1399 int min_id = elmtIdDist[0].first;
1402 for (
int i = 1; i < elmtIdDist.size(); ++i)
1404 if (elmtIdDist[i].second < min_d) {
1405 min_id = elmtIdDist[i].first;
1406 min_d = elmtIdDist[i].second;
1411 (*m_exp)[min_id]->GetGeom()->GetLocCoords(gloCoords,
1423 static int start = 0;
1429 for (
int i = start; i < (*m_exp).size(); ++i)
1431 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1440 if(nearpt < nearpt_min)
1443 nearpt_min = nearpt;
1444 Vmath::Vcopy(locCoords.num_elements(),locCoords,1,savLocCoords,1);
1449 for (
int i = 0; i < start; ++i)
1451 if ((*
m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1460 if(nearpt < nearpt_min)
1463 nearpt_min = nearpt;
1465 locCoords,1,savLocCoords,1);
1470 if(returnNearestElmt)
1473 std::string
msg =
"Failed to find point within element to tolerance of "
1474 + boost::lexical_cast<std::string>(tol)
1475 +
" using local point ("
1476 + boost::lexical_cast<std::string>(locCoords[0]) +
","
1477 + boost::lexical_cast<std::string>(locCoords[1]) +
","
1478 + boost::lexical_cast<std::string>(locCoords[1])
1480 + boost::lexical_cast<std::string>(min_id);
1483 Vmath::Vcopy(locCoords.num_elements(),savLocCoords,1,locCoords,1);
1522 for (
int i = 0; i <
m_exp->size(); ++i)
1524 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
1529 for (
int i = 0; i <
m_exp->size(); ++i)
1531 (*m_exp)[i]->Reset();
1548 int coordim =
GetExp(0)->GetCoordim();
1549 char vars[3] = {
'x',
'y',
'z' };
1560 outfile <<
"Variables = x";
1561 for (
int i = 1; i < coordim; ++i)
1563 outfile <<
", " << vars[i];
1568 outfile <<
", " << var;
1571 outfile << std::endl << std::endl;
1584 int nBases = (*m_exp)[0]->GetNumBases();
1589 if (expansion == -1)
1597 GetCoords(coords[0], coords[1], coords[2]);
1599 for (i = 0; i <
m_exp->size(); ++i)
1603 for (j = 0; j < nBases; ++j)
1605 numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1608 numBlocks += numInt;
1613 nPoints = (*m_exp)[expansion]->GetTotPoints();
1619 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1622 for (j = 0; j < nBases; ++j)
1624 numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1632 int nPlanes =
GetZIDs().num_elements();
1633 NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1634 numBlocks = (int)tmp;
1642 outfile <<
"Zone, N=" << nPoints <<
", E="
1643 << numBlocks <<
", F=FEBlock" ;
1648 outfile <<
", ET=QUADRILATERAL" << std::endl;
1651 outfile <<
", ET=BRICK" << std::endl;
1654 ASSERTL0(
false,
"Not set up for this type of output");
1659 for (j = 0; j < coordim; ++j)
1661 for (i = 0; i < nPoints; ++i)
1663 outfile << coords[j][i] <<
" ";
1664 if (i % 1000 == 0 && i)
1666 outfile << std::endl;
1669 outfile << std::endl;
1677 int nbase = (*m_exp)[0]->GetNumBases();
1680 boost::shared_ptr<LocalRegions::ExpansionVector> exp =
m_exp;
1682 if (expansion != -1)
1684 exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1686 (*exp)[0] = (*m_exp)[expansion];
1691 for(i = 0; i < (*exp).size(); ++i)
1693 const int np0 = (*exp)[i]->GetNumPoints(0);
1694 const int np1 = (*exp)[i]->GetNumPoints(1);
1696 for(j = 1; j < np1; ++j)
1698 for(k = 1; k < np0; ++k)
1700 outfile << cnt + (j-1)*np0 + k <<
" ";
1701 outfile << cnt + (j-1)*np0 + k+1 <<
" ";
1702 outfile << cnt + j *np0 + k+1 <<
" ";
1703 outfile << cnt + j *np0 + k << endl;
1710 else if (nbase == 3)
1712 for(i = 0; i < (*exp).size(); ++i)
1714 const int np0 = (*exp)[i]->GetNumPoints(0);
1715 const int np1 = (*exp)[i]->GetNumPoints(1);
1716 const int np2 = (*exp)[i]->GetNumPoints(2);
1717 const int np01 = np0*np1;
1719 for(j = 1; j < np2; ++j)
1721 for(k = 1; k < np1; ++k)
1723 for(l = 1; l < np0; ++l)
1725 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l <<
" ";
1726 outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 <<
" ";
1727 outfile << cnt + (j-1)*np01 + k *np0 + l+1 <<
" ";
1728 outfile << cnt + (j-1)*np01 + k *np0 + l <<
" ";
1729 outfile << cnt + j *np01 + (k-1)*np0 + l <<
" ";
1730 outfile << cnt + j *np01 + (k-1)*np0 + l+1 <<
" ";
1731 outfile << cnt + j *np01 + k *np0 + l+1 <<
" ";
1732 outfile << cnt + j *np01 + k *np0 + l << endl;
1741 ASSERTL0(
false,
"Not set up for this dimension");
1752 if (expansion == -1)
1760 for(
int i = 0; i < totpoints; ++i)
1762 outfile <<
m_phys[i] <<
" ";
1763 if(i % 1000 == 0 && i)
1765 outfile << std::endl;
1768 outfile << std::endl;
1773 int nPoints = (*m_exp)[expansion]->GetTotPoints();
1775 for (
int i = 0; i < nPoints; ++i)
1780 outfile << std::endl;
1786 outfile <<
"<?xml version=\"1.0\"?>" << endl;
1787 outfile <<
"<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1788 <<
"byte_order=\"LittleEndian\">" << endl;
1789 outfile <<
" <UnstructuredGrid>" << endl;
1794 outfile <<
" </UnstructuredGrid>" << endl;
1795 outfile <<
"</VTKFile>" << endl;
1800 ASSERTL0(
false,
"Routine not implemented for this expansion.");
1805 outfile <<
" </PointData>" << endl;
1806 outfile <<
" </Piece>" << endl;
1813 int nq = (*m_exp)[expansion]->GetTotPoints();
1816 outfile <<
" <DataArray type=\"Float64\" Name=\""
1817 << var <<
"\">" << endl;
1820 for(i = 0; i < nq; ++i)
1825 outfile <<
" </DataArray>" << endl;
1860 err = max(err, abs(inarray[i] - soln[i]));
1894 for (i = 0; i < (*m_exp).size(); ++i)
1902 for (i = 0; i < (*m_exp).size(); ++i)
1920 for (i = 0; i < (*m_exp).size(); ++i)
1932 "This method is not defined or valid for this class type");
1940 "This method is not defined or valid for this class type");
1948 "This method is not defined or valid for this class type");
1956 "This method is not defined or valid for this class type");
1964 "This method is not defined or valid for this class type");
1973 "This method is not defined or valid for this class type");
1978 "This method is not defined or valid for this class type");
1984 "This method is not defined or valid for this class type");
1988 const std::string &fileName,
1990 const std::string &varName,
1991 const boost::shared_ptr<ExpList> locExpList)
1993 string varString = fileName.substr(0, fileName.find_last_of(
"."));
1994 int j, k, len = varString.length();
1995 varString = varString.substr(len-1, len);
1997 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1998 std::vector<std::vector<NekDouble> > FieldData;
2004 f->Import(fileName, FieldDef, FieldData);
2007 for (j = 0; j < FieldDef.size(); ++j)
2009 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
2011 if (FieldDef[j]->m_fields[k] == varName)
2014 locExpList->ExtractDataToCoeffs(
2015 FieldDef[j], FieldData[j],
2016 FieldDef[j]->m_fields[k],
2017 locExpList->UpdateCoeffs());
2023 ASSERTL0(found,
"Could not find variable '"+varName+
2024 "' in file boundary condition "+fileName);
2025 locExpList->BwdTrans_IterPerExp(
2026 locExpList->GetCoeffs(),
2027 locExpList->UpdatePhys());
2054 for (i = 0; i < (*m_exp).size(); ++i)
2069 std::vector<NekDouble> &HomoLen,
2071 std::vector<unsigned int> &HomoSIDs,
2072 std::vector<unsigned int> &HomoZIDs,
2073 std::vector<unsigned int> &HomoYIDs)
2080 ASSERTL1(NumHomoDir == HomoBasis.num_elements(),
"Homogeneous basis is not the same length as NumHomoDir");
2081 ASSERTL1(NumHomoDir == HomoLen.size(),
"Homogeneous length vector is not the same length as NumHomDir");
2084 switch((*
m_exp)[0]->GetShapeDimension())
2100 for(s = startenum; s <= endenum; ++s)
2102 std::vector<unsigned int> elementIDs;
2103 std::vector<LibUtilities::BasisType> basis;
2104 std::vector<unsigned int> numModes;
2105 std::vector<std::string> fields;
2108 bool UniOrder =
true;
2113 for(
int i = 0; i < (*m_exp).size(); ++i)
2115 if((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
2117 elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
2120 for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2122 basis.push_back((*
m_exp)[i]->GetBasis(j)->GetBasisType());
2123 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
2127 for(n = 0 ; n < NumHomoDir; ++n)
2129 basis.push_back(HomoBasis[n]->GetBasisType());
2130 numModes.push_back(HomoBasis[n]->GetNumModes());
2137 ASSERTL0((*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
"Routine is not set up for multiple bases definitions");
2139 for(
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2141 numModes.push_back((*
m_exp)[i]->GetBasis(j)->GetNumModes());
2142 if(numModes[j] != (*
m_exp)[i]->GetBasis(j)->GetNumModes())
2148 for(n = 0 ; n < NumHomoDir; ++n)
2150 numModes.push_back(HomoBasis[n]->GetNumModes());
2157 if(elementIDs.size() > 0)
2162 UniOrder, numModes,fields,
2163 NumHomoDir, HomoLen, homoStrips,
2164 HomoSIDs, HomoZIDs, HomoYIDs);
2165 fielddef.push_back(fdef);
2176 std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2200 map<int, int> ElmtID_to_ExpID;
2201 for(i = 0; i < (*m_exp).size(); ++i)
2203 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2206 for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2208 int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2209 int datalen = (*m_exp)[eid]->GetNcoeffs();
2210 fielddata.insert(fielddata.end(),&coeffs[
m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2218 std::vector<NekDouble> &fielddata,
2240 std::vector<NekDouble> &fielddata,
2246 int modes_offset = 0;
2247 int datalen = fielddata.size()/fielddef->m_fields.size();
2250 for(i = 0; i < fielddef->m_fields.size(); ++i)
2252 if(fielddef->m_fields[i] == field)
2259 ASSERTL0(i != fielddef->m_fields.size(),
2260 "Field (" + field +
") not found in file.");
2267 for(i = (*m_exp).size()-1; i >= 0; --i)
2275 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2279 if (fielddef->m_uniOrder ==
true)
2285 fielddef->m_numModes, modes_offset);
2287 const int elmtId = fielddef->m_elementIDs[i];
2293 modes_offset += (*m_exp)[0]->GetNumBases();
2297 expId = eIt->second;
2299 bool sameBasis =
true;
2300 for (
int j = 0; j < fielddef->m_basis.size(); ++j)
2302 if (fielddef->m_basis[j] != (*
m_exp)[expId]->GetBasisType(j))
2309 if (datalen == (*
m_exp)[expId]->GetNcoeffs() && sameBasis)
2316 (*m_exp)[expId]->ExtractDataToCoeffs(
2317 &fielddata[offset], fielddef->m_numModes,
2323 modes_offset += (*m_exp)[0]->GetNumBases();
2334 for(i = 0; i < (*m_exp).size(); ++i)
2336 std::vector<unsigned int> nummodes;
2337 vector<LibUtilities::BasisType> basisTypes;
2339 for(
int j= 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
2341 nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
2342 basisTypes.push_back(fromExpList->GetExp(eid)->GetBasisType(j));
2345 (*m_exp)[eid]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2349 offset += fromExpList->GetExp(eid)->GetNcoeffs();
2358 "This method is not defined or valid for this class type");
2366 "This method is not defined or valid for this class type");
2367 static boost::shared_ptr<ExpList> result;
2378 "This method is not defined or valid for this class type");
2388 "This method is not defined or valid for this class type");
2394 "This method is not defined or valid for this class type");
2395 static boost::shared_ptr<ExpList> returnVal;
2402 "This method is not defined or valid for this class type");
2403 static boost::shared_ptr<AssemblyMapDG> result;
2409 return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2416 "This method is not defined or valid for this class type");
2425 "This method is not defined or valid for this class type");
2433 "This method is not defined or valid for this class type");
2442 "This method is not defined or valid for this class type");
2449 "This method is not defined or valid for this class type");
2458 "This method is not defined or valid for this class type");
2464 "This method is not defined or valid for this class type");
2465 static vector<bool> tmp;
2473 "This method is not defined or valid for this class type");
2481 "This method is not defined or valid for this class type");
2490 "This method is not defined or valid for this class type");
2500 const bool PhysSpaceForcing)
2502 ASSERTL0(
false,
"HelmSolve not implemented.");
2514 "This method is not defined or valid for this class type");
2526 "This method is not defined or valid for this class type");
2536 "This method is not defined or valid for this class type");
2546 "This method is not defined or valid for this class type");
2555 "This method is not defined or valid for this class type");
2565 "This method is not defined or valid for this class type");
2573 "This method is not defined or valid for this class type");
2582 "This method is not defined or valid for this class type");
2596 (*m_exp)[i]->NormVectorIProductWRTBase(
2606 (*m_exp)[i]->NormVectorIProductWRTBase(
2617 (*m_exp)[i]->NormVectorIProductWRTBase(
2626 ASSERTL0(
false,
"Dimension not supported");
2634 "This method is not defined or valid for this class type");
2642 "This method is not defined or valid for this class type");
2650 "This method is not defined or valid for this class type");
2656 "This method is not defined or valid for this class type");
2665 "This method is not defined or valid for this class type");
2672 "This method is not defined or valid for this class type");
2680 "This method is not defined or valid for this class type");
2750 for(i= 0; i < (*m_exp).size(); ++i)
2753 (*m_exp)[i]->GetCoords(e_coord_0);
2757 ASSERTL0(coord_1.num_elements() != 0,
2758 "output coord_1 is not defined");
2760 for(i= 0; i < (*m_exp).size(); ++i)
2763 e_coord_1 = coord_1 + m_phys_offset[i];
2764 (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2768 ASSERTL0(coord_1.num_elements() != 0,
2769 "output coord_1 is not defined");
2770 ASSERTL0(coord_2.num_elements() != 0,
2771 "output coord_2 is not defined");
2773 for(i= 0; i < (*m_exp).size(); ++i)
2776 e_coord_1 = coord_1 + m_phys_offset[i];
2777 e_coord_2 = coord_2 + m_phys_offset[i];
2778 (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
2789 "This method is not defined or valid for this class type");
2795 boost::shared_ptr<ExpList> &result,
2796 const bool DeclareCoeffPhysArrays)
2799 "This method is not defined or valid for this class type");
2820 for (cnt = n = 0; n < i; ++n)
2831 elmt =
GetExp(ElmtID[cnt+n]);
2832 elmt->GetTracePhysVals(EdgeID[cnt+n],
2834 tmp1 = element + offsetElmt,
2835 tmp2 = boundary + offsetBnd);
2837 offsetElmt += elmt->GetTotPoints();
2854 for (cnt = n = 0; n < i; ++n)
2863 npoints +=
GetExp(ElmtID[cnt+n])->GetTotPoints();
2874 nq =
GetExp(ElmtID[cnt+n])->GetTotPoints();
2877 tmp2 = bndElmt + offsetElmt, 1);
2900 for (cnt = n = 0; n < i; ++n)
2912 elmt =
GetExp(ElmtID[cnt+n]);
2913 elmt->GetTracePhysVals(EdgeID[cnt+n],
2915 tmp1 = phys + offsetPhys,
2916 tmp2 = bnd + offsetBnd);
2935 for (j = 0; j < coordim; ++j)
2942 for (cnt = n = 0; n < i; ++n)
2953 elmt =
GetExp(ElmtID[cnt+n]);
2955 = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
2957 for (j = 0; j < coordim; ++j)
2960 tmp = normals[j] + offset, 1);
2971 "This method is not defined or valid for this class type");
2979 "This method is not defined or valid for this class type");
2988 "This method is not defined or valid for this class type");
2999 "This method is not defined or valid for this class type");
3008 const std::string varName,
3013 "This method is not defined or valid for this class type");
3021 "This method is not defined or valid for this class type");
3022 static map<int,RobinBCInfoSharedPtr> result;
3034 "This method is not defined or valid for this class type");
3039 unsigned int regionId,
3040 const std::string& variable)
3042 SpatialDomains::BoundaryConditionCollection::const_iterator collectionIter = collection.find(regionId);
3043 ASSERTL1(collectionIter != collection.end(),
"Unable to locate collection "+boost::lexical_cast<
string>(regionId));
3045 SpatialDomains::BoundaryConditionMap::const_iterator conditionMapIter = boundaryConditionMap->find(variable);
3046 ASSERTL1(conditionMapIter != boundaryConditionMap->end(),
"Unable to locate condition map.");
3048 return boundaryCondition;
3054 "This method is not defined or valid for this class type");
3064 switch(exp->DetShapeType())
3077 exp->GetBasis(1)->GetBasisKey(),
3078 nexp->GetNodalPointsKey().GetPointsType());
3084 exp->GetBasis(1)->GetBasisKey());
3091 exp->GetBasis(1)->GetBasisKey());
3096 exp->GetBasis(1)->GetBasisKey(),
3097 exp->GetBasis(2)->GetBasisKey());
3102 exp->GetBasis(1)->GetBasisKey(),
3103 exp->GetBasis(2)->GetBasisKey());
3108 exp->GetBasis(1)->GetBasisKey(),
3109 exp->GetBasis(2)->GetBasisKey());
3114 exp->GetBasis(1)->GetBasisKey(),
3115 exp->GetBasis(2)->GetBasisKey());
3118 ASSERTL0(
false,
"Shape type not setup");
3132 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
3134 vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > >
::iterator it;
3138 Collections::CollectionOptimisation colOpt(
m_session, ImpType);
3139 ImpType = colOpt.GetDefaultImplementationType();
3141 bool autotuning = colOpt.IsUsingAutotuning();
3142 bool verbose = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
3143 (
m_comm->GetRank() == 0);
3144 int collmax = (colOpt.GetMaxCollectionSize() > 0
3145 ? colOpt.GetMaxCollectionSize()
3154 for (
int i = 0; i <
m_exp->size(); ++i)
3156 collections[(*m_exp)[i]->DetShapeType()].push_back(
3157 std::pair<LocalRegions::ExpansionSharedPtr,int> ((*
m_exp)[i],i));
3160 for (it = collections.begin(); it != collections.end(); ++it)
3164 Collections::OperatorImpMap impTypes = colOpt.GetOperatorImpMap(exp);
3165 vector<StdRegions::StdExpansionSharedPtr> collExp;
3174 if(it->second.size() == 1)
3176 collExp.push_back(it->second[0].first);
3182 impTypes = colOpt.SetWithTimings(collExp,
3186 Collections::Collection tmp(collExp, impTypes);
3192 collExp.push_back(it->second[0].first);
3193 int prevnCoeff = it->second[0].first->GetNcoeffs();
3194 int prevnPhys = it->second[0].first->GetTotPoints();
3197 for (
int i = 1; i < it->second.size(); ++i)
3199 int nCoeffs = it->second[i].first->GetNcoeffs();
3200 int nPhys = it->second[i].first->GetTotPoints();
3207 if(prevCoeffOffset + nCoeffs != coeffOffset ||
3208 prevnCoeff != nCoeffs ||
3209 prevPhysOffset + nPhys != physOffset ||
3210 prevnPhys != nPhys || collcnt >= collmax)
3218 impTypes = colOpt.SetWithTimings(collExp,
3223 Collections::Collection tmp(collExp, impTypes);
3232 collExp.push_back(it->second[i].first);
3237 collExp.push_back(it->second[i].first);
3242 if (i == it->second.size() - 1)
3248 impTypes = colOpt.SetWithTimings(collExp,
3252 Collections::Collection tmp(collExp, impTypes);
3259 prevCoeffOffset = coeffOffset;
3260 prevPhysOffset = physOffset;
3261 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.
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.
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)
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 .
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)
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
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()
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)