49#ifndef __INTREPID2_HCURL_QUAD_I1_FEM_DEF_HPP__
50#define __INTREPID2_HCURL_QUAD_I1_FEM_DEF_HPP__
58 template<EOperator opType>
59 template<
typename OutputViewType,
60 typename inputViewType>
61 KOKKOS_INLINE_FUNCTION
65 const inputViewType input ) {
67 case OPERATOR_VALUE: {
68 const auto x = input(0);
69 const auto y = input(1);
72 output.access(0, 0) = 0.5*(1.0 - y);
73 output.access(0, 1) = 0.0;
75 output.access(1, 0) = 0.0;
76 output.access(1, 1) = 0.5*(1.0 + x);
78 output.access(2, 0) = -0.5*(1.0 + y);
79 output.access(2, 1) = 0.0;
81 output.access(3, 0) = 0.0;
82 output.access(3, 1) = -0.5*(1.0 - x);
87 output.access(0) = 0.5;
88 output.access(1) = 0.5;
89 output.access(2) = 0.5;
90 output.access(3) = 0.5;
94 INTREPID2_TEST_FOR_ABORT( opType != OPERATOR_VALUE &&
95 opType != OPERATOR_CURL,
96 ">>> ERROR: (Intrepid2::Basis_HGRAD_QUAD_C1_FEM::Serial::getValues) operator is not supported");
101 template<
typename DT,
102 typename outputValueValueType,
class ...outputValueProperties,
103 typename inputPointValueType,
class ...inputPointProperties>
105 Basis_HCURL_QUAD_I1_FEM::
106 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
107 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
108 const EOperator operatorType ) {
109 typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
110 typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
111 typedef typename ExecSpace<typename inputPointViewType::execution_space,typename DT::execution_space>::ExecSpaceType ExecSpaceType;
114 const auto loopSize = inputPoints.extent(0);
115 Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
117 switch (operatorType) {
118 case OPERATOR_VALUE: {
120 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
123 case OPERATOR_CURL: {
125 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
129 INTREPID2_TEST_FOR_EXCEPTION( operatorType == OPERATOR_DIV, std::invalid_argument,
130 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM::getValues): DIV is invalid operator for HCURL Basis Functions");
133 case OPERATOR_GRAD: {
134 INTREPID2_TEST_FOR_EXCEPTION( operatorType == OPERATOR_GRAD, std::invalid_argument,
135 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM::getValues): GRAD is invalid operator for HCURL Basis Functions");
148 INTREPID2_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_D1) ||
149 (operatorType == OPERATOR_D2) ||
150 (operatorType == OPERATOR_D3) ||
151 (operatorType == OPERATOR_D4) ||
152 (operatorType == OPERATOR_D5) ||
153 (operatorType == OPERATOR_D6) ||
154 (operatorType == OPERATOR_D7) ||
155 (operatorType == OPERATOR_D8) ||
156 (operatorType == OPERATOR_D9) ||
157 (operatorType == OPERATOR_D10),
158 std::invalid_argument,
159 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM::getValues): Invalid operator type");
163 INTREPID2_TEST_FOR_EXCEPTION( (operatorType != OPERATOR_VALUE) &&
164 (operatorType != OPERATOR_GRAD) &&
165 (operatorType != OPERATOR_CURL) &&
166 (operatorType != OPERATOR_DIV) &&
167 (operatorType != OPERATOR_D1) &&
168 (operatorType != OPERATOR_D2) &&
169 (operatorType != OPERATOR_D3) &&
170 (operatorType != OPERATOR_D4) &&
171 (operatorType != OPERATOR_D5) &&
172 (operatorType != OPERATOR_D6) &&
173 (operatorType != OPERATOR_D7) &&
174 (operatorType != OPERATOR_D8) &&
175 (operatorType != OPERATOR_D9) &&
176 (operatorType != OPERATOR_D10),
177 std::invalid_argument,
178 ">>> ERROR (Basis_HCURL_QUAD_I1_FEM::getValues): Invalid operator type");
187 template<
typename DT,
typename OT,
typename PT>
192 this->
basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Quadrilateral<4> >() );
200 const ordinal_type tagSize = 4;
201 const ordinal_type posScDim = 0;
202 const ordinal_type posScOrd = 1;
203 const ordinal_type posDfOrd = 2;
206 ordinal_type tags[16] = { 1, 0, 0, 1,
213 OrdinalTypeArray1DHost tagView(&tags[0], 16);
227 Kokkos::DynRankView<typename ScalarViewType::value_type,typename DT::execution_space::array_layout,Kokkos::HostSpace>
230 dofCoords(0,0) = 0.0; dofCoords(0,1) = -1.0;
231 dofCoords(1,0) = 1.0; dofCoords(1,1) = 0.0;
232 dofCoords(2,0) = 0.0; dofCoords(2,1) = 1.0;
233 dofCoords(3,0) = -1.0; dofCoords(3,1) = 0.0;
235 this->
dofCoords_ = Kokkos::create_mirror_view(
typename DT::memory_space(), dofCoords);
236 Kokkos::deep_copy(this->
dofCoords_, dofCoords);
240 Kokkos::DynRankView<typename ScalarViewType::value_type,typename DT::execution_space::array_layout,Kokkos::HostSpace>
244 dofCoeffs(0,0) = 1.0; dofCoeffs(0,1) = 0.0;
245 dofCoeffs(1,0) = 0.0; dofCoeffs(1,1) = 1.0;
246 dofCoeffs(2,0) = -1.0; dofCoeffs(2,1) = 0.0;
247 dofCoeffs(3,0) = 0.0; dofCoeffs(3,1) = -1.0;
249 this->
dofCoeffs_ = Kokkos::create_mirror_view(
typename DT::memory_space(), dofCoeffs);
250 Kokkos::deep_copy(this->
dofCoeffs_, dofCoeffs);
Basis_HCURL_QUAD_I1_FEM()
Constructor.
ECoordinates basisCoordinates_
ordinal_type basisDegree_
void setOrdinalTagData(OrdinalTypeView3D &tagToOrdinal, OrdinalTypeView2D &ordinalToTag, const OrdinalTypeView1D tags, const ordinal_type basisCard, const ordinal_type tagSize, const ordinal_type posScDim, const ordinal_type posScOrd, const ordinal_type posDfOrd)
OrdinalTypeArray2DHost ordinalToTag_
Kokkos::DynRankView< scalarType, DeviceType > dofCoords_
Kokkos::DynRankView< scalarType, DeviceType > dofCoeffs_
ordinal_type basisCardinality_
OrdinalTypeArray3DHost tagToOrdinal_
shards::CellTopology basisCellTopology_
EFunctionSpace functionSpace_
See Intrepid2::Basis_HCURL_QUAD_I1_FEM.
See Intrepid2::Basis_HCURL_QUAD_I1_FEM.