piston.asmt file is running correctly

This commit is contained in:
Aik-Siong Koh
2023-07-30 12:08:39 -06:00
parent 225966dced
commit 6ef4789eca
142 changed files with 3177 additions and 1144 deletions

View File

@@ -1,3 +1,22 @@
#include "FunctionX.h"
#include "Constant.h"
using namespace MbD;
MbD::FunctionX::FunctionX(Symsptr arg) : xx(arg)
{
}
Symsptr MbD::FunctionX::differentiateWRT(Symsptr var)
{
if (this == var.get()) return std::make_shared<Constant>(1.0);
auto dfdx = differentiateWRTx();
auto dxdvar = xx->differentiateWRT(var);
return Symbolic::times(dfdx, dxdvar);
}
Symsptr MbD::FunctionX::differentiateWRTx()
{
assert(false);
return Symsptr();
}