49 #ifndef __INTREPID2_HDIV_WEDGE_I1_FEM_DEF_HPP__
50 #define __INTREPID2_HDIV_WEDGE_I1_FEM_DEF_HPP__
57 template<EOperator opType>
58 template<
typename outputViewType,
59 typename inputViewType>
60 KOKKOS_INLINE_FUNCTION
62 Basis_HDIV_WEDGE_I1_FEM::Serial<opType>::
63 getValues( outputViewType output,
64 const inputViewType input ) {
66 case OPERATOR_VALUE: {
67 const auto x = input(0);
68 const auto y = input(1);
69 const auto z = input(2);
72 output.access(0, 0) = x/2.0;
73 output.access(0, 1) = (y - 1.0)/2.0;
74 output.access(0, 2) = 0.0;
76 output.access(1, 0) = x/2.0;
77 output.access(1, 1) = y/2.0;
78 output.access(1, 2) = 0.0;
80 output.access(2, 0) = (x - 1.0)/2.0;
81 output.access(2, 1) = y/2.0;
82 output.access(2, 2) = 0.0;
84 output.access(3, 0) = 0.0;
85 output.access(3, 1) = 0.0;
86 output.access(3, 2) = z - 1.0;
88 output.access(4, 0) = 0.0;
89 output.access(4, 1) = 0.0;
90 output.access(4, 2) = 1.0 + z;
96 output.access(0) = 1.0;
97 output.access(1) = 1.0;
98 output.access(2) = 1.0;
99 output.access(3) = 1.0;
100 output.access(4) = 1.0;
104 INTREPID2_TEST_FOR_ABORT( opType != OPERATOR_VALUE &&
105 opType != OPERATOR_DIV,
106 ">>> ERROR: (Intrepid2::Basis_HDIV_WEDGE_I1_FEM::Serial::getValues) operator is not supported");
112 template<
typename SpT,
113 typename outputValueValueType,
class ...outputValueProperties,
114 typename inputPointValueType,
class ...inputPointProperties>
116 Basis_HDIV_WEDGE_I1_FEM::
117 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
118 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
119 const EOperator operatorType ) {
120 typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
121 typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
122 typedef typename ExecSpace<typename inputPointViewType::execution_space,SpT>::ExecSpaceType ExecSpaceType;
125 const auto loopSize = inputPoints.extent(0);
126 Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
128 switch (operatorType) {
130 case OPERATOR_VALUE: {
131 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_VALUE> FunctorType;
132 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
136 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_DIV> FunctorType;
137 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
141 INTREPID2_TEST_FOR_EXCEPTION( !( Intrepid2::isValidOperator(operatorType) ), std::invalid_argument,
142 ">>> ERROR (Basis_HDIV_WEDGE_I1_FEM): Invalid operator type");
151 template<
typename SpT,
typename OT,
typename PT>
154 this->basisCardinality_ = 5;
155 this->basisDegree_ = 1;
156 this->basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Wedge<6> >() );
157 this->basisType_ = BASIS_FEM_DEFAULT;
158 this->basisCoordinates_ = COORDINATES_CARTESIAN;
163 const ordinal_type tagSize = 4;
164 const ordinal_type posScDim = 0;
165 const ordinal_type posScOrd = 1;
166 const ordinal_type posDfOrd = 2;
169 ordinal_type tags[20] = { 2, 0, 0, 1,
181 this->setOrdinalTagData(this->tagToOrdinal_,
184 this->basisCardinality_,
192 Kokkos::DynRankView<typename scalarViewType::value_type,typename SpT::array_layout,Kokkos::HostSpace>
193 dofCoords(
"dofCoordsHost", this->basisCardinality_,this->basisCellTopology_.getDimension());
195 dofCoords(0,0) = 0.5; dofCoords(0,1) = 0.0; dofCoords(0,2) = 0.0;
196 dofCoords(1,0) = 0.5; dofCoords(1,1) = 0.5; dofCoords(1,2) = 0.0;
197 dofCoords(2,0) = 0.0; dofCoords(2,1) = 0.5; dofCoords(2,2) = 0.0;
198 dofCoords(3,0) = 1.0/3.0; dofCoords(3,1) = 1.0/3.0; dofCoords(3,2) = -1.0;
199 dofCoords(4,0) = 1.0/3.0; dofCoords(4,1) = 1.0/3.0; dofCoords(4,2) = 1.0;
201 this->dofCoords_ = Kokkos::create_mirror_view(
typename SpT::memory_space(), dofCoords);
202 Kokkos::deep_copy(this->dofCoords_, dofCoords);
Kokkos::View< ordinal_type *,typename ExecSpaceType::array_layout, Kokkos::HostSpace > ordinal_type_array_1d_host
View type for 1d host array.
Basis_HDIV_WEDGE_I1_FEM()
Constructor.