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

Method AllocateVector

comp/linearform.cpp:708–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706
707 template <typename SCAL>
708 void S_LinearForm<SCAL> :: AllocateVector ()
709 {
710 auto fes = this->fespace;
711
712 /*
713 if ( fes->IsParallel() )
714 vec = make_shared<ParallelVVector<TV>> (fes->GetNDof(),
715 fes->GetParallelDofs(), DISTRIBUTED);
716 else
717 vec = make_shared<VVector<TV>> (fes->GetNDof());
718 */
719 if ( fes->IsParallel() )
720 vec = make_shared<S_ParallelBaseVectorPtr<TSCAL>> (fes->GetNDof(),
721 fes->GetDimension()*this->cacheblocksize,
722 fes->GetParallelDofs(), DISTRIBUTED);
723 else
724 vec = make_shared<S_BaseVectorPtr<TSCAL>> (fes->GetNDof(),
725 fes->GetDimension()*this->cacheblocksize);
726
727 (*vec) = TSCAL(0);
728 vec->SetParallelStatus (DISTRIBUTED);
729 }
730
731
732

Callers

nothing calls this directly

Calls 4

GetParallelDofsMethod · 0.80
SetParallelStatusMethod · 0.80
GetNDofMethod · 0.45
GetDimensionMethod · 0.45

Tested by

no test coverage detected