#include <SpectralFunction.hpp>


Definition at line 46 of file SpectralFunction.hpp.
enum ScalarFunctionBase::Type [inherited] |
Definition at line 40 of file ScalarFunctionBase.hpp.
00040 { 00041 cfunction, 00042 constant, 00043 convection, 00044 dgfunction, 00045 femfunction, 00046 linearBasis, 00047 spectral, 00048 unaryMinus, 00049 00050 modulo, 00051 sum, 00052 difference, 00053 product, 00054 division, 00055 power, 00056 00057 min, 00058 max, 00059 00060 gt, 00061 ge, 00062 lt, 00063 le, 00064 ne, 00065 eq, 00066 and_, 00067 or_, 00068 xor_, 00069 00070 not_, 00071 00072 derivate, 00073 integrate, 00074 00075 normal, 00076 00077 domainCharacteristic, 00078 meshCharacteristic, 00079 objectCharacteristic, 00080 00081 composed, 00082 references, 00083 00084 FEM0, 00085 00086 undefined 00087 };
| SpectralFunction::SpectralFunction | ( | ConstReferenceCounting< SpectralMesh > | mesh | ) | [inline] |
Constructor
| mesh | mesh supporting the function |
Definition at line 479 of file SpectralFunction.hpp.
00481 : ScalarFunctionBase(ScalarFunctionBase::spectral), 00482 __values(mesh->numberOfVertices()), 00483 __mesh(mesh), 00484 __discretizationType(ScalarDiscretizationTypeBase::spectralLegendre), 00485 __intervalX(__mesh->shape().a()[0],__mesh->shape().b()[0]), 00486 __intervalY(__mesh->shape().a()[1],__mesh->shape().b()[1]), 00487 __intervalZ(__mesh->shape().a()[2],__mesh->shape().b()[2]), 00488 __transformX(__intervalX), 00489 __transformY(__intervalY), 00490 __transformZ(__intervalZ), 00491 __gaussLobattoX(GaussLobattoManager::instance().get(__mesh->degree(0)+1)), 00492 __gaussLobattoY(GaussLobattoManager::instance().get(__mesh->degree(1)+1)), 00493 __gaussLobattoZ(GaussLobattoManager::instance().get(__mesh->degree(2)+1)), 00494 __basisX(__mesh->degree(0)), 00495 __basisY(__mesh->degree(1)), 00496 __basisZ(__mesh->degree(2)) 00497 { 00498 ; 00499 }
| SpectralFunction::SpectralFunction | ( | ConstReferenceCounting< SpectralMesh > | mesh, | |
| const ScalarFunctionBase & | f | |||
| ) | [inline] |
Constructor
| mesh | mesh supporting the function | |
| f | function of initialization |
Definition at line 507 of file SpectralFunction.hpp.
00509 : ScalarFunctionBase(ScalarFunctionBase::spectral), 00510 __values((mesh->degree(0)+1)*(mesh->degree(1)+1)*(mesh->degree(2)+1)), 00511 __mesh(mesh), 00512 __discretizationType(ScalarDiscretizationTypeBase::spectralLegendre), 00513 __intervalX(__mesh->shape().a()[0],__mesh->shape().b()[0]), 00514 __intervalY(__mesh->shape().a()[1],__mesh->shape().b()[1]), 00515 __intervalZ(__mesh->shape().a()[2],__mesh->shape().b()[2]), 00516 __transformX(__intervalX), 00517 __transformY(__intervalY), 00518 __transformZ(__intervalZ), 00519 __gaussLobattoX(GaussLobattoManager::instance().get(__mesh->degree(0)+1)), 00520 __gaussLobattoY(GaussLobattoManager::instance().get(__mesh->degree(1)+1)), 00521 __gaussLobattoZ(GaussLobattoManager::instance().get(__mesh->degree(2)+1)), 00522 __basisX(__mesh->degree(0)), 00523 __basisY(__mesh->degree(1)), 00524 __basisZ(__mesh->degree(2)) 00525 { 00526 (*this) = f; 00527 }
| SpectralFunction::SpectralFunction | ( | const SpectralFunction & | f | ) | [inline, explicit] |
Copy constructor
| f | given function |
Definition at line 535 of file SpectralFunction.hpp.
00536 : ScalarFunctionBase(f), 00537 __values(f.__values), 00538 __mesh(f.__mesh), 00539 __discretizationType(f.__discretizationType), 00540 __intervalX(f.__intervalX), 00541 __intervalY(f.__intervalY), 00542 __intervalZ(f.__intervalZ), 00543 __transformX(f.__transformX), 00544 __transformY(f.__transformY), 00545 __transformZ(f.__transformZ), 00546 __gaussLobattoX(f.__gaussLobattoX), 00547 __gaussLobattoY(f.__gaussLobattoY), 00548 __gaussLobattoZ(f.__gaussLobattoZ), 00549 __basisX(f.__basisX), 00550 __basisY(f.__basisY), 00551 __basisZ(f.__basisZ) 00552 { 00553 ; 00554 }
| SpectralFunction::SpectralFunction | ( | ConstReferenceCounting< SpectralMesh > | mesh, | |
| const real_t & | d | |||
| ) | [inline] |
Constructor
| mesh | mesh supporting the function | |
| d | value of initialization |
Definition at line 562 of file SpectralFunction.hpp.
00564 : ScalarFunctionBase(ScalarFunctionBase::spectral), 00565 __values((mesh->degree(0)+1)*(mesh->degree(1)+1)*(mesh->degree(2)+1)), 00566 __mesh(mesh), 00567 __discretizationType(ScalarDiscretizationTypeBase::spectralLegendre), 00568 __intervalX(__mesh->shape().a()[0],__mesh->shape().b()[0]), 00569 __intervalY(__mesh->shape().a()[1],__mesh->shape().b()[1]), 00570 __intervalZ(__mesh->shape().a()[2],__mesh->shape().b()[2]), 00571 __transformX(__intervalX), 00572 __transformY(__intervalY), 00573 __transformZ(__intervalZ), 00574 __gaussLobattoX(GaussLobattoManager::instance().get(__mesh->degree(0)+1)), 00575 __gaussLobattoY(GaussLobattoManager::instance().get(__mesh->degree(1)+1)), 00576 __gaussLobattoZ(GaussLobattoManager::instance().get(__mesh->degree(2)+1)), 00577 __basisX(__mesh->degree(0)), 00578 __basisY(__mesh->degree(1)), 00579 __basisZ(__mesh->degree(2)) 00580 { 00581 (*this) = ScalarFunctionConstant(d); 00582 }
| SpectralFunction::SpectralFunction | ( | ConstReferenceCounting< SpectralMesh > | mesh, | |
| const Vector< real_t > & | values | |||
| ) | [inline] |
Constructor
| mesh | given mesh | |
| values | given values |
Definition at line 590 of file SpectralFunction.hpp.
References __values, ASSERT, and Vector< T >::size().
00593 : ScalarFunctionBase(ScalarFunctionBase::spectral), 00594 __values((mesh->degree(0)+1)*(mesh->degree(1)+1)*(mesh->degree(2)+1)), 00595 __mesh(mesh), 00596 __discretizationType(ScalarDiscretizationTypeBase::spectralLegendre), 00597 __intervalX(__mesh->shape().a()[0],__mesh->shape().b()[0]), 00598 __intervalY(__mesh->shape().a()[1],__mesh->shape().b()[1]), 00599 __intervalZ(__mesh->shape().a()[2],__mesh->shape().b()[2]), 00600 __transformX(__intervalX), 00601 __transformY(__intervalY), 00602 __transformZ(__intervalZ), 00603 __gaussLobattoX(GaussLobattoManager::instance().get(__mesh->degree(0)+1)), 00604 __gaussLobattoY(GaussLobattoManager::instance().get(__mesh->degree(1)+1)), 00605 __gaussLobattoZ(GaussLobattoManager::instance().get(__mesh->degree(2)+1)), 00606 __basisX(__mesh->degree(0)), 00607 __basisY(__mesh->degree(1)), 00608 __basisZ(__mesh->degree(2))/*((__mesh->degree(2))*/ 00609 { 00610 ASSERT(__values.size() == values.size()); 00611 __values = values; 00612 }

| SpectralFunction::~SpectralFunction | ( | ) | [inline] |
| std::ostream& SpectralFunction::__put | ( | std::ostream & | os | ) | const [inline, private, virtual] |
Overloading of the __put function
| os | given stream |
Implements ScalarFunctionBase.
Definition at line 96 of file SpectralFunction.hpp.
| const Vector<real_t>& SpectralFunction::values | ( | ) | const [inline] |
Read-only access to the set of values
Definition at line 108 of file SpectralFunction.hpp.
References __values.
Referenced by SpectralLegendreDiscretizer::assembleSecondMember().
00109 { 00110 return __values; 00111 }
| real_t& SpectralFunction::operator[] | ( | const size_t & | i | ) | [inline] |
access to the value at the ith degree of freedom
| i | number of the degree of freedom |
Definition at line 120 of file SpectralFunction.hpp.
References __values.
00121 { 00122 return __values[i]; 00123 }
| const real_t& SpectralFunction::operator[] | ( | const size_t & | i | ) | const [inline] |
Read only Access to the value at the ith degree of freedom
| i | number of the degree of freedom |
Definition at line 132 of file SpectralFunction.hpp.
References __values.
00133 { 00134 return __values[i]; 00135 }
| ConstReferenceCounting<SpectralMesh> SpectralFunction::mesh | ( | ) | const [inline] |
real-only access to the spectral mesh
Definition at line 142 of file SpectralFunction.hpp.
References __mesh.
Referenced by SolverExpression::execute(), and InstructionAffectation< FunctionExpression, FunctionVariable >::execute().
00143 { 00144 return __mesh; 00145 }
| bool SpectralFunction::canBeSimplified | ( | ) | const [inline, virtual] |
Checks if the function can be simplified
Implements ScalarFunctionBase.
Definition at line 152 of file SpectralFunction.hpp.
| const ScalarDiscretizationTypeBase::Type& SpectralFunction::discretizationType | ( | ) | const [inline] |
The type of the spectral function
Definition at line 162 of file SpectralFunction.hpp.
References __discretizationType.
00163 { 00164 return __discretizationType; 00165 }
| real_t SpectralFunction::operator() | ( | const TinyVector< 3, real_t > & | x | ) | const [inline, virtual] |
Evaluates the SpectralFunction at point x.
| x | the position of evaluation |
Implements ScalarFunctionBase.
Definition at line 174 of file SpectralFunction.hpp.
References __basisX, __basisY, __basisZ, __transformX, __transformY, __transformZ, __values, LegendreBasis::dimension(), LegendreBasis::getValues(), SpectralConformTransformation::inverse(), and ScalarFunctionBase::sum.
00175 { 00176 00177 Vector<real_t> baseValuesX(__basisX.dimension()); 00178 Vector<real_t> baseValuesY(__basisY.dimension()); 00179 Vector<real_t> baseValuesZ(__basisZ.dimension()); 00180 00181 __basisX.getValues(__transformX.inverse(x[0]),baseValuesX); 00182 __basisY.getValues(__transformY.inverse(x[1]),baseValuesY); 00183 __basisZ.getValues(__transformZ.inverse(x[2]),baseValuesZ); 00184 00185 size_t l = 0; 00186 real_t sum = 0; 00187 for (size_t i=0; i<__basisX.dimension(); ++i) { 00188 const real_t vi = baseValuesX[i]; 00189 for (size_t j=0;j<__basisY.dimension(); ++j) { 00190 const real_t vj = baseValuesY[j]; 00191 const real_t vi_vj = vi*vj; 00192 for (size_t k=0; k<__basisZ.dimension(); ++k) { 00193 const real_t vk = baseValuesZ[k]; 00194 const real_t vi_vj_vk = vi_vj * vk; 00195 sum += vi_vj_vk*__values[l]; 00196 l++; 00197 } 00198 } 00199 } 00200 00201 return sum; 00202 }

| void SpectralFunction::operator= | ( | const ScalarFunctionBase & | f | ) | [inline] |
Affects a function to a SpectralFunction
| f | original function |
Construction of the nodes
calculation of the value of function f at the nodes
calculation of the value of Legendre polynomials at the nodes
calculation of the L^2-projection of the function F
Taking into account of the renormalization of the legendre polynomials
Definition at line 209 of file SpectralFunction.hpp.
References __basisX, __basisY, __basisZ, __gaussLobattoX, __gaussLobattoY, __gaussLobattoZ, __mesh, __transformX, __transformY, __transformZ, __values, LegendreBasis::dimension(), LegendreBasis::getValues(), GaussLobatto::numberOfPoints(), and GaussLobatto::weight().
00210 { 00211 __values = 0; 00212 00217 Vector<real_t> nodesX(__gaussLobattoX.numberOfPoints()); 00218 for (size_t i=0; i<__gaussLobattoX.numberOfPoints(); ++i) { 00219 nodesX[i] = __transformX(__gaussLobattoX(i)); 00220 } 00221 00222 Vector<real_t> nodesY(__gaussLobattoY.numberOfPoints()); 00223 for (size_t i=0; i<__gaussLobattoY.numberOfPoints(); ++i) { 00224 nodesY[i] = __transformY(__gaussLobattoY(i)); 00225 } 00226 00227 Vector<real_t> nodesZ(__gaussLobattoZ.numberOfPoints()); 00228 for (size_t i=0; i<__gaussLobattoZ.numberOfPoints(); ++i) { 00229 nodesZ[i] = __transformZ(__gaussLobattoZ(i)); 00230 } 00231 00236 Vector<Vector<Vector<real_t> > > f_rst(__gaussLobattoX.numberOfPoints()); 00237 for (size_t r=0; r<__gaussLobattoX.numberOfPoints(); ++r) { 00238 f_rst[r].resize(__gaussLobattoY.numberOfPoints()); 00239 for (size_t s=0; s<__gaussLobattoY.numberOfPoints(); ++s) { 00240 f_rst[r][s].resize(__gaussLobattoZ.numberOfPoints()); 00241 f_rst[r][s] = 0; 00242 } 00243 } 00244 00245 for (size_t r=0; r < __gaussLobattoX.numberOfPoints(); ++r) { 00246 const real_t& x = nodesX[r]; 00247 for (size_t s=0; s < __gaussLobattoY.numberOfPoints(); ++s) { 00248 const real_t& y = nodesY[s]; 00249 for (size_t t=0; t < __gaussLobattoZ.numberOfPoints(); ++t) { 00250 const real_t& z = nodesZ[t]; 00251 f_rst[r][s][t] = f(x,y,z); 00252 } 00253 } 00254 } 00255 00260 Vector<Vector<real_t> > quadratureBaseValuesX(__gaussLobattoX.numberOfPoints()); 00261 for (size_t i=0; i < __gaussLobattoX.numberOfPoints(); ++i) { 00262 real_t xi= __gaussLobattoX(i); 00263 quadratureBaseValuesX[i].resize(__basisX.dimension()); 00264 __basisX.getValues(xi,quadratureBaseValuesX[i]); 00265 } 00266 00267 Vector<Vector<real_t> > quadratureBaseValuesY(__gaussLobattoY.numberOfPoints()); 00268 for (size_t j=0; j < __gaussLobattoY.numberOfPoints(); ++j) { 00269 real_t yj= __gaussLobattoY(j); 00270 quadratureBaseValuesY[j].resize(__basisY.dimension()); 00271 __basisY.getValues(yj,quadratureBaseValuesY[j]); 00272 } 00273 00274 Vector<Vector<real_t> > quadratureBaseValuesZ(__gaussLobattoZ.numberOfPoints()); 00275 for (size_t k=0; k < __gaussLobattoZ.numberOfPoints(); ++k) { 00276 real_t zk= __gaussLobattoZ(k); 00277 quadratureBaseValuesZ[k].resize(__basisZ.dimension()); 00278 __basisZ.getValues(zk,quadratureBaseValuesZ[k]); 00279 } 00280 00285 Vector<Vector<Vector<real_t> > > values_rsk(__gaussLobattoX.numberOfPoints()); 00286 for (size_t r=0; r<__gaussLobattoX.numberOfPoints(); ++r) { 00287 values_rsk[r].resize( __gaussLobattoY.numberOfPoints()); 00288 for (size_t s=0; s<__gaussLobattoY.numberOfPoints(); ++s) { 00289 values_rsk[r][s].resize( __basisZ.dimension()); 00290 values_rsk[r][s] = 0; 00291 } 00292 } 00293 00294 { 00295 for (size_t r=0; r < __gaussLobattoX.numberOfPoints(); ++r) { 00296 for (size_t s=0; s < __gaussLobattoY.numberOfPoints(); ++s) { 00297 for (size_t t=0; t < __gaussLobattoZ.numberOfPoints(); ++t) { 00298 const real_t& wt = __gaussLobattoZ.weight(t); 00299 const real_t value_rst = f_rst[r][s][t]* wt; 00300 for (size_t k=0; k<__basisZ.dimension(); ++k) { 00301 values_rsk[r][s][k] += value_rst * quadratureBaseValuesZ[t][k]; 00302 } 00303 } 00304 } 00305 } 00306 } 00307 00308 Vector<Vector<Vector<real_t> > > values_rjk(__gaussLobattoX.numberOfPoints()); 00309 for (size_t r=0; r<__gaussLobattoX.numberOfPoints(); ++r) { 00310 values_rjk[r].resize( __basisY.dimension()); 00311 for (size_t j=0; j<__basisY.dimension(); ++j) { 00312 values_rjk[r][j].resize( __basisZ.dimension()); 00313 values_rjk[r][j] = 0; 00314 } 00315 } 00316 00317 { 00318 for (size_t r=0; r < __gaussLobattoX.numberOfPoints(); ++r) { 00319 for (size_t s=0; s < __gaussLobattoY.numberOfPoints(); ++s) { 00320 const real_t& ws = __gaussLobattoY.weight(s); 00321 for (size_t k=0; k < __basisZ.dimension(); ++k) { 00322 const real_t value_rsk = values_rsk[r][s][k]* ws; 00323 for (size_t j=0; j<__basisY.dimension(); ++j) { 00324 values_rjk[r][j][k] += value_rsk * quadratureBaseValuesY[s][j]; 00325 } 00326 } 00327 } 00328 } 00329 } 00330 00331 { 00332 00333 for (size_t r=0; r < __gaussLobattoX.numberOfPoints(); ++r) { 00334 const real_t& wr = __gaussLobattoX.weight(r); 00335 //size_t l=0; 00336 for (size_t j=0; j < __basisY.dimension(); ++j) { 00337 for (size_t k=0; k < __basisZ.dimension(); ++k) { 00338 const real_t value_rjk = values_rjk[r][j][k]* wr; 00339 for (size_t i=0; i<__basisX.dimension(); ++i) { 00340 __values[__mesh->dofNumber(i,j,k)] += 00341 value_rjk * quadratureBaseValuesX[r][i]; 00342 // l++; 00343 } 00344 } 00345 } 00346 } 00347 } 00348 00352 // size_t l = 0; 00353 for (size_t i=0; i<__basisX.dimension(); ++i) { 00354 const real_t wi_8 = 1./8. * (2*i+1); 00355 for (size_t j=0;j<__basisY.dimension(); ++j) { 00356 const real_t wi_wj_8 = wi_8 * (2*j+1); 00357 for (size_t k=0; k<__basisZ.dimension(); ++k) { 00358 const real_t wi_wj_wk_8 = wi_wj_8 * (2*k+1); 00359 __values[__mesh->dofNumber(i,j,k)] *= wi_wj_wk_8; 00360 // l++; 00361 } 00362 } 00363 } 00364 }

| real_t SpectralFunction::dx | ( | const TinyVector< 3 > & | x | ) | const [inline] |
Evaluates first derivative of the function
| x | position of evaluation |
Definition at line 373 of file SpectralFunction.hpp.
References __basisX, __basisY, __basisZ, __transformX, __transformY, __transformZ, __values, LegendreBasis::dimension(), LegendreBasis::getDerivativeValues(), LegendreBasis::getValues(), SpectralConformTransformation::inverse(), SpectralConformTransformation::inverseDeterminant(), and ScalarFunctionBase::sum.
00374 { 00375 Vector<real_t> baseDerivativeValuesX(__basisX.dimension()); 00376 Vector<real_t> baseValuesY(__basisY.dimension()); 00377 Vector<real_t> baseValuesZ(__basisZ.dimension()); 00378 00379 __basisX.getDerivativeValues(__transformX.inverse(x[0]),baseDerivativeValuesX); 00380 __basisY.getValues(__transformY.inverse(x[1]),baseValuesY); 00381 __basisZ.getValues(__transformZ.inverse(x[2]),baseValuesZ); 00382 00383 size_t l = 0; 00384 real_t sum = 0; 00385 for (size_t i=0; i<__basisX.dimension(); ++i) { 00386 const real_t vi = baseDerivativeValuesX[i]; 00387 for (size_t j=0;j<__basisY.dimension(); ++j) { 00388 const real_t vj = baseValuesY[j]; 00389 const real_t vi_vj = vi*vj; 00390 for (size_t k=0; k<__basisZ.dimension(); ++k) { 00391 const real_t vk = baseValuesZ[k]; 00392 const real_t vi_vj_vk = vi_vj * vk; 00393 sum += vi_vj_vk*__values[l]; 00394 l++; 00395 } 00396 } 00397 } 00398 00399 return sum * __transformX.inverseDeterminant(); 00400 }

| real_t SpectralFunction::dy | ( | const TinyVector< 3 > & | x | ) | const [inline] |
Evaluates second derivative of the function
| x | position of evaluation |
Definition at line 409 of file SpectralFunction.hpp.
References __basisX, __basisY, __basisZ, __transformX, __transformY, __transformZ, __values, LegendreBasis::dimension(), LegendreBasis::getDerivativeValues(), LegendreBasis::getValues(), SpectralConformTransformation::inverse(), SpectralConformTransformation::inverseDeterminant(), and ScalarFunctionBase::sum.
00410 { 00411 Vector<real_t> baseValuesX(__basisX.dimension()); 00412 Vector<real_t> baseDerivativeValuesY(__basisY.dimension()); 00413 Vector<real_t> baseValuesZ(__basisZ.dimension()); 00414 00415 __basisX.getValues(__transformX.inverse(x[0]),baseValuesX); 00416 __basisY.getDerivativeValues(__transformY.inverse(x[1]),baseDerivativeValuesY); 00417 __basisZ.getValues(__transformZ.inverse(x[2]),baseValuesZ); 00418 00419 size_t l = 0; 00420 real_t sum = 0; 00421 for (size_t i=0; i<__basisX.dimension(); ++i) { 00422 const real_t vi = baseValuesX[i]; 00423 for (size_t j=0;j<__basisY.dimension(); ++j) { 00424 const real_t vj = baseDerivativeValuesY[j]; 00425 const real_t vi_vj = vi*vj; 00426 for (size_t k=0; k<__basisZ.dimension(); ++k) { 00427 const real_t vk = baseValuesZ[k]; 00428 const real_t vi_vj_vk = vi_vj * vk; 00429 sum += vi_vj_vk*__values[l]; 00430 l++; 00431 } 00432 } 00433 } 00434 00435 return sum * __transformY.inverseDeterminant(); 00436 }

| real_t SpectralFunction::dz | ( | const TinyVector< 3 > & | x | ) | const [inline] |
Evaluates third derivative of the function
| x | position of evaluation |
Definition at line 445 of file SpectralFunction.hpp.
References __basisX, __basisY, __basisZ, __transformX, __transformY, __transformZ, __values, LegendreBasis::dimension(), LegendreBasis::getDerivativeValues(), LegendreBasis::getValues(), SpectralConformTransformation::inverse(), SpectralConformTransformation::inverseDeterminant(), and ScalarFunctionBase::sum.
00446 { 00447 Vector<real_t> baseValuesX(__basisX.dimension()); 00448 Vector<real_t> baseValuesY(__basisY.dimension()); 00449 Vector<real_t> baseDerivativeValuesZ(__basisZ.dimension()); 00450 00451 __basisX.getValues(__transformX.inverse(x[0]),baseValuesX); 00452 __basisY.getValues(__transformY.inverse(x[1]),baseValuesY); 00453 __basisZ.getDerivativeValues(__transformZ.inverse(x[2]),baseDerivativeValuesZ); 00454 00455 size_t l = 0; 00456 real_t sum = 0; 00457 for (size_t i=0; i<__basisX.dimension(); ++i) { 00458 const real_t vi = baseValuesX[i]; 00459 for (size_t j=0;j<__basisY.dimension(); ++j) { 00460 const real_t vj = baseValuesY[j]; 00461 const real_t vi_vj = vi*vj; 00462 for (size_t k=0; k<__basisZ.dimension(); ++k) { 00463 const real_t vk = baseDerivativeValuesZ[k]; 00464 const real_t vi_vj_vk = vi_vj * vk; 00465 sum += vi_vj_vk*__values[l]; 00466 l++; 00467 } 00468 } 00469 } 00470 00471 return sum * __transformZ.inverseDeterminant(); 00472 }

| void ScalarFunctionBase::setName | ( | const std::string & | name | ) | [inline, inherited] |
Sets the name of the function
| name | name to give to this function |
Definition at line 109 of file ScalarFunctionBase.hpp.
References ScalarFunctionBase::__name.
Referenced by FunctionExpressionVariable::execute().
| const std::string& ScalarFunctionBase::name | ( | ) | const [inline, inherited] |
Gets the name of the function
Definition at line 119 of file ScalarFunctionBase.hpp.
References ScalarFunctionBase::__name.
00120 { 00121 return __name; 00122 }
| const Type& ScalarFunctionBase::type | ( | ) | const [inline, inherited] |
Read-only access to the type of the function
Definition at line 129 of file ScalarFunctionBase.hpp.
References ScalarFunctionBase::__type.
Referenced by WriterVTK::__fillCrossedComponent(), WriterMedit::__fillCrossedComponent(), ScalarFunctionBuilder::Simplifier::__getOperatorF1SimplifiedFunction(), ScalarFunctionBuilder::Simplifier::__getOperatorSimplifiedFunction(), WriterVTK::__proceed(), WriterMedit::__proceedData(), WriterRaw::__saveScalarFunction(), FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember(), InstructionAffectation< FunctionExpression, FunctionVariable >::execute(), FEMFunction< MeshType, FiniteElementTraits >::operator=(), and DGFunction< MeshType, FiniteElementTraits >::operator=().
00130 { 00131 return __type; 00132 }
| real_t ScalarFunctionBase::operator() | ( | const real_t & | x, | |
| const real_t & | y, | |||
| const real_t & | z | |||
| ) | const [inline, inherited] |
Evaluates the function at point 
| x | | |
| y | | |
| z | ![]() |
Definition at line 162 of file ScalarFunctionBase.hpp.
00165 { 00166 return this->operator()(TinyVector<3, real_t>(x,y,z)); 00167 }
| virtual real_t ScalarFunctionBase::dx | ( | const TinyVector< 3, real_t > & | x | ) | const [inline, virtual, inherited] |
Evaluates first derivative of the function
| x | position of evaluation |
at position
Definition at line 185 of file ScalarFunctionBase.hpp.
References ErrorHandler::normal.
00186 { 00187 std::stringstream errorMsg; 00188 00189 errorMsg << "cannot compute derivative of non discrete functions :-(\n"; 00190 errorMsg << "the function " << (*this) << " is not of that kind" 00191 << std::ends; 00192 00193 throw ErrorHandler(__FILE__,__LINE__, 00194 errorMsg.str(), 00195 ErrorHandler::normal); 00196 return 0; 00197 }
| virtual real_t ScalarFunctionBase::dy | ( | const TinyVector< 3, real_t > & | x | ) | const [inline, virtual, inherited] |
Evaluates second derivative of the function
| x | position of evaluation |
at position
Definition at line 206 of file ScalarFunctionBase.hpp.
References ErrorHandler::normal.
00207 { 00208 std::stringstream errorMsg; 00209 00210 errorMsg << "cannot compute derivative of non discrete functions :-(\n"; 00211 errorMsg << "the function " << (*this) << " is not of that kind" 00212 << std::ends; 00213 00214 throw ErrorHandler(__FILE__,__LINE__, 00215 errorMsg.str(), 00216 ErrorHandler::normal); 00217 return 0; 00218 }
| virtual real_t ScalarFunctionBase::dz | ( | const TinyVector< 3, real_t > & | x | ) | const [inline, virtual, inherited] |
Evaluates third derivative of the function
| x | position of evaluation |
at position
Definition at line 227 of file ScalarFunctionBase.hpp.
References ErrorHandler::normal.
00228 { 00229 std::stringstream errorMsg; 00230 00231 errorMsg << "cannot compute derivative of non discrete functions :-(\n"; 00232 errorMsg << "the function " << (*this) << " is not of that kind" 00233 << std::ends; 00234 00235 throw ErrorHandler(__FILE__,__LINE__, 00236 errorMsg.str(), 00237 ErrorHandler::normal); 00238 return 0; 00239 }
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const ScalarFunctionBase & | scalarFunction | |||
| ) | [friend, inherited] |
Writes the function scalarFunction to the stream os
| os | the output stream | |
| scalarFunction | the function to write |
Definition at line 142 of file ScalarFunctionBase.hpp.
00144 { 00145 if (scalarFunction.__name.size()>0) { 00146 os << scalarFunction.__name; 00147 return os; 00148 } else { 00149 return scalarFunction.__put(os); 00150 } 00151 }
Vector<real_t> SpectralFunction::__values [private] |
coefficients in the spectral basis
Definition at line 50 of file SpectralFunction.hpp.
Referenced by dx(), dy(), dz(), operator()(), operator=(), operator[](), SpectralFunction(), and values().
the mesh where the function leaves
Definition at line 54 of file SpectralFunction.hpp.
Referenced by mesh(), and operator=().
type of discretization
Definition at line 58 of file SpectralFunction.hpp.
Referenced by discretizationType().
const Interval SpectralFunction::__intervalX [private] |
interval in the
direction
Definition at line 60 of file SpectralFunction.hpp.
const Interval SpectralFunction::__intervalY [private] |
interval in the
direction
Definition at line 61 of file SpectralFunction.hpp.
const Interval SpectralFunction::__intervalZ [private] |
interval in the
direction
Definition at line 62 of file SpectralFunction.hpp.
const SpectralConformTransformation SpectralFunction::__transformX [private] |
geometric transformation of
to
Definition at line 65 of file SpectralFunction.hpp.
Referenced by dx(), dy(), dz(), operator()(), and operator=().
const SpectralConformTransformation SpectralFunction::__transformY [private] |
geometric transformation of
to
Definition at line 68 of file SpectralFunction.hpp.
Referenced by dx(), dy(), dz(), operator()(), and operator=().
const SpectralConformTransformation SpectralFunction::__transformZ [private] |
geometric transformation of
to
Definition at line 71 of file SpectralFunction.hpp.
Referenced by dx(), dy(), dz(), operator()(), and operator=().
const GaussLobatto& SpectralFunction::__gaussLobattoX [private] |
Quadrature points for
Definition at line 74 of file SpectralFunction.hpp.
Referenced by operator=().
const GaussLobatto& SpectralFunction::__gaussLobattoY [private] |
Quadrature points for
Definition at line 76 of file SpectralFunction.hpp.
Referenced by operator=().
const GaussLobatto& SpectralFunction::__gaussLobattoZ [private] |
Quadrature points for
Definition at line 78 of file SpectralFunction.hpp.
Referenced by operator=().
const LegendreBasis SpectralFunction::__basisX [private] |
Basis in the
direction
Definition at line 80 of file SpectralFunction.hpp.
Referenced by dx(), dy(), dz(), operator()(), and operator=().
const LegendreBasis SpectralFunction::__basisY [private] |
Basis in the
direction
Definition at line 81 of file SpectralFunction.hpp.
Referenced by dx(), dy(), dz(), operator()(), and operator=().
const LegendreBasis SpectralFunction::__basisZ [private] |
Basis in the
direction
Definition at line 82 of file SpectralFunction.hpp.
Referenced by dx(), dy(), dz(), operator()(), and operator=().
TinyVector<3, ConstReferenceCounting<Interval> > SpectralFunction::__interval [private] |
Definition at line 84 of file SpectralFunction.hpp.
TinyVector<3, ConstReferenceCounting<SpectralConformTransformation> > SpectralFunction::__transform [private] |
Definition at line 85 of file SpectralFunction.hpp.
TinyVector<3, ConstReferenceCounting<GaussLobatto> > SpectralFunction::__gaussLobatto [private] |
Definition at line 86 of file SpectralFunction.hpp.
TinyVector<3, ConstReferenceCounting<LegendreBasis> > SpectralFunction::__basis [private] |
Definition at line 87 of file SpectralFunction.hpp.
const Type ScalarFunctionBase::__type [protected, inherited] |
type of the function
Definition at line 90 of file ScalarFunctionBase.hpp.
Referenced by ScalarFunctionBase::type().
std::string ScalarFunctionBase::__name [protected, inherited] |
name of the function
Definition at line 92 of file ScalarFunctionBase.hpp.
Referenced by ScalarFunctionBase::name(), and ScalarFunctionBase::setName().
1.5.6