00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00036 namespace Intrepid {
00037
00038 template<class Scalar, class ArrayScalar>
00039 Basis_HDIV_WEDGE_I1_FEM<Scalar,ArrayScalar>::Basis_HDIV_WEDGE_I1_FEM()
00040 {
00041 this -> basisCardinality_ = 5;
00042 this -> basisDegree_ = 1;
00043 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Wedge<6> >() );
00044 this -> basisType_ = BASIS_FEM_DEFAULT;
00045 this -> basisCoordinates_ = COORDINATES_CARTESIAN;
00046 this -> basisTagsAreSet_ = false;
00047 }
00048
00049 template<class Scalar, class ArrayScalar>
00050 void Basis_HDIV_WEDGE_I1_FEM<Scalar, ArrayScalar>::initializeTags() {
00051
00052
00053 int tagSize = 4;
00054 int posScDim = 0;
00055 int posScOrd = 1;
00056 int posDfOrd = 2;
00057
00058
00059 int tags[] = {
00060 2, 0, 0, 1,
00061 2, 1, 0, 1,
00062 2, 2, 0, 1,
00063 2, 3, 0, 1,
00064 2, 4, 0, 1
00065 };
00066
00067
00068 Intrepid::setOrdinalTagData(this -> tagToOrdinal_,
00069 this -> ordinalToTag_,
00070 tags,
00071 this -> basisCardinality_,
00072 tagSize,
00073 posScDim,
00074 posScOrd,
00075 posDfOrd);
00076 }
00077
00078
00079
00080 template<class Scalar, class ArrayScalar>
00081 void Basis_HDIV_WEDGE_I1_FEM<Scalar, ArrayScalar>::getValues(ArrayScalar & outputValues,
00082 const ArrayScalar & inputPoints,
00083 const EOperator operatorType) const {
00084
00085
00086 #ifdef HAVE_INTREPID_DEBUG
00087 Intrepid::getValues_HDIV_Args<Scalar, ArrayScalar>(outputValues,
00088 inputPoints,
00089 operatorType,
00090 this -> getBaseCellTopology(),
00091 this -> getCardinality() );
00092 #endif
00093
00094
00095 int dim0 = inputPoints.dimension(0);
00096
00097
00098 Scalar x = 0.0;
00099 Scalar y = 0.0;
00100 Scalar z = 0.0;
00101
00102 switch (operatorType) {
00103 case OPERATOR_VALUE:
00104 for (int i0 = 0; i0 < dim0; i0++) {
00105 x = inputPoints(i0, 0);
00106 y = inputPoints(i0, 1);
00107 z = inputPoints(i0, 2);
00108
00109
00110 outputValues(0, i0, 0) = x/2.0;
00111 outputValues(0, i0, 1) = (y - 1.0)/2.0;
00112 outputValues(0, i0, 2) = 0.0;
00113
00114 outputValues(1, i0, 0) = x/2.0;
00115 outputValues(1, i0, 1) = y/2.0;
00116 outputValues(1, i0, 2) = 0.0;
00117
00118 outputValues(2, i0, 0) = (x - 1.0)/2.0;
00119 outputValues(2, i0, 1) = y/2.0;
00120 outputValues(2, i0, 2) = 0.0;
00121
00122 outputValues(3, i0, 0) = 0.0;
00123 outputValues(3, i0, 1) = 0.0;
00124 outputValues(3, i0, 2) = z - 1.0;
00125
00126 outputValues(4, i0, 0) = 0.0;
00127 outputValues(4, i0, 1) = 0.0;
00128 outputValues(4, i0, 2) = 1.0 + z;
00129 }
00130 break;
00131
00132 case OPERATOR_DIV:
00133
00134 for (int i0 = 0; i0 < dim0; i0++) {
00135 outputValues(0, i0) = 1.0;
00136 outputValues(1, i0) = 1.0;
00137 outputValues(2, i0) = 1.0;
00138 outputValues(3, i0) = 1.0;
00139 outputValues(4, i0) = 1.0;
00140 }
00141 break;
00142
00143 case OPERATOR_CURL:
00144 TEST_FOR_EXCEPTION( (operatorType == OPERATOR_CURL), std::invalid_argument,
00145 ">>> ERROR (Basis_HDIV_WEDGE_I1_FEM): CURL is invalid operator for HDIV Basis Functions");
00146 break;
00147
00148 case OPERATOR_GRAD:
00149 TEST_FOR_EXCEPTION( (operatorType == OPERATOR_GRAD), std::invalid_argument,
00150 ">>> ERROR (Basis_HDIV_WEDGE_I1_FEM): GRAD is invalid operator for HDIV Basis Functions");
00151 break;
00152
00153 case OPERATOR_D1:
00154 case OPERATOR_D2:
00155 case OPERATOR_D3:
00156 case OPERATOR_D4:
00157 case OPERATOR_D5:
00158 case OPERATOR_D6:
00159 case OPERATOR_D7:
00160 case OPERATOR_D8:
00161 case OPERATOR_D9:
00162 case OPERATOR_D10:
00163 TEST_FOR_EXCEPTION( ( (operatorType == OPERATOR_D1) ||
00164 (operatorType == OPERATOR_D2) ||
00165 (operatorType == OPERATOR_D3) ||
00166 (operatorType == OPERATOR_D4) ||
00167 (operatorType == OPERATOR_D5) ||
00168 (operatorType == OPERATOR_D6) ||
00169 (operatorType == OPERATOR_D7) ||
00170 (operatorType == OPERATOR_D8) ||
00171 (operatorType == OPERATOR_D9) ||
00172 (operatorType == OPERATOR_D10) ),
00173 std::invalid_argument,
00174 ">>> ERROR (Basis_HDIV_WEDGE_I1_FEM): Invalid operator type");
00175 break;
00176
00177 default:
00178 TEST_FOR_EXCEPTION( ( (operatorType != OPERATOR_VALUE) &&
00179 (operatorType != OPERATOR_GRAD) &&
00180 (operatorType != OPERATOR_CURL) &&
00181 (operatorType != OPERATOR_DIV) &&
00182 (operatorType != OPERATOR_D1) &&
00183 (operatorType != OPERATOR_D2) &&
00184 (operatorType != OPERATOR_D3) &&
00185 (operatorType != OPERATOR_D4) &&
00186 (operatorType != OPERATOR_D5) &&
00187 (operatorType != OPERATOR_D6) &&
00188 (operatorType != OPERATOR_D7) &&
00189 (operatorType != OPERATOR_D8) &&
00190 (operatorType != OPERATOR_D9) &&
00191 (operatorType != OPERATOR_D10) ),
00192 std::invalid_argument,
00193 ">>> ERROR (Basis_HDIV_WEDGE_I1_FEM): Invalid operator type");
00194 }
00195 }
00196
00197
00198
00199 template<class Scalar, class ArrayScalar>
00200 void Basis_HDIV_WEDGE_I1_FEM<Scalar, ArrayScalar>::getValues(ArrayScalar& outputValues,
00201 const ArrayScalar & inputPoints,
00202 const ArrayScalar & cellVertices,
00203 const EOperator operatorType) const {
00204 TEST_FOR_EXCEPTION( (true), std::logic_error,
00205 ">>> ERROR (Basis_HDIV_WEDGE_I1_FEM): FEM Basis calling an FVD member function");
00206 }
00207
00208 }