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

Method MultTrans

bem/fmmoperator.hpp:174–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172 }
173
174 void MultTrans(const BaseVector & x, BaseVector & y) const override
175 {
176 static Timer tall("ngbem fmm apply Trans "+KERNEL::Name()); RegionTimer reg(tall);
177
178 auto shape = KERNEL::Shape();
179 auto matx = x.FV<typename KERNEL::value_type>().AsMatrix(xpts.Size(), shape[0]);
180 auto maty = y.FV<typename KERNEL::value_type>().AsMatrix(ypts.Size(), shape[1]);
181
182 maty = 0;
183 auto singmp = kernel.target.CreateMultipoleExpansion (cy, ry, fmm_params);
184 ParallelFor (ypts.Size(), [&](int i){
185 kernel.target.AddSource(*singmp, ypts[i], ynv[i], matx.Row(i));
186 });
187 singmp->CalcMP();
188 auto regmp = kernel.source.CreateLocalExpansion (cx, rx, fmm_params);
189 ParallelFor (xpts.Size(), [&](int i){
190 regmp->AddTarget(xpts[i]);
191 });
192 regmp->CalcMP(singmp);
193 ParallelFor (xpts.Size(), [&](int i) {
194 kernel.source.EvaluateMP(*regmp, xpts[i], xnv[i], maty.Row(i));
195 });
196 }
197
198 BaseMatrix::OperatorInfo GetOperatorInfo () const override
199 {

Callers

nothing calls this directly

Calls 10

CreateLocalExpansionMethod · 0.80
AddTargetMethod · 0.80
NameFunction · 0.50
ShapeFunction · 0.50
SizeMethod · 0.45
AddSourceMethod · 0.45
RowMethod · 0.45
CalcMPMethod · 0.45
EvaluateMPMethod · 0.45

Tested by

no test coverage detected