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

Method SetIndirect

linalg/basevector.cpp:502–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500
501
502 void BaseVector :: SetIndirect (FlatArray<int> ind,
503 FlatVector<double> v)
504 {
505 FlatSysVector<double> lsv(Size(), EntrySize(), FVDouble().Addr(0));
506 FlatSysVector<double> sv(ind.Size(), EntrySize(), v.Addr(0));
507
508 for (size_t i = 0; i < ind.Size(); i++)
509 if (IsRegularIndex(ind[i]))
510 lsv(ind[i]) = sv(i);
511
512 /*
513 FlatVector<double> fv = FVDouble();
514 int es = EntrySize();
515 int ii = 0;
516 for (int i = 0; i < ind.Size(); i++)
517 if (ind[i] != -1)
518 {
519 int base = es * ind[i];
520 for (int j = 0; j < es; j++)
521 fv[base++] = v[ii++];
522 }
523 else
524 ii += es;
525 */
526 }
527
528 void BaseVector :: SetIndirect (FlatArray<int> ind,
529 FlatVector<Complex> v)

Callers

nothing calls this directly

Calls 7

EntrySizeFunction · 0.85
FVDoubleFunction · 0.85
FVComplexFunction · 0.85
AddrMethod · 0.80
SizeFunction · 0.70
IsRegularIndexFunction · 0.70
SizeMethod · 0.45

Tested by

no test coverage detected