Intrepid2
Intrepid2_ProjectionToolsDefHGRAD.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ************************************************************************
3 //
4 // Intrepid2 Package
5 // Copyright (2007) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or
38 // Mauro Perego (mperego@sandia.gov)
39 //
40 // ************************************************************************
41 // @HEADER
42 
49 #ifndef __INTREPID2_PROJECTIONTOOLSDEFHGRAD_HPP__
50 #define __INTREPID2_PROJECTIONTOOLSDEFHGRAD_HPP__
51 
53 #include "Intrepid2_ArrayTools.hpp"
55 
56 
57 namespace Intrepid2 {
58 namespace Experimental {
59 
60 template<typename ViewType1, typename ViewType2, typename ViewType3,
61 typename ViewType4, typename ViewType5>
63  ViewType1 basisCoeffs_;
64  const ViewType2 tagToOrdinal_;
65  const ViewType3 targetEPointsRange_;
66  const ViewType4 targetAtTargetEPoints_;
67  const ViewType5 basisAtTargetEPoints_;
68  ordinal_type numVertices_;
69 
70 
71  ComputeBasisCoeffsOnVertices_HGRAD(ViewType1 basisCoeffs, ViewType2 tagToOrdinal, ViewType3 targetEPointsRange,
72  ViewType4 targetAtTargetEPoints, ViewType5 basisAtTargetEPoints, ordinal_type numVertices) :
73  basisCoeffs_(basisCoeffs), tagToOrdinal_(tagToOrdinal), targetEPointsRange_(targetEPointsRange),
74  targetAtTargetEPoints_(targetAtTargetEPoints), basisAtTargetEPoints_(basisAtTargetEPoints), numVertices_(numVertices) {}
75 
76  void
77  KOKKOS_INLINE_FUNCTION
78  operator()(const ordinal_type ic) const {
79 
80 
81  for(ordinal_type iv=0; iv<numVertices_; ++iv) {
82  ordinal_type idof = tagToOrdinal_(0, iv, 0);
83  ordinal_type pt = targetEPointsRange_(0,iv).first;
84  //the value of the basis at the vertex might be different than 1; HGrad basis, so the function is scalar
85  basisCoeffs_(ic,idof) = targetAtTargetEPoints_(ic,pt)/basisAtTargetEPoints_(ic,idof,pt,0);
86  }
87  }
88 };
89 
90 template<typename ViewType1, typename ViewType2, typename ViewType3,
91 typename ViewType4, typename ViewType5, typename ViewType6>
93  const ViewType1 basisCoeffs_;
94  const ViewType2 negPartialProjGrad_;
95  const ViewType2 basisTanAtEPoints_;
96  const ViewType2 basisGradAtBasisGradEPoints_;
97  const ViewType3 basisGradEWeights_;
98  const ViewType2 wBasisAtBasisGradEPoints_;
99  const ViewType3 targetGradEWeights_;
100  const ViewType2 basisGradAtTargetGradEPoints_;
101  const ViewType2 wBasisAtTargetGradEPoints_;
102  const ViewType4 computedDofs_;
103  const ViewType5 tagToOrdinal_;
104  const ViewType2 targetGradTanAtTargetGradEPoints_;
105  const ViewType6 targetGradAtTargetGradEPoints_;
106  const ViewType2 refEdgesTan_;
107  ordinal_type edgeCardinality_;
108  ordinal_type offsetBasis_;
109  ordinal_type offsetTarget_;
110  ordinal_type numVertexDofs_;
111  ordinal_type edgeDim_;
112  ordinal_type dim_;
113  ordinal_type iedge_;
114 
115  ComputeBasisCoeffsOnEdges_HGRAD(const ViewType1 basisCoeffs, ViewType2 negPartialProjGrad, const ViewType2 basisTanAtEPoints,
116  const ViewType2 basisGradAtBasisGradEPoints, const ViewType3 basisGradEWeights, const ViewType2 wBasisAtBasisGradEPoints, const ViewType3 targetGradEWeights,
117  const ViewType2 basisGradAtTargetGradEPoints, const ViewType2 wBasisAtTargetGradEPoints, const ViewType4 computedDofs, const ViewType5 tagToOrdinal,
118  const ViewType2 targetGradTanAtTargetGradEPoints, const ViewType6 targetGradAtTargetGradEPoints, const ViewType2 refEdgesTan,
119  ordinal_type edgeCardinality, ordinal_type offsetBasis,
120  ordinal_type offsetTarget, ordinal_type numVertexDofs, ordinal_type edgeDim, ordinal_type dim, ordinal_type iedge) :
121  basisCoeffs_(basisCoeffs), negPartialProjGrad_(negPartialProjGrad), basisTanAtEPoints_(basisTanAtEPoints),
122  basisGradAtBasisGradEPoints_(basisGradAtBasisGradEPoints), basisGradEWeights_(basisGradEWeights), wBasisAtBasisGradEPoints_(wBasisAtBasisGradEPoints), targetGradEWeights_(targetGradEWeights),
123  basisGradAtTargetGradEPoints_(basisGradAtTargetGradEPoints), wBasisAtTargetGradEPoints_(wBasisAtTargetGradEPoints),
124  computedDofs_(computedDofs), tagToOrdinal_(tagToOrdinal), targetGradTanAtTargetGradEPoints_(targetGradTanAtTargetGradEPoints),
125  targetGradAtTargetGradEPoints_(targetGradAtTargetGradEPoints), refEdgesTan_(refEdgesTan),
126  edgeCardinality_(edgeCardinality), offsetBasis_(offsetBasis),
127  offsetTarget_(offsetTarget), numVertexDofs_(numVertexDofs), edgeDim_(edgeDim), dim_(dim), iedge_(iedge)
128  {}
129 
130  void
131  KOKKOS_INLINE_FUNCTION
132  operator()(const ordinal_type ic) const {
133 
134  ordinal_type numBasisGradEPoints = basisGradEWeights_.extent(0);
135  ordinal_type numTargetGradEPoints = targetGradEWeights_.extent(0);
136  for(ordinal_type j=0; j <edgeCardinality_; ++j) {
137  ordinal_type jdof = tagToOrdinal_(edgeDim_, iedge_, j);
138 
139  //Note: we are not considering the jacobian of the orientation map since it is simply a scalar term for the integrals and it does not affect the projection
140  for(ordinal_type iq=0; iq <numBasisGradEPoints; ++iq) {
141  for(ordinal_type d=0; d <dim_; ++d)
142  basisTanAtEPoints_(ic,j,iq) += basisGradAtBasisGradEPoints_(ic,jdof,offsetBasis_+iq,d)*refEdgesTan_(iedge_, d);
143  wBasisAtBasisGradEPoints_(ic,j,iq) = basisTanAtEPoints_(ic,j,iq)*basisGradEWeights_(iq);
144  }
145  for(ordinal_type iq=0; iq <numTargetGradEPoints; ++iq) {
146  for(ordinal_type d=0; d <dim_; ++d)
147  wBasisAtTargetGradEPoints_(ic,j,iq) += basisGradAtTargetGradEPoints_(ic,jdof,offsetTarget_+iq,d)*refEdgesTan_(iedge_, d)*targetGradEWeights_(iq);
148  }
149  }
150 
151  for(ordinal_type iq=0; iq <numTargetGradEPoints; ++iq)
152  for(ordinal_type d=0; d <dim_; ++d)
153  targetGradTanAtTargetGradEPoints_(ic,iq) += targetGradAtTargetGradEPoints_(ic,offsetTarget_+iq,d)*refEdgesTan_(iedge_, d);
154 
155  for(ordinal_type j=0; j <numVertexDofs_; ++j) {
156  ordinal_type jdof = computedDofs_(j);
157  for(ordinal_type iq=0; iq <numBasisGradEPoints; ++iq)
158  for(ordinal_type d=0; d <dim_; ++d)
159  negPartialProjGrad_(ic,iq) -= basisCoeffs_(ic,jdof)*basisGradAtBasisGradEPoints_(ic,jdof,offsetBasis_+iq,d)*refEdgesTan_(iedge_, d);
160  }
161  }
162 };
163 
164 template<typename ViewType1, typename ViewType2, typename ViewType3,
165 typename ViewType4, typename ViewType5, typename ViewType6, typename ViewType7>
167  const ViewType1 basisCoeffs_;
168  const ViewType2 negPartialProjGrad_;
169  const ViewType2 faceBasisGradAtGradEPoints_;
170  const ViewType2 basisGradAtBasisGradEPoints_;
171  const ViewType3 basisGradEWeights_;
172  const ViewType2 wBasisGradAtGradEPoints_;
173  const ViewType3 targetGradEWeights_;
174  const ViewType2 basisGradAtTargetGradEPoints_;
175  const ViewType2 wBasisGradBasisAtTargetGradEPoints_;
176  const ViewType4 computedDofs_;
177  const ViewType5 tagToOrdinal_;
178  const ViewType6 orts_;
179  const ViewType2 targetGradTanAtTargetGradEPoints_;
180  const ViewType7 targetGradAtTargetGradEPoints_;
181  const ViewType2 ortJacobian_;
182  const ViewType2 faceCoeff_;
183  const ViewType2 refFacesTangents_;
184  ordinal_type faceCardinality_;
185  ordinal_type offsetBasisGrad_;
186  ordinal_type offsetTargetGrad_;
187  ordinal_type numVertexEdgeDofs_;
188  ordinal_type numFaces_;
189  ordinal_type faceDim_;
190  ordinal_type dim_;
191  ordinal_type iface_;
192  unsigned topoKey_;
193 
194  ComputeBasisCoeffsOnFaces_HGRAD(const ViewType1 basisCoeffs, ViewType2 negPartialProjGrad, const ViewType2 faceBasisGradAtGradEPoints,
195  const ViewType2 basisGradAtBasisGradEPoints, const ViewType3 basisGradEWeights, const ViewType2 wBasisGradAtGradEPoints, const ViewType3 targetGradEWeights,
196  const ViewType2 basisGradAtTargetGradEPoints, const ViewType2 wBasisGradBasisAtTargetGradEPoints, const ViewType4 computedDofs, const ViewType5 tagToOrdinal,
197  const ViewType6 orts, const ViewType2 targetGradTanAtTargetGradEPoints, const ViewType7 targetGradAtTargetGradEPoints,
198  const ViewType2 refFacesTangents, ordinal_type faceCardinality, ordinal_type offsetBasisGrad,
199  ordinal_type offsetTargetGrad, ordinal_type numVertexEdgeDofs, ordinal_type numFaces, ordinal_type faceDim,
200  ordinal_type dim, ordinal_type iface, unsigned topoKey) :
201  basisCoeffs_(basisCoeffs), negPartialProjGrad_(negPartialProjGrad), faceBasisGradAtGradEPoints_(faceBasisGradAtGradEPoints),
202  basisGradAtBasisGradEPoints_(basisGradAtBasisGradEPoints), basisGradEWeights_(basisGradEWeights), wBasisGradAtGradEPoints_(wBasisGradAtGradEPoints),
203  targetGradEWeights_(targetGradEWeights),
204  basisGradAtTargetGradEPoints_(basisGradAtTargetGradEPoints), wBasisGradBasisAtTargetGradEPoints_(wBasisGradBasisAtTargetGradEPoints),
205  computedDofs_(computedDofs), tagToOrdinal_(tagToOrdinal), orts_(orts), targetGradTanAtTargetGradEPoints_(targetGradTanAtTargetGradEPoints),
206  targetGradAtTargetGradEPoints_(targetGradAtTargetGradEPoints), refFacesTangents_(refFacesTangents),
207  faceCardinality_(faceCardinality), offsetBasisGrad_(offsetBasisGrad),
208  offsetTargetGrad_(offsetTargetGrad), numVertexEdgeDofs_(numVertexEdgeDofs), numFaces_(numFaces),
209  faceDim_(faceDim), dim_(dim), iface_(iface), topoKey_(topoKey)
210  {}
211 
212  void
213  KOKKOS_INLINE_FUNCTION
214  operator()(const ordinal_type ic) const {
215 
216  typename ViewType2::value_type ortJacData[2*2];
217  auto ortJac = ViewType2(ortJacData, 2, 2);
218 
219  ordinal_type fOrt[6];
220  orts_(ic).getFaceOrientation(fOrt, numFaces_);
221  ordinal_type ort = fOrt[iface_];
222 
223  ordinal_type numBasisGradEPoints = basisGradEWeights_.extent(0);
224  ordinal_type numTargetGradEPoints = targetGradEWeights_.extent(0);
226  for(ordinal_type j=0; j <faceCardinality_; ++j) {
227  ordinal_type jdof = tagToOrdinal_(faceDim_, iface_, j);
228  for(ordinal_type itan=0; itan <faceDim_; ++itan) {
229  for(ordinal_type iq=0; iq <numBasisGradEPoints; ++iq) {
230  for(ordinal_type d=0; d <dim_; ++d)
231  for(ordinal_type jtan=0; jtan <faceDim_; ++jtan)
232  faceBasisGradAtGradEPoints_(ic,j,iq,itan) += refFacesTangents_(iface_, d, jtan)*ortJac(jtan,itan)*basisGradAtBasisGradEPoints_(ic,jdof,offsetBasisGrad_+iq,d);
233  wBasisGradAtGradEPoints_(ic,j,iq,itan) = faceBasisGradAtGradEPoints_(ic,j,iq,itan) * basisGradEWeights_(iq);
234  }
235  for(ordinal_type iq=0; iq <numTargetGradEPoints; ++iq) {
236  typename ViewType2::value_type tmp=0;
237  for(ordinal_type d=0; d <dim_; ++d) {
238  for(ordinal_type jtan=0; jtan <faceDim_; ++jtan)
239  tmp += refFacesTangents_(iface_, d, jtan)*ortJac(jtan,itan)*basisGradAtTargetGradEPoints_(ic,jdof,offsetTargetGrad_+iq,d);
240  }
241  wBasisGradBasisAtTargetGradEPoints_(ic,j,iq,itan) = tmp * targetGradEWeights_(iq);
242  }
243  }
244  }
245 
246  for(ordinal_type d=0; d <dim_; ++d)
247  for(ordinal_type itan=0; itan <faceDim_; ++itan)
248  for(ordinal_type iq=0; iq <numTargetGradEPoints; ++iq)
249  for(ordinal_type jtan=0; jtan <faceDim_; ++jtan)
250  targetGradTanAtTargetGradEPoints_(ic,iq,itan) += refFacesTangents_(iface_, d, jtan)*ortJac(jtan,itan)*targetGradAtTargetGradEPoints_(ic,offsetTargetGrad_+iq,d);
251 
252  for(ordinal_type j=0; j <numVertexEdgeDofs_; ++j) {
253  ordinal_type jdof = computedDofs_(j);
254  for(ordinal_type iq=0; iq <numBasisGradEPoints; ++iq)
255  for(ordinal_type d=0; d <dim_; ++d)
256  for(ordinal_type itan=0; itan <faceDim_; ++itan)
257  for(ordinal_type jtan=0; jtan <faceDim_; ++jtan)
258  negPartialProjGrad_(ic,iq,itan) -= basisCoeffs_(ic,jdof)*refFacesTangents_(iface_, d, jtan)*ortJac(jtan,itan)*basisGradAtBasisGradEPoints_(ic,jdof,offsetBasisGrad_+iq,d);
259  }
260  }
261 };
262 
263 
264 template<typename ViewType1, typename ViewType2, typename ViewType3,
265 typename ViewType4, typename ViewType5>
267  const ViewType1 basisCoeffs_;
268  const ViewType2 negPartialProjGrad_;
269  const ViewType2 cellBasisGradAtGradEPoints_;
270  const ViewType2 basisGradAtBasisGradEPoints_;
271  const ViewType3 basisGradEWeights_;
272  const ViewType2 wBasisGradAtGradEPoints_;
273  const ViewType3 targetGradEWeights_;
274  const ViewType2 basisGradAtTargetGradEPoints_;
275  const ViewType2 wBasisGradBasisAtTargetGradEPoints_;
276  const ViewType4 computedDofs_;
277  const ViewType5 elemDof_;
278  ordinal_type dim_;
279  ordinal_type numElemDofs_;
280  ordinal_type offsetBasisGrad_;
281  ordinal_type offsetTargetGrad_;
282  ordinal_type numVertexEdgeFaceDofs_;
283 
284  ComputeBasisCoeffsOnCells_HGRAD(const ViewType1 basisCoeffs, ViewType2 negPartialProjGrad, const ViewType2 cellBasisGradAtGradEPoints,
285  const ViewType2 basisGradAtBasisGradEPoints, const ViewType3 basisGradEWeights, const ViewType2 wBasisGradAtGradEPoints, const ViewType3 targetGradEWeights,
286  const ViewType2 basisGradAtTargetGradEPoints, const ViewType2 wBasisGradBasisAtTargetGradEPoints, const ViewType4 computedDofs, const ViewType5 elemDof,
287  ordinal_type dim, ordinal_type numElemDofs, ordinal_type offsetBasisGrad, ordinal_type offsetTargetGrad, ordinal_type numVertexEdgeFaceDofs) :
288  basisCoeffs_(basisCoeffs), negPartialProjGrad_(negPartialProjGrad), cellBasisGradAtGradEPoints_(cellBasisGradAtGradEPoints),
289  basisGradAtBasisGradEPoints_(basisGradAtBasisGradEPoints), basisGradEWeights_(basisGradEWeights), wBasisGradAtGradEPoints_(wBasisGradAtGradEPoints), targetGradEWeights_(targetGradEWeights),
290  basisGradAtTargetGradEPoints_(basisGradAtTargetGradEPoints), wBasisGradBasisAtTargetGradEPoints_(wBasisGradBasisAtTargetGradEPoints),
291  computedDofs_(computedDofs), elemDof_(elemDof), dim_(dim), numElemDofs_(numElemDofs), offsetBasisGrad_(offsetBasisGrad),
292  offsetTargetGrad_(offsetTargetGrad), numVertexEdgeFaceDofs_(numVertexEdgeFaceDofs) {}
293 
294  void
295  KOKKOS_INLINE_FUNCTION
296  operator()(const ordinal_type ic) const {
297  ordinal_type numBasisGradEPoints = basisGradEWeights_.extent(0);
298  ordinal_type numTargetGradEPoints = targetGradEWeights_.extent(0);
299  for(ordinal_type j=0; j <numElemDofs_; ++j) {
300  ordinal_type idof = elemDof_(j);
301  for(ordinal_type d=0; d <dim_; ++d) {
302  for(ordinal_type iq=0; iq <numBasisGradEPoints; ++iq) {
303  cellBasisGradAtGradEPoints_(ic,j,iq,d) = basisGradAtBasisGradEPoints_(ic,idof,offsetBasisGrad_+iq,d);
304  wBasisGradAtGradEPoints_(ic,j,iq,d) = cellBasisGradAtGradEPoints_(ic,j,iq,d) * basisGradEWeights_(iq);
305  }
306  for(ordinal_type iq=0; iq <numTargetGradEPoints; ++iq) {
307  wBasisGradBasisAtTargetGradEPoints_(ic,j,iq,d )= basisGradAtTargetGradEPoints_(ic,idof,offsetTargetGrad_+iq,d) * targetGradEWeights_(iq);
308  }
309  }
310  }
311  for(ordinal_type j=0; j <numVertexEdgeFaceDofs_; ++j) {
312  ordinal_type jdof = computedDofs_(j);
313  for(ordinal_type iq=0; iq <numBasisGradEPoints; ++iq)
314  for(ordinal_type d=0; d <dim_; ++d) {
315  negPartialProjGrad_(ic,iq,d) -= basisCoeffs_(ic,jdof)*basisGradAtBasisGradEPoints_(ic,jdof,offsetBasisGrad_+iq,d);
316  }
317  }
318  }
319 };
320 
321 
322 template<typename SpT>
323 template<typename BasisType,
324 typename ortValueType, class ...ortProperties>
325 void
326 ProjectionTools<SpT>::getHGradEvaluationPoints(typename BasisType::ScalarViewType ePoints,
327  typename BasisType::ScalarViewType gradEPoints,
328  const Kokkos::DynRankView<ortValueType, ortProperties...> orts,
329  const BasisType* cellBasis,
331  const EvalPointsType evalPointType) {
332  typedef typename BasisType::scalarType scalarType;
333  typedef Kokkos::DynRankView<scalarType,SpT> ScalarViewType;
334  typedef Kokkos::pair<ordinal_type,ordinal_type> range_type;
335  const auto cellTopo = cellBasis->getBaseCellTopology();
336  //const auto cellTopoKey = cellBasis->getBaseCellTopology().getKey();
337  ordinal_type dim = cellTopo.getDimension();
338  ordinal_type numCells = ePoints.extent(0);
339  const ordinal_type edgeDim = 1;
340  const ordinal_type faceDim = 2;
341 
342  ordinal_type numVertices = (cellBasis->getDofCount(0, 0) > 0) ? cellTopo.getVertexCount() : 0;
343  ordinal_type numEdges = (cellBasis->getDofCount(1, 0) > 0) ? cellTopo.getEdgeCount() : 0;
344  ordinal_type numFaces = (cellBasis->getDofCount(2, 0) > 0) ? cellTopo.getFaceCount() : 0;
345 
347  typename CellTools<SpT>::subcellParamViewType subcellParamEdge, subcellParamFace;
348  if(numEdges>0)
349  CellTools<SpT>::getSubcellParametrization(subcellParamEdge, edgeDim, cellBasis->getBaseCellTopology());
350  if(numFaces>0)
351  CellTools<SpT>::getSubcellParametrization(subcellParamFace, faceDim, cellBasis->getBaseCellTopology());
352 
353  auto refTopologyKey = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getTopologyKey());
354 
355  auto ePointsRange = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getPointsRange(evalPointType));
356  auto gradEPointsRange = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getDerivPointsRange(evalPointType));
357 
358  if(numVertices>0) {
359  for(ordinal_type iv=0; iv<numVertices; ++iv) {
360  auto vertexEPoints = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getEvalPoints(0,iv,evalPointType));
361  RealSpaceTools<SpT>::clone(Kokkos::subview(ePoints, Kokkos::ALL(),
362  ePointsRange(0, iv), Kokkos::ALL()), vertexEPoints);
363  }
364  }
365 
366  ScalarViewType workView("workView", numCells, projStruct->getMaxNumDerivPoints(evalPointType), dim-1);
367  for(ordinal_type ie=0; ie<numEdges; ++ie) {
368 
369  auto edgeGradEPointsRange = gradEPointsRange(edgeDim, ie);
370  auto edgeRefGradEPointsRange = range_type(0, range_size(edgeGradEPointsRange));
371  auto edgeGradEPoints = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getDerivEvalPoints(edgeDim,ie,evalPointType));
372 
373  const auto topoKey = refTopologyKey(edgeDim,ie);
374 
375  Kokkos::parallel_for
376  ("Evaluate Points Edges ",
377  Kokkos::RangePolicy<SpT, int> (0, numCells),
378  KOKKOS_LAMBDA (const size_t ic) {
379 
380 
381  ordinal_type eOrt[12];
382  orts(ic).getEdgeOrientation(eOrt, numEdges);
383  ordinal_type ort = eOrt[ie];
384 
385  auto orientedEdgeEPoints = Kokkos::subview(workView, ic, edgeRefGradEPointsRange, range_type(0, edgeDim));
386  Impl::OrientationTools::mapToModifiedReference(orientedEdgeEPoints,edgeGradEPoints,topoKey,ort);
387  CellTools<SpT>::mapToReferenceSubcell(Kokkos::subview(gradEPoints,ic,edgeGradEPointsRange,Kokkos::ALL()), orientedEdgeEPoints, subcellParamEdge, edgeDim, ie, dim);
388  });
389  }
390 
391 
392  for(ordinal_type iface=0; iface<numFaces; ++iface) {
393 
394  auto faceGradEPointsRange = gradEPointsRange(faceDim, iface);
395  auto faceRefGradEPointsRange = range_type(0, range_size(faceGradEPointsRange));
396  auto refGradEPoints = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getDerivEvalPoints(faceDim,iface,evalPointType));
397 
398 
399  const auto topoKey = refTopologyKey(faceDim,iface);
400  Kokkos::parallel_for
401  ("Evaluate Points Faces ",
402  Kokkos::RangePolicy<SpT, int> (0, numCells),
403  KOKKOS_LAMBDA (const size_t ic) {
404  auto faceGradEPoints = Kokkos::subview(workView, ic, faceRefGradEPointsRange, Kokkos::ALL());
405 
406  ordinal_type fOrt[6];
407  orts(ic).getFaceOrientation(fOrt, numFaces);
408  ordinal_type ort = fOrt[iface];
409 
410  Impl::OrientationTools::mapToModifiedReference(faceGradEPoints,refGradEPoints,topoKey,ort);
411  CellTools<SpT>::mapToReferenceSubcell(Kokkos::subview(gradEPoints, ic, faceGradEPointsRange, Kokkos::ALL()), faceGradEPoints, subcellParamFace, faceDim, iface, dim);
412  });
413  }
414 
415  if(cellBasis->getDofCount(dim,0)>0) {
416  auto gradPointsRange = gradEPointsRange(dim, 0);
417  //auto refGradEPointsRange = range_type(0, range_size(gradPointsRange));
418  auto refCellGradEPoints = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getDerivEvalPoints(dim,0,evalPointType));
419  RealSpaceTools<SpT>::clone(Kokkos::subview(gradEPoints, Kokkos::ALL(), gradPointsRange, Kokkos::ALL()), refCellGradEPoints);
420  }
421 }
422 
423 
424 template<typename SpT>
425 template<typename basisCoeffsValueType, class ...basisCoeffsProperties,
426 typename funValsValueType, class ...funValsProperties,
427 typename BasisType,
428 typename ortValueType,class ...ortProperties>
429 void
430 ProjectionTools<SpT>::getHGradBasisCoeffs(Kokkos::DynRankView<basisCoeffsValueType,basisCoeffsProperties...> basisCoeffs,
431  const Kokkos::DynRankView<funValsValueType,funValsProperties...> targetAtTargetEPoints,
432  const Kokkos::DynRankView<funValsValueType,funValsProperties...> targetGradAtTargetGradEPoints,
433  const typename BasisType::ScalarViewType targetEPoints,
434  const typename BasisType::ScalarViewType targetGradEPoints,
435  const Kokkos::DynRankView<ortValueType, ortProperties...> orts,
436  const BasisType* cellBasis,
437  ProjectionStruct<SpT, typename BasisType::scalarType> * projStruct){
438 
439  typedef typename Kokkos::Impl::is_space<SpT>::host_mirror_space::execution_space host_space_type;
440  typedef typename BasisType::scalarType scalarType;
441  typedef Kokkos::DynRankView<scalarType,SpT> ScalarViewType;
442  typedef Kokkos::pair<ordinal_type,ordinal_type> range_type;
443  const auto cellTopo = cellBasis->getBaseCellTopology();
444  ordinal_type dim = cellTopo.getDimension();
445  ordinal_type numTotalTargetEPoints(targetAtTargetEPoints.extent(1)),
446  numTotalTargetGradEPoints(targetGradAtTargetGradEPoints.extent(1));
447  ordinal_type basisCardinality = cellBasis->getCardinality();
448  ordinal_type numCells = targetAtTargetEPoints.extent(0);
449  const ordinal_type edgeDim = 1;
450  const ordinal_type faceDim = 2;
451 
452  ordinal_type numVertices = (cellBasis->getDofCount(0, 0) > 0) ? cellTopo.getVertexCount() : 0;
453  ordinal_type numEdges = (cellBasis->getDofCount(1, 0) > 0) ? cellTopo.getEdgeCount() : 0;
454  ordinal_type numFaces = (cellBasis->getDofCount(2, 0) > 0) ? cellTopo.getFaceCount() : 0;
455 
456  ScalarViewType refEdgesTan("refEdgesTan", numEdges, dim);
457  ScalarViewType refFacesTangents("refFacesTangents", numFaces, dim, faceDim);
458 
459  ordinal_type numVertexDofs = numVertices;
460 
461  ordinal_type numEdgeDofs(0);
462  for(ordinal_type ie=0; ie<numEdges; ++ie)
463  numEdgeDofs += cellBasis->getDofCount(edgeDim,ie);
464 
465  ordinal_type numFaceDofs(0);
466  for(ordinal_type iface=0; iface<numFaces; ++iface)
467  numFaceDofs += cellBasis->getDofCount(faceDim,iface);
468 
469  Kokkos::View<ordinal_type*> computedDofs("computedDofs",numVertexDofs+numEdgeDofs+numFaceDofs);
470 
471  ordinal_type numTotalBasisEPoints = projStruct->getNumBasisEvalPoints(),
472  numTotalBasisGradEPoints = projStruct->getNumBasisDerivEvalPoints();
473  ScalarViewType basisEPoints("basisEPoints",numCells,numTotalBasisEPoints, dim);
474  ScalarViewType basisGradEPoints("basisGradEPoints",numCells,numTotalBasisGradEPoints, dim);
475  getHGradEvaluationPoints(basisEPoints, basisGradEPoints, orts, cellBasis, projStruct, EvalPointsType::BASIS);
476 
477  ScalarViewType basisAtTargetEPoints("basisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints);
478  {
479  ScalarViewType nonOrientedBasisAtTargetEPoints("nonOrientedBasisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints);
480  for(ordinal_type ic=0; ic<numCells; ++ic) {
481  cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtTargetEPoints,ic,Kokkos::ALL(),Kokkos::ALL()), Kokkos::subview(targetEPoints, ic, Kokkos::ALL(), Kokkos::ALL()));
482  }
483  OrientationTools<SpT>::modifyBasisByOrientation(basisAtTargetEPoints, nonOrientedBasisAtTargetEPoints, orts, cellBasis);
484  }
485 
486  ScalarViewType basisGradAtBasisGradEPoints;
487  ScalarViewType basisGradAtTargetGradEPoints;
488  if(numTotalBasisGradEPoints>0) {
489  ScalarViewType nonOrientedBasisGradAtTargetGradEPoints, nonOrientedBasisGradAtBasisGradEPoints;
490 
491  basisGradAtBasisGradEPoints = ScalarViewType ("basisGradAtBasisGradEPoints",numCells,basisCardinality, numTotalBasisGradEPoints, dim);
492  nonOrientedBasisGradAtBasisGradEPoints = ScalarViewType ("nonOrientedBasisGradAtBasisGradEPoints",numCells,basisCardinality, numTotalBasisGradEPoints, dim);
493  basisGradAtTargetGradEPoints = ScalarViewType("basisGradAtTargetGradEPoints",numCells,basisCardinality, numTotalTargetGradEPoints, dim);
494  nonOrientedBasisGradAtTargetGradEPoints = ScalarViewType("nonOrientedBasisGradAtTargetGradEPoints",numCells,basisCardinality, numTotalTargetGradEPoints, dim);
495 
496  for(ordinal_type ic=0; ic<numCells; ++ic) {
497  cellBasis->getValues(Kokkos::subview(nonOrientedBasisGradAtBasisGradEPoints,ic,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()), Kokkos::subview(basisGradEPoints, ic, Kokkos::ALL(), Kokkos::ALL()),OPERATOR_GRAD);
498  cellBasis->getValues(Kokkos::subview(nonOrientedBasisGradAtTargetGradEPoints,ic,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()), Kokkos::subview(targetGradEPoints, ic, Kokkos::ALL(), Kokkos::ALL()),OPERATOR_GRAD);
499  }
500 
501  OrientationTools<SpT>::modifyBasisByOrientation(basisGradAtBasisGradEPoints, nonOrientedBasisGradAtBasisGradEPoints, orts, cellBasis);
502  OrientationTools<SpT>::modifyBasisByOrientation(basisGradAtTargetGradEPoints, nonOrientedBasisGradAtTargetGradEPoints, orts, cellBasis);
503  }
504 
505  auto targetEPointsRange = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getTargetPointsRange());
506  auto targetGradEPointsRange = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getTargetDerivPointsRange());
507 
508  auto basisGradEPointsRange = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getBasisDerivPointsRange());
509 
510  auto refTopologyKey = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getTopologyKey());
511 
512  auto tagToOrdinal = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(), cellBasis->getAllDofOrdinal());
513 
514  ordinal_type computedDofsCount = 0;
515  for(ordinal_type iv=0; iv<numVertices; ++iv)
516  computedDofs(computedDofsCount++) = tagToOrdinal(0, iv, 0);
517 
518  const Kokkos::RangePolicy<SpT> policy(0, numCells);
519  typedef ComputeBasisCoeffsOnVertices_HGRAD<decltype(basisCoeffs), decltype(tagToOrdinal), decltype(targetEPointsRange),
520  decltype(targetAtTargetEPoints), decltype(basisAtTargetEPoints)> functorType;
521  Kokkos::parallel_for(policy, functorType(basisCoeffs, tagToOrdinal, targetEPointsRange,
522  targetAtTargetEPoints, basisAtTargetEPoints, numVertices));
523 
524  for(ordinal_type ie=0; ie<numEdges; ++ie) {
525 
526  ordinal_type edgeCardinality = cellBasis->getDofCount(edgeDim,ie);
527  ordinal_type offsetBasis = basisGradEPointsRange(edgeDim, ie).first;
528  ordinal_type offsetTarget = targetGradEPointsRange(edgeDim, ie).first;
529  ordinal_type numBasisGradEPoints = range_size(basisGradEPointsRange(edgeDim, ie));
530  ordinal_type numTargetGradEPoints = range_size(targetGradEPointsRange(edgeDim, ie));
531  auto basisGradEWeights = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getBasisDerivEvalWeights(edgeDim,ie));
532  auto targetGradEWeights = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getTargetDerivEvalWeights(edgeDim,ie));
533 
534  auto edgeTan = Kokkos::subview(refEdgesTan, ie, Kokkos::ALL());
535  auto edgeTanHost = Kokkos::create_mirror_view(edgeTan);
536  CellTools<SpT>::getReferenceEdgeTangent(edgeTanHost,ie, cellTopo);
537  Kokkos::deep_copy(edgeTan,edgeTanHost);
538 
539  ScalarViewType basisTanAtEPoints("basisTanAtEPoints",numCells,edgeCardinality, numBasisGradEPoints);
540  ScalarViewType targetGradTanAtTargetGradEPoints("tanBasisAtTargetGradEPoints",numCells, numTargetGradEPoints);
541  ScalarViewType wBasisAtBasisGradEPoints("wTanBasisAtBasisGradEPoints",numCells,edgeCardinality, numBasisGradEPoints);
542  ScalarViewType wBasisAtTargetGradEPoints("wTanBasisAtTargetGradEPoints",numCells,edgeCardinality, numTargetGradEPoints);
543  ScalarViewType negPartialProjGrad("negPartialProjGrad", numCells, numBasisGradEPoints);
544 
545  typedef ComputeBasisCoeffsOnEdges_HGRAD<decltype(basisCoeffs), ScalarViewType, decltype(basisGradEWeights),
546  decltype(computedDofs), decltype(tagToOrdinal), decltype(targetGradAtTargetGradEPoints)> functorTypeEdge;
547 
548  Kokkos::parallel_for(policy, functorTypeEdge(basisCoeffs, negPartialProjGrad, basisTanAtEPoints,
549  basisGradAtBasisGradEPoints, basisGradEWeights, wBasisAtBasisGradEPoints, targetGradEWeights,
550  basisGradAtTargetGradEPoints, wBasisAtTargetGradEPoints, computedDofs, tagToOrdinal,
551  targetGradTanAtTargetGradEPoints, targetGradAtTargetGradEPoints, refEdgesTan,
552  edgeCardinality, offsetBasis,
553  offsetTarget, numVertexDofs, edgeDim, dim, ie));
554 
555  ScalarViewType edgeMassMat_("edgeMassMat_", numCells, edgeCardinality, edgeCardinality),
556  edgeRhsMat_("rhsMat_", numCells, edgeCardinality);
557 
558  FunctionSpaceTools<SpT >::integrate(edgeMassMat_, basisTanAtEPoints, wBasisAtBasisGradEPoints);
559  FunctionSpaceTools<SpT >::integrate(edgeRhsMat_, targetGradTanAtTargetGradEPoints, wBasisAtTargetGradEPoints);
560  FunctionSpaceTools<SpT >::integrate(edgeRhsMat_, negPartialProjGrad, wBasisAtBasisGradEPoints,true);
561 
562  typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, SpT> WorkArrayViewType;
563  ScalarViewType t_("t",numCells, edgeCardinality);
564  WorkArrayViewType w_("w",numCells, edgeCardinality);
565 
566  auto edgeDofs = Kokkos::subview(tagToOrdinal, edgeDim, ie, Kokkos::ALL());
567 
568  ElemSystem edgeSystem("edgeSystem", false);
569  edgeSystem.solve(basisCoeffs, edgeMassMat_, edgeRhsMat_, t_, w_, edgeDofs, edgeCardinality);
570 
571  for(ordinal_type i=0; i<edgeCardinality; ++i)
572  computedDofs(computedDofsCount++) = tagToOrdinal(edgeDim, ie, i);
573  }
574 
575  for(ordinal_type iface=0; iface<numFaces; ++iface) {
576 
577  const auto topoKey = refTopologyKey(faceDim,iface);
578 
579  ordinal_type faceCardinality = cellBasis->getDofCount(faceDim,iface);
580 
581  ordinal_type numGradEPoints = range_size(basisGradEPointsRange(faceDim, iface));
582  ordinal_type numTargetGradEPoints = range_size(targetGradEPointsRange(faceDim, iface));
583  ordinal_type offsetBasisGrad = basisGradEPointsRange(faceDim, iface).first;
584  ordinal_type offsetTargetGrad = targetGradEPointsRange(faceDim, iface).first;
585  auto basisGradEWeights = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getBasisDerivEvalWeights(faceDim,iface));
586  auto targetGradEWeights = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getTargetDerivEvalWeights(faceDim,iface));
587 
588  auto refFaceTanU = Kokkos::subview(refFacesTangents, iface, Kokkos::ALL, 0);
589  auto refFaceTanV = Kokkos::subview(refFacesTangents, iface, Kokkos::ALL,1);
590  auto refFaceTanUHost = Kokkos::create_mirror_view(refFaceTanU);
591  auto refFaceTanVHost = Kokkos::create_mirror_view(refFaceTanV);
592  CellTools<SpT>::getReferenceFaceTangents(refFaceTanUHost, refFaceTanVHost, iface, cellTopo);
593  Kokkos::deep_copy(refFaceTanU, refFaceTanUHost);
594  Kokkos::deep_copy(refFaceTanV, refFaceTanVHost);
595 
596  ScalarViewType faceBasisGradAtGradEPoints("normaBasisGradAtGradEPoints",numCells,faceCardinality, numGradEPoints,faceDim);
597  ScalarViewType wBasisGradAtGradEPoints("wNormalBasisGradAtGradEPoints",numCells,faceCardinality, numGradEPoints,faceDim);
598  ScalarViewType wBasisGradBasisAtTargetGradEPoints("wNormalBasisGradAtTargetGradEPoints",numCells,faceCardinality, numTargetGradEPoints,faceDim);
599  ScalarViewType targetGradTanAtTargetGradEPoints("targetGradTanAtTargetGradEPoints",numCells, numTargetGradEPoints,faceDim);
600  ScalarViewType negPartialProjGrad("mNormalComputedProjection", numCells,numGradEPoints,faceDim);
601 
602  typedef ComputeBasisCoeffsOnFaces_HGRAD<decltype(basisCoeffs), ScalarViewType, decltype(basisGradEWeights),
603  decltype(computedDofs), decltype(tagToOrdinal), decltype(orts), decltype(targetGradAtTargetGradEPoints)> functorTypeFace_HGRAD;
604 
605  Kokkos::parallel_for(policy, functorTypeFace_HGRAD(basisCoeffs, negPartialProjGrad, faceBasisGradAtGradEPoints,
606  basisGradAtBasisGradEPoints, basisGradEWeights, wBasisGradAtGradEPoints, targetGradEWeights,
607  basisGradAtTargetGradEPoints,wBasisGradBasisAtTargetGradEPoints, computedDofs, tagToOrdinal,
608  orts,targetGradTanAtTargetGradEPoints,targetGradAtTargetGradEPoints,
609  refFacesTangents, faceCardinality, offsetBasisGrad,
610  offsetTargetGrad, numVertexDofs+numEdgeDofs, numFaces, faceDim,
611  dim, iface, topoKey));
612 
613  ScalarViewType faceMassMat_("faceMassMat_", numCells, faceCardinality, faceCardinality),
614  faceRhsMat_("rhsMat_", numCells, faceCardinality);
615 
616  FunctionSpaceTools<SpT >::integrate(faceMassMat_, faceBasisGradAtGradEPoints, wBasisGradAtGradEPoints);
617 
618  FunctionSpaceTools<SpT >::integrate(faceRhsMat_, targetGradTanAtTargetGradEPoints, wBasisGradBasisAtTargetGradEPoints);
619  FunctionSpaceTools<SpT >::integrate(faceRhsMat_, negPartialProjGrad, wBasisGradAtGradEPoints,true);
620 
621  Kokkos::View<funValsValueType**,Kokkos::LayoutLeft,host_space_type> faceMassMat("faceMassMat", faceCardinality,faceCardinality);
622  Kokkos::View<funValsValueType**,Kokkos::LayoutLeft,host_space_type> faceRhsMat("faceRhsMat",faceCardinality, 1);
623 
624  typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, SpT> WorkArrayViewType;
625  ScalarViewType t_("t",numCells, faceCardinality);
626  WorkArrayViewType w_("w",numCells, faceCardinality);
627 
628  auto faceDofs = Kokkos::subview(tagToOrdinal, faceDim, iface, Kokkos::ALL());
629 
630  ElemSystem faceSystem("faceSystem", false);
631  faceSystem.solve(basisCoeffs, faceMassMat_, faceRhsMat_, t_, w_, faceDofs, faceCardinality);
632 
633  for(ordinal_type i=0; i<faceCardinality; ++i)
634  computedDofs(computedDofsCount++) = tagToOrdinal(faceDim, iface, i);
635  }
636 
637  ordinal_type numElemDofs = cellBasis->getDofCount(dim,0);
638  if(numElemDofs>0) {
639 
640  range_type cellTargetGradEPointsRange = targetGradEPointsRange(dim, 0);
641  ordinal_type numTargetGradEPoints = range_size(cellTargetGradEPointsRange);
642  ordinal_type numGradEPoints = range_size(basisGradEPointsRange(dim, 0));
643  ordinal_type offsetBasisGrad = basisGradEPointsRange(dim, 0).first;
644  ordinal_type offsetTargetGrad = cellTargetGradEPointsRange.first;
645  auto targetGradEWeights = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getTargetDerivEvalWeights(dim,0));
646  auto basisGradEWeights = Kokkos::create_mirror_view_and_copy(typename SpT::memory_space(),projStruct->getBasisDerivEvalWeights(dim,0));
647 
648  ScalarViewType cellBasisGradAtGradEPoints("internalBasisGradAtEPoints",numCells,numElemDofs, numGradEPoints, dim);
649  ScalarViewType negPartialProjGrad("negPartialProjGrad", numCells, numGradEPoints, dim);
650  ScalarViewType wBasisGradAtGradEPoints("wBasisGradAtGradEPoints",numCells,numElemDofs, numGradEPoints,dim);
651  ScalarViewType wBasisGradBasisAtTargetGradEPoints("wBasisGradAtTargetGradEPoints",numCells,numElemDofs, numTargetGradEPoints,dim);
652 
653  auto elemDof = Kokkos::subview(tagToOrdinal, dim, 0, Kokkos::ALL());
654  typedef ComputeBasisCoeffsOnCells_HGRAD<decltype(basisCoeffs), ScalarViewType, decltype(basisGradEWeights), decltype(computedDofs), decltype(elemDof)> functorTypeCell_HGRAD;
655  Kokkos::parallel_for(policy, functorTypeCell_HGRAD(basisCoeffs, negPartialProjGrad, cellBasisGradAtGradEPoints,
656  basisGradAtBasisGradEPoints, basisGradEWeights, wBasisGradAtGradEPoints, targetGradEWeights,
657  basisGradAtTargetGradEPoints, wBasisGradBasisAtTargetGradEPoints, computedDofs, elemDof,
658  dim, numElemDofs, offsetBasisGrad, offsetTargetGrad, numVertexDofs+numEdgeDofs+numFaceDofs));
659  ScalarViewType cellMassMat_("cellMassMat_", numCells, numElemDofs, numElemDofs),
660  cellRhsMat_("rhsMat_", numCells, numElemDofs);
661 
662  FunctionSpaceTools<SpT >::integrate(cellMassMat_, cellBasisGradAtGradEPoints, wBasisGradAtGradEPoints);
663  FunctionSpaceTools<SpT >::integrate(cellRhsMat_, Kokkos::subview(targetGradAtTargetGradEPoints,Kokkos::ALL(),cellTargetGradEPointsRange,Kokkos::ALL()), wBasisGradBasisAtTargetGradEPoints);
664  FunctionSpaceTools<SpT >::integrate(cellRhsMat_, negPartialProjGrad, wBasisGradAtGradEPoints, true);
665 
666  typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, SpT> WorkArrayViewType;
667  ScalarViewType t_("t",numCells, numElemDofs);
668  WorkArrayViewType w_("w",numCells, numElemDofs);
669 
670  auto cellDofs = Kokkos::subview(tagToOrdinal, dim, 0, Kokkos::ALL());
671  ElemSystem cellSystem("cellSystem", true);
672  cellSystem.solve(basisCoeffs, cellMassMat_, cellRhsMat_, t_, w_, cellDofs, numElemDofs);
673  }
674 }
675 }
676 }
677 
678 #endif
679 
static void getReferenceEdgeTangent(Kokkos::DynRankView< refEdgeTangentValueType, refEdgeTangentProperties...> refEdgeTangent, const ordinal_type edgeOrd, const shards::CellTopology parentCell)
Computes constant tangent vectors to edges of 2D or 3D reference cells.
Header file for the abstract base class Intrepid2::DefaultCubatureFactory.
const range_tag getPointsRange(const EvalPointsType type) const
Returns the range tag of the basis/target evaluation points in subcells.
const range_tag getDerivPointsRange(const EvalPointsType type) const
Returns the range tag of the basis/target derivative evaluation points on subcells.
static void getJacobianOfOrientationMap(JacobianViewType jacobian, const shards::CellTopology cellTopo, const ordinal_type cellOrt)
Computes jacobian of the parameterization maps of 1- and 2-subcells with orientation.
static void modifyBasisByOrientation(Kokkos::DynRankView< outputValueType, outputProperties...> output, const Kokkos::DynRankView< inputValueType, inputProperties...> input, const Kokkos::DynRankView< ortValueType, ortProperties...> orts, const BasisType *basis)
Modify basis due to orientation.
static void integrate(Kokkos::DynRankView< outputValueValueType, outputValueProperties...> outputValues, const Kokkos::DynRankView< leftValueValueType, leftValueProperties...> leftValues, const Kokkos::DynRankView< rightValueValueType, rightValueProperties...> rightValues, const bool sumInto=false)
Contracts leftValues and rightValues arrays on the point and possibly space dimensions and stores the...
static void getHGradBasisCoeffs(Kokkos::DynRankView< basisCoeffsValueType, basisCoeffsProperties...> basisCoeffs, const Kokkos::DynRankView< funValsValueType, funValsProperties...> targetAtEvalPoints, const Kokkos::DynRankView< funValsValueType, funValsProperties...> targetGradAtGradEvalPoints, const typename BasisType::ScalarViewType evaluationPoints, const typename BasisType::ScalarViewType gradEvalPoints, const Kokkos::DynRankView< ortValueType, ortProperties...> cellOrientations, const BasisType *cellBasis, ProjectionStruct< ExecSpaceType, typename BasisType::scalarType > *projStruct)
Computes the basis coefficients of the HGrad projection of the target function.
static void mapToReferenceSubcell(Kokkos::DynRankView< refSubcellPointValueType, refSubcellPointProperties...> refSubcellPoints, const Kokkos::DynRankView< paramPointValueType, paramPointProperties...> paramPoints, const ordinal_type subcellDim, const ordinal_type subcellOrd, const shards::CellTopology parentCell)
Computes parameterization maps of 1- and 2-subcells of reference cells.
view_type getDerivEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId, EvalPointsType type) const
Returns the evaluation points for basis/target derivatives on a subcell.
Header file for the Intrepid2::FunctionSpaceTools class.
ordinal_type getMaxNumDerivPoints(const EvalPointsType type) const
Returns the maximum number of derivative evaluation points across all the subcells.
static void clone(Kokkos::DynRankView< outputValueType, outputProperties...> output, const Kokkos::DynRankView< inputValueType, inputProperties...> input)
Clone input array.
Header file for Intrepid2::ArrayTools class providing utilities for array operations.
static void getHGradEvaluationPoints(typename BasisType::ScalarViewType evaluationPoints, typename BasisType::ScalarViewType gradEvalPoints, const Kokkos::DynRankView< ortValueType, ortProperties...> cellOrientations, const BasisType *cellBasis, ProjectionStruct< ExecSpaceType, typename BasisType::scalarType > *projStruct, const EvalPointsType evalPointType=EvalPointsType::TARGET)
Computes evaluation points for HGrad projection.
static void getReferenceFaceTangents(Kokkos::DynRankView< refFaceTanUValueType, refFaceTanUProperties...> refFaceTanU, Kokkos::DynRankView< refFaceTanVValueType, refFaceTanVProperties...> refFaceTanV, const ordinal_type faceOrd, const shards::CellTopology parentCell)
Computes pairs of constant tangent vectors to faces of a 3D reference cells.
static void mapToModifiedReference(outPointViewType outPoints, const refPointViewType refPoints, const shards::CellTopology cellTopo, const ordinal_type cellOrt=0)
Computes modified parameterization maps of 1- and 2-subcells with orientation.
static void setSubcellParametrization()
Defines orientation-preserving parametrizations of reference edges and faces of cell topologies with ...
An helper class to compute the evaluation points and weights needed for performing projections...
static void getSubcellParametrization(subcellParamViewType &subcellParam, const ordinal_type subcellDim, const shards::CellTopology parentCell)
Returns array with the coefficients of the parametrization maps for the edges or faces of a reference...
const key_tag getTopologyKey() const
Returns the key tag for subcells.
view_type getEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId, EvalPointsType type) const
Returns the basis/target evaluation points on a subcell.