405 |
} |
} |
406 |
|
|
407 |
Data |
Data |
408 |
Data::wherePositive() const |
Data::wherePositive(double tol) const |
409 |
{ |
{ |
410 |
#if defined DOPROF |
#if defined DOPROF |
411 |
profData->where++; |
profData->where++; |
412 |
#endif |
#endif |
413 |
return escript::unaryOp(*this,bind2nd(greater<double>(),0.0)); |
return escript::unaryOp(*this,bind2nd(greater<double>(),0.0+tol)); |
414 |
} |
} |
415 |
|
|
416 |
Data |
Data |
417 |
Data::whereNegative() const |
Data::whereNegative(double tol) const |
418 |
{ |
{ |
419 |
#if defined DOPROF |
#if defined DOPROF |
420 |
profData->where++; |
profData->where++; |
421 |
#endif |
#endif |
422 |
return escript::unaryOp(*this,bind2nd(less<double>(),0.0)); |
return escript::unaryOp(*this,bind2nd(less<double>(),0.0-tol)); |
423 |
} |
} |
424 |
|
|
425 |
Data |
Data |
426 |
Data::whereNonNegative() const |
Data::whereNonNegative(double tol) const |
427 |
{ |
{ |
428 |
#if defined DOPROF |
#if defined DOPROF |
429 |
profData->where++; |
profData->where++; |
430 |
#endif |
#endif |
431 |
return escript::unaryOp(*this,bind2nd(greater_equal<double>(),0.0)); |
return escript::unaryOp(*this,bind2nd(greater_equal<double>(),0.0+tol)); |
432 |
} |
} |
433 |
|
|
434 |
Data |
Data |
435 |
Data::whereNonPositive() const |
Data::whereNonPositive(double tol) const |
436 |
{ |
{ |
437 |
#if defined DOPROF |
#if defined DOPROF |
438 |
profData->where++; |
profData->where++; |
439 |
#endif |
#endif |
440 |
return escript::unaryOp(*this,bind2nd(less_equal<double>(),0.0)); |
return escript::unaryOp(*this,bind2nd(less_equal<double>(),0.0-tol)); |
441 |
} |
} |
442 |
|
|
443 |
Data |
Data |
444 |
Data::whereZero() const |
Data::whereZero(double tol) const |
445 |
{ |
{ |
446 |
#if defined DOPROF |
#if defined DOPROF |
447 |
profData->where++; |
profData->where++; |
448 |
#endif |
#endif |
449 |
return escript::unaryOp(*this,bind2nd(equal_to<double>(),0.0)); |
Data dataAbs=abs(); |
450 |
|
return escript::unaryOp(dataAbs,bind2nd(less_equal<double>(),tol)); |
451 |
} |
} |
452 |
|
|
453 |
Data |
Data |
454 |
Data::whereNonZero() const |
Data::whereNonZero(double tol) const |
455 |
{ |
{ |
456 |
#if defined DOPROF |
#if defined DOPROF |
457 |
profData->where++; |
profData->where++; |
458 |
#endif |
#endif |
459 |
return escript::unaryOp(*this,bind2nd(not_equal_to<double>(),0.0)); |
Data dataAbs=abs(); |
460 |
|
return escript::unaryOp(dataAbs,bind2nd(greater<double>(),tol)); |
461 |
} |
} |
462 |
|
|
463 |
Data |
Data |