73 Array<OneD, NekDouble> &outarray_d0,
74 Array<OneD, NekDouble> &outarray_d1)
76 int nquad0 =
m_base[0]->GetNumPoints();
77 int nquad1 =
m_base[1]->GetNumPoints();
79 if (outarray_d0.num_elements() > 0)
82 if(inarray.data() == outarray_d0.data())
84 Array<OneD, NekDouble> wsp(nquad0 * nquad1);
85 Vmath::Vcopy(nquad0 * nquad1,inarray.get(),1,wsp.get(),1);
86 Blas::Dgemm(
'N',
'N', nquad0, nquad1, nquad0, 1.0,
87 &(D0->GetPtr())[0], nquad0, &wsp[0], nquad0, 0.0,
88 &outarray_d0[0], nquad0);
92 Blas::Dgemm(
'N',
'N', nquad0, nquad1, nquad0, 1.0,
93 &(D0->GetPtr())[0], nquad0, &inarray[0], nquad0, 0.0,
94 &outarray_d0[0], nquad0);
98 if (outarray_d1.num_elements() > 0)
101 if(inarray.data() == outarray_d1.data())
103 Array<OneD, NekDouble> wsp(nquad0 * nquad1);
104 Vmath::Vcopy(nquad0 * nquad1,inarray.get(),1,wsp.get(),1);
105 Blas:: Dgemm(
'N',
'T', nquad0, nquad1, nquad1, 1.0, &wsp[0], nquad0,
106 &(D1->GetPtr())[0], nquad1, 0.0, &outarray_d1[0], nquad0);
110 Blas:: Dgemm(
'N',
'T', nquad0, nquad1, nquad1, 1.0, &inarray[0], nquad0,
111 &(D1->GetPtr())[0], nquad1, 0.0, &outarray_d1[0], nquad0);
118 Array<OneD, NekDouble> coll(2);
119 Array<OneD, DNekMatSharedPtr> I(2);
128 I[0] =
m_base[0]->GetI(coll);
129 I[1] =
m_base[1]->GetI(coll+1);
135 const Array<OneD, DNekMatSharedPtr > &I,
136 const Array<OneD, const NekDouble> &physvals)
140 int nq0 =
m_base[0]->GetNumPoints();
141 int nq1 =
m_base[1]->GetNumPoints();
142 Array<OneD, NekDouble> wsp1(nq1);
145 for (i = 0; i < nq1;++i)
147 wsp1[i] =
Blas::Ddot(nq0, &(I[0]->GetPtr())[0], 1,
148 &physvals[i * nq0], 1);
152 val =
Blas::Ddot(nq1, I[1]->GetPtr(), 1, wsp1, 1);
162 const Array<OneD, const NekDouble>& w0,
163 const Array<OneD, const NekDouble>& w1)
167 int nquad0 =
m_base[0]->GetNumPoints();
168 int nquad1 =
m_base[1]->GetNumPoints();
169 Array<OneD, NekDouble> tmp(nquad0 * nquad1);
172 for (i = 0; i < nquad1; ++i)
174 Vmath::Vmul(nquad0, &inarray[0] + i*nquad0, 1, w0.get(),
175 1, &tmp[0] + i*nquad0, 1);
178 for (i = 0; i < nquad0; ++i)
180 Vmath::Vmul(nquad1, &tmp[0]+ i, nquad0, w1.get(), 1,
181 &tmp[0] + i, nquad0);
189 const Array<OneD, const NekDouble>& base0,
190 const Array<OneD, const NekDouble>& base1,
191 const Array<OneD, const NekDouble>& inarray,
192 Array<OneD, NekDouble> &outarray,
193 Array<OneD, NekDouble> &wsp,
194 bool doCheckCollDir0,
195 bool doCheckCollDir1)
201 const Array<OneD, const NekDouble>& base0,
202 const Array<OneD, const NekDouble>& base1,
203 const Array<OneD, const NekDouble>& inarray,
204 Array<OneD, NekDouble> &outarray,
205 Array<OneD, NekDouble> &wsp,
206 bool doCheckCollDir0,
207 bool doCheckCollDir1)
213 const Array<OneD, const NekDouble> &inarray,
214 Array<OneD,NekDouble> &outarray,
222 int nquad0 =
m_base[0]->GetNumPoints();
223 int nquad1 =
m_base[1]->GetNumPoints();
224 int nqtot = nquad0*nquad1;
225 int nmodes0 =
m_base[0]->GetNumModes();
226 int nmodes1 =
m_base[1]->GetNumModes();
227 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
229 const Array<OneD, const NekDouble>& base0 =
m_base[0]->GetBdata();
230 const Array<OneD, const NekDouble>& base1 =
m_base[1]->GetBdata();
233 Array<OneD,NekDouble> wsp0(4*wspsize);
234 Array<OneD,NekDouble> wsp1(wsp0+wspsize);
236 if(!(
m_base[0]->Collocation() &&
m_base[1]->Collocation()))
253 inarray,outarray,mkey);
260 const Array<OneD, const NekDouble> &inarray,
261 Array<OneD,NekDouble> &outarray,
267 int nquad0 =
m_base[0]->GetNumPoints();
268 int nquad1 =
m_base[1]->GetNumPoints();
269 int nqtot = nquad0*nquad1;
270 int nmodes0 =
m_base[0]->GetNumModes();
271 int nmodes1 =
m_base[1]->GetNumModes();
272 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),
277 const Array<OneD, const NekDouble>& base0 =
m_base[0]->GetBdata();
278 const Array<OneD, const NekDouble>& base1 =
m_base[1]->GetBdata();
281 Array<OneD,NekDouble> wsp0(5*wspsize);
282 Array<OneD,NekDouble> wsp1(wsp0 + wspsize);
283 Array<OneD,NekDouble> wsp2(wsp0 + 2*wspsize);
285 if (!(
m_base[0]->Collocation() &&
m_base[1]->Collocation()))
293 wsp0, wsp2,
true,
true);
309 &wsp1[0], 1, &outarray[0], 1);
314 inarray,outarray,mkey);