69 class SharedExpr :
public std::enable_shared_from_this<SharedExpr> {
74 ~SharedExpr(
void) {
delete m_expr; };
76 std::shared_ptr<const SharedExpr>
pCopy(
void)
const {
return shared_from_this(); };
79 typedef std::shared_ptr<const SharedExpr> SharedExprPtr_t;
81 SharedExprPtr_t m_expr;
95 virtual std::ostream&
Restart(std::ostream& out)
const;
118 val = m_expr->Get()->Eval().GetReal();
120 silent_cerr(
"StringDriveCaller::dGet(): " << e.
what() << std::endl);
144 virtual std::ostream&
Restart(std::ostream& out)
const;
198 virtual std::ostream&
Restart(std::ostream& out)
const;
234 virtual std::ostream&
Restart(std::ostream& out)
const;
290 virtual std::ostream&
Restart(std::ostream& out)
const;
343 virtual std::ostream&
Restart(std::ostream& out)
const;
398 virtual std::ostream&
Restart(std::ostream& out)
const;
451 virtual std::ostream&
Restart(std::ostream& out)
const;
492 silent_cerr(
"singularity in step drive derivative at " << dVar << std::endl);
521 virtual std::ostream&
Restart(std::ostream& out)
const;
562 silent_cerr(
"singularity in double step drive derivative at " << dVar << std::endl);
590 virtual std::ostream&
Restart(std::ostream& out)
const;
636 if (dVar < dStartTime || dVar >
dEndTime) {
675 virtual std::ostream&
Restart(std::ostream& out)
const;
779 virtual std::ostream&
Restart(std::ostream& out)
const;
861 virtual std::ostream&
Restart(std::ostream& out)
const;
932 virtual std::ostream&
Restart(std::ostream& out)
const;
978 std::vector<doublereal>&
a,
987 virtual std::ostream&
Restart(std::ostream& out)
const;
1012 for (
unsigned i = 2; i <
amplitudes.size(); i += 2 ) {
1042 for (
unsigned i = 2; i <
amplitudes.size(); i += 2 ) {
1055 silent_cerr(
"singularity in fourier series drive derivative at " << dVar << std::endl);
1093 virtual std::ostream&
Restart(std::ostream& out)
const;
1172 virtual std::ostream&
Restart(std::ostream& out)
const;
1244 virtual std::ostream&
Restart(std::ostream& out)
const;
1255 if (dVar < dStartTime || dVar >
dEndTime) {
1284 virtual std::ostream&
Restart(std::ostream& out)
const;
1297 if (dVar < dStartTime || dVar >
dEndTime) {
1332 virtual std::ostream&
Restart(std::ostream& out)
const;
1340 if (dVar < dStartTime || dVar >
dEndTime) {
1361 virtual std::ostream&
Restart(std::ostream& out)
const;
1411 virtual std::ostream&
Restart(std::ostream& out)
const;
1434 for (
unsigned int i = 1; i <
iNumPoints; i++) {
1440 return ((dVar - pPoints[i - 1])*
pVals[i]
1441 + (pPoints[i] - dVar)*
pVals[i - 1])/dx;
1469 for (
unsigned int i = 1; i <
iNumPoints; i++) {
1474 return (dS1 + dS2)/2.;
1491 typedef std::vector<const DriveCaller *>
dcv_t;
1504 virtual std::ostream&
Restart(std::ostream& out)
const;
1522 for (dcv_t::const_iterator i =
m_dc.begin(); i !=
m_dc.end(); ++i) {
1525 d += (*i)->dGet(dVar);
1536 for (dcv_t::const_iterator i =
m_dc.begin(); i !=
m_dc.end(); ++i) {
1548 for (dcv_t::const_iterator i =
m_dc.begin(); i !=
m_dc.end(); ++i) {
1551 if (!(*i)->bIsDifferentiable()) {
1564 for (dcv_t::const_iterator i =
m_dc.begin(); i !=
m_dc.end(); ++i) {
1566 ASSERT((*i)->bIsDifferentiable());
1568 dP += (*i)->dGetP(dVar);
1590 virtual std::ostream&
Restart(std::ostream& out)
const;
1653 void Check(
void)
const;
1660 virtual std::ostream&
Restart(std::ostream& out)
const;
1725 virtual bool IsWord(
const std::string& s)
const;
GradientExpression< UnaryExpr< FuncTanh, Expr > > tanh(const GradientExpression< Expr > &u)
GradientExpression< UnaryExpr< FuncExp, Expr > > exp(const GradientExpression< Expr > &u)
virtual bool bIsDifferentiable(void) const
bool setFileDriveCallerType(const char *name, FileDriveCallerTypeReader *rf)
virtual std::ostream & Restart(std::ostream &out) const
virtual DriveCaller * pCopy(void) const
virtual ~ParabolicDriveCaller(void)
virtual bool IsWord(const std::string &s) const
virtual DriveCaller * pCopy(void) const
TimeDriveCaller(const DriveHandler *pDH)
DriveArrayCaller(const DriveHandler *pDH, dcv_t &DC)
virtual std::ostream & Restart(std::ostream &out) const
std::vector< doublereal > amplitudes
virtual ~DriveArrayCaller(void)
virtual std::ostream & Restart(std::ostream &out) const
const DriveCaller * pAmplitude
#define MBDYN_EXCEPT_ARGS
integer iGetSteps(void) const
GradientExpression< UnaryExpr< FuncSin, Expr > > sin(const GradientExpression< Expr > &u)
virtual std::ostream & Restart(std::ostream &out) const
doublereal dGet(void) const
virtual ~LinearDriveCaller(void)
doublereal dGet(void) const
void DestroyFileDriveCallerTypes(void)
virtual DriveCaller * pCopy(void) const
virtual DriveCaller * pCopy(void) const
virtual DriveCaller * pCopy(void) const
virtual bool bIsDifferentiable(void) const
virtual bool bIsDifferentiable(void) const
virtual DriveCaller * pCopy(void) const
virtual std::ostream & Restart(std::ostream &out) const
const char * what(void) const
virtual DriveCaller * pCopy(void) const
virtual DriveCaller * pCopy(void) const
virtual ~ClosestNextDriveCaller(void)
CubicDriveCaller(const DriveHandler *pDH, doublereal d0, doublereal d1, doublereal d2, doublereal d3)
virtual bool bIsDifferentiable(void) const
virtual ~RandDriveCaller(void)
const std::string sEvalStr
MeterDriveCaller(const DriveHandler *pDH, doublereal dS, doublereal dE, integer iS)
CosineDriveCaller(const DriveHandler *pDH, doublereal d1, doublereal d2, doublereal d3, integer iNumCyc, doublereal d4)
ClosestNextDriveCaller(const DriveHandler *pDH, doublereal dS, doublereal dE, const DriveCaller *pIncrement)
virtual bool bIsDifferentiable(void) const
doublereal dGet(void) const
virtual DriveCaller * pCopy(void) const
doublereal dAscendingEndTime
void SetVar(const doublereal &dVar)
virtual ~PeriodicDriveCaller(void)
virtual std::ostream & Restart(std::ostream &out) const
virtual bool bIsDifferentiable(void) const
bool bIsDifferentiable(void) const
virtual DriveCaller * pCopy(void) const
LinearDriveCaller(const DriveHandler *pDH, doublereal d0, doublereal d1)
virtual DriveCaller * pCopy(void) const
virtual bool bIsDifferentiable(void) const
doublereal dGetP(const doublereal &dVar) const
virtual ~DirectDriveCaller(void)
virtual std::ostream & Restart(std::ostream &out) const
virtual std::ostream & Restart(std::ostream &out) const
doublereal dDescendingSlope
virtual integer Read(const DataManager *pDM, MBDynParser &HP, FileDrive *pDrv)=0
virtual std::ostream & Restart(std::ostream &out) const
bool bGetClosestNext(integer iNumber) const
virtual doublereal dGetP(const doublereal &dVar) const
virtual ~PiecewiseLinearDriveCaller(void)
virtual DriveCaller * pCopy(void) const
virtual std::ostream & Restart(std::ostream &out) const
virtual std::ostream & Restart(std::ostream &out) const
doublereal dGet(void) const
virtual DriveCaller * pCopy(void) const
virtual DriveCaller * pCopy(void) const
ParabolicDriveCaller(const DriveHandler *pDH, doublereal d0, doublereal d1, doublereal d2)
virtual ~ExpDriveCaller(void)
doublereal dAscendingStartTime
virtual DriveCaller * pCopy(void) const
virtual bool bIsDifferentiable(void) const
~DoubleRampDriveCaller(void)
virtual DriveCaller * pCopy(void) const
virtual DriveCaller * pCopy(void) const
virtual bool bIsDifferentiable(void) const
std::vector< const DriveCaller * > dcv_t
RampDriveCaller(const DriveHandler *pDH, doublereal d1, doublereal d2, doublereal d3, doublereal d4)
virtual ~MultDriveCaller(void)
virtual bool bIsDifferentiable(void) const
virtual DriveCaller * pCopy(void) const
doublereal dDescendingEndTime
DoubleStepDriveCaller(const DriveHandler *pDH, doublereal d1, doublereal d2, doublereal d3, doublereal d4)
virtual bool bIsDifferentiable(void) const
virtual std::ostream & Restart(std::ostream &out) const
virtual bool bIsDifferentiable(void) const
virtual std::ostream & Restart(std::ostream &out) const
integer iMeterDriveNumber
virtual ~TimeDriveCaller(void)
virtual std::ostream & Restart(std::ostream &out) const
virtual bool bIsDifferentiable(void) const
doublereal dGet(void) const
doublereal dGetTimeStep(void) const
~FourierSeriesDriveCaller(void)
virtual DriveCaller * pCopy(void) const
virtual std::ostream & Restart(std::ostream &out) const
virtual DriveCaller * pCopy(void) const
~FreqSweepDriveCaller(void)
doublereal dGet(void) const
ExpDriveCaller(const DriveHandler *pDH, doublereal dA, doublereal dT, doublereal dS, doublereal dI)
virtual bool bIsDifferentiable(void) const
virtual std::ostream & Restart(std::ostream &out) const
virtual bool bIsDifferentiable(void) const
FileDriveCallerTypeMap fileDriveCallerTypeMap
virtual std::ostream & Restart(std::ostream &out) const
const DriveCaller * pOmega
virtual std::ostream & Restart(std::ostream &out) const
#define ASSERT(expression)
virtual ~MeterDriveCaller(void)
DirectDriveCaller(const DriveHandler *pDH)
virtual DriveCaller * pCopy(void) const
DriveCaller * pGetDriveCaller(void) const
virtual std::ostream & Restart(std::ostream &out) const
virtual doublereal dGet(void) const
virtual bool bIsDifferentiable(void) const
virtual doublereal dGetP(void) const
StringDriveCaller(const DriveHandler *pDH, const std::string &sTmpStr)
RandDriveCaller(const DriveHandler *pDH, doublereal dA, doublereal dR, doublereal dS, doublereal dE, integer iS)
std::map< std::string, FileDriveCallerTypeReader * > FileDriveCallerTypeMap
virtual doublereal dGet(const doublereal &dVar) const =0
doublereal dGet(void) const
virtual ~TimeStepDriveCaller(void)
virtual std::ostream & Restart(std::ostream &out) const
virtual DriveCaller * pCopy(void) const
const DriveCaller * pIncrement
PostponedDriveCaller(MBDynParser &HP, unsigned uLabel)
virtual ~PostponedDriveCaller(void)
virtual std::ostream & Restart(std::ostream &out) const
virtual std::ostream & Restart(std::ostream &out) const
virtual doublereal dGetP(void) const
bool bGetMeter(integer iNumber) const
long int iGetRand(integer iNumber) const
virtual bool bIsDifferentiable(void) const
StepDriveCaller(const DriveHandler *pDH, doublereal d1, doublereal d2, doublereal d3)
FourierSeriesDriveCaller(const DriveHandler *pDH, doublereal dStartTime, doublereal dOmega, std::vector< doublereal > &a, integer iNumCyc, doublereal dInitialValue)
virtual bool bIsDifferentiable(void) const
PiecewiseLinearDriveCaller(const DriveHandler *pDH, unsigned int i, doublereal *p)
doublereal dGetTime(void) const
doublereal dGet(const doublereal &dVar) const
virtual bool bIsDifferentiable(void) const
virtual bool bIsDifferentiable(void) const
GradientExpression< UnaryExpr< FuncCos, Expr > > cos(const GradientExpression< Expr > &u)
virtual DriveCaller * pCopy(void) const
static const doublereal a
virtual ~FileDriveCallerTypeReader(void)
virtual ~CubicDriveCaller(void)
TimeStepDriveCaller(const DriveHandler *pDH)
virtual bool bIsDifferentiable(void) const
TanhDriveCaller(const DriveHandler *pDH, doublereal ds, doublereal da, doublereal db, doublereal di)
MultDriveCaller(const DriveHandler *pDH, const DriveCaller *pDC1, const DriveCaller *pDC2)
virtual std::ostream & Restart(std::ostream &out) const
PeriodicDriveCaller(const DriveHandler *pDH, const DriveCaller *pDC, doublereal dT0, doublereal dPeriod)
~DoubleStepDriveCaller(void)
doublereal dGet(InputStream &InStr) const
SineDriveCaller(const DriveHandler *pDH, doublereal d1, doublereal d2, doublereal d3, integer iNumCyc, doublereal d4)
DoubleRampDriveCaller(const DriveHandler *pDH, doublereal d1, doublereal d2, doublereal d3, doublereal d4, doublereal d5, doublereal d6, doublereal d7)
doublereal dDescendingStartTime
virtual DriveCaller * pCopy(void) const
doublereal dAscendingSlope
FileDriveCallerTypeWordSet fileDriveCallerTypeWordSet
FreqSweepDriveCaller(const DriveHandler *pDH, doublereal d1, const DriveCaller *pOmega, const DriveCaller *pAmplitude, doublereal d2, doublereal d3, doublereal d4)
virtual DriveCaller * pCopy(void) const
virtual std::ostream & Restart(std::ostream &out) const
virtual std::ostream & Restart(std::ostream &out) const