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"))
135 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"))
187 CheckIfSingularSystem);
189 if (
m_session->DefinesCmdLineArgument(
"verbose"))
209 m_locToGloMap(In.m_locToGloMap),
210 m_globalMat(In.m_globalMat),
211 m_globalLinSysManager(In.m_globalLinSysManager)
242 Array<OneD, NekDouble> &outarray,
248 Array<OneD,NekDouble> wsp(contNcoeffs);
260 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
272 Array<OneD,NekDouble> tmp1(gloNcoeffs);
273 Array<OneD,NekDouble> tmp2(gloNcoeffs);
293 const Array<OneD, const NekDouble> &inarray,
294 Array<OneD, NekDouble> &outarray,
303 if(inarray.data() == outarray.data())
305 Array<OneD, NekDouble> tmp(contNcoeffs,0.0);
316 Array<OneD, NekDouble> globaltmp(contNcoeffs,0.0);
318 if(inarray.data() == outarray.data())
320 Array<OneD,NekDouble> tmp(inarray.num_elements());
383 const Array<OneD, const NekDouble> &inarray,
384 Array<OneD, NekDouble> &outarray,
385 const Array<OneD, const NekDouble> &dirForcing,
386 const Array<
OneD, Array<OneD,NekDouble> >& variablecoeffs,
392 Array<OneD,NekDouble> wsp(contNcoeffs);
408 ->GetBndCondCoeffsToGlobalCoeffsMap(bndcnt++)]
435 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
454 Array<OneD, NekDouble> &Real,
455 Array<OneD, NekDouble> &Imag,
456 Array<OneD, NekDouble> &Evecs)
459 Array<OneD, Array<OneD, NekDouble> > vel(2);
460 Array<OneD, NekDouble> vel_x(
m_npoints,ax);
461 Array<OneD, NekDouble> vel_y(
m_npoints,ay);
474 Gmat->EigenSolve(Real,Imag,Evecs);
533 const Array<OneD, const NekDouble>& rhs,
534 Array<OneD, NekDouble>& inout,
535 const Array<OneD, const NekDouble>& dirForcing)
545 if(contNcoeffs - NumDirBcs > 0)
564 "To use method must have a AssemblyMap "
573 (*m_globalMat)[mkey] = glo_matrix;
577 glo_matrix = matrixIter->second;
602 "To use method must have a AssemblyMap "
612 const Array<OneD, const NekDouble> &inarray,
613 Array<OneD, NekDouble> &outarray,
616 BwdTrans(inarray,outarray,coeffstate);
624 const Array<OneD, const NekDouble> &inarray,
625 Array<OneD, NekDouble> &outarray,
628 FwdTrans(inarray,outarray,coeffstate);
640 const Array<OneD,const int> &bndMap =
643 Array<OneD, NekDouble> tmp(
652 map<int, vector<ExtraDirDof> > &extraDirDofs =
655 for (it = extraDirDofs.begin(); it != extraDirDofs.end(); ++it)
657 for (i = 0; i < it->second.size(); ++i)
659 tmp[it->second.at(i).get<1>()] =
661 it->second.at(i).get<0>()]*it->second.at(i).get<2>();
672 const Array<OneD,const NekDouble>& coeffs =
678 tmp[bndMap[bndcnt++]] = sign * coeffs[j];
694 const Array<OneD,const int> &bndMap =
697 Array<OneD, NekDouble> tmp(
m_locToGloMap->GetNumGlobalCoeffs());
707 sign =
m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsSign(bndcnt);
708 coeffs[j] = sign * tmp[bndMap[bndcnt++]];
777 const Array<OneD, const NekDouble> &inarray,
778 Array<OneD, NekDouble> &outarray,
815 const Array<OneD, const NekDouble> &inarray,
816 Array<OneD, NekDouble> &outarray,
820 const Array<OneD, const NekDouble> &dirForcing)
827 Array<OneD,NekDouble> wsp(contNcoeffs);
836 Array<OneD, NekDouble> gamma(contNcoeffs, 0.0);
845 ->GetBndCondCoeffsToGlobalCoeffsMap(bndcnt++)]
858 Vmath::Vadd(contNcoeffs, wsp, 1, gamma, 1, wsp, 1);
868 Array<OneD,NekDouble> tmp(contNcoeffs);
894 const Array<OneD,const NekDouble> &inarray,
895 Array<OneD, NekDouble> &outarray,
906 mat->Multiply(inarray,outarray);
912 Array<OneD,NekDouble> tmp2(tmp1+
m_ncoeffs);
937 const Array<OneD, const NekDouble> &inarray,
938 Array<OneD, NekDouble> &outarray,
941 const Array<OneD, const NekDouble>& dirForcing)
945 Array<OneD,NekDouble> wsp(contNcoeffs);
954 Array<OneD, NekDouble> gamma(contNcoeffs, 0.0);
962 ->GetBndCondCoeffsToGlobalCoeffsMap(bndcnt++)]
973 Vmath::Vadd(contNcoeffs, wsp, 1, gamma, 1, wsp, 1);
989 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
1006 const Array<OneD, const NekDouble> &inarray,
1007 Array<OneD, NekDouble> &outarray,
1010 const Array<OneD, const NekDouble>& dirForcing)
1014 Array<OneD,NekDouble> wsp(contNcoeffs);
1031 Array<OneD,NekDouble> tmp(contNcoeffs,0.0);
1041 const Array<OneD,const SpatialDomains::BoundaryConditionShPtr>&