|
Intrepid
|
00001 #ifndef INTREPID_HGRAD_WEDGE_I2_FEMDEF_HPP 00002 #define INTREPID_HGRAD_WEDGE_I2_FEMDEF_HPP 00003 // @HEADER 00004 // ************************************************************************ 00005 // 00006 // Intrepid Package 00007 // Copyright (2007) Sandia Corporation 00008 // 00009 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00010 // license for use of this work by or on behalf of the U.S. Government. 00011 // 00012 // Redistribution and use in source and binary forms, with or without 00013 // modification, are permitted provided that the following conditions are 00014 // met: 00015 // 00016 // 1. Redistributions of source code must retain the above copyright 00017 // notice, this list of conditions and the following disclaimer. 00018 // 00019 // 2. Redistributions in binary form must reproduce the above copyright 00020 // notice, this list of conditions and the following disclaimer in the 00021 // documentation and/or other materials provided with the distribution. 00022 // 00023 // 3. Neither the name of the Corporation nor the names of the 00024 // contributors may be used to endorse or promote products derived from 00025 // this software without specific prior written permission. 00026 // 00027 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY 00028 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00029 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00030 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE 00031 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00032 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00033 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00034 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00035 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00036 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00037 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00038 // 00039 // Questions? Contact Pavel Bochev (pbboche@sandia.gov) 00040 // Denis Ridzal (dridzal@sandia.gov), or 00041 // Kara Peterson (kjpeter@sandia.gov) 00042 // 00043 // ************************************************************************ 00044 // @HEADER 00045 00051 namespace Intrepid { 00052 00053 template<class Scalar, class ArrayScalar> 00054 Basis_HGRAD_WEDGE_I2_FEM<Scalar, ArrayScalar>::Basis_HGRAD_WEDGE_I2_FEM() 00055 { 00056 this -> basisCardinality_ = 15; 00057 this -> basisDegree_ = 2; 00058 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Wedge<6> >() ); 00059 this -> basisType_ = BASIS_FEM_DEFAULT; 00060 this -> basisCoordinates_ = COORDINATES_CARTESIAN; 00061 this -> basisTagsAreSet_ = false; 00062 } 00063 00064 00065 template<class Scalar, class ArrayScalar> 00066 void Basis_HGRAD_WEDGE_I2_FEM<Scalar, ArrayScalar>::initializeTags() { 00067 00068 // Basis-dependent intializations 00069 int tagSize = 4; // size of DoF tag 00070 int posScDim = 0; // position in the tag, counting from 0, of the subcell dim 00071 int posScOrd = 1; // position in the tag, counting from 0, of the subcell ordinal 00072 int posDfOrd = 2; // position in the tag, counting from 0, of DoF ordinal relative to the subcell 00073 00074 // An array with local DoF tags assigned to basis functions, in the order of their local enumeration 00075 int tags[] = { 0, 0, 0, 1, 00076 0, 1, 0, 1, 00077 0, 2, 0, 1, 00078 0, 3, 0, 1, 00079 0, 4, 0, 1, 00080 0, 5, 0, 1, 00081 1, 0, 0, 1, 00082 1, 1, 0, 1, 00083 1, 2, 0, 1, 00084 1, 6, 0, 1, 00085 1, 7, 0, 1, 00086 1, 8, 0, 1, 00087 1, 3, 0, 1, 00088 1, 4, 0, 1, 00089 1, 5, 0, 1, 00090 }; 00091 00092 // Basis-independent function sets tag and enum data in tagToOrdinal_ and ordinalToTag_ arrays: 00093 Intrepid::setOrdinalTagData(this -> tagToOrdinal_, 00094 this -> ordinalToTag_, 00095 tags, 00096 this -> basisCardinality_, 00097 tagSize, 00098 posScDim, 00099 posScOrd, 00100 posDfOrd); 00101 } 00102 00103 00104 00105 template<class Scalar, class ArrayScalar> 00106 void Basis_HGRAD_WEDGE_I2_FEM<Scalar, ArrayScalar>::getValues(ArrayScalar & outputValues, 00107 const ArrayScalar & inputPoints, 00108 const EOperator operatorType) const { 00109 00110 // Verify arguments 00111 #ifdef HAVE_INTREPID_DEBUG 00112 Intrepid::getValues_HGRAD_Args<Scalar, ArrayScalar>(outputValues, 00113 inputPoints, 00114 operatorType, 00115 this -> getBaseCellTopology(), 00116 this -> getCardinality() ); 00117 #endif 00118 00119 // Number of evaluation points = dim 0 of inputPoints 00120 int dim0 = inputPoints.dimension(0); 00121 00122 // Temporaries: (x,y,z) coordinates of the evaluation point 00123 Scalar x = 0.0; 00124 Scalar y = 0.0; 00125 Scalar z = 0.0; 00126 Scalar w = 0.0; 00127 00128 switch (operatorType) { 00129 00130 case OPERATOR_VALUE: 00131 for (int i0 = 0; i0 < dim0; i0++) { 00132 x = inputPoints(i0, 0); 00133 y = inputPoints(i0, 1); 00134 z = inputPoints(i0, 2); 00135 w = 1.0 - x - y; 00136 00137 // outputValues is a rank-2 array with dimensions (basisCardinality_, dim0) 00138 outputValues(0, i0) = 0.5 * w *(2.0*w - 2.0 - z)*(1.0 - z); 00139 outputValues(1, i0) = 0.5 * x *(2.0*x - 2.0 - z)*(1.0 - z); 00140 outputValues(2, i0) = 0.5 * y *(2.0*y - 2.0 - z)*(1.0 - z); 00141 outputValues(3, i0) = 0.5 * w *(2.0*w - 2.0 + z)*(1.0 + z); 00142 outputValues(4, i0) = 0.5 * x *(2.0*x - 2.0 + z)*(1.0 + z); 00143 outputValues(5, i0) = 0.5 * y *(2.0*y - 2.0 + z)*(1.0 + z); 00144 00145 outputValues(6, i0) = 2.0 * w * x * (1.0 - z); 00146 outputValues(7, i0) = 2.0 * x * y * (1.0 - z); 00147 outputValues(8, i0) = 2.0 * y * w * (1.0 - z); 00148 outputValues(9, i0) = w * (1.0 - z*z); 00149 outputValues(10,i0) = x * (1.0 - z*z); 00150 outputValues(11,i0) = y * (1.0 - z*z); 00151 outputValues(12,i0) = 2.0 * w * x * (1.0 + z); 00152 outputValues(13,i0) = 2.0 * x * y * (1.0 + z); 00153 outputValues(14,i0) = 2.0 * y * w * (1.0 + z); 00154 } 00155 break; 00156 00157 case OPERATOR_GRAD: 00158 case OPERATOR_D1: 00159 for (int i0 = 0; i0 < dim0; i0++) { 00160 x = inputPoints(i0,0); 00161 y = inputPoints(i0,1); 00162 z = inputPoints(i0,2); 00163 w = 1.0 - x - y; 00164 00165 // outputValues is a rank-3 array with dimensions (basisCardinality_, dim0, spaceDim) 00166 outputValues(0, i0, 0) = -(2.0*w - 1.0 - 0.5*z)*(1.0 - z); 00167 outputValues(0, i0, 1) = -(2.0*w - 1.0 - 0.5*z)*(1.0 - z); 00168 outputValues(0, i0, 2) = -0.5*w*(2.0*w - 1.0 - 2.0*z); 00169 00170 outputValues(1, i0, 0) = (2.0*x - 1.0 - 0.5*z)*(1.0 - z); 00171 outputValues(1, i0, 1) = 0.0; 00172 outputValues(1, i0, 2) = -0.5*x*(2.0*x - 1.0 - 2.0*z); 00173 00174 outputValues(2, i0, 0) = 0.0; 00175 outputValues(2, i0, 1) = (2.0*y - 1.0 - 0.5*z)*(1.0 - z); 00176 outputValues(2, i0, 2) = -0.5*y*(2.0*y - 1.0 - 2.0*z); 00177 00178 outputValues(3, i0, 0) = -(2.0*w - 1.0 + 0.5*z)*(1.0 + z); 00179 outputValues(3, i0, 1) = -(2.0*w - 1.0 + 0.5*z)*(1.0 + z); 00180 outputValues(3, i0, 2) = 0.5*w*(2.0*w - 1.0 + 2.0*z); 00181 00182 outputValues(4, i0, 0) = (2.0*x - 1.0 + 0.5*z)*(1.0 + z); 00183 outputValues(4, i0, 1) = 0.0; 00184 outputValues(4, i0, 2) = 0.5*x*(2.0*x - 1.0 + 2.0*z); 00185 00186 outputValues(5, i0, 0) = 0.0; 00187 outputValues(5, i0, 1) = (2.0*y - 1.0 + 0.5*z)*(1.0 + z); 00188 outputValues(5, i0, 2) = 0.5*y*(2.0*y - 1.0 + 2.0*z); 00189 00190 outputValues(6, i0, 0) = 2.0*(w - x)*(1.0 - z); 00191 outputValues(6, i0, 1) = -2.0*x*(1.0 - z); 00192 outputValues(6, i0, 2) = -2.0*x*w; 00193 00194 outputValues(7, i0, 0) = 2.0*y*(1.0 - z); 00195 outputValues(7, i0, 1) = 2.0*x*(1.0 - z); 00196 outputValues(7, i0, 2) = -2.0*x*y; 00197 00198 outputValues(8, i0, 0) = -2.0*y*(1.0 - z); 00199 outputValues(8, i0, 1) = 2.0*(w - y)*(1.0 - z); 00200 outputValues(8, i0, 2) = -2.0*w*y; 00201 00202 outputValues(9, i0, 0) = -(1.0 - z*z); 00203 outputValues(9, i0, 1) = -(1.0 - z*z); 00204 outputValues(9, i0, 2) = -2.0*z*w; 00205 00206 outputValues(10,i0, 0) = (1.0 - z*z); 00207 outputValues(10,i0, 1) = 0.0; 00208 outputValues(10,i0, 2) = -2.0*z*x; 00209 00210 outputValues(11,i0, 0) = 0.0; 00211 outputValues(11,i0, 1) = (1.0 - z*z); 00212 outputValues(11,i0, 2) = -2.0*z*y; 00213 00214 outputValues(12,i0, 0) = 2.0*(w - x)*(1.0 + z); 00215 outputValues(12,i0, 1) = -2.0*x*(1.0 + z); 00216 outputValues(12,i0, 2) = 2.0*x*w; 00217 00218 outputValues(13,i0, 0) = 2.0*y*(1.0 + z); 00219 outputValues(13,i0, 1) = 2.0*x*(1.0 + z); 00220 outputValues(13,i0, 2) = 2.0*x*y; 00221 00222 outputValues(14,i0, 0) = -2.0*y*(1.0 + z); 00223 outputValues(14,i0, 1) = 2.0*(w - y)*(1.0 + z); 00224 outputValues(14,i0, 2) = 2.0*w*y; 00225 00226 } 00227 break; 00228 00229 case OPERATOR_CURL: 00230 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_CURL), std::invalid_argument, 00231 ">>> ERROR (Basis_HGRAD_WEDGE_I2_FEM): CURL is invalid operator for rank-0 (scalar) functions in 3D"); 00232 break; 00233 00234 case OPERATOR_DIV: 00235 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument, 00236 ">>> ERROR (Basis_HGRAD_WEDGE_I2_FEM): DIV is invalid operator for rank-0 (scalar) functions in 3D"); 00237 break; 00238 00239 case OPERATOR_D2: 00240 for (int i0 = 0; i0 < dim0; i0++) { 00241 x = inputPoints(i0,0); 00242 y = inputPoints(i0,1); 00243 z = inputPoints(i0,2); 00244 w = 1.0 - x - y; 00245 00246 outputValues(0, i0, 0) = 2.0*(1.0 - z); 00247 outputValues(0, i0, 1) = 2.0*(1.0 - z); 00248 outputValues(0, i0, 2) = 2.0*w - 0.5 - z; 00249 outputValues(0, i0, 3) = 2.0*(1.0-z); 00250 outputValues(0, i0, 4) = 2.0*w -0.5 - z; 00251 outputValues(0, i0, 5) = w; 00252 00253 outputValues(1, i0, 0) = 2.0*(1.0 - z); 00254 outputValues(1, i0, 1) = 0.; 00255 outputValues(1, i0, 2) = -2.0*x + 0.5 + z; 00256 outputValues(1, i0, 3) = 0.; 00257 outputValues(1, i0, 4) = 0.; 00258 outputValues(1, i0, 5) = x; 00259 00260 outputValues(2, i0, 0) = 0.; 00261 outputValues(2, i0, 1) = 0.; 00262 outputValues(2, i0, 2) = 0.; 00263 outputValues(2, i0, 3) = 2.0*(1.0 - z); 00264 outputValues(2, i0, 4) = -2.0*y + 0.5 + z; 00265 outputValues(2, i0, 5) = y; 00266 00267 outputValues(3, i0, 0) = 2.0*(1.0 + z); 00268 outputValues(3, i0, 1) = 2.0*(1.0 + z); 00269 outputValues(3, i0, 2) = -2.0*w + 0.5 - z; 00270 outputValues(3, i0, 3) = 2.0*(1.0 + z); 00271 outputValues(3, i0, 4) = -2.0*w + 0.5 - z; 00272 outputValues(3, i0, 5) = w; 00273 00274 outputValues(4, i0, 0) = 2.0*(1.0 + z); 00275 outputValues(4, i0, 1) = 0.; 00276 outputValues(4, i0, 2) = 2.0*x - 0.5 + z; 00277 outputValues(4, i0, 3) = 0.; 00278 outputValues(4, i0, 4) = 0.; 00279 outputValues(4, i0, 5) = x; 00280 00281 outputValues(5, i0, 0) = 0.; 00282 outputValues(5, i0, 1) = 0.; 00283 outputValues(5, i0, 2) = 0.; 00284 outputValues(5, i0, 3) = 2.0*(1.0 + z); 00285 outputValues(5, i0, 4) = 2.0*y - 0.5 + z; 00286 outputValues(5, i0, 5) = y; 00287 00288 outputValues(6, i0, 0) = -4.0*(1.0 - z); 00289 outputValues(6, i0, 1) = -2.0*(1.0 - z); 00290 outputValues(6, i0, 2) = -2.0*(w - x); 00291 outputValues(6, i0, 3) = 0.; 00292 outputValues(6, i0, 4) = 2.0*x; 00293 outputValues(6, i0, 5) = 0.; 00294 00295 outputValues(7, i0, 0) = 0.; 00296 outputValues(7, i0, 1) = 2.0*(1.0 - z); 00297 outputValues(7, i0, 2) = -2.0*y; 00298 outputValues(7, i0, 3) = 0.; 00299 outputValues(7, i0, 4) = -2.0*x; 00300 outputValues(7, i0, 5) = 0.; 00301 00302 outputValues(8, i0, 0) = 0.; 00303 outputValues(8, i0, 1) = -2.0*(1.0 - z); 00304 outputValues(8, i0, 2) = 2.0*y; 00305 outputValues(8, i0, 3) = -4.0*(1.0 - z); 00306 outputValues(8, i0, 4) = -2.0*(w - y); 00307 outputValues(8, i0, 5) = 0.; 00308 00309 outputValues(9, i0, 0) = 0.; 00310 outputValues(9, i0, 1) = 0.; 00311 outputValues(9, i0, 2) = 2.0*z; 00312 outputValues(9, i0, 3) = 0.; 00313 outputValues(9, i0, 4) = 2.0*z; 00314 outputValues(9, i0, 5) = -2.0*w; 00315 00316 outputValues(10,i0, 0) = 0.; 00317 outputValues(10,i0, 1) = 0.; 00318 outputValues(10,i0, 2) = -2.0*z; 00319 outputValues(10,i0, 3) = 0.; 00320 outputValues(10,i0, 4) = 0.; 00321 outputValues(10,i0, 5) = -2.0*x; 00322 00323 outputValues(11,i0, 0) = 0.; 00324 outputValues(11,i0, 1) = 0.; 00325 outputValues(11,i0, 2) = 0.; 00326 outputValues(11,i0, 3) = 0.; 00327 outputValues(11,i0, 4) = -2.0*z; 00328 outputValues(11,i0, 5) = -2.0*y; 00329 00330 outputValues(12,i0, 0) = -4.0*(1.0 + z); 00331 outputValues(12,i0, 1) = -2.0*(1.0 + z); 00332 outputValues(12,i0, 2) = 2.0*(w - x); 00333 outputValues(12,i0, 3) = 0.; 00334 outputValues(12,i0, 4) = -2.0*x; 00335 outputValues(12,i0, 5) = 0.; 00336 00337 outputValues(13,i0, 0) = 0.; 00338 outputValues(13,i0, 1) = 2.0*(1.0 + z); 00339 outputValues(13,i0, 2) = 2.0*y; 00340 outputValues(13,i0, 3) = 0.; 00341 outputValues(13,i0, 4) = 2.0*x; 00342 outputValues(13,i0, 5) = 0.; 00343 00344 outputValues(14,i0, 0) = 0.; 00345 outputValues(14,i0, 1) = -2.0*(1.0 + z); 00346 outputValues(14,i0, 2) = -2.0*y; 00347 outputValues(14,i0, 3) = -4.0*(1.0 + z); 00348 outputValues(14,i0, 4) = 2.0*(w - y); 00349 outputValues(14,i0, 5) = 0.; 00350 00351 } 00352 break; 00353 00354 case OPERATOR_D3: 00355 for (int i0 = 0; i0 < dim0; i0++) { 00356 x = inputPoints(i0,0); 00357 y = inputPoints(i0,1); 00358 z = inputPoints(i0,2); 00359 00360 outputValues(0, i0, 0) = 0.0; 00361 outputValues(0, i0, 1) = 0.0; 00362 outputValues(0, i0, 2) = -2.0; 00363 outputValues(0, i0, 3) = 0.0; 00364 outputValues(0, i0, 4) = -2.0; 00365 outputValues(0, i0, 5) = -1.0; 00366 outputValues(0, i0, 6) = 0.0; 00367 outputValues(0, i0, 7) = -2.0; 00368 outputValues(0, i0, 8) = -1.0; 00369 outputValues(0, i0, 9) = 0.0; 00370 00371 outputValues(1, i0, 0) = 0.0; 00372 outputValues(1, i0, 1) = 0.0; 00373 outputValues(1, i0, 2) = -2.0; 00374 outputValues(1, i0, 3) = 0.0; 00375 outputValues(1, i0, 4) = 0.0; 00376 outputValues(1, i0, 5) = -1.0; 00377 outputValues(1, i0, 6) = 0.0; 00378 outputValues(1, i0, 7) = 0.0; 00379 outputValues(1, i0, 8) = 0.0; 00380 outputValues(1, i0, 9) = 0.0; 00381 00382 outputValues(2, i0, 0) = 0.0; 00383 outputValues(2, i0, 1) = 0.0; 00384 outputValues(2, i0, 2) = 0.0; 00385 outputValues(2, i0, 3) = 0.0; 00386 outputValues(2, i0, 4) = 0.0; 00387 outputValues(2, i0, 5) = 0.0; 00388 outputValues(2, i0, 6) = 0.0; 00389 outputValues(2, i0, 7) = -2.0; 00390 outputValues(2, i0, 8) = -1.0; 00391 outputValues(2, i0, 9) = 0.0; 00392 00393 outputValues(3, i0, 0) = 0.0; 00394 outputValues(3, i0, 1) = 0.0; 00395 outputValues(3, i0, 2) = 2.0; 00396 outputValues(3, i0, 3) = 0.0; 00397 outputValues(3, i0, 4) = 2.0; 00398 outputValues(3, i0, 5) = -1.0; 00399 outputValues(3, i0, 6) = 0.0; 00400 outputValues(3, i0, 7) = 2.0; 00401 outputValues(3, i0, 8) = -1.0; 00402 outputValues(3, i0, 9) = 0.0; 00403 00404 outputValues(4, i0, 0) = 0.0; 00405 outputValues(4, i0, 1) = 0.0; 00406 outputValues(4, i0, 2) = 2.0; 00407 outputValues(4, i0, 3) = 0.0; 00408 outputValues(4, i0, 4) = 0.0; 00409 outputValues(4, i0, 5) = 1.0; 00410 outputValues(4, i0, 6) = 0.0; 00411 outputValues(4, i0, 7) = 0.0; 00412 outputValues(4, i0, 8) = 0.0; 00413 outputValues(4, i0, 9) = 0.0; 00414 00415 outputValues(5, i0, 0) = 0.0; 00416 outputValues(5, i0, 1) = 0.0; 00417 outputValues(5, i0, 2) = 0.0; 00418 outputValues(5, i0, 3) = 0.0; 00419 outputValues(5, i0, 4) = 0.0; 00420 outputValues(5, i0, 5) = 0.0; 00421 outputValues(5, i0, 6) = 0.0; 00422 outputValues(5, i0, 7) = 2.0; 00423 outputValues(5, i0, 8) = 1.0; 00424 outputValues(5, i0, 9) = 0.0; 00425 00426 outputValues(6, i0, 0) = 0.0; 00427 outputValues(6, i0, 1) = 0.0; 00428 outputValues(6, i0, 2) = 4.0; 00429 outputValues(6, i0, 3) = 0.0; 00430 outputValues(6, i0, 4) = 2.0; 00431 outputValues(6, i0, 5) = 0.0; 00432 outputValues(6, i0, 6) = 0.0; 00433 outputValues(6, i0, 7) = 0.0; 00434 outputValues(6, i0, 8) = 0.0; 00435 outputValues(6, i0, 9) = 0.0; 00436 00437 outputValues(7, i0, 0) = 0.0; 00438 outputValues(7, i0, 1) = 0.0; 00439 outputValues(7, i0, 2) = 0.0; 00440 outputValues(7, i0, 3) = 0.0; 00441 outputValues(7, i0, 4) = -2.0; 00442 outputValues(7, i0, 5) = 0.0; 00443 outputValues(7, i0, 6) = 0.0; 00444 outputValues(7, i0, 7) = 0.0; 00445 outputValues(7, i0, 8) = 0.0; 00446 outputValues(7, i0, 9) = 0.0; 00447 00448 outputValues(8, i0, 0) = 0.0; 00449 outputValues(8, i0, 1) = 0.0; 00450 outputValues(8, i0, 2) = 0.0; 00451 outputValues(8, i0, 3) = 0.0; 00452 outputValues(8, i0, 4) = 2.0; 00453 outputValues(8, i0, 5) = 0.0; 00454 outputValues(8, i0, 6) = 0.0; 00455 outputValues(8, i0, 7) = 4.0; 00456 outputValues(8, i0, 8) = 0.0; 00457 outputValues(8, i0, 9) = 0.0; 00458 00459 outputValues(9, i0, 0) = 0.0; 00460 outputValues(9, i0, 1) = 0.0; 00461 outputValues(9, i0, 2) = 0.0; 00462 outputValues(9, i0, 3) = 0.0; 00463 outputValues(9, i0, 4) = 0.0; 00464 outputValues(9, i0, 5) = 2.0; 00465 outputValues(9, i0, 6) = 0.0; 00466 outputValues(9, i0, 7) = 0.0; 00467 outputValues(9, i0, 8) = 2.0; 00468 outputValues(9, i0, 9) = 0.0; 00469 00470 outputValues(10,i0, 0) = 0.0; 00471 outputValues(10,i0, 1) = 0.0; 00472 outputValues(10,i0, 2) = 0.0; 00473 outputValues(10,i0, 3) = 0.0; 00474 outputValues(10,i0, 4) = 0.0; 00475 outputValues(10,i0, 5) = -2.0; 00476 outputValues(10,i0, 6) = 0.0; 00477 outputValues(10,i0, 7) = 0.0; 00478 outputValues(10,i0, 8) = 0.0; 00479 outputValues(10,i0, 9) = 0.0; 00480 00481 outputValues(11,i0, 0) = 0.0; 00482 outputValues(11,i0, 1) = 0.0; 00483 outputValues(11,i0, 2) = 0.0; 00484 outputValues(11,i0, 3) = 0.0; 00485 outputValues(11,i0, 4) = 0.0; 00486 outputValues(11,i0, 5) = 0.0; 00487 outputValues(11,i0, 6) = 0.0; 00488 outputValues(11,i0, 7) = 0.0; 00489 outputValues(11,i0, 8) = -2.0; 00490 outputValues(11,i0, 9) = 0.0; 00491 00492 outputValues(12,i0, 0) = 0.0; 00493 outputValues(12,i0, 1) = 0.0; 00494 outputValues(12,i0, 2) = -4.0; 00495 outputValues(12,i0, 3) = 0.0; 00496 outputValues(12,i0, 4) = -2.0; 00497 outputValues(12,i0, 5) = 0.0; 00498 outputValues(12,i0, 6) = 0.0; 00499 outputValues(12,i0, 7) = 0.0; 00500 outputValues(12,i0, 8) = 0.0; 00501 outputValues(12,i0, 9) = 0.0; 00502 00503 outputValues(13,i0, 0) = 0.0; 00504 outputValues(13,i0, 1) = 0.0; 00505 outputValues(13,i0, 2) = 0.0; 00506 outputValues(13,i0, 3) = 0.0; 00507 outputValues(13,i0, 4) = 2.0; 00508 outputValues(13,i0, 5) = 0.0; 00509 outputValues(13,i0, 6) = 0.0; 00510 outputValues(13,i0, 7) = 0.0; 00511 outputValues(13,i0, 8) = 0.0; 00512 outputValues(13,i0, 9) = 0.0; 00513 00514 outputValues(14,i0, 0) = 0.0; 00515 outputValues(14,i0, 1) = 0.0; 00516 outputValues(14,i0, 2) = 0.0; 00517 outputValues(14,i0, 3) = 0.0; 00518 outputValues(14,i0, 4) = -2.0; 00519 outputValues(14,i0, 5) = 0.0; 00520 outputValues(14,i0, 6) = 0.0; 00521 outputValues(14,i0, 7) = -4.0; 00522 outputValues(14,i0, 8) = 0.0; 00523 outputValues(14,i0, 9) = 0.0; 00524 00525 } 00526 break; 00527 00528 case OPERATOR_D4: 00529 case OPERATOR_D5: 00530 case OPERATOR_D6: 00531 case OPERATOR_D7: 00532 case OPERATOR_D8: 00533 case OPERATOR_D9: 00534 case OPERATOR_D10: 00535 { 00536 // outputValues is a rank-3 array with dimensions (basisCardinality_, dim0, DkCardinality) 00537 int DkCardinality = Intrepid::getDkCardinality(operatorType, 00538 this -> basisCellTopology_.getDimension() ); 00539 for(int dofOrd = 0; dofOrd < this -> basisCardinality_; dofOrd++) { 00540 for (int i0 = 0; i0 < dim0; i0++) { 00541 for(int dkOrd = 0; dkOrd < DkCardinality; dkOrd++){ 00542 outputValues(dofOrd, i0, dkOrd) = 0.0; 00543 } 00544 } 00545 } 00546 } 00547 break; 00548 00549 default: 00550 TEUCHOS_TEST_FOR_EXCEPTION( !( Intrepid::isValidOperator(operatorType) ), std::invalid_argument, 00551 ">>> ERROR (Basis_HGRAD_WEDGE_I2_FEM): Invalid operator type"); 00552 } 00553 } 00554 00555 00556 00557 template<class Scalar, class ArrayScalar> 00558 void Basis_HGRAD_WEDGE_I2_FEM<Scalar, ArrayScalar>::getValues(ArrayScalar& outputValues, 00559 const ArrayScalar & inputPoints, 00560 const ArrayScalar & cellVertices, 00561 const EOperator operatorType) const { 00562 TEUCHOS_TEST_FOR_EXCEPTION( (true), std::logic_error, 00563 ">>> ERROR (Basis_HGRAD_WEDGE_I2_FEM): FEM Basis calling an FVD member function"); 00564 } 00565 }// namespace Intrepid 00566 #endif
1.7.6.1