Commit 8ebd0628 by David Moxey

### Fix iterative full solver

parent ee792bf9
 ... @@ -131,7 +131,7 @@ namespace Nektar ... @@ -131,7 +131,7 @@ namespace Nektar expList->GetComm()->AllReduce(nDirTotal, LibUtilities::ReduceSum); expList->GetComm()->AllReduce(nDirTotal, LibUtilities::ReduceSum); Array tmp(nGlobDofs); Array tmp(nGlobDofs), tmp2; if(nDirTotal) if(nDirTotal) { { ... @@ -156,9 +156,12 @@ namespace Nektar ... @@ -156,9 +156,12 @@ namespace Nektar if (vCG) if (vCG) { { Array out(nGlobDofs,0.0); Array out(nGlobDofs,0.0); // solve for perturbation from intiial guess in pOutput // solve for perturbation from intiial guess in pOutput SolveLinearSystem(nGlobDofs, tmp, out, pLocToGloMap, nDirDofs); SolveLinearSystem( Vmath::Vadd(nGlobDofs,out,1,pOutput,1,out,1); nGlobDofs, tmp, out, pLocToGloMap, nDirDofs); Vmath::Vadd(nGlobDofs-nDirDofs, &out [nDirDofs], 1, &pOutput[nDirDofs], 1, &pOutput[nDirDofs], 1); } } else else { { ... ...
 ... @@ -146,12 +146,11 @@ namespace Nektar ... @@ -146,12 +146,11 @@ namespace Nektar int nGlobDofs = pLocToGloMap->GetNumGlobalCoeffs(); int nGlobDofs = pLocToGloMap->GetNumGlobalCoeffs(); Array tmp(nGlobDofs), tmp2; Array tmp(nGlobDofs), tmp2; int check = nDirDofs > 0 ? 1 : 0; int nDirTotal = nDirDofs; LibUtilities::CommSharedPtr vComm m_expList.lock()->GetComm()->GetRowComm()->AllReduce( = m_expList.lock()->GetSession()->GetComm(); nDirTotal, LibUtilities::ReduceSum); vComm->AllReduce(check, LibUtilities::ReduceMax); if(check) if(nDirTotal) { { // calculate the dirichlet forcing // calculate the dirichlet forcing if(dirForcCalculated) if(dirForcCalculated) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!