45 vector<LocalRegions::ExpansionSharedPtr> &pCollExp)
51 int nElmts = pCollExp.size();
52 int npts = pCollExp[0]->GetTotPoints();
60 for (
int i = 0; i < nElmts; ++i)
63 pCollExp[i]->GetGeomFactors()->GetJac();
76 for (
int i = 0; i < nElmts; ++i)
79 pCollExp[i]->GetGeomFactors()->GetJac();
91 vector<LocalRegions::ExpansionSharedPtr> &pCollExp,
int nElmt)
97 int jacsize = jac.size();
98 int npts = pCollExp[0]->GetTotPoints();
101 "Number of elements not divisible by vector "
102 "width, padding not yet implemented.");
103 int nBlocks = nElmt / vec_t::width;
111 newjac.resize(nBlocks * npts);
113 alignas(vec_t::alignment)
NekDouble tmp[vec_t::width];
115 for (
size_t block = 0; block < nBlocks; ++block)
117 size_t nblock_width = block * npts * vec_t::width;
118 for (
size_t q = 0; q < npts; q++)
120 for (
int j = 0; j < vec_t::width; ++j)
122 if (nblock_width + npts * j + q < jacsize)
124 tmp[j] = jac[nblock_width + npts * j + q];
133 newjac[block * npts + q].load(&tmp[0]);
139 newjac.resize(nBlocks);
141 alignas(vec_t::alignment)
NekDouble tmp[vec_t::width];
142 for (
size_t i = 0; i < nBlocks; ++i)
144 for (
int j = 0; j < vec_t::width; ++j)
146 if (vec_t::width * i + j < jacsize)
148 tmp[j] = jac[vec_t::width * i + j];
156 newjac[i].load(&tmp[0]);
168 vector<LocalRegions::ExpansionSharedPtr> &pCollExp)
173 int nElmts = pCollExp.size();
174 int npts = pCollExp[0]->GetTotPoints();
179 for (
int i = 0; i < nElmts; ++i)
182 pCollExp[i]->GetGeomFactors()->GetJac();
184 if (pCollExp[i]->GetGeomFactors()->GetGtype() ==
194 pCollExp[0]->MultiplyByStdQuadratureMetric(newjac + cnt,
206 vector<LocalRegions::ExpansionSharedPtr> &pCollExp)
212 int nElmts = pCollExp.size();
213 int npts = pCollExp[0]->GetTotPoints();
214 const int coordim = pCollExp[0]->GetCoordim();
215 int dim = ptsKeys.size();
231 for (
int i = 0; i < nElmts; ++i)
234 pCollExp[i]->GetGeomFactors()->GetDerivFactors();
238 for (
int j = 0; j < dim * coordim; ++j)
240 Vmath::Vcopy(npts, &Dfac[j][0], 1, &newDFac[j][cnt], 1);
245 for (
int j = 0; j < dim * coordim; ++j)
247 newDFac[j][i] = Dfac[j][0];
260 vector<LocalRegions::ExpansionSharedPtr> &pCollExp,
int nElmt)
265 "Number of elements not divisible by vector "
266 "width, padding not yet implemented.");
268 int nBlocks = nElmt / vec_t::width;
271 const int coordim = pCollExp[0]->GetCoordim();
272 int dim = ptsKeys.size();
274 unsigned int n_df = coordim * dim;
275 alignas(vec_t::alignment)
NekDouble vec[vec_t::width];
278 int dfsize = df.GetColumns();
282 int npts = pCollExp[0]->GetTotPoints();
286 newdf.resize(nBlocks * n_df * npts);
287 auto *df_ptr = &newdf[0];
288 for (
int e = 0; e < nBlocks; ++e)
290 for (
int q = 0; q < npts; q++)
292 for (
int dir = 0; dir < n_df; ++dir, ++df_ptr)
294 for (
int j = 0; j < vec_t::width; ++j)
297 if ((vec_t::width * e + j) * npts + q < dfsize)
300 df[dir][(vec_t::width * e + j) * npts + q];
307 (*df_ptr).load(&vec[0]);
314 newdf.resize(nBlocks * n_df);
315 for (
int e = 0; e < nBlocks; ++e)
317 for (
int dir = 0; dir < n_df; ++dir)
319 for (
int j = 0; j < vec_t::width; ++j)
322 if (vec_t::width * e + j < dfsize)
324 vec[j] = df[dir][vec_t::width * e + j];
332 newdf[e * n_df + dir].load(&vec[0]);
345 vector<LocalRegions::ExpansionSharedPtr> &pCollExp)
347 return pCollExp[0]->GetGeomFactors()->GetGtype() ==
#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
std::map< GeomData, std::shared_ptr< VecVec_t > > m_oneDGeomDataInterLeave
bool IsDeformed(std::vector< LocalRegions::ExpansionSharedPtr > &pCollExp)
const Array< OneD, const NekDouble > & GetJac(std::vector< LocalRegions::ExpansionSharedPtr > &pColLExp)
const std::shared_ptr< VecVec_t > GetDerivFactorsInterLeave(std::vector< LocalRegions::ExpansionSharedPtr > &pCollExp, int nElmts)
std::map< GeomData, Array< OneD, NekDouble > > m_oneDGeomData
const Array< TwoD, const NekDouble > & GetDerivFactors(std::vector< LocalRegions::ExpansionSharedPtr > &pColLExp)
const Array< OneD, const NekDouble > & GetJacWithStdWeights(std::vector< LocalRegions::ExpansionSharedPtr > &pColLExp)
std::map< GeomData, Array< TwoD, NekDouble > > m_twoDGeomData
const std::shared_ptr< VecVec_t > GetJacInterLeave(std::vector< LocalRegions::ExpansionSharedPtr > &pCollExp, int nElmts)
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::vector< vec_t, tinysimd::allocator< vec_t > > VecVec_t
std::vector< PointsKey > PointsKeyVector
@ eDeformed
Geometry is curved or has non-constant factors.
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)