40#include <MatrixFreeOps/Operator.hpp> 
   76            "Constant factor not defined: " +
 
   82        int shape_dimension = 
m_stdExp->GetShapeDimension();
 
   84        for (
int i = 0; i < shape_dimension; ++i)
 
  106        int shape_dimension = 
m_stdExp->GetShapeDimension();
 
  108        for (
int i = 0; i < shape_dimension; ++i)
 
  136        (*m_oper)(input, output0);
 
  145                 "PhysInterp1DScaled_MatrixFree: Not valid for this operator.");
 
  155            "Constant factor not defined: " +
 
  162        const auto dim = 
m_stdExp->GetShapeDimension();
 
  165        std::vector<LibUtilities::BasisSharedPtr> basis(dim);
 
  166        for (
unsigned int i = 0; i < dim; ++i)
 
  173        m_oper->SetScalingFactor(x->second);
 
  179    std::shared_ptr<MatrixFree::PhysInterp1DScaled> 
m_oper;
 
  182        vector<StdRegions::StdExpansionSharedPtr> pCollExp,
 
  186                         pCollExp[0]->GetStdExp()->GetTotPoints(),
 
  190        const auto dim = pCollExp[0]->GetStdExp()->GetShapeDimension();
 
  193        std::vector<LibUtilities::BasisSharedPtr> basis(dim);
 
  194        for (
unsigned int i = 0; i < dim; ++i)
 
  196            basis[i] = pCollExp[0]->GetBasis(i);
 
  200        auto shapeType = pCollExp[0]->GetStdExp()->DetShapeType();
 
  203        std::string op_string = 
"PhysInterp1DScaled";
 
  204        op_string += MatrixFree::GetOpstring(shapeType, 
false);
 
  206            op_string, basis, pCollExp.size());
 
  209            std::dynamic_pointer_cast<MatrixFree::PhysInterp1DScaled>(oper);
 
  226        m_oper->SetScalingFactor(scale);
 
  227        m_oper->SetUpInterp1D(basis, scale);
 
  233OperatorKey PhysInterp1DScaled_MatrixFree::m_typeArr[] = {
 
  236        PhysInterp1DScaled_MatrixFree::create,
 
  237        "PhysInterp1DScaled_MatrixFree_Seg"),
 
  240        PhysInterp1DScaled_MatrixFree::create,
 
  241        "PhysInterp1DScaled_MatrixFree_Tri"),
 
  244        PhysInterp1DScaled_MatrixFree::create,
 
  245        "PhysInterp1DScaled_MatrixFree_NodalTri"),
 
  248        PhysInterp1DScaled_MatrixFree::create,
 
  249        "PhysInterp1DScaled_MatrixFree_Quad"),
 
  252        PhysInterp1DScaled_MatrixFree::create,
 
  253        "PhysInterp1DScaled_MatrixFree_Tet"),
 
  256        PhysInterp1DScaled_MatrixFree::create,
 
  257        "PhysInterp1DScaled_MatrixFree_NodalTet"),
 
  260        PhysInterp1DScaled_MatrixFree::create,
 
  261        "PhysInterp1DScaled_MatrixFree_Pyr"),
 
  264        PhysInterp1DScaled_MatrixFree::create,
 
  265        "PhysInterp1DScaled_MatrixFree_Prism"),
 
  268        PhysInterp1DScaled_MatrixFree::create,
 
  269        "PhysInterp1DScaled_MatrixFree_NodalPrism"),
 
  272        PhysInterp1DScaled_MatrixFree::create,
 
  273        "PhysInterp1DScaled_NoCollection_Hex"),
 
  298        int dim{
m_expList[0]->GetShapeDimension()}; 
 
  307                int npt0 = (int)pt0 * scale;
 
  321                    Blas::Dgemv(
'N', npt0, pt0, 1.0, I0->GetPtr().data(), npt0,
 
  322                                &input[cnt], 1, 0.0, &output[cnt1], 1);
 
  335                int npt0 = (int)pt0 * scale;
 
  336                int npt1 = (int)pt1 * scale;
 
  359                    Blas::Dgemm(
'N', 
'T', pt0, npt1, pt1, 1.0, &input[cnt], pt0,
 
  360                                I1->GetPtr().data(), npt1, 0.0, wsp.data(),
 
  364                                I0->GetPtr().data(), npt0, wsp.data(), pt0, 0.0,
 
  365                                &output[cnt1], npt0);
 
  379                int npt0 = (int)pt0 * scale;
 
  380                int npt1 = (int)pt1 * scale;
 
  381                int npt2 = (int)pt2 * scale;
 
  411                                I0->GetPtr().data(), npt0, &input[cnt], pt0,
 
  412                                0.0, wsp2.data(), npt0);
 
  414                    for (
int j = 0; j < pt2; j++)
 
  417                                    wsp2.data() + j * npt0 * pt1, npt0,
 
  418                                    I1->GetPtr().data(), npt1, 0.0,
 
  419                                    wsp1.data() + j * npt0 * npt1, npt0);
 
  423                                wsp1.data(), npt0 * npt1, I2->GetPtr().data(),
 
  424                                npt2, 0.0, &output[cnt1], npt0 * npt1);
 
  426                    cnt += pt0 * pt1 * pt2;
 
  427                    cnt1 += npt0 * npt1 * npt2;
 
  434                                            "PhysInterp1DScaled operator.");
 
  444        ASSERTL0(
false, 
"Not valid for this operator.");
 
  455        vector<StdRegions::StdExpansionSharedPtr> pCollExp,
 
  468OperatorKey PhysInterp1DScaled_NoCollection::m_typeArr[] = {
 
  471        PhysInterp1DScaled_NoCollection::create,
 
  472        "PhysInterp1DScaled_NoCollection_Seg"),
 
  475        PhysInterp1DScaled_NoCollection::create,
 
  476        "PhysInterp1DScaled_NoCollection_Tri"),
 
  479        PhysInterp1DScaled_NoCollection::create,
 
  480        "PhysInterp1DScaled_NoCollection_NodalTri"),
 
  483        PhysInterp1DScaled_NoCollection::create,
 
  484        "PhysInterp1DScaled_NoCollection_Quad"),
 
  487        PhysInterp1DScaled_NoCollection::create,
 
  488        "PhysInterp1DScaled_NoCollection_Tet"),
 
  491        PhysInterp1DScaled_NoCollection::create,
 
  492        "PhysInterp1DScaled_NoCollection_NodalTet"),
 
  495        PhysInterp1DScaled_NoCollection::create,
 
  496        "PhysInterp1DScaled_NoCollection_Pyr"),
 
  499        PhysInterp1DScaled_NoCollection::create,
 
  500        "PhysInterp1DScaled_NoCollection_Prism"),
 
  503        PhysInterp1DScaled_NoCollection::create,
 
  504        "PhysInterp1DScaled_NoCollection_NodalPrism"),
 
  507        PhysInterp1DScaled_NoCollection::create,
 
  508        "PhysInterp1DScaled_NoCollection_Hex"),
 
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define OPERATOR_CREATE(cname)
unsigned int m_nElmtPad
size after padding
unsigned int m_nOut
actural size of output array
Base class for operators on a collection of elements.
StdRegions::StdExpansionSharedPtr m_stdExp
unsigned int m_numElmt
number of elements that the operator is applied on
unsigned int m_outputSize
number of modes or quadrature points that are taken as output from an operator
unsigned int m_inputSize
number of modes or quadrature points that are passed as input to an operator
PhysInterp1DScaled help class to calculate the size of the collection that is given as an input and a...
StdRegions::FactorMap m_factors
PhysInterp1DScaled_Helper()
void UpdateFactors(StdRegions::FactorMap factors) override
Update the supplied factor map.
PhysInterp1DScaled operator using matrix free implementation.
PhysInterp1DScaled_MatrixFree(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
std::shared_ptr< MatrixFree::PhysInterp1DScaled > m_oper
~PhysInterp1DScaled_MatrixFree() final=default
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
void UpdateFactors(StdRegions::FactorMap factors) override
Update the supplied factor map.
PhysInterp1DScaled operator using LocalRegions implementation.
PhysInterp1DScaled_NoCollection(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) override
Perform operation.
void UpdateFactors(StdRegions::FactorMap factors) override
Update the supplied factor map.
StdRegions::FactorMap m_factors
~PhysInterp1DScaled_NoCollection() final
vector< StdRegions::StdExpansionSharedPtr > m_expList
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Defines a specification for a set of points.
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = alpha A x plus beta y where A[m x n].
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k], op(B)[k x n], C[m x n] DGEMM perfo...
std::tuple< LibUtilities::ShapeType, OperatorType, ImplementationType, ExpansionIsNodal > OperatorKey
Key for describing an Operator.
std::shared_ptr< CoalescedGeomData > CoalescedGeomDataSharedPtr
OperatorFactory & GetOperatorFactory()
Returns the singleton Operator factory object.
PointsManagerT & PointsManager(void)
const char *const ConstFactorTypeMap[]
StdRegions::ConstFactorMap factors
std::shared_ptr< DNekMat > DNekMatSharedPtr