void ShiftedLaplacian<Scalar,LocalOrdinal,GlobalOrdinal,Node>::setupFastRAP() { int numLevels = Hierarchy_ -> GetNumLevels(); Manager_ -> SetFactory("Smoother", smooFact_); Manager_ -> SetFactory("CoarseSolver", coarsestSmooFact_); Hierarchy_ -> GetLevel(0) -> Set("A", P_); Hierarchy_ -> Setup(*Manager_, 0, numLevels); setupSolver(); }
void ShiftedLaplacian<Scalar,LocalOrdinal,GlobalOrdinal,Node>::setupNormalRAP() { // Only setup hierarchy again if preconditioning matrix has changed if( GridTransfersExist_ == false ) { Hierarchy_ = rcp( new Hierarchy(P_) ); if(NullSpace_!=Teuchos::null) Hierarchy_ -> GetLevel(0) -> Set("Nullspace", NullSpace_); if(isSymmetric_==true) Hierarchy_ -> SetImplicitTranspose(true); Hierarchy_ -> SetMaxCoarseSize( coarseGridSize_ ); Hierarchy_ -> Setup(*Manager_, 0, numLevels_); GridTransfersExist_=true; } setupSolver(); }
void Cell::setupf( Id cell ) { cout << "Cell::setup()" << endl; cout << ".... cell path: " << cell.path() << endl; //~ return; // Delete existing solver string solverPath = cell.path() + "/" + solverName_; Id solver( solverPath ); if ( solver.path() == solverPath ) solver.destroy(); if ( method_ == "ee" ) return; // Find any compartment that is a descendant of this cell Id seed = findCompt( cell ); if ( seed == Id() ) // No compartment found. return; setupSolver( cell, seed ); }
void Cell::reinit( const Eref& cell, ProcPtr p ) //~ void Cell::reinit( const Eref& cell, const Qinfo* q ) { cout << ".. Cell::reinit()" << endl; //~ if ( q->protectedAddToStructuralQ() ) //~ return; // Delete existing solver //~ string solverPath = cell.id().path() + "/" + solverName_; //~ Id solver( solverPath ); //~ if ( solver.path() == solverPath ) //~ solver.destroy(); if ( method_ == "ee" ) return; // Find any compartment that is a descendant of this cell Id seed = findCompt( cell.id() ); if ( seed == Id() ) // No compartment found. return; setupSolver( cell.id(), seed ); }