MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / AddTransSIMDIR

Method AddTransSIMDIR

comp/l2hofespace.cpp:3731–3759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3729
3730 using DiffOp<DiffOpIdVectorL2Covariant<DIM_SPC>>::AddTransSIMDIR;
3731 static void AddTransSIMDIR (const FiniteElement & bfel, const SIMD_BaseMappedIntegrationRule & bmir,
3732 BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
3733 {
3734 auto & mir = static_cast<const SIMD_MappedIntegrationRule<DIM_ELEMENT,DIM_SPC>&> (bmir);
3735 auto & fel = static_cast<const VectorFiniteElement&> (bfel);
3736 auto & feli = static_cast<const BaseScalarFiniteElement&> (fel[0]);
3737 size_t ndofi = feli.GetNDof();
3738
3739 STACK_ARRAY(SIMD<double>, mempt, mir.Size()*DIM_SPACE);
3740 FlatMatrix<SIMD<double>> hy(DIM_SPACE, mir.Size(), &mempt[0]);
3741
3742 for (size_t i = 0; i < mir.Size(); i++)
3743 {
3744 auto jacinv = mir[i].GetJacobianInverse();
3745 Vec<DIM_SPACE,SIMD<double>> val = y.Col(i);
3746 hy.Col(i) = jacinv * val;
3747 }
3748
3749 STACK_ARRAY(double, memx, DIM_SPACE*ndofi);
3750 FlatMatrix<double> matx(ndofi, DIM_SPACE, &memx[0]);
3751
3752 for (size_t k = 0; k < DIM_SPACE; k++)
3753 matx.Col(k) = x.Range(k*ndofi, (k+1)*ndofi);
3754
3755 feli.AddTrans(mir.IR(), hy, matx);
3756
3757 for (size_t k = 0; k < DIM_SPACE; k++)
3758 x.Range(k*ndofi, (k+1)*ndofi) = matx.Col(k);
3759 }
3760 };
3761
3762

Callers

nothing calls this directly

Calls 6

GetNDofMethod · 0.45
SizeMethod · 0.45
GetJacobianInverseMethod · 0.45
ColMethod · 0.45
RangeMethod · 0.45
AddTransMethod · 0.45

Tested by

no test coverage detected