49#ifndef __INTREPID2_HGRAD_LINE_C1_FEM_DEF_HPP__
50#define __INTREPID2_HGRAD_LINE_C1_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);
70 output.access(0) = (1.0 - x)/2.0;
71 output.access(1) = (1.0 + x)/2.0;
74 case OPERATOR_GRAD : {
75 output.access(0, 0) = -0.5;
76 output.access(1, 0) = 0.5;
80 const ordinal_type jend = output.extent(1);
81 const ordinal_type iend = output.extent(0);
83 for (ordinal_type j=0;j<jend;++j)
84 for (ordinal_type i=0;i<iend;++i)
85 output.access(i, j) = 0.0;
89 INTREPID2_TEST_FOR_ABORT( opType != OPERATOR_VALUE &&
90 opType != OPERATOR_GRAD &&
91 opType != OPERATOR_MAX,
92 ">>> ERROR: (Intrepid2::Basis_HGRAD_LINE_C1_FEM::Serial::getValues) operator is not supported");
99 typename outputValueValueType,
class ...outputValueProperties,
100 typename inputPointValueType,
class ...inputPointProperties>
102 Basis_HGRAD_LINE_C1_FEM::
103 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
104 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
105 const EOperator operatorType ) {
106 typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
107 typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
108 typedef typename ExecSpace<typename inputPointViewType::execution_space,typename DT::execution_space>::ExecSpaceType ExecSpaceType;
111 const auto loopSize = inputPoints.extent(0);
112 Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
114 switch (operatorType) {
116 case OPERATOR_VALUE: {
118 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
126 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
139 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
143 INTREPID2_TEST_FOR_EXCEPTION( !Intrepid2::isValidOperator(operatorType), std::invalid_argument,
144 ">>> ERROR (Basis_HGRAD_LINE_C1_FEM): Invalid operator type");
155 template<
typename DT,
typename OT,
typename PT>
160 this->
basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Line<2> >() );
168 const ordinal_type tagSize = 4;
169 const ordinal_type posScDim = 0;
170 const ordinal_type posScOrd = 1;
171 const ordinal_type posDfOrd = 2;
174 ordinal_type tags[8] = { 0, 0, 0, 1,
178 OrdinalTypeArray1DHost tagView(&tags[0], 8);
201 Kokkos::DynRankView<typename ScalarViewType::value_type,typename DT::execution_space::array_layout,Kokkos::HostSpace>
204 dofCoords(0,0) = -1.0;
205 dofCoords(1,0) = 1.0;
207 this->
dofCoords_ = Kokkos::create_mirror_view(
typename DT::memory_space(), dofCoords);
208 Kokkos::deep_copy(this->
dofCoords_, dofCoords);
Basis_HGRAD_LINE_C1_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_
ordinal_type basisCardinality_
OrdinalTypeArray3DHost tagToOrdinal_
shards::CellTopology basisCellTopology_
EFunctionSpace functionSpace_
See Intrepid2::Basis_HGRAD_LINE_C1_FEM.
See Intrepid2::Basis_HGRAD_LINE_C1_FEM.