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_HEX_I1_FEM<Scalar,ArrayScalar>::Basis_HDIV_HEX_I1_FEM()
00040 {
00041 this -> basisCardinality_ = 6;
00042 this -> basisDegree_ = 1;
00043 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Hexahedron<8> >() );
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_HEX_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 2, 5, 0, 1,
00066 };
00067
00068
00069 Intrepid::setOrdinalTagData(this -> tagToOrdinal_,
00070 this -> ordinalToTag_,
00071 tags,
00072 this -> basisCardinality_,
00073 tagSize,
00074 posScDim,
00075 posScOrd,
00076 posDfOrd);
00077 }
00078
00079
00080
00081 template<class Scalar, class ArrayScalar>
00082 void Basis_HDIV_HEX_I1_FEM<Scalar, ArrayScalar>::getValues(ArrayScalar & outputValues,
00083 const ArrayScalar & inputPoints,
00084 const EOperator operatorType) const {
00085
00086
00087 #ifdef HAVE_INTREPID_DEBUG
00088 Intrepid::getValues_HDIV_Args<Scalar, ArrayScalar>(outputValues,
00089 inputPoints,
00090 operatorType,
00091 this -> getBaseCellTopology(),
00092 this -> getCardinality() );
00093 #endif
00094
00095
00096 int dim0 = inputPoints.dimension(0);
00097
00098
00099 Scalar x = 0.0;
00100 Scalar y = 0.0;
00101 Scalar z = 0.0;
00102
00103 switch (operatorType) {
00104 case OPERATOR_VALUE:
00105 for (int i0 = 0; i0 < dim0; i0++) {
00106 x = inputPoints(i0, 0);
00107 y = inputPoints(i0, 1);
00108 z = inputPoints(i0, 2);
00109
00110
00111 outputValues(0, i0, 0) = 0.0;
00112 outputValues(0, i0, 1) = (y - 1.0)/8.0;
00113 outputValues(0, i0, 2) = 0.0;
00114
00115 outputValues(1, i0, 0) = (1.0 + x)/8.0;
00116 outputValues(1, i0, 1) = 0.0;
00117 outputValues(1, i0, 2) = 0.0;
00118
00119 outputValues(2, i0, 0) = 0.0;
00120 outputValues(2, i0, 1) = (1.0 + y)/8.0;
00121 outputValues(2, i0, 2) = 0.0;
00122
00123 outputValues(3, i0, 0) = (x - 1.0)/8.0;
00124 outputValues(3, i0, 1) = 0.0;
00125 outputValues(3, i0, 2) = 0.0;
00126
00127 outputValues(4, i0, 0) = 0.0;
00128 outputValues(4, i0, 1) = 0.0;
00129 outputValues(4, i0, 2) = (z - 1.0)/8.0;
00130
00131 outputValues(5, i0, 0) = 0.0;
00132 outputValues(5, i0, 1) = 0.0;
00133 outputValues(5, i0, 2) = (1.0 + z)/8.0;
00134 }
00135 break;
00136
00137 case OPERATOR_DIV:
00138
00139 for (int i0 = 0; i0 < dim0; i0++) {
00140 outputValues(0, i0) = 0.125;
00141 outputValues(1, i0) = 0.125;
00142 outputValues(2, i0) = 0.125;
00143 outputValues(3, i0) = 0.125;
00144 outputValues(4, i0) = 0.125;
00145 outputValues(5, i0) = 0.125;
00146 }
00147 break;
00148
00149 case OPERATOR_CURL:
00150 TEST_FOR_EXCEPTION( (operatorType == OPERATOR_CURL), std::invalid_argument,
00151 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): CURL is invalid operator for HDIV Basis Functions");
00152 break;
00153
00154 case OPERATOR_GRAD:
00155 TEST_FOR_EXCEPTION( (operatorType == OPERATOR_GRAD), std::invalid_argument,
00156 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): GRAD is invalid operator for HDIV Basis Functions");
00157 break;
00158
00159 case OPERATOR_D1:
00160 case OPERATOR_D2:
00161 case OPERATOR_D3:
00162 case OPERATOR_D4:
00163 case OPERATOR_D5:
00164 case OPERATOR_D6:
00165 case OPERATOR_D7:
00166 case OPERATOR_D8:
00167 case OPERATOR_D9:
00168 case OPERATOR_D10:
00169 TEST_FOR_EXCEPTION( ( (operatorType == OPERATOR_D1) ||
00170 (operatorType == OPERATOR_D2) ||
00171 (operatorType == OPERATOR_D3) ||
00172 (operatorType == OPERATOR_D4) ||
00173 (operatorType == OPERATOR_D5) ||
00174 (operatorType == OPERATOR_D6) ||
00175 (operatorType == OPERATOR_D7) ||
00176 (operatorType == OPERATOR_D8) ||
00177 (operatorType == OPERATOR_D9) ||
00178 (operatorType == OPERATOR_D10) ),
00179 std::invalid_argument,
00180 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): Invalid operator type");
00181 break;
00182
00183 default:
00184 TEST_FOR_EXCEPTION( ( (operatorType != OPERATOR_VALUE) &&
00185 (operatorType != OPERATOR_GRAD) &&
00186 (operatorType != OPERATOR_CURL) &&
00187 (operatorType != OPERATOR_DIV) &&
00188 (operatorType != OPERATOR_D1) &&
00189 (operatorType != OPERATOR_D2) &&
00190 (operatorType != OPERATOR_D3) &&
00191 (operatorType != OPERATOR_D4) &&
00192 (operatorType != OPERATOR_D5) &&
00193 (operatorType != OPERATOR_D6) &&
00194 (operatorType != OPERATOR_D7) &&
00195 (operatorType != OPERATOR_D8) &&
00196 (operatorType != OPERATOR_D9) &&
00197 (operatorType != OPERATOR_D10) ),
00198 std::invalid_argument,
00199 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): Invalid operator type");
00200 }
00201 }
00202
00203
00204
00205 template<class Scalar, class ArrayScalar>
00206 void Basis_HDIV_HEX_I1_FEM<Scalar, ArrayScalar>::getValues(ArrayScalar& outputValues,
00207 const ArrayScalar & inputPoints,
00208 const ArrayScalar & cellVertices,
00209 const EOperator operatorType) const {
00210 TEST_FOR_EXCEPTION( (true), std::logic_error,
00211 ">>> ERROR (Basis_HDIV_HEX_I1_FEM): FEM Basis calling an FVD member function");
00212 }
00213
00214 }