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

Method Mult

linalg/mumpsinverse.cpp:353–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351
352 template <class TM, class TV_ROW, class TV_COL>
353 void MumpsInverse<TM,TV_ROW,TV_COL> ::
354 Mult (const BaseVector & x, BaseVector & y) const
355 {
356 int id = comm.Rank();
357
358 static Timer timer("Mumps mult inverse");
359 RegionTimer reg (timer);
360
361
362 if (id == 0)
363 {
364 FlatVector<TVX> fx = x.FV<TVX>();
365 FlatVector<TVX> fy = y.FV<TVX>();
366
367 fy = fx;
368
369 MUMPS_STRUC_C & ncid = const_cast<MUMPS_STRUC_C&> (mumps_id);
370
371 ncid.rhs = (typename mumps_trait<TSCAL>::MUMPS_TSCAL*)& (y.FV<TSCAL>()(0));
372
373 ncid.job = JOB_SOLVE;
374 mumps_trait<TSCAL>::MumpsFunction (&ncid);
375
376 if (inner)
377 {
378 for (int i = 0; i < height/entrysize; i++)
379 if (!inner->Test(i))
380 for (int j = 0; j < entrysize; j++ ) fy(i*entrysize+j) = 0.0;
381 }
382 else if (cluster)
383 {
384 for (int i = 0; i < height/entrysize; i++)
385 if (!(*cluster)[i])
386 for (int j = 0; j < entrysize; j++ ) fy(i*entrysize+j) = 0.0;
387 }
388 }
389 else
390 {
391 MUMPS_STRUC_C & ncid = const_cast<MUMPS_STRUC_C&> (mumps_id);
392 ncid.rhs = (typename mumps_trait<TSCAL>::MUMPS_TSCAL*)& (y.FV<TSCAL>()(0));
393
394 ncid.job = JOB_SOLVE;
395 mumps_trait<TSCAL>::MumpsFunction (&ncid);
396 }
397 }
398
399
400 template <class TM, class TV_ROW, class TV_COL>

Callers

nothing calls this directly

Calls 5

DistributeMethod · 0.80
SetParallelStatusMethod · 0.80
GetCommunicatorMethod · 0.45
SizeMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected