37 #ifndef NEKTAR_LIB_STDREGIONS_STANDARDEXPANSION_H
38 #define NEKTAR_LIB_STDREGIONS_STANDARDEXPANSION_H
49 #include <boost/enable_shared_from_this.hpp>
50 namespace Nektar {
namespace LocalRegions {
class MatrixKey;
class Expansion; } }
61 typedef Array<OneD, Array<OneD, NekDouble> >
NormalVector;
69 class StdExpansion :
public boost::enable_shared_from_this<StdExpansion>
100 return m_base.num_elements();
107 inline const Array<OneD, const LibUtilities::BasisSharedPtr>&
GetBase()
const
121 "dir is larger than number of bases");
146 for(i=0; i <
m_base.num_elements(); ++i)
148 nqtot *=
m_base[i]->GetNumPoints();
167 ASSERTL1(dir <
m_base.num_elements(),
"dir is larger than m_numbases");
180 ASSERTL1(dir <
m_base.num_elements(),
"dir is larger than m_numbases");
181 return(
m_base[dir]->GetNumModes());
196 for(i = 0; i <
m_base.num_elements(); ++i)
198 returnval = max(returnval,
m_base[i]->GetNumModes());
218 ASSERTL1(dir <
m_base.num_elements(),
"dir is larger than m_numbases");
232 "dir is larger than m_numbases");
233 return(
m_base.num_elements() > 0 ?
m_base[dir]->GetNumPoints() : 1);
243 inline const Array<OneD, const NekDouble>&
GetPoints(
const int dir)
const
245 return m_base[dir]->GetZ();
425 const int nBase =
m_base.num_elements();
487 void BwdTrans (
const Array<OneD, const NekDouble>& inarray,
488 Array<OneD, NekDouble> &outarray)
497 inline void FwdTrans (
const Array<OneD, const NekDouble>& inarray,
498 Array<OneD, NekDouble> &outarray);
501 Array<OneD, NekDouble> &outarray)
554 void FillMode(
const int mode, Array<OneD, NekDouble> &outarray)
592 Array<OneD, NekDouble> &outarray)
598 const Array<OneD, const NekDouble>& base,
599 const Array<OneD, const NekDouble>& inarray,
600 Array<OneD, NekDouble> &outarray,
608 const Array<OneD, const NekDouble>& inarray,
609 Array<OneD, NekDouble> &outarray)
656 void GetCoord(
const Array<OneD, const NekDouble>& Lcoord,
657 Array<OneD, NekDouble> &coord)
689 void NormVectorIProductWRTBase(
const Array<OneD, const NekDouble> &Fx,
const Array<OneD, const NekDouble> &Fy, Array< OneD, NekDouble> &outarray)
694 void NormVectorIProductWRTBase(
const Array<OneD, const NekDouble> &Fx,
const Array<OneD, const NekDouble> &Fy,
const Array<OneD, const NekDouble> &Fz, Array< OneD, NekDouble> &outarray)
730 Array<OneD, NekDouble> &coeffs,
738 Array<OneD, const NekDouble> &inarray,
739 Array<OneD, NekDouble> &outarray)
750 const std::vector<unsigned int > &nummodes,
751 const int nmodes_offset,
759 const Array<OneD, const NekDouble> &Lcoord,
760 const Array<OneD, const NekDouble> &physvals);
779 bool useCoeffPacking =
false)
785 Array<OneD, unsigned int> &maparray,
786 Array<OneD, int> &signarray)
792 Array<OneD, unsigned int> &maparray,
793 Array<OneD, int> &signarray)
799 Array<OneD, unsigned int> &maparray,
800 Array<OneD, int> &signarray)
806 Array<OneD, unsigned int> &maparray,
807 Array<OneD, int> &signarray,
808 int nummodesA = -1,
int nummodesB = -1)
811 nummodesA,nummodesB);
823 Array<OneD,NekDouble> &outarray)
829 const boost::shared_ptr<StdExpansion> &EdgeExp,
830 const Array<OneD, const NekDouble> &inarray,
831 Array<OneD,NekDouble> &outarray)
836 void GetTracePhysVals(
const int edge,
const boost::shared_ptr<StdExpansion> &EdgeExp,
const Array<OneD, const NekDouble> &inarray, Array<OneD,NekDouble> &outarray)
842 const Array<OneD, const NekDouble> &inarray,
850 Array<OneD,NekDouble> &outarray)
863 Array<OneD, NekDouble> &outarray)
872 const boost::shared_ptr<StdExpansion> &FaceExp,
873 const Array<OneD, const NekDouble> &inarray,
874 Array<OneD, NekDouble> &outarray,
881 const Array<OneD, const NekDouble> &inarray,
882 Array<OneD, NekDouble> &outarray)
888 const Array<OneD, const NekDouble> &inarray,
889 Array<OneD, NekDouble> & outarray)
906 Array<OneD,NekDouble> &outarray,
910 Array<OneD,NekDouble> &outarray,
917 Array<OneD,NekDouble> &outarray,
924 const Array<OneD, const NekDouble> &inarray,
925 Array<OneD,NekDouble> &outarray)
937 const Array<OneD, const NekDouble> &inarray,
938 Array<OneD,NekDouble> &outarray,
945 const Array<OneD, const NekDouble> &inarray,
946 Array<OneD,NekDouble> &outarray,
953 Array<OneD,NekDouble> &outarray,
960 Array<OneD,NekDouble> &outarray,
967 Array<OneD,NekDouble> &outarray,
969 bool addDiffusionTerm =
true)
981 Array<OneD,NekDouble> &outarray,
992 void PhysDeriv (
const Array<OneD, const NekDouble>& inarray,
993 Array<OneD, NekDouble> &out_d0,
1001 const Array<OneD, const NekDouble>& inarray,
1002 Array<OneD, NekDouble> &outarray)
1008 Array<OneD, NekDouble> &out_ds)
1014 Array<OneD, NekDouble>& out_dn)
1020 const Array<OneD, const NekDouble>& direction,
1021 Array<OneD, NekDouble> &outarray)
1027 Array<OneD, NekDouble> &out_d0,
1035 const Array<OneD, const NekDouble>& inarray,
1036 Array<OneD, NekDouble> &outarray)
1074 const Array<OneD, const NekDouble>& physvals)
1101 const Array<OneD, const NekDouble >& physvals)
1112 Array<OneD, NekDouble>& eta)
1140 const std::vector<unsigned int > &nummodes,
1141 const int nmode_offset,
1257 for (
int i = 0; i <
m_base.num_elements(); ++i)
1259 p.push_back(
m_base[i]->GetPointsKey());
1280 m_transformationmatrix);
1295 const Array<OneD, const NekDouble> &inarray,
1296 Array<OneD, NekDouble> &outarray);
1307 Array<OneD, int> &conn,
1308 bool standard =
true)
1314 boost::shared_ptr<T>
as()
1316 #if defined __INTEL_COMPILER && BOOST_VERSION > 105200
1317 typedef typename boost::shared_ptr<T>::element_type E;
1318 E * p =
dynamic_cast< E*
>( shared_from_this().get() );
1319 ASSERTL1(p,
"Cannot perform cast");
1320 return boost::shared_ptr<T>( shared_from_this(), p );
1322 return boost::dynamic_pointer_cast<T>( shared_from_this() );
1327 Array<OneD, LibUtilities::BasisSharedPtr>
m_base;
1363 Array<OneD, NekDouble> &outarray);
1366 Array<OneD, NekDouble> &outarray)
1372 Array<OneD, NekDouble> &outarray)
1378 const Array<OneD, const NekDouble>& inarray,
1379 Array<OneD, NekDouble> &outarray)
1392 Array<OneD,NekDouble> &outarray,
1396 Array<OneD,NekDouble> &outarray,
1400 Array<OneD,NekDouble> &outarray,
1407 const Array<OneD, const NekDouble> &inarray,
1408 Array<OneD, NekDouble> &outarray,
1409 Array<OneD, NekDouble> &wsp)
1415 Array<OneD,NekDouble> &outarray,
1419 const Array<OneD, const NekDouble> &inarray,
1420 Array<OneD,NekDouble> &outarray,
1424 const Array<OneD, const NekDouble> &inarray,
1425 Array<OneD,NekDouble> &outarray,
1429 Array<OneD,NekDouble> &outarray,
1433 Array<OneD,NekDouble> &outarray,
1437 Array<OneD,NekDouble> &outarray,
1439 bool addDiffusionTerm =
true);
1442 Array<OneD,NekDouble> &outarray,
1449 Array<OneD,NekDouble> &outarray,
1453 Array<OneD, const NekDouble> &inarray,
1454 Array<OneD, NekDouble> &outarray);
1457 Array<OneD, NekDouble> &coeffs,
1461 const Array<OneD, const NekDouble> &Lcoord,
1462 const Array<OneD, const NekDouble> &physvals);
1506 Array<OneD, NekDouble> &outarray) = 0;
1514 const Array<OneD, const NekDouble>& inarray,
1515 Array<OneD, NekDouble> &outarray) = 0;
1522 const Array<OneD, const NekDouble>& inarray,
1523 Array<OneD, NekDouble> &outarray) = 0;
1526 const Array<OneD, const NekDouble>& base,
1527 const Array<OneD, const NekDouble>& inarray,
1528 Array<OneD, NekDouble>& outarray,
1531 ASSERTL0(
false,
"StdExpansion::v_IProductWRTBase has no (and should have no) implementation");
1535 const Array<OneD, const NekDouble>& inarray,
1536 Array<OneD, NekDouble> &outarray);
1539 Array<OneD, NekDouble> &outarray);
1544 Array<OneD, NekDouble> &out_d1,
1545 Array<OneD, NekDouble> &out_d2,
1546 Array<OneD, NekDouble> &out_d3);
1549 Array<OneD, NekDouble> &out_ds);
1552 Array<OneD, NekDouble>& out_dn);
1554 const Array<OneD, const NekDouble>& inarray,
1555 Array<OneD, NekDouble> &out_d0);
1558 const Array<OneD, const NekDouble>& direction,
1559 Array<OneD, NekDouble> &outarray);
1562 Array<OneD, NekDouble> &out_d1,
1563 Array<OneD, NekDouble> &out_d2,
1564 Array<OneD, NekDouble> &out_d3);
1567 const Array<OneD, const NekDouble>& inarray,
1568 Array<OneD, NekDouble> &outarray);
1579 const Array<OneD, const NekDouble>& xi,
1580 Array<OneD, NekDouble>& eta);
1590 Array<OneD, NekDouble> &coords_1,
1591 Array<OneD, NekDouble> &coords_2);
1594 Array<OneD, NekDouble> &coord);
1603 bool useCoeffPacking =
false);
1606 Array<OneD, unsigned int> &maparray,
1607 Array<OneD, int> &signarray);
1610 Array<OneD, unsigned int> &maparray,
1611 Array<OneD, int> &signarray);
1614 Array<OneD, unsigned int> &maparray,
1615 Array<OneD, int> &signarray);
1618 Array<OneD, unsigned int> &maparray,
1619 Array<OneD, int> &signarray,
1620 int nummodesA = -1,
int nummodesB = -1);
1629 STD_REGIONS_EXPORT virtual void v_GetEdgePhysVals(
const int edge,
const boost::shared_ptr<StdExpansion> &EdgeExp,
const Array<OneD, const NekDouble> &inarray, Array<OneD,NekDouble> &outarray);
1636 const Array<OneD, const NekDouble> &inarray,Array<OneD,NekDouble> &outarray);
1640 Array<OneD, NekDouble> &outarray);
1644 const boost::shared_ptr<StdExpansion> &FaceExp,
1645 const Array<OneD, const NekDouble> &inarray,
1646 Array<OneD, NekDouble> &outarray,
1650 const Array<OneD, const NekDouble> &inarray,
1651 Array<OneD, NekDouble> &outarray);
1654 const Array<OneD, const NekDouble> &inarray,
1655 Array<OneD, NekDouble> &outarray);
1660 Array<OneD, NekDouble> &outarray);
1663 Array<OneD, NekDouble> &outarray);
1666 const Array<OneD, const NekDouble>& inarray,
1667 Array<OneD, NekDouble> &outarray);
1670 Array<OneD,NekDouble> &outarray,
1674 Array<OneD,NekDouble> &outarray,
1682 const Array<OneD, const NekDouble> &inarray,
1683 Array<OneD,NekDouble> &outarray);
1686 const Array<OneD, const NekDouble> &inarray,
1687 Array<OneD,NekDouble> &outarray,
1691 const Array<OneD, const NekDouble> &inarray,
1692 Array<OneD,NekDouble> &outarray,
1696 Array<OneD,NekDouble> &outarray,
1700 Array<OneD,NekDouble> &outarray,
1705 Array<OneD,NekDouble> &outarray,
1707 bool addDiffusionTerm=
true);
1710 Array<OneD,NekDouble> &outarray,
1714 Array<OneD,NekDouble> &outarray,
1718 const Array<OneD, const NekDouble> &inarray,
1719 Array<OneD, NekDouble> &outarray,
1720 Array<OneD, NekDouble> &wsp);
1723 Array<OneD,NekDouble> &outarray,
1755 Array<OneD, int> &conn,
1756 bool standard =
true);
1793 Array<OneD, NekDouble> &outarray)
1801 #endif //STANDARDDEXPANSION_H