70 const Array<OneD, const NekDouble> &inarray,
71 Array<OneD, NekDouble> &out_dx,
72 Array<OneD, NekDouble> &out_dy,
73 Array<OneD, NekDouble> &out_dz)
75 const int nquad0 =
m_base[0]->GetNumPoints();
76 const int nquad1 =
m_base[1]->GetNumPoints();
77 const int nquad2 =
m_base[2]->GetNumPoints();
79 Array<OneD, NekDouble> wsp(nquad0*nquad1*nquad2);
82 Vmath::Vcopy(nquad0*nquad1*nquad2, &inarray[0], 1, &wsp[0], 1);
84 if (out_dx.num_elements() > 0)
88 Blas::Dgemm(
'N',
'N', nquad0,nquad1*nquad2,nquad0,1.0,
89 D0,nquad0,&wsp[0],nquad0,0.0,&out_dx[0],nquad0);
92 if (out_dy.num_elements() > 0)
95 for (
int j = 0; j < nquad2; ++j)
97 Blas::Dgemm(
'N',
'T', nquad0, nquad1, nquad1,
98 1.0, &wsp[j*nquad0*nquad1], nquad0,
100 0.0, &out_dy[j*nquad0*nquad1], nquad0);
104 if (out_dz.num_elements() > 0)
108 Blas::Dgemm(
'N',
'T',nquad0*nquad1,nquad2,nquad2,1.0,
109 &wsp[0],nquad0*nquad1,D2,nquad2,0.0,&out_dz[0],
115 const Array<OneD, const NekDouble>& base0,
116 const Array<OneD, const NekDouble>& base1,
117 const Array<OneD, const NekDouble>& base2,
118 const Array<OneD, const NekDouble>& inarray,
119 Array<OneD, NekDouble>& outarray,
120 Array<OneD, NekDouble>& wsp,
121 bool doCheckCollDir0,
122 bool doCheckCollDir1,
123 bool doCheckCollDir2)
125 v_BwdTrans_SumFacKernel(base0, base1, base2, inarray, outarray, wsp, doCheckCollDir0, doCheckCollDir1, doCheckCollDir2);
129 const Array<OneD, const NekDouble>& base0,
130 const Array<OneD, const NekDouble>& base1,
131 const Array<OneD, const NekDouble>& base2,
132 const Array<OneD, const NekDouble>& inarray,
133 Array<OneD, NekDouble> &outarray,
134 Array<OneD, NekDouble> &wsp,
135 bool doCheckCollDir0,
136 bool doCheckCollDir1,
137 bool doCheckCollDir2)
143 const Array<OneD, const NekDouble> &coords,
144 const Array<OneD, const NekDouble> &physvals)
146 Array<OneD, NekDouble> eta = Array<OneD, NekDouble>(3);
147 Array<OneD, DNekMatSharedPtr> I(3);
149 WARNINGL2(coords[0] >= -1,
"coord[0] < -1");
150 WARNINGL2(coords[0] <= 1,
"coord[0] > 1");
151 WARNINGL2(coords[1] >= -1,
"coord[1] < -1");
152 WARNINGL2(coords[1] <= 1,
"coord[1] > 1");
153 WARNINGL2(coords[2] >= -1,
"coord[2] < -1");
154 WARNINGL2(coords[2] <= 1,
"coord[2] > 1");
161 I[0] =
m_base[0]->GetI(eta);
162 I[1] =
m_base[1]->GetI(eta+1);
163 I[2] =
m_base[2]->GetI(eta+2);
169 const Array<OneD, DNekMatSharedPtr > &I,
170 const Array<OneD, const NekDouble> &physvals)
174 int Qx =
m_base[0]->GetNumPoints();
175 int Qy =
m_base[1]->GetNumPoints();
176 int Qz =
m_base[2]->GetNumPoints();
178 Array<OneD, NekDouble> sumFactorization_qr = Array<OneD, NekDouble>(Qy*Qz);
179 Array<OneD, NekDouble> sumFactorization_r = Array<OneD, NekDouble>(Qz);
185 interpolatingNodes = &I[0]->GetPtr()[0];
187 Blas::Dgemv(
'T',Qx,Qy*Qz,1.0,&physvals[0],Qx,&interpolatingNodes[0], 1, 0.0, &sumFactorization_qr[0], 1);
190 interpolatingNodes = &I[1]->GetPtr()[0];
192 Blas::Dgemv(
'T',Qy,Qz,1.0,&sumFactorization_qr[0],Qy,&interpolatingNodes[0],1,0.0,&sumFactorization_r[0], 1);
195 interpolatingNodes = &I[2]->GetPtr()[0];
196 value =
Blas::Ddot(Qz, interpolatingNodes, 1, &sumFactorization_r[0], 1);
208 const Array<OneD, const NekDouble> &inarray,
209 Array<OneD,NekDouble> &outarray,
219 const Array<OneD, const NekDouble>& base0 =
m_base[0]->GetBdata();
220 const Array<OneD, const NekDouble>& base1 =
m_base[1]->GetBdata();
221 const Array<OneD, const NekDouble>& base2 =
m_base[2]->GetBdata();
224 Array<OneD,NekDouble> wsp0(7*nqtot);
225 Array<OneD,NekDouble> wsp1(wsp0+nqtot);
227 if(!(
m_base[0]->Collocation() &&
m_base[1]->Collocation() &&
228 m_base[2]->Collocation()))
250 const Array<OneD, const NekDouble> &inarray,
251 Array<OneD,NekDouble> &outarray,
256 int nquad0 =
m_base[0]->GetNumPoints();
257 int nquad1 =
m_base[1]->GetNumPoints();
258 int nquad2 =
m_base[2]->GetNumPoints();
259 int nmodes0 =
m_base[0]->GetNumModes();
260 int nmodes1 =
m_base[1]->GetNumModes();
261 int nmodes2 =
m_base[2]->GetNumModes();
262 int wspsize = max(nquad0*nmodes2*(nmodes1+nquad1),
263 nquad0*nquad1*(nquad2+nmodes0)+
264 nmodes0*nmodes1*nquad2);
268 const Array<OneD, const NekDouble>& base0 =
m_base[0]->GetBdata ();
269 const Array<OneD, const NekDouble>& base1 =
m_base[1]->GetBdata ();
270 const Array<OneD, const NekDouble>& base2 =
m_base[2]->GetBdata ();
271 Array<OneD,NekDouble> wsp0(8*wspsize);
272 Array<OneD,NekDouble> wsp1(wsp0+1*wspsize);
273 Array<OneD,NekDouble> wsp2(wsp0+2*wspsize);
275 if(!(
m_base[0]->Collocation() &&
m_base[1]->Collocation() &&
276 m_base[2]->Collocation()))
284 wsp0,wsp2,
true,
true,
true);
287 outarray,wsp2,
true,
true,
true);
318 std::map<int, NormalVector>::const_iterator x;
321 "face normal not computed.");
326 const Array<OneD, const NekDouble>& inarray)