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

Method BlockVector

linalg/basevector.cpp:799–823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797
798
799 BlockVector :: BlockVector (const Array<shared_ptr<BaseVector>> & avecs)
800 : vecs(avecs), ispar(vecs.Size())
801 {
802 size = 0;
803 for (auto & vec:vecs)
804 size += vec->Size();
805 // #ifdef PARALLEL
806 ispar.Clear();
807 for (size_t k = 0; k < vecs.Size(); k++)
808 if (vecs[k]->GetParallelStatus() != NOT_PARALLEL)
809 {
810 ispar.SetBit(k);
811 comm = dynamic_pointer_cast<ParallelBaseVector> (vecs[k])->GetParallelDofs()->GetCommunicator();
812 }
813 /*
814 for (size_t k = 0; k<vecs.Size(); k++) {
815 auto stat = vecs[k]->GetParallelStatus();
816 if ( stat==NOT_PARALLEL ) continue;
817 ispar.SetBit(k);
818 auto * pv = dynamic_cast_ParallelBaseVector(vecs[k].get());
819 comm = pv->GetParallelDofs()->GetCommunicator();
820 }
821 */
822 // #endif
823 }
824
825 void * BlockVector :: Memory () const
826 { throw Exception("BlockVector::Memory is not useful"); }

Callers

nothing calls this directly

Calls 5

ClearMethod · 0.80
GetParallelStatusMethod · 0.80
GetParallelDofsMethod · 0.80
SizeMethod · 0.45
GetCommunicatorMethod · 0.45

Tested by

no test coverage detected