51     namespace MultiRegions
 
   65                 const std::vector<unsigned int> &eIDs): 
ExpList(In, eIDs)
 
  105             SpatialDomains::ExpansionMap::const_iterator expIt;
 
  106             for (expIt = expansions.begin(); expIt != expansions.end(); ++expIt)
 
  113                 if((TetGeom = boost::dynamic_pointer_cast<SpatialDomains::TetGeom>(expIt->second->m_geomShPtr)))
 
  123                         (*m_exp).push_back(tet);
 
  150                 else if((HexGeom = boost::dynamic_pointer_cast<SpatialDomains::HexGeom>(expIt->second->m_geomShPtr)))
 
  153                     (*m_exp).push_back(hex);
 
  160                     ASSERTL0(
false,
"dynamic cast to a proper Geometry3D failed");
 
  190                              const std::string  &variable) :
 
  202                                         = graph3D->GetExpansions(variable);
 
  204             SpatialDomains::ExpansionMap::const_iterator expIt;
 
  205             for (expIt = expansions.begin(); expIt != expansions.end(); ++expIt)
 
  212                 if((TetGeom = boost::dynamic_pointer_cast<
 
  216                                         = expIt->second->m_basisKeyVector[0];
 
  218                                         = expIt->second->m_basisKeyVector[1];
 
  220                                         = expIt->second->m_basisKeyVector[2];
 
  225                       ASSERTL0(
false,
"LocalRegions::NodalTetExp is not " 
  233                         tet->SetElmtId(elmtid++);
 
  234                         (*m_exp).push_back(tet);
 
  237                 else if((PrismGeom = boost::dynamic_pointer_cast<SpatialDomains
 
  238                              ::PrismGeom>(expIt->second->m_geomShPtr)))
 
  241                                         = expIt->second->m_basisKeyVector[0];
 
  243                                         = expIt->second->m_basisKeyVector[1];
 
  245                                         = expIt->second->m_basisKeyVector[2];
 
  250                     prism->SetElmtId(elmtid++);
 
  251                     (*m_exp).push_back(prism);
 
  253                 else if((PyrGeom = boost::dynamic_pointer_cast<
 
  257                                         = expIt->second->m_basisKeyVector[0];
 
  259                                         = expIt->second->m_basisKeyVector[1];
 
  261                                         = expIt->second->m_basisKeyVector[2];
 
  266                     pyramid->SetElmtId(elmtid++);
 
  267                     (*m_exp).push_back(pyramid);
 
  269                 else if((HexGeom = boost::dynamic_pointer_cast<
 
  273                                         = expIt->second->m_basisKeyVector[0];
 
  275                                         = expIt->second->m_basisKeyVector[1];
 
  277                                         = expIt->second->m_basisKeyVector[2];
 
  282                     hex->SetElmtId(elmtid++);
 
  283                     (*m_exp).push_back(hex);
 
  287                     ASSERTL0(
false,
"dynamic cast to a proper Geometry3D " 
  329             for(
int i = 0; i < expansions.size(); ++i)
 
  336                 SpatialDomains::ExpansionMap::const_iterator expmap = expansions.find(i);
 
  337                 ASSERTL1(expmap != expansions.end(), 
"Unable to find expansion.");
 
  340                 if((TetGeom = boost::dynamic_pointer_cast<
 
  344                                         = exp->m_basisKeyVector[0];
 
  346                                         = exp->m_basisKeyVector[1];
 
  348                                         = exp->m_basisKeyVector[2];
 
  353                       ASSERTL0(
false,
"LocalRegions::NodalTetExp is not " 
  361                         tet->SetElmtId(elmtid++);
 
  362                         (*m_exp).push_back(tet);
 
  365                 else if((PrismGeom = boost::dynamic_pointer_cast<
 
  369                                         = exp->m_basisKeyVector[0];
 
  371                                         = exp->m_basisKeyVector[1];
 
  373                                         = exp->m_basisKeyVector[2];
 
  378                     prism->SetElmtId(elmtid++);
 
  379                     (*m_exp).push_back(prism);
 
  381                 else if((PyrGeom = boost::dynamic_pointer_cast<
 
  385                                         = exp->m_basisKeyVector[0];
 
  387                                         = exp->m_basisKeyVector[1];
 
  389                                         = exp->m_basisKeyVector[2];
 
  394                     pyramid->SetElmtId(elmtid++);
 
  395                     (*m_exp).push_back(pyramid);
 
  397                 else if((HexGeom = boost::dynamic_pointer_cast<
 
  401                                         = exp->m_basisKeyVector[0];
 
  403                                         = exp->m_basisKeyVector[1];
 
  405                                         = exp->m_basisKeyVector[2];
 
  410                     hex->SetElmtId(elmtid++);
 
  411                     (*m_exp).push_back(hex);
 
  415                     ASSERTL0(
false,
"dynamic cast to a proper Geometry3D " 
  453             for(i = 0; i < 
m_exp->size(); ++i)
 
  457                 m_offset_elmt_id[i] = i;
 
  458                 m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
 
  459                 m_npoints += (*m_exp)[i]->GetTotPoints();
 
  472                 switch ((*
m_exp)[i]->DetShapeType())
 
  479                         ASSERTL0(
false, 
"Unknown expansion type.");
 
  492             int nquad0 = (*m_exp)[expansion]->GetNumPoints(0);
 
  493             int nquad1 = (*m_exp)[expansion]->GetNumPoints(1);
 
  494             int nquad2 = (*m_exp)[expansion]->GetNumPoints(2);
 
  495             int ntot = nquad0*nquad1*nquad2;
 
  496             int ntotminus = (nquad0-1)*(nquad1-1)*(nquad2-1);
 
  502             (*m_exp)[expansion]->GetCoords(coords[0],coords[1],coords[2]);
 
  504             outfile << 
"    <Piece NumberOfPoints=\"" 
  505                     << ntot << 
"\" NumberOfCells=\"" 
  506                     << ntotminus << 
"\">" << endl;
 
  507             outfile << 
"      <Points>" << endl;
 
  508             outfile << 
"        <DataArray type=\"Float64\" " 
  509                     << 
"NumberOfComponents=\"3\" format=\"ascii\">" << endl;
 
  511             for (i = 0; i < ntot; ++i)
 
  513                 for (j = 0; j < 3; ++j)
 
  515                     outfile << setprecision(8) << scientific 
 
  516                             << (float)coords[j][i] << 
" ";
 
  522             outfile << 
"        </DataArray>" << endl;
 
  523             outfile << 
"      </Points>" << endl;
 
  524             outfile << 
"      <Cells>" << endl;
 
  525             outfile << 
"        <DataArray type=\"Int32\" " 
  526                     << 
"Name=\"connectivity\" format=\"ascii\">" << endl;
 
  527             for (i = 0; i < nquad0-1; ++i)
 
  529                 for (j = 0; j < nquad1-1; ++j)
 
  531                     for (k = 0; k < nquad2-1; ++k)
 
  533                         outfile << k*nquad0*nquad1 + j*nquad0 + i << 
" " 
  534                                 << k*nquad0*nquad1 + j*nquad0 + i + 1 << 
" " 
  535                                 << k*nquad0*nquad1 + (j+1)*nquad0 + i + 1 << 
" " 
  536                                 << k*nquad0*nquad1 + (j+1)*nquad0 + i << 
" " 
  537                                 << (k+1)*nquad0*nquad1 + j*nquad0 + i << 
" " 
  538                                 << (k+1)*nquad0*nquad1 + j*nquad0 + i + 1 << 
" " 
  539                                 << (k+1)*nquad0*nquad1 + (j+1)*nquad0 + i + 1 << 
" " 
  540                                 << (k+1)*nquad0*nquad1 + (j+1)*nquad0 + i << 
" " << endl;
 
  545             outfile << 
"        </DataArray>" << endl;
 
  546             outfile << 
"        <DataArray type=\"Int32\" " 
  547                     << 
"Name=\"offsets\" format=\"ascii\">" << endl;
 
  548             for (i = 0; i < ntotminus; ++i)
 
  550                 outfile << i*8+8 << 
" ";
 
  553             outfile << 
"        </DataArray>" << endl;
 
  554             outfile << 
"        <DataArray type=\"UInt8\" " 
  555                     << 
"Name=\"types\" format=\"ascii\">" << endl;
 
  556             for (i = 0; i < ntotminus; ++i)
 
  561             outfile << 
"        </DataArray>" << endl;
 
  562             outfile << 
"      </Cells>" << endl;
 
  563             outfile << 
"      <PointData>" << endl;
 
  569             for (i = 0; i < 
m_exp->size(); ++i)
 
  571                 for (j = 0; j < (*m_exp)[i]->GetNfaces(); ++j)
 
  573                     (*m_exp)[i]->ComputeFaceNormal(j);
 
  588                 int pt0 = (*m_exp)[i]->GetNumPoints(0);
 
  589                 int pt1 = (*m_exp)[i]->GetNumPoints(1);
 
  590                 int pt2 = (*m_exp)[i]->GetNumPoints(2);
 
  591                 int npt0 = (int) pt0*scale;
 
  592                 int npt1 = (int) pt1*scale;
 
  593                 int npt2 = (int) pt2*scale;
 
  601                                        (*
m_exp)[i]->GetBasis(1)->GetPointsKey(),
 
  602                                        (*
m_exp)[i]->GetBasis(2)->GetPointsKey(),
 
  603                                        &inarray[cnt], newPointsKey0,
 
  604                                        newPointsKey1, newPointsKey2,
 
  608                 cnt1 += npt0*npt1*npt2;
 
  622                 int pt0 = (*m_exp)[i]->GetNumPoints(0);
 
  623                 int pt1 = (*m_exp)[i]->GetNumPoints(1);
 
  624                 int pt2 = (*m_exp)[i]->GetNumPoints(2);
 
  625                 int npt0 = (int) pt0*scale;
 
  626                 int npt1 = (int) pt1*scale;
 
  627                 int npt2 = (int) pt2*scale;
 
  638                                        (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
 
  639                                        (*
m_exp)[i]->GetBasis(1)->GetPointsKey(),
 
  640                                        (*
m_exp)[i]->GetBasis(2)->GetPointsKey(),
 
  643                 cnt  += npt0*npt1*npt2;
 
boost::shared_ptr< PyrGeom > PyrGeomSharedPtr
 
#define ASSERTL0(condition, msg)
 
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool. 
 
virtual void v_SetUpPhysNormals()
Set up the normals on each expansion. 
 
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
 
BasisType GetBasisType() const 
Return type of expansion basis. 
 
Lagrange Polynomials using the Gauss points . 
 
boost::shared_ptr< HexExp > HexExpSharedPtr
 
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points. 
 
boost::shared_ptr< HexGeom > HexGeomSharedPtr
 
int getNumberOfCoefficients(int Na, int Nb, int Nc)
 
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients. 
 
int GetExpSize(void)
This function returns the number of elements in the expansion. 
 
boost::shared_ptr< TetExp > TetExpSharedPtr
 
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
 
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs. 
 
Base class for all multi-elemental spectral/hp expansions. 
 
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions. 
 
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys. 
 
boost::shared_ptr< PyrExp > PyrExpSharedPtr
 
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...
 
int GetNumPoints() const 
Return points order at which basis is defined. 
 
LibUtilities::SessionReaderSharedPtr m_session
Session. 
 
void PhysGalerkinProject3D(const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
 
Defines a specification for a set of points. 
 
boost::shared_ptr< PrismExp > PrismExpSharedPtr
 
virtual void v_ReadGlobalOptimizationParameters()
 
virtual ~ExpList3D()
Destructor. 
 
void Interp3D(const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
this function interpolates a 3D function  evaluated at the quadrature points of the 3D basis...
 
boost::shared_ptr< Expansion > ExpansionShPtr
 
boost::shared_ptr< PrismGeom > PrismGeomSharedPtr
 
void ReadGlobalOptimizationParameters()
 
boost::shared_ptr< TetGeom > TetGeomSharedPtr
 
Abstraction of a three-dimensional multi-elemental expansion which is merely a collection of local ex...
 
ExpList3D()
Default constructor. 
 
void CreateCollections(Collections::ImplementationType ImpType=Collections::eNoImpType)
Construct collections of elements containing a single element type and polynomial order from the list...
 
int GetNumModes() const 
Returns the order of the basis. 
 
void SetExpType(ExpansionType Type)
Returns the type of the expansion. 
 
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
 
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
 
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
 
Describes the specification for a Basis. 
 
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
 
std::map< int, ExpansionShPtr > ExpansionMap
 
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)