48 #ifndef __INTREPID2_HVOL_C0_FEM_DEF_HPP__
49 #define __INTREPID2_HVOL_C0_FEM_DEF_HPP__
55 template<EOperator opType>
56 template<
typename OutputViewType,
57 typename inputViewType>
58 KOKKOS_INLINE_FUNCTION
60 Basis_HVOL_C0_FEM::Serial<opType>::
61 getValues( OutputViewType output,
62 const inputViewType ) {
64 case OPERATOR_VALUE : {
65 output.access(0) = 1.0;
69 const ordinal_type jend = output.extent(1);
70 const ordinal_type iend = output.extent(0);
72 for (ordinal_type j=0;j<jend;++j)
73 for (ordinal_type i=0;i<iend;++i)
74 output.access(i, j) = 0.0;
78 INTREPID2_TEST_FOR_ABORT( opType != OPERATOR_VALUE &&
79 opType != OPERATOR_MAX,
80 ">>> ERROR: (Intrepid2::Basis_HVOL_C0_FEM::Serial::getValues) operator is not supported");
86 typename outputValueValueType,
class ...outputValueProperties,
87 typename inputPointValueType,
class ...inputPointProperties>
90 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
91 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
92 const EOperator operatorType ) {
93 typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
94 typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
95 typedef typename ExecSpace<typename inputPointViewType::execution_space,typename DT::execution_space>::ExecSpaceType ExecSpaceType;
98 const auto loopSize = inputPoints.extent(0);
99 Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
101 switch (operatorType) {
102 case OPERATOR_VALUE: {
103 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_VALUE> FunctorType;
104 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
120 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_MAX> FunctorType;
121 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
125 INTREPID2_TEST_FOR_EXCEPTION( !Intrepid2::isValidOperator(operatorType), std::invalid_argument,
126 ">>> ERROR (Basis_HVOL_C0_FEM): Invalid operator type");
132 template<
typename DT,
typename OT,
typename PT>
135 const ordinal_type spaceDim = cellTopo.getDimension();
137 this->basisCardinality_ = 1;
138 this->basisDegree_ = 0;
139 this->basisCellTopology_ = cellTopo;
140 this->basisType_ = Intrepid2::BASIS_FEM_DEFAULT;
141 this->basisCoordinates_ = Intrepid2::COORDINATES_CARTESIAN;
142 this->functionSpace_ = FUNCTION_SPACE_HVOL;
144 basisName_ =
"Intrepid2_HVOL_";
145 basisName_ += cellTopo.getName();
146 basisName_ +=
"_C0_FEM";
151 const ordinal_type tagSize = 4;
152 const ordinal_type posScDim = 0;
153 const ordinal_type posScOrd = 1;
154 const ordinal_type posDfOrd = 2;
157 ordinal_type tags[4] = { spaceDim, 0, 0, 1 };
159 OrdinalTypeArray1DHost tagView(&tags[0], 4);
161 this->setOrdinalTagData(this->tagToOrdinal_,
164 this->basisCardinality_,
172 Kokkos::DynRankView<typename ScalarViewType::value_type,typename DT::execution_space::array_layout,Kokkos::HostSpace>
173 dofCoords(
"dofCoordsHost", this->basisCardinality_, spaceDim);
177 this->dofCoords_ = Kokkos::create_mirror_view(
typename DT::memory_space(), dofCoords);
178 Kokkos::deep_copy(this->dofCoords_, dofCoords);
Basis_HVOL_C0_FEM()=delete
Constructor.