34 const scalar markFraction = markSpace_/(1 + markSpace_);
36 const scalar
phi = frequency_*(x - start_);
37 const scalar fraction = phi - floor(phi);
40 amplitude_->value(x)*(fraction < markFraction ? 1 : -1)
55 <<
"Integration is not defined for " <<
type() <<
" functions " 56 <<
"unless the amplitude is constant" 60 auto integral0 = [&](
const scalar
x)
62 const scalar markFraction = markSpace_/(1 + markSpace_);
64 const scalar
phi = frequency_*(
x - start_);
65 const scalar fraction = phi - floor(phi);
68 (2*amplitude_->value(
x)/frequency_)
70 markFraction*floor(phi + 1 - markFraction)
71 + fraction*(fraction < markFraction ? 1 : 0)
76 return integral0(x2) - integral0(x1) + level_->integral(x1, x2);
virtual Type integral(const scalar x1, const scalar x2) const
Integrate between two values.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual Type value(const scalar x) const
Return value.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.