49 #ifndef __INTREPID2_HCURL_WEDGE_I1_FEM_DEF_HPP__ 
   50 #define __INTREPID2_HCURL_WEDGE_I1_FEM_DEF_HPP__ 
   57     template<EOperator opType>
 
   58     template<
typename OutputViewType,
 
   59              typename inputViewType>
 
   60     KOKKOS_INLINE_FUNCTION
 
   62     Basis_HCURL_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) = (1.0 - z)*(1.0 - y)/2.0;
 
   73         output.access(0, 1) = x*(1.0 - z)/2.0;
 
   74         output.access(0, 2) = 0.0;
 
   76         output.access(1, 0) = y*(z - 1.0)/2.0;
 
   77         output.access(1, 1) = x*(1.0 - z)/2.0;
 
   78         output.access(1, 2) = 0.0;
 
   80         output.access(2, 0) = y*(z - 1.0)/2.0;
 
   81         output.access(2, 1) = (1.0 - x)*(z - 1.0)/2.0;
 
   82         output.access(2, 2) = 0.0;
 
   84         output.access(3, 0) = (1.0 - y)*(1.0 + z)/2.0;
 
   85         output.access(3, 1) = x*(1.0 + z)/2.0;
 
   86         output.access(3, 2) = 0.0;
 
   88         output.access(4, 0) =-y*(1.0 + z)/2.0;
 
   89         output.access(4, 1) = x*(1.0 + z)/2.0;
 
   90         output.access(4, 2) = 0.0;
 
   92         output.access(5, 0) = -y*(1.0 + z)/2.0;
 
   93         output.access(5, 1) = (x - 1.0)*(1.0 + z)/2.0;
 
   94         output.access(5, 2) = 0.0;
 
   96         output.access(6, 0) = 0.0;
 
   97         output.access(6, 1) = 0.0;
 
   98         output.access(6, 2) = (1.0 - x - y)/2.0;
 
  100         output.access(7, 0) = 0.0;
 
  101         output.access(7, 1) = 0.0;
 
  102         output.access(7, 2) = x/2.0;
 
  104         output.access(8, 0) = 0.0;
 
  105         output.access(8, 1) = 0.0;
 
  106         output.access(8, 2) = y/2.0;
 
  109       case OPERATOR_CURL: {
 
  110         const auto x = input(0);
 
  111         const auto y = input(1);
 
  112         const auto z = input(2);
 
  114         output.access(0, 0) = x/2.0;
 
  115         output.access(0, 1) = (y - 1.0)/2.0;
 
  116         output.access(0, 2) = 1.0 - z;
 
  118         output.access(1, 0) = x/2.0;
 
  119         output.access(1, 1) = y/2.0;
 
  120         output.access(1, 2) = 1.0 - z;
 
  122         output.access(2, 0) = (x - 1.0)/2.0;
 
  123         output.access(2, 1) = y/2.0;
 
  124         output.access(2, 2) = 1.0 - z;
 
  126         output.access(3, 0) = -x/2.0;
 
  127         output.access(3, 1) = (1.0 - y)/2.0;
 
  128         output.access(3, 2) = 1.0 + z;
 
  130         output.access(4, 0) = -x/2.0;
 
  131         output.access(4, 1) = -y/2.0;
 
  132         output.access(4, 2) = 1.0 + z;
 
  134         output.access(5, 0) = (1.0 - x)/2.0;
 
  135         output.access(5, 1) = -y/2.0;
 
  136         output.access(5, 2) = 1.0 + z;
 
  138         output.access(6, 0) =-0.5;
 
  139         output.access(6, 1) = 0.5;
 
  140         output.access(6, 2) = 0.0;
 
  142         output.access(7, 0) = 0.0;
 
  143         output.access(7, 1) =-0.5;
 
  144         output.access(7, 2) = 0.0;
 
  146         output.access(8, 0) = 0.5;
 
  147         output.access(8, 1) = 0.0;
 
  148         output.access(8, 2) = 0.0;
 
  152         INTREPID2_TEST_FOR_ABORT( opType != OPERATOR_VALUE &&
 
  153                                   opType != OPERATOR_CURL,
 
  154                                   ">>> ERROR: (Intrepid2::Basis_HCURL_WEDGE_I1_FEM::Serial::getValues) operator is not supported");
 
  160     template<
typename SpT,
 
  161              typename outputValueValueType, 
class ...outputValueProperties,
 
  162              typename inputPointValueType,  
class ...inputPointProperties>
 
  163     void Basis_HCURL_WEDGE_I1_FEM::
 
  164     getValues(       Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
 
  165                const Kokkos::DynRankView<inputPointValueType, inputPointProperties...>  inputPoints,
 
  166                const EOperator operatorType )  {
 
  167       typedef          Kokkos::DynRankView<outputValueValueType,outputValueProperties...>         outputValueViewType;
 
  168       typedef          Kokkos::DynRankView<inputPointValueType, inputPointProperties...>          inputPointViewType;
 
  169       typedef typename ExecSpace<typename inputPointViewType::execution_space,SpT>::ExecSpaceType ExecSpaceType;
 
  172       const auto loopSize = inputPoints.extent(0);
 
  173       Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
 
  175       switch (operatorType) {
 
  176       case OPERATOR_VALUE: {
 
  177         typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_VALUE> FunctorType;
 
  178         Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
 
  181       case OPERATOR_CURL: {
 
  182         typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_CURL> FunctorType;
 
  183         Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
 
  187         INTREPID2_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument,
 
  188                                       ">>> ERROR (Basis_HCURL_WEDGE_I1_FEM): DIV is invalid operator for HCURL Basis Functions");
 
  191       case OPERATOR_GRAD: {
 
  192         INTREPID2_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_GRAD), std::invalid_argument,
 
  193                                       ">>> ERROR (Basis_HCURL_WEDGE_I1_FEM): GRAD is invalid operator for HCURL Basis Functions");
 
  206         INTREPID2_TEST_FOR_EXCEPTION( ( (operatorType == OPERATOR_D1)    ||
 
  207                                         (operatorType == OPERATOR_D2)    ||
 
  208                                         (operatorType == OPERATOR_D3)    ||
 
  209                                         (operatorType == OPERATOR_D4)    ||
 
  210                                         (operatorType == OPERATOR_D5)    ||
 
  211                                         (operatorType == OPERATOR_D6)    ||
 
  212                                         (operatorType == OPERATOR_D7)    ||
 
  213                                         (operatorType == OPERATOR_D8)    ||
 
  214                                         (operatorType == OPERATOR_D9)    ||
 
  215                                         (operatorType == OPERATOR_D10) ),
 
  216                                       std::invalid_argument,
 
  217                                       ">>> ERROR (Basis_HCURL_WEDGE_I1_FEM): Invalid operator type");
 
  221         INTREPID2_TEST_FOR_EXCEPTION( !(Intrepid2::isValidOperator(operatorType)),
 
  222                                       std::invalid_argument,
 
  223                                       ">>> ERROR (Basis_HCURL_WEDGE_I1_FEM): Invalid operator type");
 
  230   template<
typename SpT, 
typename OT, 
typename PT>
 
  233     this->basisCardinality_  = 9;
 
  234     this->basisDegree_       = 1;
 
  235     this->basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Wedge<6> >() );
 
  236     this->basisType_         = BASIS_FEM_DEFAULT;
 
  237     this->basisCoordinates_  = COORDINATES_CARTESIAN;
 
  238     this->functionSpace_     = FUNCTION_SPACE_HCURL;
 
  244       const ordinal_type tagSize  = 4;        
 
  245       const ordinal_type posScDim = 0;        
 
  246       const ordinal_type posScOrd = 1;        
 
  247       const ordinal_type posDfOrd = 2;        
 
  250       ordinal_type tags[36]  = {
 
  265       this->setOrdinalTagData(this->tagToOrdinal_,
 
  268                               this->basisCardinality_,
 
  275     Kokkos::DynRankView<typename ScalarViewType::value_type,typename SpT::array_layout,Kokkos::HostSpace>
 
  276       dofCoords(
"dofCoordsHost", this->basisCardinality_,this->basisCellTopology_.getDimension());
 
  278     dofCoords(0,0) =  0.5;  dofCoords(0,1) =  0.0;  dofCoords(0,2) = -1.0;
 
  279     dofCoords(1,0) =  0.5;  dofCoords(1,1) =  0.5;  dofCoords(1,2) = -1.0;
 
  280     dofCoords(2,0) =  0.0;  dofCoords(2,1) =  0.5;  dofCoords(2,2) = -1.0;
 
  281     dofCoords(3,0) =  0.5;  dofCoords(3,1) =  0.0;  dofCoords(3,2) =  1.0;
 
  282     dofCoords(4,0) =  0.5;  dofCoords(4,1) =  0.5;  dofCoords(4,2) =  1.0;
 
  283     dofCoords(5,0) =  0.0;  dofCoords(5,1) =  0.5;  dofCoords(5,2) =  1.0;
 
  284     dofCoords(6,0) =  0.0;  dofCoords(6,1) =  0.0;  dofCoords(6,2) =  0.0;
 
  285     dofCoords(7,0) =  1.0;  dofCoords(7,1) =  0.0;  dofCoords(7,2) =  0.0;
 
  286     dofCoords(8,0) =  0.0;  dofCoords(8,1) =  1.0;  dofCoords(8,2) =  0.0;
 
  288     this->dofCoords_ = Kokkos::create_mirror_view(
typename SpT::memory_space(), dofCoords);
 
  289     Kokkos::deep_copy(this->dofCoords_, dofCoords);
 
Kokkos::View< ordinal_type *, typename ExecSpaceType::array_layout, Kokkos::HostSpace > OrdinalTypeArray1DHost
View type for 1d host array. 
 
Basis_HCURL_WEDGE_I1_FEM()
Constructor.