| 3192 | |
| 3193 | using DiffOp<DiffOpIdVectorL2Piola<DIM_SPC,VB>>::AddTransSIMDIR; |
| 3194 | static void AddTransSIMDIR (const FiniteElement & bfel, const SIMD_BaseMappedIntegrationRule & bmir, |
| 3195 | BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x) |
| 3196 | { |
| 3197 | //static Timer t("DiffpIdVectorL2Piola::AddTransSIMD"); |
| 3198 | // static Timer tc("DiffpIdVectorL2Piola::AddTransSIMD calc"); |
| 3199 | // RegionTracer rt(TaskManager::GetThreadId(), t); |
| 3200 | |
| 3201 | auto & mir = static_cast<const SIMD_MappedIntegrationRule<DIM_ELEMENT,DIM_SPC>&> (bmir); |
| 3202 | auto & fel = static_cast<const VectorFiniteElement&> (bfel); |
| 3203 | auto & feli = static_cast<const BaseScalarFiniteElement&> (fel[0]); |
| 3204 | size_t ndofi = feli.GetNDof(); |
| 3205 | |
| 3206 | STACK_ARRAY(SIMD<double>, mempt, mir.Size()*DIM_SPACE); |
| 3207 | FlatMatrix<SIMD<double>> hy(DIM_SPACE, mir.Size(), &mempt[0]); |
| 3208 | |
| 3209 | for (size_t i = 0; i < mir.Size(); i++) |
| 3210 | { |
| 3211 | auto jac = mir[i].GetJacobian(); |
| 3212 | Vec<DIM_SPACE,SIMD<double>> val = y.Col(i); |
| 3213 | val *= 1/mir[i].GetJacobiDet(); |
| 3214 | hy.Col(i).Range(0,DIM_SPACE) = Trans(jac) * val; |
| 3215 | } |
| 3216 | |
| 3217 | STACK_ARRAY(double, memx, DIM_ELEMENT*ndofi); |
| 3218 | FlatMatrixFixWidth<DIM_ELEMENT, double> matx(ndofi, &memx[0]); |
| 3219 | |
| 3220 | for (size_t i = 0; i < ndofi; i++) |
| 3221 | matx.Row(i) = x.Slice(i, ndofi); |
| 3222 | |
| 3223 | feli.AddTrans(mir.IR(), hy, matx); |
| 3224 | |
| 3225 | for (size_t k = 0; k < DIM_ELEMENT; k++) |
| 3226 | x.Range(k*ndofi, (k+1)*ndofi) = matx.Col(k); |
| 3227 | } |
| 3228 | |
| 3229 | |
| 3230 | /* |
nothing calls this directly
no test coverage detected