42 namespace MultiRegions
49 m_globalLinSysManager(
50 boost::bind(&
ContField3D::GenGlobalLinSys, this, _1),
51 std::string(
"GlobalLinSys"))
78 const std::string &variable,
79 const bool CheckIfSingularSystem):
82 m_globalLinSysManager(
83 boost::bind(&
ContField3D::GenGlobalLinSys, this, _1),
84 std::string(
"GlobalLinSys"))
89 CheckIfSingularSystem, variable);
91 if (
m_session->DefinesCmdLineArgument(
"verbose"))
123 const std::string &variable,
124 const bool CheckIfSingularSystem):
127 m_globalLinSysManager(boost::bind(&
ContField3D::GenGlobalLinSys, this, _1),
128 std::string(
"GlobalLinSys"))
137 CheckIfSingularSystem,variable);
139 if (
m_session->DefinesCmdLineArgument(
"verbose"))
153 m_locToGloMap(In.m_locToGloMap),
154 m_globalMat(In.m_globalMat),
155 m_globalLinSysManager(In.m_globalLinSysManager)
180 const Array<OneD, const NekDouble> &inarray,
181 Array<OneD, NekDouble> &outarray,
193 mat->Multiply(inarray,outarray);
225 Array<OneD, NekDouble> &outarray,
238 mat->Multiply(inarray,outarray);
256 Array<OneD, NekDouble> &outarray,
261 Array<OneD,NekDouble> wsp(contNcoeffs);
273 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
281 const Array<OneD, const NekDouble> &inarray,
282 Array<OneD, NekDouble> &outarray,
291 if(inarray.data() == outarray.data())
293 Array<OneD, NekDouble> tmp(contNcoeffs,0.0);
304 Array<OneD, NekDouble> globaltmp(contNcoeffs,0.0);
306 if(inarray.data() == outarray.data())
308 Array<OneD,NekDouble> tmp(inarray.num_elements());
324 Array<OneD, NekDouble> &inout,
325 Array<OneD, NekDouble> &outarray)
328 const Array<OneD,const int>& map =
m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsMap();
338 sign =
m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsSign(bndcnt);
339 inout[map[bndcnt++]] = sign * coeffs[j];
355 const Array<OneD, const NekDouble> &rhs,
356 Array<OneD, NekDouble> &inout,
357 const Array<OneD, const NekDouble> &dirForcing)
368 if(contNcoeffs - NumDirBcs > 0)
384 "To use method must have a AssemblyMap "
400 "To use method must have a AssemblyMap "
409 (*m_globalMat)[mkey] = glo_matrix;
413 glo_matrix = matrixIter->second;
427 const Array<OneD,const int> &bndMap =
430 Array<OneD, NekDouble> tmp(
438 map<int, vector<ExtraDirDof> > &extraDirDofs =
441 for (it = extraDirDofs.begin(); it != extraDirDofs.end(); ++it)
443 for (i = 0; i < it->second.size(); ++i)
445 tmp[it->second.at(i).get<1>()] =
447 it->second.at(i).get<0>()]*it->second.at(i).get<2>();
459 const Array<OneD,const NekDouble>& coeffs =
465 tmp[bndMap[bndcnt++]] = sign * coeffs[j];
481 const Array<OneD,const int> &bndMap =
484 Array<OneD, NekDouble> tmp(
m_locToGloMap->GetNumGlobalCoeffs());
494 sign =
m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsSign(bndcnt);
495 coeffs[j] = sign * tmp[bndMap[bndcnt++]];
513 const Array<OneD, const NekDouble> &inarray,
514 Array<OneD, NekDouble> &outarray,
518 const Array<OneD, const NekDouble> &dirForcing)
522 Array<OneD,NekDouble> wsp(contNcoeffs);
533 Array<OneD, NekDouble> gamma(contNcoeffs, 0.0);
540 sign =
m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsSign(bndcnt);
541 gamma[
m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsMap(bndcnt++)] +=
553 Vmath::Vadd(contNcoeffs, wsp, 1, gamma, 1, wsp, 1);
564 Array<OneD,NekDouble> tmp(contNcoeffs);
573 const Array<OneD,const NekDouble> &inarray,
574 Array<OneD, NekDouble> &outarray,
584 mat->Multiply(inarray,outarray);
590 Array<OneD,NekDouble> tmp2(tmp1+
m_ncoeffs);
605 "To use method must have a AssemblyMap "
616 return matrixIter->second->GetNumNonZeroEntries();