41 namespace MultiRegions
90 m_globalLinSysManager(
91 boost::bind(&
ContField2D::GenGlobalLinSys, this, _1),
92 std::string(
"GlobalLinSys"))
120 const std::string &variable,
121 const bool DeclareCoeffPhysArrays,
122 const bool CheckIfSingularSystem):
123 DisContField2D(pSession,graph2D,variable,false,DeclareCoeffPhysArrays),
125 m_globalLinSysManager(
126 boost::bind(&
ContField2D::GenGlobalLinSys, this, _1),
127 std::string(
"GlobalLinSys"))
133 CheckIfSingularSystem,
138 if (
m_session->DefinesCmdLineArgument(
"verbose"))
170 const std::string &variable,
171 bool DeclareCoeffPhysArrays,
172 const bool CheckIfSingularSystem):
175 m_globalLinSysManager(
176 boost::bind(&
ContField2D::GenGlobalLinSys, this, _1),
177 std::string(
"GlobalLinSys"))
185 CheckIfSingularSystem,
190 if (
m_session->DefinesCmdLineArgument(
"verbose"))
210 m_locToGloMap(In.m_locToGloMap),
211 m_globalMat(In.m_globalMat),
212 m_globalLinSysManager(In.m_globalLinSysManager)
243 Array<OneD, NekDouble> &outarray,
249 Array<OneD,NekDouble> wsp(contNcoeffs);
261 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
273 Array<OneD,NekDouble> tmp1(gloNcoeffs);
274 Array<OneD,NekDouble> tmp2(gloNcoeffs);
294 const Array<OneD, const NekDouble> &inarray,
295 Array<OneD, NekDouble> &outarray,
304 if(inarray.data() == outarray.data())
306 Array<OneD, NekDouble> tmp(contNcoeffs,0.0);
317 Array<OneD, NekDouble> globaltmp(contNcoeffs,0.0);
319 if(inarray.data() == outarray.data())
321 Array<OneD,NekDouble> tmp(inarray.num_elements());
384 const Array<OneD, const NekDouble> &inarray,
385 Array<OneD, NekDouble> &outarray,
386 const Array<OneD, const NekDouble> &dirForcing,
387 const Array<
OneD, Array<OneD,NekDouble> >& variablecoeffs,
393 Array<OneD,NekDouble> wsp(contNcoeffs);
409 ->GetBndCondCoeffsToGlobalCoeffsMap(bndcnt++)]
436 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
455 Array<OneD, NekDouble> &Real,
456 Array<OneD, NekDouble> &Imag,
457 Array<OneD, NekDouble> &Evecs)
460 Array<OneD, Array<OneD, NekDouble> > vel(2);
461 Array<OneD, NekDouble> vel_x(
m_npoints,ax);
462 Array<OneD, NekDouble> vel_y(
m_npoints,ay);
475 Gmat->EigenSolve(Real,Imag,Evecs);
534 const Array<OneD, const NekDouble>& rhs,
535 Array<OneD, NekDouble>& inout,
536 const Array<OneD, const NekDouble>& dirForcing)
546 if(contNcoeffs - NumDirBcs > 0)
565 "To use method must have a AssemblyMap "
574 (*m_globalMat)[mkey] = glo_matrix;
578 glo_matrix = matrixIter->second;
603 "To use method must have a AssemblyMap "
613 const Array<OneD, const NekDouble> &inarray,
614 Array<OneD, NekDouble> &outarray,
617 BwdTrans(inarray,outarray,coeffstate);
625 const Array<OneD, const NekDouble> &inarray,
626 Array<OneD, NekDouble> &outarray,
629 FwdTrans(inarray,outarray,coeffstate);
641 const Array<OneD,const int> &bndMap =
644 Array<OneD, NekDouble> tmp(
653 map<int, vector<ExtraDirDof> > &extraDirDofs =
656 for (it = extraDirDofs.begin(); it != extraDirDofs.end(); ++it)
658 for (i = 0; i < it->second.size(); ++i)
660 tmp[it->second.at(i).get<1>()] =
662 it->second.at(i).get<0>()]*it->second.at(i).get<2>();
673 const Array<OneD,const NekDouble>& coeffs =
679 tmp[bndMap[bndcnt++]] = sign * coeffs[j];
695 const Array<OneD,const int> &bndMap =
698 Array<OneD, NekDouble> tmp(
m_locToGloMap->GetNumGlobalCoeffs());
708 sign =
m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsSign(bndcnt);
709 coeffs[j] = sign * tmp[bndMap[bndcnt++]];
778 const Array<OneD, const NekDouble> &inarray,
779 Array<OneD, NekDouble> &outarray,
816 const Array<OneD, const NekDouble> &inarray,
817 Array<OneD, NekDouble> &outarray,
821 const Array<OneD, const NekDouble> &dirForcing)
828 Array<OneD,NekDouble> wsp(contNcoeffs);
837 Array<OneD, NekDouble> gamma(contNcoeffs, 0.0);
846 ->GetBndCondCoeffsToGlobalCoeffsMap(bndcnt++)]
859 Vmath::Vadd(contNcoeffs, wsp, 1, gamma, 1, wsp, 1);
869 Array<OneD,NekDouble> tmp(contNcoeffs);
895 const Array<OneD,const NekDouble> &inarray,
896 Array<OneD, NekDouble> &outarray,
907 mat->Multiply(inarray,outarray);
913 Array<OneD,NekDouble> tmp2(tmp1+
m_ncoeffs);
938 const Array<OneD, const NekDouble> &inarray,
939 Array<OneD, NekDouble> &outarray,
942 const Array<OneD, const NekDouble>& dirForcing)
946 Array<OneD,NekDouble> wsp(contNcoeffs);
955 Array<OneD, NekDouble> gamma(contNcoeffs, 0.0);
963 ->GetBndCondCoeffsToGlobalCoeffsMap(bndcnt++)]
974 Vmath::Vadd(contNcoeffs, wsp, 1, gamma, 1, wsp, 1);
990 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
1007 const Array<OneD, const NekDouble> &inarray,
1008 Array<OneD, NekDouble> &outarray,
1011 const Array<OneD, const NekDouble>& dirForcing)
1015 Array<OneD,NekDouble> wsp(contNcoeffs);
1032 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
1042 const Array<OneD,const SpatialDomains::BoundaryConditionShPtr>&