56 vector<StdRegions::StdExpansionSharedPtr> &pCollExp)
63 int nElmts = pCollExp.size();
67 for (
int i = 0; i < ptsKeys.size(); ++i)
69 npts *= ptsKeys[i].GetNumPoints();
78 for (
int i = 0; i < nElmts; ++i)
98 for (
int i = 0; i < nElmts; ++i)
117 vector<StdRegions::StdExpansionSharedPtr> &pCollExp,
int nElmt)
123 int jacsize = jac.size();
126 "Number of elements not divisible by vector "
127 "width, padding not yet implemented.");
128 int nBlocks = nElmt / vec_t::width;
136 for (
int i = 0; i < ptsKeys.size(); ++i)
138 nq *= ptsKeys[i].GetNumPoints();
144 newjac.resize(nBlocks * nq);
146 alignas(vec_t::alignment)
NekDouble tmp[vec_t::width];
148 for (
size_t block = 0; block < nBlocks; ++block)
150 size_t nblock_width = block * nq * vec_t::width;
151 for (
size_t q = 0;
q < nq;
q++)
153 for (
int j = 0; j < vec_t::width; ++j)
155 if (nblock_width + nq * j +
q < jacsize)
157 tmp[j] = jac[nblock_width + nq * j +
q];
166 newjac[block * nq +
q].load(&tmp[0]);
172 newjac.resize(nBlocks);
174 alignas(vec_t::alignment)
NekDouble tmp[vec_t::width];
175 for (
size_t i = 0; i < nBlocks; ++i)
177 for (
int j = 0; j < vec_t::width; ++j)
179 if (vec_t::width * i + j < jacsize)
181 tmp[j] = jac[vec_t::width * i + j];
189 newjac[i].load(&tmp[0]);
201 vector<StdRegions::StdExpansionSharedPtr> &pCollExp)
206 int nElmts = pCollExp.size();
210 for (
int i = 0; i < ptsKeys.size(); ++i)
212 npts *= ptsKeys[i].GetNumPoints();
219 for (
int i = 0; i < nElmts; ++i)
237 pCollExp[0]->MultiplyByStdQuadratureMetric(newjac + cnt,
249 vector<StdRegions::StdExpansionSharedPtr> &pCollExp)
255 int nElmts = pCollExp.size();
256 const int coordim = pCollExp[0]->GetCoordim();
257 int dim = ptsKeys.size();
261 for (
int i = 0; i < dim; ++i)
263 npts *= ptsKeys[i].GetNumPoints();
279 for (
int i = 0; i < nElmts; ++i)
290 for (
int j = 0; j < dim * coordim; ++j)
292 Vmath::Vcopy(npts, &Dfac[j][0], 1, &newDFac[j][cnt], 1);
297 for (
int j = 0; j < dim * coordim; ++j)
299 newDFac[j][i] = Dfac[j][0];
312 vector<StdRegions::StdExpansionSharedPtr> &pCollExp,
int nElmt)
317 "Number of elements not divisible by vector "
318 "width, padding not yet implemented.");
320 int nBlocks = nElmt / vec_t::width;
323 const int coordim = pCollExp[0]->GetCoordim();
324 int dim = ptsKeys.size();
326 unsigned int n_df = coordim * dim;
327 alignas(vec_t::alignment)
NekDouble vec[vec_t::width];
330 int dfsize = df.GetColumns();
335 for (
int i = 0; i < dim; ++i)
337 nq *= ptsKeys[i].GetNumPoints();
342 newdf.resize(nBlocks * n_df * nq);
343 auto *df_ptr = &newdf[0];
344 for (
int e = 0; e < nBlocks; ++e)
346 for (
int q = 0;
q < nq;
q++)
348 for (
int dir = 0; dir < n_df; ++dir, ++df_ptr)
350 for (
int j = 0; j < vec_t::width; ++j)
353 if ((vec_t::width * e + j) * nq +
q < dfsize)
356 df[dir][(vec_t::width * e + j) * nq +
q];
363 (*df_ptr).load(&vec[0]);
370 newdf.resize(nBlocks * n_df);
371 for (
int e = 0; e < nBlocks; ++e)
373 for (
int dir = 0; dir < n_df; ++dir)
375 for (
int j = 0; j < vec_t::width; ++j)
378 if (vec_t::width * e + j < dfsize)
380 vec[j] = df[dir][vec_t::width * e + j];
388 newdf[e * n_df + dir].load(&vec[0]);
401 vector<StdRegions::StdExpansionSharedPtr> &pCollExp)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
std::map< GeomData, std::shared_ptr< VecVec_t > > m_twoDGeomDataInterLeave
virtual ~CoalescedGeomData(void)
std::map< GeomData, std::shared_ptr< VecVec_t > > m_oneDGeomDataInterLeave
const Array< OneD, const NekDouble > & GetJacWithStdWeights(std::vector< StdRegions::StdExpansionSharedPtr > &pColLExp)
bool IsDeformed(std::vector< StdRegions::StdExpansionSharedPtr > &pCollExp)
const std::shared_ptr< VecVec_t > GetJacInterLeave(std::vector< StdRegions::StdExpansionSharedPtr > &pCollExp, int nElmts)
std::map< GeomData, Array< OneD, NekDouble > > m_oneDGeomData
const Array< OneD, const NekDouble > & GetJac(std::vector< StdRegions::StdExpansionSharedPtr > &pColLExp)
const std::shared_ptr< VecVec_t > GetDerivFactorsInterLeave(std::vector< StdRegions::StdExpansionSharedPtr > &pCollExp, int nElmts)
std::map< GeomData, Array< TwoD, NekDouble > > m_twoDGeomData
const Array< TwoD, const NekDouble > & GetDerivFactors(std::vector< StdRegions::StdExpansionSharedPtr > &pColLExp)
const SpatialDomains::GeomFactorsSharedPtr & GetMetricInfo() const
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
The base class for all shapes.
std::vector< vec_t, tinysimd::allocator< vec_t > > VecVec_t
std::vector< PointsKey > PointsKeyVector
@ eDeformed
Geometry is curved or has non-constant factors.
std::vector< double > q(NPUPPER *NPUPPER)
The above copyright notice and this permission notice shall be included.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)