Intrepid2
Intrepid2_OrientationToolsDefMatrixData.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 
43 
48 #ifndef __INTREPID2_ORIENTATIONTOOLS_DEF_MATRIX_DATA_HPP__
49 #define __INTREPID2_ORIENTATIONTOOLS_DEF_MATRIX_DATA_HPP__
50 
51 // disable clang warnings
52 #if defined (__clang__) && !defined (__INTEL_COMPILER)
53 #pragma clang system_header
54 #endif
55 
56 namespace Intrepid2 {
57 
58  template<typename SpT>
59  template<typename BasisType>
60  typename OrientationTools<SpT>::CoeffMatrixDataViewType
61  OrientationTools<SpT>::createCoeffMatrixInternal(const BasisType* basis) {
62  const ordinal_type order(basis->getDegree());
63  const std::string name(basis->getName());
64  CoeffMatrixDataViewType matData;
65 
66  using ExecutionSpace = typename BasisType::ExecutionSpace;
67  using OutputValueType = typename BasisType::OutputValueType;
68  using PointValueType = typename BasisType::PointValueType;
69 
70  using hostExecutionSpace = Kokkos::DefaultHostExecutionSpace;
71 
72  auto ordinalToTag = basis->getAllDofTags();
73  auto tagToOrdinal = basis->getAllDofOrdinal();
74 
75  //
76  // High order HGRAD Elements
77  //
78 
79  //std::cout << "Name: " << name << " " << order << std::endl;
80 
81  if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Quadrilateral<4> >()->key)
82  && (basis->getFunctionSpace() == FUNCTION_SPACE_HGRAD)) {
83  if (order >1) {
84  const ordinal_type matDim = ordinalToTag(tagToOrdinal(1, 0, 0), 3), numEdges = 4, numOrts = 2;
85  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::"+name,
86  numEdges,
87  numOrts,
88  matDim,
89  matDim);
90 
91  if(dynamic_cast<const typename NodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HGRAD_QUAD*>(basis)) {
92  typename NodalBasisFamily<hostExecutionSpace>::HGRAD_QUAD hostBasis(order);
93  init_HGRAD_QUAD(matData, &hostBasis);
94  } else if(dynamic_cast<const typename DerivedNodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HGRAD_QUAD*>(basis)) {
95  typename DerivedNodalBasisFamily<hostExecutionSpace>::HGRAD_QUAD hostBasis(order);
96  init_HGRAD_QUAD(matData, &hostBasis);
97  } else if(dynamic_cast<const typename HierarchicalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HGRAD_QUAD*>(basis)) {
98  typename HierarchicalBasisFamily<hostExecutionSpace>::HGRAD_QUAD hostBasis(order);
99  init_HGRAD_QUAD(matData, &hostBasis);
100  }
101  } else {
102  // add dummy
103  matData = CoeffMatrixDataViewType();
104  }
105  }
106  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Hexahedron<8> >()->key)
107  && (basis->getFunctionSpace() == FUNCTION_SPACE_HGRAD)) {
108  if (order > 1) {
109  const ordinal_type matDim = ordinalToTag(tagToOrdinal(2, 0, 0), 3), numSubcells = 18, numOrts = 8;
110  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HGRAD_HEX_Cn_FEM",
111  numSubcells,
112  numOrts,
113  matDim,
114  matDim);
115 
116  if(dynamic_cast<const typename NodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HGRAD_HEX*>(basis)) {
117  typename NodalBasisFamily<hostExecutionSpace>::HGRAD_HEX hostBasis(order);
118  init_HGRAD_HEX(matData, &hostBasis);
119  } else if(dynamic_cast<const typename DerivedNodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HGRAD_HEX*>(basis)) {
120  typename DerivedNodalBasisFamily<hostExecutionSpace>::HGRAD_HEX hostBasis(order);
121  init_HGRAD_HEX(matData, &hostBasis);
122  } else if(dynamic_cast<const typename HierarchicalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HGRAD_HEX*>(basis)) {
123  typename HierarchicalBasisFamily<hostExecutionSpace>::HGRAD_HEX hostBasis(order);
124  init_HGRAD_HEX(matData, &hostBasis);
125  }
126  } else {
127  // add dummy
128  matData = CoeffMatrixDataViewType();
129  }
130  }
131  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Triangle<3> >()->key)
132  && (basis->getFunctionSpace() == FUNCTION_SPACE_HGRAD)) {
133  if (order > 1) {
134  const ordinal_type matDim = ordinalToTag(tagToOrdinal(1, 0, 0), 3), numEdges = 3, numOrts = 2;
135  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HGRAD_TRI_Cn_FEM",
136  numEdges,
137  numOrts,
138  matDim,
139  matDim);
140 
141  Basis_HGRAD_TRI_Cn_FEM<hostExecutionSpace> hostBasis(order);
142  init_HGRAD_TRI(matData, &hostBasis);
143  } else {
144  // add dummy
145  matData = CoeffMatrixDataViewType();
146  }
147  }
148  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Tetrahedron<4> >()->key)
149  && (basis->getFunctionSpace() == FUNCTION_SPACE_HGRAD)) {
150  const ordinal_type
151  matDim = max(ordinalToTag(tagToOrdinal(1, 0, 0), 3),
152  ordinalToTag(tagToOrdinal(2, 0, 0), 3)),
153  numSubcells = 10, numOrts = 6;
154  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HGRAD_TET_Cn_FEM",
155  numSubcells,
156  numOrts,
157  matDim,
158  matDim);
159 
160  Basis_HGRAD_TET_Cn_FEM<hostExecutionSpace> hostBasis(order);
161  init_HGRAD_TET(matData, &hostBasis);
162  }
163 
164  //
165  // High order HCURL Elements
166  //
167 
168  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Quadrilateral<4> >()->key)
169  && (basis->getFunctionSpace() == FUNCTION_SPACE_HCURL)) {
170  const ordinal_type matDim = ordinalToTag(tagToOrdinal(1, 0, 0), 3), numEdges = 4, numOrts = 2;
171  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HCURL_QUAD_In_FEM",
172  numEdges,
173  numOrts,
174  matDim,
175  matDim);
176 
177  if (name == "Intrepid2_HCURL_QUAD_I1_FEM") {
178  for (ordinal_type edgeId=0;edgeId<numEdges;++edgeId)
179  init_EDGE_ELEMENT_I1_FEM(matData, edgeId);
180  } else if(dynamic_cast<const typename NodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HCURL_QUAD*>(basis)) {
181  typename NodalBasisFamily<hostExecutionSpace>::HCURL_QUAD hostBasis(order);
182  init_HCURL_QUAD(matData, &hostBasis);
183  } else if(dynamic_cast<const typename DerivedNodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HCURL_QUAD*>(basis)) {
184  typename DerivedNodalBasisFamily<hostExecutionSpace>::HCURL_QUAD hostBasis(order);
185  init_HCURL_QUAD(matData, &hostBasis);
186  } else if(dynamic_cast<const typename HierarchicalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HCURL_QUAD*>(basis)) {
187  typename HierarchicalBasisFamily<hostExecutionSpace>::HCURL_QUAD hostBasis(order);
188  init_HCURL_QUAD(matData, &hostBasis);
189  }
190  }
191  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Hexahedron<8> >()->key)
192  && (basis->getFunctionSpace() == FUNCTION_SPACE_HCURL)) {
193  // if order == 1, there is no face dofs
194  const ordinal_type matDim = ordinalToTag(tagToOrdinal((order < 2 ? 1 : 2), 0, 0), 3), numSubcells = (order < 2 ? 12 : 18), numOrts = 8;
195  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HCURL_HEX_In_FEM",
196  numSubcells,
197  numOrts,
198  matDim,
199  matDim);
200 
201  if (name == "Intrepid2_HCURL_HEX_I1_FEM") {
202  for (ordinal_type edgeId=0;edgeId<numSubcells;++edgeId)
203  init_EDGE_ELEMENT_I1_FEM(matData, edgeId);
204  } else if(dynamic_cast<const typename NodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HCURL_HEX*>(basis)) {
205  typename NodalBasisFamily<hostExecutionSpace>::HCURL_HEX hostBasis(order);
206  init_HCURL_HEX(matData, &hostBasis);
207  } else if(dynamic_cast<const typename DerivedNodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HCURL_HEX*>(basis)) {
208  typename DerivedNodalBasisFamily<hostExecutionSpace>::HCURL_HEX hostBasis(order);
209  init_HCURL_HEX(matData, &hostBasis);
210  } else if(dynamic_cast<const typename HierarchicalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HCURL_HEX*>(basis)) {
211  typename HierarchicalBasisFamily<hostExecutionSpace>::HCURL_HEX hostBasis(order);
212  init_HCURL_HEX(matData, &hostBasis);
213  }
214  }
215  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Triangle<3> >()->key)
216  && (basis->getFunctionSpace() == FUNCTION_SPACE_HCURL)) {
217  const ordinal_type matDim = ordinalToTag(tagToOrdinal(1, 0, 0), 3), numEdges = 3, numOrts = 2;
218  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HCURL_TRI_In_FEM",
219  numEdges,
220  numOrts,
221  matDim,
222  matDim);
223 
224  if (name == "Intrepid2_HCURL_TRI_I1_FEM") {
225  for (ordinal_type edgeId=0;edgeId<numEdges;++edgeId)
226  init_EDGE_ELEMENT_I1_FEM(matData, edgeId);
227  } else if (name == "Intrepid2_HCURL_TRI_In_FEM") {
228  Basis_HCURL_TRI_In_FEM<hostExecutionSpace> hostBasis(order);
229  init_HCURL_TRI(matData, &hostBasis);
230  }
231  }
232  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Tetrahedron<4> >()->key)
233  && (basis->getFunctionSpace() == FUNCTION_SPACE_HCURL)) {
234  const ordinal_type matDim = ordinalToTag(tagToOrdinal((order < 2 ? 1 : 2), 0, 0), 3), numSubcells = (order < 2 ? 6 : 10), numOrts = 6;
235  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HCURL_TET_In_FEM",
236  numSubcells,
237  numOrts,
238  matDim,
239  matDim);
240 
241  if (name == "Intrepid2_HCURL_TET_I1_FEM") {
242  for (ordinal_type edgeId=0;edgeId<numSubcells;++edgeId)
243  init_EDGE_ELEMENT_I1_FEM(matData, edgeId);
244  } else if (name == "Intrepid2_HCURL_TET_In_FEM") {
245  Basis_HCURL_TET_In_FEM<hostExecutionSpace> hostBasis(order);
246  init_HCURL_TET(matData, &hostBasis);
247  }
248  }
249 
250  //
251  // High order HDIV Elements
252  //
253 
254  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Quadrilateral<4> >()->key)
255  && (basis->getFunctionSpace() == FUNCTION_SPACE_HDIV)) {
256  // (name == "Intrepid2_HCURL_QUAD_I1_FEM")) {
257  const ordinal_type matDim = ordinalToTag(tagToOrdinal(1, 0, 0), 3), numEdges = 4, numOrts = 2;
258  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HCURL_QUAD_In_FEM",
259  numEdges,
260  numOrts,
261  matDim,
262  matDim);
263 
264  if (name == "Intrepid2_HDIV_QUAD_I1_FEM") {
265  for (ordinal_type edgeId=0;edgeId<numEdges;++edgeId)
266  init_EDGE_ELEMENT_I1_FEM(matData, edgeId);
267  } else if(dynamic_cast<const typename NodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HDIV_QUAD*>(basis)) {
268  typename NodalBasisFamily<hostExecutionSpace>::HDIV_QUAD hostBasis(order);
269  init_HDIV_QUAD(matData, &hostBasis);
270  } else if(dynamic_cast<const typename DerivedNodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HDIV_QUAD*>(basis)) {
271  typename DerivedNodalBasisFamily<hostExecutionSpace>::HDIV_QUAD hostBasis(order);
272  init_HDIV_QUAD(matData, &hostBasis);
273  } else if(dynamic_cast<const typename HierarchicalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HDIV_QUAD*>(basis)) {
274  typename HierarchicalBasisFamily<hostExecutionSpace>::HDIV_QUAD hostBasis(order);
275  init_HDIV_QUAD(matData, &hostBasis);
276  }
277  }
278  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Hexahedron<8> >()->key)
279  && (basis->getFunctionSpace() == FUNCTION_SPACE_HDIV)) {
280  const ordinal_type matDim = ordinalToTag(tagToOrdinal(2, 0, 0), 3), numSubcells = 6, numOrts = 8;
281  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HDIV_HEX_In_FEM",
282  numSubcells,
283  numOrts,
284  matDim,
285  matDim);
286 
287  if (name == "Intrepid2_HDIV_HEX_I1_FEM") {
288  for (ordinal_type faceId=0;faceId<numSubcells;++faceId)
289  init_QUAD_FACE_ELEMENT_I1_FEM(matData, faceId);
290  } else if(dynamic_cast<const typename NodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HDIV_HEX*>(basis)) {
291  typename NodalBasisFamily<hostExecutionSpace>::HDIV_HEX hostBasis(order);
292  init_HDIV_HEX(matData, &hostBasis);
293  } else if(dynamic_cast<const typename DerivedNodalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HDIV_HEX*>(basis)) {
294  typename DerivedNodalBasisFamily<hostExecutionSpace>::HDIV_HEX hostBasis(order);
295  init_HDIV_HEX(matData, &hostBasis);
296  } else if(dynamic_cast<const typename HierarchicalBasisFamily<ExecutionSpace, OutputValueType, PointValueType>::HDIV_HEX*>(basis)) {
297  typename HierarchicalBasisFamily<hostExecutionSpace>::HDIV_HEX hostBasis(order);
298  init_HDIV_HEX(matData, &hostBasis);
299  }
300  }
301  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Triangle<3> >()->key)
302  && (basis->getFunctionSpace() == FUNCTION_SPACE_HDIV)) {
303  const ordinal_type matDim = ordinalToTag(tagToOrdinal(1, 0, 0), 3), numEdges = 3, numOrts = 2;
304  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HDIV_TRI_In_FEM",
305  numEdges,
306  numOrts,
307  matDim,
308  matDim);
309  if (name == "Intrepid2_HDIV_TRI_I1_FEM") {
310  for (ordinal_type edgeId=0;edgeId<numEdges;++edgeId)
311  init_EDGE_ELEMENT_I1_FEM(matData, edgeId);
312  } else if (name == "Intrepid2_HDIV_TRI_In_FEM") {
313  Basis_HDIV_TRI_In_FEM<hostExecutionSpace> hostBasis(order);
314  init_HDIV_TRI(matData, &hostBasis);
315  }
316  }
317  else if((basis->getBaseCellTopology().getKey() == shards::getCellTopologyData<shards::Tetrahedron<4> >()->key)
318  && (basis->getFunctionSpace() == FUNCTION_SPACE_HDIV)) {
319  const ordinal_type matDim = ordinalToTag(tagToOrdinal(2, 0, 0), 3), numSubcells = 4, numOrts = 6;
320  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HDIV_TET_In_FEM",
321  numSubcells,
322  numOrts,
323  matDim,
324  matDim);
325 
326  if (name == "Intrepid2_HDIV_TET_I1_FEM") {
327  for (ordinal_type faceId=0;faceId<numSubcells;++faceId)
328  init_TRI_FACE_ELEMENT_I1_FEM(matData, faceId);
329  } else if (name == "Intrepid2_HDIV_TET_In_FEM") {
330  Basis_HDIV_TET_In_FEM<hostExecutionSpace> hostBasis(order);
331  init_HDIV_TET(matData, &hostBasis);
332  }
333  }
334 
335  //
336  // 3D H(Curl) I1 Elements
337  //
338 
339  else if (name == "Intrepid2_HCURL_WEDGE_I1_FEM") {
340  const ordinal_type matDim = 1, numEdges = 9, numOrts = 2;
341  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HCURL_WEDGE_I1_FEM",
342  numEdges,
343  numOrts,
344  matDim,
345  matDim);
346  for (ordinal_type edgeId=0;edgeId<numEdges;++edgeId)
347  init_EDGE_ELEMENT_I1_FEM(matData, edgeId);
348  }
349 
350  //
351  // 3D H(Div) I1 Elements
352  //
353 
354  else if (name == "Intrepid2_HDIV_WEDGE_I1_FEM") {
355  const ordinal_type matDim = 1, numFaces = 5, numOrts = 8;
356  matData = CoeffMatrixDataViewType("Orientation::CoeffMatrix::Intrepid2_HDIV_WEDGE_I1_FEM",
357  numFaces,
358  numOrts,
359  matDim,
360  matDim);
361  ordinal_type faceId = 0;
362  for ( ;faceId<3;++faceId)
363  init_QUAD_FACE_ELEMENT_I1_FEM(matData, faceId);
364  for ( ;faceId<numFaces;++faceId)
365  init_TRI_FACE_ELEMENT_I1_FEM(matData, faceId);
366  }
367  return matData;
368  }
369 
370  //
371  // Quad elements
372  //
373 
374  template<typename SpT>
375  template<typename BasisType>
376  void
377  OrientationTools<SpT>::
378  init_HGRAD_QUAD(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
379  BasisType const *cellBasis) {
380  const ordinal_type order(cellBasis->getDegree());
381  Basis_HGRAD_LINE_Cn_FEM<typename BasisType::ExecutionSpace> lineBasis(order);
382 
383  const ordinal_type numEdge = 4, numOrt = 2;
384  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
385  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
386  auto mat = Kokkos::subview(matData,
387  edgeId, edgeOrt,
388  Kokkos::ALL(), Kokkos::ALL());
390  lineBasis, *cellBasis,
391  edgeId, edgeOrt);
392  }
393  }
394 
395  template<typename SpT>
396  template<typename BasisType>
397  void
398  OrientationTools<SpT>::
399  init_HCURL_QUAD(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
400  BasisType const *cellBasis) {
401  const ordinal_type order(cellBasis->getDegree());
402  Basis_HGRAD_LINE_Cn_FEM<typename BasisType::ExecutionSpace> bubbleBasis(order-1, POINTTYPE_GAUSS);
403 
404  const ordinal_type numEdge = 4, numOrt = 2;
405  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
406  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
407  auto mat = Kokkos::subview(matData,
408  edgeId, edgeOrt,
409  Kokkos::ALL(), Kokkos::ALL());
411  bubbleBasis, *cellBasis,
412  edgeId, edgeOrt);
413  }
414  }
415 
416  template<typename SpT>
417  template<typename BasisType>
418  void
419  OrientationTools<SpT>::
420  init_HDIV_QUAD(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
421  BasisType const *cellBasis) {
422  const ordinal_type order(cellBasis->getDegree());
423  Basis_HGRAD_LINE_Cn_FEM<typename BasisType::ExecutionSpace> bubbleBasis(order-1, POINTTYPE_GAUSS);
424 
425  const ordinal_type numEdge = 4, numOrt = 2;
426  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
427  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
428  auto mat = Kokkos::subview(matData,
429  edgeId, edgeOrt,
430  Kokkos::ALL(), Kokkos::ALL());
432  bubbleBasis, *cellBasis,
433  edgeId, edgeOrt);
434  }
435  }
436 
437  //
438  // Hexahedral elements
439  //
440 
441  template<typename SpT>
442  template<typename BasisType>
443  void
444  OrientationTools<SpT>::
445  init_HGRAD_HEX(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
446  BasisType const *cellBasis) {
447  const ordinal_type order(cellBasis->getDegree());
448  Basis_HGRAD_LINE_Cn_FEM<typename BasisType::ExecutionSpace> lineBasis(order);
449  Basis_HGRAD_QUAD_Cn_FEM<typename BasisType::ExecutionSpace> quadBasis(order);
450 
451  const ordinal_type numEdge = 12, numFace = 6;
452  {
453  const ordinal_type numOrt = 2;
454  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
455  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
456  auto mat = Kokkos::subview(matData,
457  edgeId, edgeOrt,
458  Kokkos::ALL(), Kokkos::ALL());
460  lineBasis, *cellBasis,
461  edgeId, edgeOrt);
462  }
463  }
464  {
465  const ordinal_type numOrt = 8;
466  for (ordinal_type faceId=0;faceId<numFace;++faceId)
467  for (ordinal_type faceOrt=0;faceOrt<numOrt;++faceOrt) {
468  auto mat = Kokkos::subview(matData,
469  numEdge+faceId, faceOrt,
470  Kokkos::ALL(), Kokkos::ALL());
472  quadBasis, *cellBasis,
473  faceId, faceOrt);
474  }
475  }
476  }
477 
478  template<typename SpT>
479  template<typename BasisType>
480  void
481  OrientationTools<SpT>::
482  init_HCURL_HEX(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
483  BasisType const *cellBasis) {
484  const ordinal_type order(cellBasis->getDegree());
485  Basis_HGRAD_LINE_Cn_FEM<typename BasisType::ExecutionSpace> bubbleBasis(order-1, POINTTYPE_GAUSS);
486  Basis_HCURL_QUAD_In_FEM<typename BasisType::ExecutionSpace> quadBasis(order);
487 
488  const ordinal_type numEdge = 12, numFace = 6;
489  {
490  const ordinal_type numOrt = 2;
491  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
492  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
493  auto mat = Kokkos::subview(matData,
494  edgeId, edgeOrt,
495  Kokkos::ALL(), Kokkos::ALL());
497  bubbleBasis, *cellBasis,
498  edgeId, edgeOrt);
499  }
500  }
501  if (order > 1) {
502  const ordinal_type numOrt = 8;
503  for (ordinal_type faceId=0;faceId<numFace;++faceId)
504  for (ordinal_type faceOrt=0;faceOrt<numOrt;++faceOrt) {
505  auto mat = Kokkos::subview(matData,
506  numEdge+faceId, faceOrt,
507  Kokkos::ALL(), Kokkos::ALL());
509  quadBasis, *cellBasis,
510  faceId, faceOrt);
511  }
512  }
513  }
514 
515  template<typename SpT>
516  template<typename BasisType>
517  void
518  OrientationTools<SpT>::
519  init_HDIV_HEX(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
520  BasisType const *cellBasis) {
521  const ordinal_type order(cellBasis->getDegree());
522  Basis_HGRAD_QUAD_Cn_FEM<typename BasisType::ExecutionSpace> quadBasis(order-1, POINTTYPE_GAUSS);
523 
524  const ordinal_type numFace = 6;
525  {
526  const ordinal_type numOrt = 8;
527  for (ordinal_type faceId=0;faceId<numFace;++faceId)
528  for (ordinal_type faceOrt=0;faceOrt<numOrt;++faceOrt) {
529  auto mat = Kokkos::subview(matData,
530  faceId, faceOrt,
531  Kokkos::ALL(), Kokkos::ALL());
533  quadBasis, *cellBasis,
534  faceId, faceOrt);
535  }
536  }
537  }
538 
539  //
540  // Triangle elements
541  //
542 
543  template<typename SpT>
544  template<typename BasisType>
545  void
546  OrientationTools<SpT>::
547  init_HGRAD_TRI(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
548  BasisType const *cellBasis) {
549  const ordinal_type order(cellBasis->getDegree());
550  Basis_HGRAD_LINE_Cn_FEM<typename BasisType::ExecutionSpace> lineBasis(order);
551 
552  const ordinal_type numEdge = 3, numOrt = 2;
553  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
554  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
555  auto mat = Kokkos::subview(matData,
556  edgeId, edgeOrt,
557  Kokkos::ALL(), Kokkos::ALL());
559  lineBasis, *cellBasis,
560  edgeId, edgeOrt);
561  }
562  }
563 
564 
565  template<typename SpT>
566  template<typename BasisType>
567  void
568  OrientationTools<SpT>::
569  init_HCURL_TRI(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
570  BasisType const *cellBasis) {
571  const ordinal_type order(cellBasis->getDegree());
572  Basis_HVOL_LINE_Cn_FEM<typename BasisType::ExecutionSpace> bubbleBasis(order-1);
573 
574  const ordinal_type numEdge = 3, numOrt = 2;
575  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
576  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
577  auto mat = Kokkos::subview(matData,
578  edgeId, edgeOrt,
579  Kokkos::ALL(), Kokkos::ALL());
581  bubbleBasis, *cellBasis,
582  edgeId, edgeOrt);
583  }
584  }
585 
586  template<typename SpT>
587  template<typename BasisType>
588  void
589  OrientationTools<SpT>::
590  init_HDIV_TRI(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
591  BasisType const *cellBasis) {
592  const ordinal_type order(cellBasis->getDegree());
593  Basis_HVOL_LINE_Cn_FEM<typename BasisType::ExecutionSpace> bubbleBasis(order-1);
594 
595  const ordinal_type numEdge = 3, numOrt = 2;
596  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
597  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
598  auto mat = Kokkos::subview(matData,
599  edgeId, edgeOrt,
600  Kokkos::ALL(), Kokkos::ALL());
602  bubbleBasis, *cellBasis,
603  edgeId, edgeOrt);
604  }
605  }
606 
607  //
608  // Tetrahedral elements
609  //
610 
611  template<typename SpT>
612  template<typename BasisType>
613  void
614  OrientationTools<SpT>::
615  init_HGRAD_TET(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
616  BasisType const *cellBasis) {
617  const ordinal_type order(cellBasis->getDegree());
618  Basis_HGRAD_LINE_Cn_FEM<typename BasisType::ExecutionSpace> lineBasis(order);
619  Basis_HGRAD_TRI_Cn_FEM<typename BasisType::ExecutionSpace> triBasis(order);
620 
621  const ordinal_type numEdge = 6, numFace = 4;
622  {
623  const ordinal_type numOrt = 2;
624  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
625  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
626  auto mat = Kokkos::subview(matData,
627  edgeId, edgeOrt,
628  Kokkos::ALL(), Kokkos::ALL());
630  lineBasis, *cellBasis,
631  edgeId, edgeOrt);
632  }
633  }
634  if (order > 2) {
635  const ordinal_type numOrt = 6;
636  for (ordinal_type faceId=0;faceId<numFace;++faceId)
637  for (ordinal_type faceOrt=0;faceOrt<numOrt;++faceOrt) {
638  auto mat = Kokkos::subview(matData,
639  numEdge+faceId, faceOrt,
640  Kokkos::ALL(), Kokkos::ALL());
642  triBasis, *cellBasis,
643  faceId, faceOrt);
644  }
645  }
646  }
647 
648  template<typename SpT>
649  template<typename BasisType>
650  void
651  OrientationTools<SpT>::
652  init_HCURL_TET(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
653  BasisType const *cellBasis) {
654  const ordinal_type order(cellBasis->getDegree());
655  Basis_HVOL_LINE_Cn_FEM<typename BasisType::ExecutionSpace> bubbleBasis(order-1);
656  Basis_HCURL_TRI_In_FEM<typename BasisType::ExecutionSpace> triBasis(order);
657 
658  const ordinal_type numEdge = 6, numFace = 4;
659  {
660  const ordinal_type numOrt = 2;
661  for (ordinal_type edgeId=0;edgeId<numEdge;++edgeId)
662  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
663  auto mat = Kokkos::subview(matData,
664  edgeId, edgeOrt,
665  Kokkos::ALL(), Kokkos::ALL());
667  bubbleBasis, *cellBasis,
668  edgeId, edgeOrt);
669  }
670  }
671  if (order > 1) {
672  const ordinal_type numOrt = 6;
673  for (ordinal_type faceId=0;faceId<numFace;++faceId)
674  for (ordinal_type faceOrt=0;faceOrt<numOrt;++faceOrt) {
675  auto mat = Kokkos::subview(matData,
676  numEdge+faceId, faceOrt,
677  Kokkos::ALL(), Kokkos::ALL());
679  triBasis, *cellBasis,
680  faceId, faceOrt);
681  }
682  }
683  }
684 
685  template<typename SpT>
686  template<typename BasisType>
687  void
688  OrientationTools<SpT>::
689  init_HDIV_TET(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
690  BasisType const *cellBasis) {
691  const ordinal_type order(cellBasis->getDegree());
692  Basis_HVOL_TRI_Cn_FEM<typename BasisType::ExecutionSpace> triBasis(order-1);
693 
694  const ordinal_type numFace = 4, numOrt = 6;
695  for (ordinal_type faceId=0;faceId<numFace;++faceId)
696  for (ordinal_type faceOrt=0;faceOrt<numOrt;++faceOrt) {
697  auto mat = Kokkos::subview(matData,
698  faceId, faceOrt,
699  Kokkos::ALL(), Kokkos::ALL());
701  triBasis, *cellBasis,
702  faceId, faceOrt);
703  }
704  }
705 
706  //
707  // Lower order I1 elements
708  //
709 
710  template<typename SpT>
711  void
712  OrientationTools<SpT>::
713  init_EDGE_ELEMENT_I1_FEM(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
714  const ordinal_type edgeId) {
715  const ordinal_type numOrt = 2;
716  const double edgeOrtCoeff[2] = { 1.0, -1.0 };
717  for (ordinal_type edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
718  auto mat = Kokkos::subview(matData,
719  edgeId, edgeOrt,
720  Kokkos::ALL(), Kokkos::ALL());
721  mat(0,0) = edgeOrtCoeff[edgeOrt];
722  }
723  }
724 
725  template<typename SpT>
726  void
727  OrientationTools<SpT>::
728  init_TRI_FACE_ELEMENT_I1_FEM(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
729  const ordinal_type faceId) {
730  const ordinal_type numOrt = 6;
731  const double faceOrtCoeff[6] = { 1.0, 1.0, 1.0,
732  -1.0, -1.0, -1.0 };
733 
734  for (ordinal_type faceOrt=0;faceOrt<numOrt;++faceOrt) {
735  auto mat = Kokkos::subview(matData,
736  faceId, faceOrt,
737  Kokkos::ALL(), Kokkos::ALL());
738  mat(0,0) = faceOrtCoeff[faceOrt];
739  }
740  }
741 
742  template<typename SpT>
743  void
744  OrientationTools<SpT>::
745  init_QUAD_FACE_ELEMENT_I1_FEM(typename OrientationTools<SpT>::CoeffMatrixDataViewType matData,
746  const ordinal_type faceId) {
747  const ordinal_type numOrt = 8;
748  const double faceOrtCoeff[8] = { 1.0, 1.0, 1.0, 1.0,
749  -1.0, -1.0, -1.0, -1.0 };
750 
751  for (ordinal_type faceOrt=0;faceOrt<numOrt;++faceOrt) {
752  auto mat = Kokkos::subview(matData,
753  faceId, faceOrt,
754  Kokkos::ALL(), Kokkos::ALL());
755  mat(0,0) = faceOrtCoeff[faceOrt];
756  }
757  }
758 
759  template<typename SpT>
760  template<typename BasisType>
761  typename OrientationTools<SpT>::CoeffMatrixDataViewType
762  OrientationTools<SpT>::createCoeffMatrix(const BasisType* basis) {
763 #ifdef HAVE_INTREPID2_DEBUG
764  INTREPID2_TEST_FOR_EXCEPTION( !basis->requireOrientation(), std::invalid_argument,
765  ">>> ERROR (OrientationTools::createCoeffMatrix): basis does not require orientations." );
766 #endif
767  Kokkos::push_finalize_hook( [=] {
768  ortCoeffData=std::map<std::pair<std::string,ordinal_type>, typename OrientationTools<SpT>::CoeffMatrixDataViewType>();
769  });
770 
771  const std::pair<std::string,ordinal_type> key(basis->getName(), basis->getDegree());
772  const auto found = ortCoeffData.find(key);
773 
774  CoeffMatrixDataViewType matData;
775  if (found == ortCoeffData.end()) {
776  matData = createCoeffMatrixInternal(basis);
777  ortCoeffData.insert(std::make_pair(key, matData));
778  } else {
779  matData = found->second;
780  }
781 
782  return matData;
783  }
784 
785  template<typename SpT>
787  ortCoeffData.clear();
788  }
789 }
790 
791 #endif
792 
793 
794 // template<typename SpT>
795 // void
796 // OrientationTools<SpT>::CoeffMatrix::import(const OrientationTools<SpT>::DenseMatrix &b,
797 // const bool transpose) {
798 // #ifdef HAVE_INTREPID2_DEBUG
799 // INTREPID2_TEST_FOR_ABORT( !( NumRows() == b.NumRows() && NumCols() == b.NumCols() ), std::invalid_argument,
800 // ">>> ERROR (Intrepid::Orientation::CoeffMatrix::import): "
801 // "Matrix dimensions are not matched");
802 // #endif
803 // // count size
804 // const SpT eps = 1.0e-8;
805 // const ordinal_type nrows = (transpose ? b.NumCols() : b.NumRows());
806 // const ordinal_type ncols = (transpose ? b.NumRows() : b.NumCols());
807 // size_type nnz = b.countNumNonZeros(eps);
808 // createInternalArrays(nrows, ncols, nnz);
809 
810 // // construct sparse array
811 // nnz = 0;
812 // for (ordinal_type i=0;i<nrows;++i) {
813 // _ap(i) = nnz;
814 // for (ordinal_type j=0;j<ncols;++j) {
815 // const SpT val = (transpose ? b.Value(j,i) : b.Value(i,j));
816 // const SpT val2 = val*val;
817 
818 // // consider it as a nonzero entry
819 // if (val2 > eps) {
820 // _aj(nnz) = j;
821 // _ax(nnz) = val;
822 // ++nnz;
823 // }
824 // }
825 // }
826 // _ap(nrows) = nnz;
827 // }
828 
829 // template<typename SpT>
830 // std::ostream&
831 // OrientationTools<SpT>::CoeffMatrix::showMe(std::ostream &os) const {
832 // std::ofstream prec;
833 // prec.copyfmt(os);
834 
835 // os.precision(3);
836 
837 // os << " -- OrientationTools::CoeffMatrix -- " << std::endl
838 // << " # of Rows = " << _m << std::endl
839 // << " # of Cols = " << _n << std::endl
840 // << std::endl
841 // << " RowPtrArray length = " << _ap.extent(0) << std::endl
842 // << " ColArray length = " << _aj.extent(0) << std::endl
843 // << " ValueArray length = " << _ax.extent(0) << std::endl
844 // << std::endl;
845 
846 // const ordinal_type w = 10;
847 // if (_ap.size() && _aj.size() && _ax.size()) {
848 // os << std::setw(w) << "Row" << " "
849 // << std::setw(w) << "Col" << " "
850 // << std::setw(w) << "Val" << std::endl;
851 // for (ordinal_type i=0;i<_m;++i) {
852 // size_type jbegin = _ap[i], jend = _ap[i+1];
853 // for (ordinal_type j=jbegin;j<jend;++j) {
854 // SpT val = _ax[j];
855 // os << std::setw(w) << i << " "
856 // << std::setw(w) << _aj[j] << " "
857 // << std::setw(w) << val << std::endl;
858 // }
859 // }
860 // }
861 // os.copyfmt(prec);
862 
863 // return os;
864 // }
865 
866 // template<class Scalar>
867 // size_type
868 // OrientationTools<Scalar>::DenseMatrix::countNumNonZeros(const Scalar epsilon) const {
869 // size_type nnz = 0;
870 // for (ordinal_type j=0;j<NumCols();++j) {
871 // for (ordinal_type i=0;i<NumRows();++i) {
872 // const Scalar val = Value(i,j);
873 // nnz += ((val*val) > epsilon);
874 // }
875 // }
876 // return nnz;
877 // }
878 
879 // template<class Scalar>
880 // std::ostream&
881 // OrientationTools<Scalar>::DenseMatrix::showMe(std::ostream &os) const {
882 // std::ofstream prec;
883 // prec.copyfmt(os);
884 
885 // os.precision(3);
886 
887 // os << " -- OrientationTools::DenseMatrix -- " << std::endl
888 // << " # of Rows = " << _m << std::endl
889 // << " # of Cols = " << _n << std::endl
890 // << " Col Stride = " << _cs << std::endl
891 // << " Row Stride = " << _rs << std::endl
892 // << std::endl
893 // << " ValueArray dimensions = " << _a.extent(0) << std::endl
894 // << std::endl;
895 
896 // const ordinal_type w = 10;
897 // if (_a.size()) {
898 // for (ordinal_type i=0;i<_m;++i) {
899 // for (ordinal_type j=0;j<_n;++j) {
900 // const Scalar val = this->Value(i,j);
901 // os << std::setw(w) << val << " ";
902 // }
903 // os << std::endl;
904 // }
905 // }
906 // os.copyfmt(prec);
907 
908 // return os;
909 // }
910 
911 
912 
913 
914 
915 // template<typename SpT>
916 // void
917 // OrientationTools<SpT>::
918 // initHexahedron(Kokkos::View<CoeffMatrixType***,SpT> MatrixData,
919 // const EFunctionSpace space,
920 // const ordinal_type order) {
921 
922 // switch (space) {
923 // case FUNCTION_SPACE_HGRAD: {
924 // Basis_HGRAD_LINE_Cn_FEM<SpT> lineBasis(order);
925 // Basis_HGRAD_QUAD_Cn_FEM<SpT> faceBasis(order);
926 // Basis_HGRAD_HEXA_Cn_FEM<SpT> cellBasis(order);
927 
928 // {
929 // const ordinal_type numEdge = 12, numOrt = 2;
930 // for (auto edgeId=0;edgeId<numEdge;++edgeId)
931 // for (auto edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
932 // const auto C = Impl::OrientationTools::getEdgeCoeffMatrix_HGRAD(lineBasis, cellBasis, edgeId, edgeOrt);
933 // MatrixData(0, edgeId, edgeOrt) = Kokkos::create_mirror_view(typename SpT::memory_space(), C);
934 // Kokkos::deep_copy(MatrixData(0, edgdId, edgeOrt), C);
935 // }
936 // }
937 // {
938 // const ordinal_type numFace = 6, numOrt = 8;
939 // for (auto faceId=0;faceId<numFace;++faceId)
940 // for (auto faceOrt=0;faceOrt<numOrt;++faceOrt) {
941 // const auto C = Impl::OrientationTools::getQuadrilateralCoeffMatrix_HGRAD(faceBasis, cellBasis, faceId, faceOrt);
942 // MatrixData(1, faceId, faceOrt) = Kokkos::create_mirror_view(typename SpT::memory_space(), C);
943 // Kokkos::deep_copy(MatrixData(1, faceId, faceOrt), C);
944 // }
945 // }
946 // break;
947 // }
948 // default: {
949 // INTREPID2_TEST_FOR_EXCEPTION( true, std::invalid_argument,
950 // ">>> ERROR (Intrepid::OrientationTools::initQuadrilateral): Invalid function space.");
951 // break;
952 // }
953 // }
954 // }
955 
956 // template<typename SpT>
957 // void
958 // OrientationTools<SpT>::
959 // initTetrahedron(Kokkos::View<CoeffMatrixType***,SpT> MatrixData,
960 // const EFunctionSpace space,
961 // const ordinal_type order) {
962 
963 // switch (space) {
964 // case FUNCTION_SPACE_HGRAD: {
965 // Basis_HGRAD_LINE_Cn_FEM<SpT> lineBasis(order);
966 // Basis_HGRAD_TRI_Cn_FEM <SpT> faceBasis(order);
967 // Basis_HGRAD_TET_Cn_FEM <SpT> cellBasis(order);
968 
969 // {
970 // const ordinal_type numEdge = 6, numOrt = 2;
971 // for (auto edgeId=0;edgeId<numEdge;++edgeId)
972 // for (auto edgeOrt=0;edgeOrt<numOrt;++edgeOrt) {
973 // const auto C = Impl::OrientationTools::getEdgeCoeffMatrix_HGRAD(lineBasis, cellBasis, edgeId, edgeOrt);
974 // MatrixData(0, edgeId, edgeOrt) = Kokkos::create_mirror_view(typename SpT::memory_space(), C);
975 // Kokkos::deep_copy(MatrixData(0, edgdId, edgeOrt), C);
976 // }
977 // }
978 // {
979 // const ordinal_type numFace = 4, numOrt = 6;
980 // for (auto faceId=0;faceId<numFace;++faceId)
981 // for (auto faceOrt=0;faceOrt<numOrt;++faceOrt) {
982 // const auto C = Impl::OrientationTools::getTriangleCoeffMatrix_HGRAD(faceBasis, cellBasis, faceId, faceOrt);
983 // MatrixData(1, faceId, faceOrt) = Kokkos::create_mirror_view(typename SpT::memory_space(), C);
984 // Kokkos::deep_copy(MatrixData(1, faceId, faceOrt), C);
985 // }
986 // }
987 // break;
988 // }
989 // default: {
990 // INTREPID2_TEST_FOR_EXCEPTION( true, std::invalid_argument,
991 // ">>> ERROR (Intrepid::OrientationTools::initQuadrilateral): Invalid function space.");
992 // break;
993 // }
994 // }
995 // }
static void getCoeffMatrix_HDIV(OutputViewType &output, const subcellBasisType subcellBasis, const cellBasisType cellBasis, const ordinal_type subcellId, const ordinal_type subcellOrt)
Compute coefficient matrix for HDIV by collocating point values.
static void getCoeffMatrix_HCURL(OutputViewType &output, const subcellBasisType subcellBasis, const cellBasisType cellBasis, const ordinal_type subcellId, const ordinal_type subcellOrt)
Compute coefficient matrix for HCURL by collocating point values.
static void clearCoeffMatrix()
Clear coefficient matrix.
static void getCoeffMatrix_HGRAD(OutputViewType &output, const subcellBasisType subcellBasis, const cellBasisType cellBasis, const ordinal_type subcellId, const ordinal_type subcellOrt)
Compute coefficient matrix for HGRAD by collocating point values.
static CoeffMatrixDataViewType createCoeffMatrix(const BasisType *basis)
Create coefficient matrix.