FEDEM Solver
R8.0
Source code of the dynamics solver
|
#include <FFpCurve.H>
Classes | |
struct | PointData |
Public Types | |
enum | TimeOp { None , Min , Max , AMax , Mean , RMS } |
Public Member Functions | |
FFaEnumMapping (TimeOp) | |
FFpCurve (size_t nSpatialPoints=1) | |
FFpCurve (const FFpCurve &curve) | |
~FFpCurve () | |
FFpCurve & | operator= (const FFpCurve &)=delete |
void | clear () |
void | resize (size_t nSpatialPoints) |
void | unref (bool clearReadOp=false) |
bool | initAxis (const FFaResultDescription &desc, const std::string &oper, int axis) |
bool | initAxes (const std::vector< FFaResultDescription > &xdesc, const std::vector< FFaResultDescription > &ydesc, const std::string &xOper, const std::string &yOper, const std::pair< double, double > &tRange, const std::string &tOper, short int end1) |
int | getSpatialXaxisObject (size_t i) const |
const std::pair< double, double > & | getTimeRange () const |
bool | notReadThisFar (double &lastStep) const |
bool | findVarRefsAndOpers (FFrExtractor *extractor, std::string &errMsg) |
void | printPosition (std::ostream &os) const |
bool | loadTemporalData (double currentTime) |
bool | loadSpatialData (double currentTime, const double epsT=0.0) |
bool | loadCurrentSpatialX () |
void | finalizeTimeOp () |
bool | usingInitialXaxis () const |
bool | loadFileData (const std::string &filePath, const std::string &channel, std::string &errMsg, double minX=0.0, double maxX=-1.0) |
bool | combineData (int ID, const std::string &expression, const std::vector< FFpCurve * > &compCurves, const char **compNames, bool clipXdomain, std::string &message) |
bool | replaceByScaledShifted (const DFTparams &dft) |
bool | replaceByDerivative () |
bool | replaceByIntegral () |
bool | replaceByDFT (const DFTparams &dft, const std::string &cId, std::string &errMsg) |
bool | replaceByRainflow (const RFprm &rf, double toMPa, bool doPVXonly, const std::string &cId, std::string &errMsg) |
bool | getCurveStatistics (bool entire, double start, double stop, bool useScaledShifted, const DFTparams &dft, double &rms, double &avg, double &stdDev, double &integral, double &min, double &max, std::string &errMsg) const |
double | getDamage (const RFprm &rf, double toMPa, const FFpSNCurve &sn) |
bool | empty () const |
bool | hasDataChanged () const |
void | onDataPlotted () |
void | setDataChanged () |
std::vector< double > & | operator[] (int axis) |
const std::vector< double > & | getAxisData (int ax) const |
double | getValue (double x, bool &monotonX) const |
double | getXrange () const |
bool | inDomain (double x) const |
bool | clipX (double Xmin, double Xmax) |
bool | checkAxesSize () |
Private Types | |
enum | { X = 0 , Y = 1 , N_AXES = 2 } |
Private Member Functions | |
int | numberOfSamples (double delta, double start, double stop) const |
bool | sample (double start, double stop, double shift, double scale, bool subMean, size_t n, std::vector< double > &yOut, std::string &errMsg) const |
bool | performRainflowCalc (const RFprm &rf, bool doPVXonly=false) |
bool | reversePoints () |
Private Attributes | |
std::vector< PointData > | reader [N_AXES] |
std::string * | rdOper [N_AXES] |
std::vector< double > | points [N_AXES] |
std::vector< FFpCycle > | cycles |
RFprm | lastRF |
double | lastKey |
double | Xrange |
size_t | lastX |
size_t | timeSamples |
std::pair< double, double > | timeRange |
TimeOp | timeOper |
bool | useInitialXaxis |
short int | beamEndFlag |
bool | dataChanged |
bool | needRainflow |
Friends | |
std::ostream & | operator<< (std::ostream &os, const PointData &) |
enum FFpCurve::TimeOp |
|
inline |
FFpCurve::FFpCurve | ( | const FFpCurve & | curve | ) |
The copy constructor only copies the curve data, not reader data.
FFpCurve::~FFpCurve | ( | ) |
bool FFpCurve::checkAxesSize | ( | ) |
void FFpCurve::clear | ( | ) |
bool FFpCurve::clipX | ( | double | Xmin, |
double | Xmax | ||
) |
bool FFpCurve::combineData | ( | int | ID, |
const std::string & | expression, | ||
const std::vector< FFpCurve * > & | compCurves, | ||
const char ** | compNames, | ||
bool | clipXdomain, | ||
std::string & | message | ||
) |
|
inline |
|
inline |
void FFpCurve::finalizeTimeOp | ( | ) |
bool FFpCurve::findVarRefsAndOpers | ( | FFrExtractor * | extractor, |
std::string & | errMsg | ||
) |
|
inline |
bool FFpCurve::getCurveStatistics | ( | bool | entire, |
double | start, | ||
double | stop, | ||
bool | useScaledShifted, | ||
const DFTparams & | dft, | ||
double & | rms, | ||
double & | avg, | ||
double & | stdDev, | ||
double & | integral, | ||
double & | min, | ||
double & | max, | ||
std::string & | errMsg | ||
) | const |
Calculates statistical properties based on current curve data.
double FFpCurve::getDamage | ( | const RFprm & | rf, |
double | toMPa, | ||
const FFpSNCurve & | sn | ||
) |
Calculates the total damage based on the given S-N curve.
int FFpCurve::getSpatialXaxisObject | ( | size_t | i | ) | const |
|
inline |
double FFpCurve::getValue | ( | double | x, |
bool & | monotonX | ||
) | const |
|
inline |
|
inline |
bool FFpCurve::inDomain | ( | double | x | ) | const |
bool FFpCurve::initAxes | ( | const std::vector< FFaResultDescription > & | xdesc, |
const std::vector< FFaResultDescription > & | ydesc, | ||
const std::string & | xOper, | ||
const std::string & | yOper, | ||
const std::pair< double, double > & | tRange, | ||
const std::string & | tOper, | ||
short int | end1 | ||
) |
bool FFpCurve::initAxis | ( | const FFaResultDescription & | desc, |
const std::string & | oper, | ||
int | axis | ||
) |
bool FFpCurve::loadCurrentSpatialX | ( | ) |
bool FFpCurve::loadFileData | ( | const std::string & | filePath, |
const std::string & | channel, | ||
std::string & | errMsg, | ||
double | minX = 0.0 , |
||
double | maxX = -1.0 |
||
) |
bool FFpCurve::loadSpatialData | ( | double | currentTime, |
const double | epsT = 0.0 |
||
) |
bool FFpCurve::loadTemporalData | ( | double | currentTime | ) |
bool FFpCurve::notReadThisFar | ( | double & | lastStep | ) | const |
|
private |
The DFT function needs to be able to factor the number of samples cleanly so that largest factor (i.e. prime) is smaller than its set largest prime. This is why we're massaging the number of samples a bit.
|
inline |
|
inline |
|
private |
Performs peak valley extraction and rainflow counting on the curve point data.
void FFpCurve::printPosition | ( | std::ostream & | os | ) | const |
bool FFpCurve::replaceByDerivative | ( | ) |
bool FFpCurve::replaceByDFT | ( | const DFTparams & | dft, |
const std::string & | cId, | ||
std::string & | errMsg | ||
) |
bool FFpCurve::replaceByIntegral | ( | ) |
bool FFpCurve::replaceByRainflow | ( | const RFprm & | rf, |
double | toMPa, | ||
bool | doPVXonly, | ||
const std::string & | cId, | ||
std::string & | errMsg | ||
) |
bool FFpCurve::replaceByScaledShifted | ( | const DFTparams & | dft | ) |
void FFpCurve::resize | ( | size_t | nSpatialPoints | ) |
|
private |
|
private |
Between start and stop of domain in x, sample n times from y and put results in the yOut vector. Apply the given shift and scale to the sampled values. Also subtract sample mean from all sample values if so wanted. It is assumed that start is inside the span of the vector, and that the X-values are monotonically increasing.
void FFpCurve::setDataChanged | ( | ) |
void FFpCurve::unref | ( | bool | clearReadOp = false | ) |
|
inline |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |