Cmake gtest (#72)

* Check rackpin and gear for zero radii

* rebase zero-radii-check (#69)

* contributing

* Update push-freecad.yml

updated actions/checkout to v4

* dragging log for debugging

* fix calcdxNorm crash

* setDebug and remove MBDyn*

* Update cmakelists.txt

* fix includes for gcc-14

gcc-14 is more disciplined about not including <algorithm> transitively.

* fix runDragStep

* backhoe files (#65)

* Mark unused variables to silence compiler warnings. (#64)

* Backhoe issues (#67)

* backhoe issues

* runDragStep edit

* backhoe issues

* runDragStep edit

* Reduce large drag step progressively until convergence.

* Switch to using built-in M_PI, even on MSVC (#68)

---------

Co-authored-by: Brad Collette <bradcollette@pop-os.localdomain>
Co-authored-by: mosfet80 <realeandrea@yahoo.it>
Co-authored-by: PaddleStroke <pierrelouis.boyer@gmail.com>
Co-authored-by: Jed Brown <jed@jedbrown.org>
Co-authored-by: sliptonic <shopinthewoods@gmail.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* in progress

* Gtest added

---------

Co-authored-by: Brad Collette <bradcollette@pop-os.localdomain>
Co-authored-by: mosfet80 <realeandrea@yahoo.it>
Co-authored-by: PaddleStroke <pierrelouis.boyer@gmail.com>
Co-authored-by: Jed Brown <jed@jedbrown.org>
Co-authored-by: sliptonic <shopinthewoods@gmail.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This commit is contained in:
aiksiongkoh
2024-07-30 14:45:59 -06:00
committed by GitHub
parent 64e546fe80
commit 3d6a23a678
162 changed files with 1348 additions and 992 deletions

View File

@@ -15,659 +15,11 @@ ELSE()
set( ONDSELSOLVER_BUILD_SHARED OFF )
ENDIF ()
if ( ONDSELSOLVER_BUILD_SHARED )
message( STATUS "[OndselSolver] Building shared library" )
add_library(OndselSolver SHARED)
else()
message( STATUS "[OndselSolver] Building static library" )
add_library(OndselSolver STATIC)
endif()
set(ONDSELSOLVER_SRC
OndselSolver/Abs.cpp
OndselSolver/AbsConstraint.cpp
OndselSolver/AccICKineNewtonRaphson.cpp
OndselSolver/AccICNewtonRaphson.cpp
OndselSolver/AccKineNewtonRaphson.cpp
OndselSolver/AccNewtonRaphson.cpp
OndselSolver/AllowZRotation.cpp
OndselSolver/AllowZRotationConstraintIqctJqc.cpp
OndselSolver/AngleJoint.cpp
OndselSolver/AngleZConstraintIJ.cpp
OndselSolver/AngleZConstraintIqcJc.cpp
OndselSolver/AngleZConstraintIqcJqc.cpp
OndselSolver/AngleZIecJec.cpp
OndselSolver/AngleZIeqcJec.cpp
OndselSolver/AngleZIeqcJeqc.cpp
OndselSolver/AnyGeneralSpline.cpp
OndselSolver/AnyPosICNewtonRaphson.cpp
OndselSolver/ArcSine.cpp
OndselSolver/ArcTan.cpp
OndselSolver/ArcTan2.cpp
OndselSolver/Arguments.cpp
OndselSolver/Array.cpp
OndselSolver/ASMTAllowRotation.cpp
OndselSolver/ASMTAngleJoint.cpp
OndselSolver/ASMTAnimationParameters.cpp
OndselSolver/ASMTAssembly.cpp
OndselSolver/ASMTConeConeContact.cpp
OndselSolver/ASMTContact.cpp
OndselSolver/ASMTCylConeContact.cpp
OndselSolver/ASMTCylCylContact.cpp
OndselSolver/ASMTCompoundJoint.cpp
OndselSolver/ASMTConstantGravity.cpp
OndselSolver/ASMTConstantVelocityJoint.cpp
OndselSolver/ASMTConstraintSet.cpp
OndselSolver/ASMTCylindricalJoint.cpp
OndselSolver/ASMTCylSphJoint.cpp
OndselSolver/ASMTExtrusion.cpp
OndselSolver/ASMTFixedJoint.cpp
OndselSolver/ASMTForceTorque.cpp
OndselSolver/ASMTGearJoint.cpp
OndselSolver/ASMTGeneralMotion.cpp
OndselSolver/ASMTInPlaneJoint.cpp
OndselSolver/ASMTItem.cpp
OndselSolver/ASMTItemIJ.cpp
OndselSolver/ASMTJoint.cpp
OndselSolver/ASMTKinematicIJ.cpp
OndselSolver/ASMTLimit.cpp
OndselSolver/ASMTLineInPlaneJoint.cpp
OndselSolver/ASMTMarker.cpp
OndselSolver/ASMTMotion.cpp
OndselSolver/ASMTNoRotationJoint.cpp
OndselSolver/ASMTParallelAxesJoint.cpp
OndselSolver/ASMTPart.cpp
OndselSolver/ASMTPerpendicularJoint.cpp
OndselSolver/ASMTPlanarJoint.cpp
OndselSolver/ASMTPointInLineJoint.cpp
OndselSolver/ASMTPointInPlaneJoint.cpp
OndselSolver/ASMTPrincipalMassMarker.cpp
OndselSolver/ASMTRackPinionJoint.cpp
OndselSolver/ASMTRefCurve.cpp
OndselSolver/ASMTRefItem.cpp
OndselSolver/ASMTRefPoint.cpp
OndselSolver/ASMTRefSurface.cpp
OndselSolver/ASMTRevCylJoint.cpp
OndselSolver/ASMTRevoluteJoint.cpp
OndselSolver/ASMTRevRevJoint.cpp
OndselSolver/ASMTRotationalMotion.cpp
OndselSolver/ASMTRotationLimit.cpp
OndselSolver/ASMTScrewJoint.cpp
OndselSolver/ASMTSimulationParameters.cpp
OndselSolver/ASMTSpatialContainer.cpp
OndselSolver/ASMTSpatialItem.cpp
OndselSolver/ASMTSphericalJoint.cpp
OndselSolver/ASMTSphSphJoint.cpp
OndselSolver/ASMTTime.cpp
OndselSolver/ASMTTranslationalJoint.cpp
OndselSolver/ASMTTranslationalMotion.cpp
OndselSolver/ASMTTranslationLimit.cpp
OndselSolver/ASMTUniversalJoint.cpp
OndselSolver/AtPointConstraintIJ.cpp
OndselSolver/AtPointConstraintIqcJc.cpp
OndselSolver/AtPointConstraintIqcJqc.cpp
OndselSolver/AtPointConstraintIqctJqc.cpp
OndselSolver/AtPointJoint.cpp
OndselSolver/BasicIntegrator.cpp
OndselSolver/BasicQuasiIntegrator.cpp
OndselSolver/BasicUserFunction.cpp
OndselSolver/CADSystem.cpp
OndselSolver/CartesianFrame.cpp
OndselSolver/CompoundJoint.cpp
OndselSolver/Constant.cpp
OndselSolver/ConstantGravity.cpp
OndselSolver/ConstantVelocityJoint.cpp
OndselSolver/Constraint.cpp
OndselSolver/ConstraintIJ.cpp
OndselSolver/ConstraintSet.cpp
OndselSolver/ConstVelConstraintIJ.cpp
OndselSolver/ConstVelConstraintIqcJc.cpp
OndselSolver/ConstVelConstraintIqcJqc.cpp
OndselSolver/Cosine.cpp
OndselSolver/CREATE.cpp
OndselSolver/CylindricalJoint.cpp
OndselSolver/CylSphJoint.cpp
OndselSolver/DiagonalMatrix.cpp
OndselSolver/DifferenceOperator.cpp
OndselSolver/DifferentiatedGeneralSpline.cpp
OndselSolver/DirectionCosineConstraintIJ.cpp
OndselSolver/DirectionCosineConstraintIqcJc.cpp
OndselSolver/DirectionCosineConstraintIqcJqc.cpp
OndselSolver/DirectionCosineConstraintIqctJqc.cpp
OndselSolver/DirectionCosineIecJec.cpp
OndselSolver/DirectionCosineIeqcJec.cpp
OndselSolver/DirectionCosineIeqcJeqc.cpp
OndselSolver/DirectionCosineIeqctJeqc.cpp
OndselSolver/DiscontinuityError.cpp
OndselSolver/DispCompIecJecIe.cpp
OndselSolver/DispCompIecJecKec.cpp
OndselSolver/DispCompIecJecKeqc.cpp
OndselSolver/DispCompIecJecO.cpp
OndselSolver/DispCompIeqcJecIe.cpp
OndselSolver/DispCompIeqcJecKeqc.cpp
OndselSolver/DispCompIeqcJecO.cpp
OndselSolver/DispCompIeqcJeqcIe.cpp
OndselSolver/DispCompIeqcJeqcKeqc.cpp
OndselSolver/DispCompIeqcJeqcKeqct.cpp
OndselSolver/DispCompIeqcJeqcO.cpp
OndselSolver/DispCompIeqctJeqcIe.cpp
OndselSolver/DispCompIeqctJeqcKeqct.cpp
OndselSolver/DispCompIeqctJeqcO.cpp
OndselSolver/DistanceConstraintIJ.cpp
OndselSolver/DistanceConstraintIqcJc.cpp
OndselSolver/DistanceConstraintIqcJqc.cpp
OndselSolver/DistanceConstraintIqctJqc.cpp
OndselSolver/DistancexyConstraintIJ.cpp
OndselSolver/DistancexyConstraintIqcJc.cpp
OndselSolver/DistancexyConstraintIqcJqc.cpp
OndselSolver/DistIecJec.cpp
OndselSolver/DistIeqcJec.cpp
OndselSolver/DistIeqcJeqc.cpp
OndselSolver/DistIeqctJeqc.cpp
OndselSolver/DistxyIecJec.cpp
OndselSolver/DistxyIeqcJec.cpp
OndselSolver/DistxyIeqcJeqc.cpp
OndselSolver/DistxyIeqctJeqc.cpp
OndselSolver/EigenDecomposition.cpp
OndselSolver/EndFramec.cpp
OndselSolver/EndFrameqc.cpp
OndselSolver/EndFrameqct.cpp
OndselSolver/EndFrameqct2.cpp
OndselSolver/EulerAngles.cpp
OndselSolver/EulerAnglesDDot.cpp
OndselSolver/EulerAnglesDot.cpp
OndselSolver/EulerAngleszxz.cpp
OndselSolver/EulerAngleszxzDDot.cpp
OndselSolver/EulerAngleszxzDot.cpp
OndselSolver/EulerArray.cpp
OndselSolver/EulerConstraint.cpp
OndselSolver/EulerParameters.cpp
OndselSolver/EulerParametersDDot.cpp
OndselSolver/EulerParametersDot.cpp
OndselSolver/Exponential.cpp
OndselSolver/ExpressionX.cpp
OndselSolver/ExternalSystem.cpp
OndselSolver/FixedJoint.cpp
OndselSolver/ForceTorqueData.cpp
OndselSolver/ForceTorqueItem.cpp
OndselSolver/FullColumn.cpp
OndselSolver/FullMatrix.cpp
OndselSolver/FullMotion.cpp
OndselSolver/FullRow.cpp
OndselSolver/FullVector.cpp
OndselSolver/Function.cpp
OndselSolver/FunctionFromData.cpp
OndselSolver/FunctionWithManyArgs.cpp
OndselSolver/FunctionX.cpp
OndselSolver/FunctionXcParameter.cpp
OndselSolver/FunctionXY.cpp
OndselSolver/GearConstraintIJ.cpp
OndselSolver/GearConstraintIqcJc.cpp
OndselSolver/GearConstraintIqcJqc.cpp
OndselSolver/GearJoint.cpp
OndselSolver/GEFullMat.cpp
OndselSolver/GEFullMatFullPv.cpp
OndselSolver/GEFullMatParPv.cpp
OndselSolver/GeneralSpline.cpp
OndselSolver/GESpMat.cpp
OndselSolver/GESpMatFullPv.cpp
OndselSolver/GESpMatFullPvPosIC.cpp
OndselSolver/GESpMatParPv.cpp
OndselSolver/GESpMatParPvMarko.cpp
OndselSolver/GESpMatParPvMarkoFast.cpp
OndselSolver/GESpMatParPvPrecise.cpp
OndselSolver/ICKineIntegrator.cpp
OndselSolver/IndependentVariable.cpp
OndselSolver/InLineJoint.cpp
OndselSolver/InPlaneJoint.cpp
OndselSolver/Integral.cpp
OndselSolver/Integrator.cpp
OndselSolver/IntegratorInterface.cpp
OndselSolver/Item.cpp
OndselSolver/ItemIJ.cpp
OndselSolver/Joint.cpp
OndselSolver/KineIntegrator.cpp
OndselSolver/KinematicIeJe.cpp
OndselSolver/LDUFullMat.cpp
OndselSolver/LDUFullMatParPv.cpp
OndselSolver/LDUSpMat.cpp
OndselSolver/LDUSpMatParPv.cpp
OndselSolver/LDUSpMatParPvMarko.cpp
OndselSolver/LDUSpMatParPvPrecise.cpp
OndselSolver/LimitIJ.cpp
OndselSolver/LinearMultiStepMethod.cpp
OndselSolver/LineInPlaneJoint.cpp
OndselSolver/Ln.cpp
OndselSolver/Log10.cpp
OndselSolver/LogN.cpp
OndselSolver/MarkerFrame.cpp
OndselSolver/MatrixDecomposition.cpp
OndselSolver/MatrixGaussElimination.cpp
OndselSolver/MatrixLDU.cpp
OndselSolver/MatrixSolver.cpp
OndselSolver/MaximumIterationError.cpp
OndselSolver/MbDMath.cpp
OndselSolver/MomentOfInertiaSolver.cpp
OndselSolver/Negative.cpp
OndselSolver/NewtonRaphson.cpp
OndselSolver/NewtonRaphsonError.cpp
OndselSolver/NoRotationJoint.cpp
OndselSolver/NotKinematicError.cpp
OndselSolver/Numeric.cpp
OndselSolver/OrbitAngleZIecJec.cpp
OndselSolver/OrbitAngleZIeqcJec.cpp
OndselSolver/OrbitAngleZIeqcJeqc.cpp
OndselSolver/Orientation.cpp
OndselSolver/ParallelAxesJoint.cpp
OndselSolver/Part.cpp
OndselSolver/PartFrame.cpp
OndselSolver/PerpendicularJoint.cpp
OndselSolver/PiecewiseFunction.cpp
OndselSolver/PlanarJoint.cpp
OndselSolver/PointInLineJoint.cpp
OndselSolver/PointInPlaneJoint.cpp
OndselSolver/Polynomial.cpp
OndselSolver/PosICDragLimitNewtonRaphson.cpp
OndselSolver/PosICDragNewtonRaphson.cpp
OndselSolver/PosICKineNewtonRaphson.cpp
OndselSolver/PosICNewtonRaphson.cpp
OndselSolver/PosKineNewtonRaphson.cpp
OndselSolver/PosNewtonRaphson.cpp
OndselSolver/PosVelAccData.cpp
OndselSolver/Power.cpp
OndselSolver/PrescribedMotion.cpp
OndselSolver/Product.cpp
OndselSolver/QuasiIntegrator.cpp
OndselSolver/RackPinConstraintIJ.cpp
OndselSolver/RackPinConstraintIqcJc.cpp
OndselSolver/RackPinConstraintIqcJqc.cpp
OndselSolver/RackPinJoint.cpp
OndselSolver/RampStepFunction.cpp
OndselSolver/Reciprocal.cpp
OndselSolver/RedundantConstraint.cpp
OndselSolver/RevCylJoint.cpp
OndselSolver/RevoluteJoint.cpp
OndselSolver/RevRevJoint.cpp
OndselSolver/RotationLimitIJ.cpp
OndselSolver/RowTypeMatrix.cpp
OndselSolver/ScalarNewtonRaphson.cpp
OndselSolver/ScrewConstraintIJ.cpp
OndselSolver/ScrewConstraintIqcJc.cpp
OndselSolver/ScrewConstraintIqcJqc.cpp
OndselSolver/ScrewJoint.cpp
OndselSolver/SimulationStoppingError.cpp
OndselSolver/Sine.cpp
OndselSolver/SingularMatrixError.cpp
OndselSolver/Solver.cpp
OndselSolver/SparseColumn.cpp
OndselSolver/SparseMatrix.cpp
OndselSolver/SparseRow.cpp
OndselSolver/SparseVector.cpp
OndselSolver/SphericalJoint.cpp
OndselSolver/SphSphJoint.cpp
OndselSolver/StableBackwardDifference.cpp
OndselSolver/StateData.cpp
OndselSolver/Sum.cpp
OndselSolver/Symbolic.cpp
OndselSolver/SymbolicParser.cpp
OndselSolver/SyntaxError.cpp
OndselSolver/System.cpp
OndselSolver/SystemNewtonRaphson.cpp
OndselSolver/SystemSolver.cpp
OndselSolver/Time.cpp
OndselSolver/TooManyTriesError.cpp
OndselSolver/TooSmallStepSizeError.cpp
OndselSolver/Translation.cpp
OndselSolver/TranslationalJoint.cpp
OndselSolver/TranslationConstraintIJ.cpp
OndselSolver/TranslationConstraintIqcJc.cpp
OndselSolver/TranslationConstraintIqcJqc.cpp
OndselSolver/TranslationConstraintIqctJqc.cpp
OndselSolver/TranslationLimitIJ.cpp
OndselSolver/Units.cpp
OndselSolver/UniversalJoint.cpp
OndselSolver/UserFunction.cpp
OndselSolver/Variable.cpp
OndselSolver/VectorNewtonRaphson.cpp
OndselSolver/VelICKineSolver.cpp
OndselSolver/VelICSolver.cpp
OndselSolver/VelKineSolver.cpp
OndselSolver/VelSolver.cpp
OndselSolver/ZRotation.cpp
OndselSolver/ZTranslation.cpp
)
set(ONDSELSOLVER_HEADERS
OndselSolver/Abs.h
OndselSolver/AbsConstraint.h
OndselSolver/AccICKineNewtonRaphson.h
OndselSolver/AccICNewtonRaphson.h
OndselSolver/AccKineNewtonRaphson.h
OndselSolver/AccNewtonRaphson.h
OndselSolver/AllowZRotation.h
OndselSolver/AllowZRotationConstraintIqctJqc.h
OndselSolver/AngleJoint.h
OndselSolver/AngleZConstraintIJ.h
OndselSolver/AngleZConstraintIqcJc.h
OndselSolver/AngleZConstraintIqcJqc.h
OndselSolver/AngleZIecJec.h
OndselSolver/AngleZIeqcJec.h
OndselSolver/AngleZIeqcJeqc.h
OndselSolver/AnyGeneralSpline.h
OndselSolver/AnyPosICNewtonRaphson.h
OndselSolver/ArcSine.h
OndselSolver/ArcTan.h
OndselSolver/ArcTan2.h
OndselSolver/Arguments.h
OndselSolver/Array.h
OndselSolver/ASMTAllowRotation.h
OndselSolver/ASMTAngleJoint.h
OndselSolver/ASMTAnimationParameters.h
OndselSolver/ASMTAssembly.h
OndselSolver/ASMTCompoundJoint.h
OndselSolver/ASMTConstantGravity.h
OndselSolver/ASMTConstantVelocityJoint.h
OndselSolver/ASMTConstraintSet.h
OndselSolver/ASMTCylindricalJoint.h
OndselSolver/ASMTCylSphJoint.h
OndselSolver/ASMTExtrusion.h
OndselSolver/ASMTFixedJoint.h
OndselSolver/ASMTForceTorque.h
OndselSolver/ASMTGearJoint.h
OndselSolver/ASMTGeneralMotion.h
OndselSolver/ASMTInPlaneJoint.h
OndselSolver/ASMTItem.h
OndselSolver/ASMTItemIJ.h
OndselSolver/ASMTJoint.h
OndselSolver/ASMTKinematicIJ.h
OndselSolver/ASMTLimit.h
OndselSolver/ASMTLineInPlaneJoint.h
OndselSolver/ASMTMarker.h
OndselSolver/ASMTMotion.h
OndselSolver/ASMTNoRotationJoint.h
OndselSolver/ASMTParallelAxesJoint.h
OndselSolver/ASMTPart.h
OndselSolver/ASMTPerpendicularJoint.h
OndselSolver/ASMTPlanarJoint.h
OndselSolver/ASMTPointInLineJoint.h
OndselSolver/ASMTPointInPlaneJoint.h
OndselSolver/ASMTPrincipalMassMarker.h
OndselSolver/ASMTRackPinionJoint.h
OndselSolver/ASMTRefCurve.h
OndselSolver/ASMTRefItem.h
OndselSolver/ASMTRefPoint.h
OndselSolver/ASMTRefSurface.h
OndselSolver/ASMTRevCylJoint.h
OndselSolver/ASMTRevoluteJoint.h
OndselSolver/ASMTRevRevJoint.h
OndselSolver/ASMTRotationalMotion.h
OndselSolver/ASMTRotationLimit.h
OndselSolver/ASMTScrewJoint.h
OndselSolver/ASMTSimulationParameters.h
OndselSolver/ASMTSpatialContainer.h
OndselSolver/ASMTSpatialItem.h
OndselSolver/ASMTSphericalJoint.h
OndselSolver/ASMTSphSphJoint.h
OndselSolver/ASMTTime.h
OndselSolver/ASMTTranslationalJoint.h
OndselSolver/ASMTTranslationalMotion.h
OndselSolver/ASMTTranslationLimit.h
OndselSolver/ASMTUniversalJoint.h
OndselSolver/AtPointConstraintIJ.h
OndselSolver/AtPointConstraintIqcJc.h
OndselSolver/AtPointConstraintIqcJqc.h
OndselSolver/AtPointConstraintIqctJqc.h
OndselSolver/AtPointJoint.h
OndselSolver/BasicIntegrator.h
OndselSolver/BasicQuasiIntegrator.h
OndselSolver/BasicUserFunction.h
OndselSolver/CADSystem.h
OndselSolver/CartesianFrame.h
OndselSolver/CompoundJoint.h
OndselSolver/ASMTConeConeContact.h
OndselSolver/ASMTContact.h
OndselSolver/ASMTCylConeContact.h
OndselSolver/ASMTCylCylContact.h
OndselSolver/Constant.h
OndselSolver/ConstantGravity.h
OndselSolver/ConstantVelocityJoint.h
OndselSolver/Constraint.h
OndselSolver/ConstraintIJ.h
OndselSolver/ConstraintSet.h
OndselSolver/ConstVelConstraintIJ.h
OndselSolver/ConstVelConstraintIqcJc.h
OndselSolver/ConstVelConstraintIqcJqc.h
OndselSolver/Cosine.h
OndselSolver/CREATE.h
OndselSolver/CylindricalJoint.h
OndselSolver/CylSphJoint.h
OndselSolver/DiagonalMatrix.h
OndselSolver/DifferenceOperator.h
OndselSolver/DifferentiatedGeneralSpline.h
OndselSolver/DirectionCosineConstraintIJ.h
OndselSolver/DirectionCosineConstraintIqcJc.h
OndselSolver/DirectionCosineConstraintIqcJqc.h
OndselSolver/DirectionCosineConstraintIqctJqc.h
OndselSolver/DirectionCosineIecJec.h
OndselSolver/DirectionCosineIeqcJec.h
OndselSolver/DirectionCosineIeqcJeqc.h
OndselSolver/DirectionCosineIeqctJeqc.h
OndselSolver/DiscontinuityError.h
OndselSolver/DispCompIecJecIe.h
OndselSolver/DispCompIecJecKec.h
OndselSolver/DispCompIecJecKeqc.h
OndselSolver/DispCompIecJecO.h
OndselSolver/DispCompIeqcJecIe.h
OndselSolver/DispCompIeqcJecKeqc.h
OndselSolver/DispCompIeqcJecO.h
OndselSolver/DispCompIeqcJeqcIe.h
OndselSolver/DispCompIeqcJeqcKeqc.h
OndselSolver/DispCompIeqcJeqcKeqct.h
OndselSolver/DispCompIeqcJeqcO.h
OndselSolver/DispCompIeqctJeqcIe.h
OndselSolver/DispCompIeqctJeqcKeqct.h
OndselSolver/DispCompIeqctJeqcO.h
OndselSolver/DistanceConstraintIJ.h
OndselSolver/DistanceConstraintIqcJc.h
OndselSolver/DistanceConstraintIqcJqc.h
OndselSolver/DistanceConstraintIqctJqc.h
OndselSolver/DistancexyConstraintIJ.h
OndselSolver/DistancexyConstraintIqcJc.h
OndselSolver/DistancexyConstraintIqcJqc.h
OndselSolver/DistIecJec.h
OndselSolver/DistIeqcJec.h
OndselSolver/DistIeqcJeqc.h
OndselSolver/DistIeqctJeqc.h
OndselSolver/DistxyIecJec.h
OndselSolver/DistxyIeqcJec.h
OndselSolver/DistxyIeqcJeqc.h
OndselSolver/DistxyIeqctJeqc.h
OndselSolver/EigenDecomposition.h
OndselSolver/EndFramec.h
OndselSolver/EndFrameqc.h
OndselSolver/EndFrameqct.h
OndselSolver/EndFrameqct2.h
OndselSolver/enum.h
OndselSolver/EulerAngles.h
OndselSolver/EulerAnglesDDot.h
OndselSolver/EulerAnglesDot.h
OndselSolver/EulerAngleszxz.h
OndselSolver/EulerAngleszxzDDot.h
OndselSolver/EulerAngleszxzDot.h
OndselSolver/EulerArray.h
OndselSolver/EulerConstraint.h
OndselSolver/EulerParameters.h
OndselSolver/EulerParametersDDot.h
OndselSolver/EulerParametersDot.h
OndselSolver/Exponential.h
OndselSolver/ExpressionX.h
OndselSolver/ExternalSystem.h
OndselSolver/FixedJoint.h
OndselSolver/ForceTorqueData.h
OndselSolver/ForceTorqueItem.h
OndselSolver/FullColumn.h
OndselSolver/FullMatrix.h
OndselSolver/FullMotion.h
OndselSolver/FullRow.h
OndselSolver/FullRow.h
OndselSolver/FullVector.h
OndselSolver/Function.h
OndselSolver/FunctionFromData.h
OndselSolver/FunctionWithManyArgs.h
OndselSolver/FunctionX.h
OndselSolver/FunctionXcParameter.h
OndselSolver/FunctionXY.h
OndselSolver/GearConstraintIJ.h
OndselSolver/GearConstraintIqcJc.h
OndselSolver/GearConstraintIqcJqc.h
OndselSolver/GearJoint.h
OndselSolver/GEFullMat.h
OndselSolver/GEFullMatFullPv.h
OndselSolver/GEFullMatParPv.h
OndselSolver/GeneralSpline.h
OndselSolver/GESpMat.h
OndselSolver/GESpMatFullPv.h
OndselSolver/GESpMatFullPvPosIC.h
OndselSolver/GESpMatParPv.h
OndselSolver/GESpMatParPvMarko.h
OndselSolver/GESpMatParPvMarkoFast.h
OndselSolver/GESpMatParPvPrecise.h
OndselSolver/ICKineIntegrator.h
OndselSolver/IndependentVariable.h
OndselSolver/InLineJoint.h
OndselSolver/InPlaneJoint.h
OndselSolver/Integrator.h
OndselSolver/IntegratorInterface.h
OndselSolver/Item.h
OndselSolver/ItemIJ.h
OndselSolver/Joint.h
OndselSolver/KineIntegrator.h
OndselSolver/KinematicIeJe.h
OndselSolver/LDUFullMat.h
OndselSolver/LDUFullMatParPv.h
OndselSolver/LDUSpMat.h
OndselSolver/LDUSpMatParPv.h
OndselSolver/LDUSpMatParPvMarko.h
OndselSolver/LDUSpMatParPvPrecise.h
OndselSolver/LimitIJ.h
OndselSolver/LinearMultiStepMethod.h
OndselSolver/LineInPlaneJoint.h
OndselSolver/Ln.h
OndselSolver/Log10.h
OndselSolver/LogN.h
OndselSolver/MarkerFrame.h
OndselSolver/MatrixDecomposition.h
OndselSolver/MatrixGaussElimination.h
OndselSolver/MatrixLDU.h
OndselSolver/MatrixSolver.h
OndselSolver/MaximumIterationError.h
OndselSolver/MbDMath.h
OndselSolver/MomentOfInertiaSolver.h
OndselSolver/Negative.h
OndselSolver/NewtonRaphson.h
OndselSolver/NewtonRaphsonError.h
OndselSolver/NoRotationJoint.h
OndselSolver/NotKinematicError.h
OndselSolver/Numeric.h
OndselSolver/OrbitAngleZIecJec.h
OndselSolver/OrbitAngleZIeqcJec.h
OndselSolver/OrbitAngleZIeqcJeqc.h
OndselSolver/Orientation.h
OndselSolver/ParallelAxesJoint.h
OndselSolver/Part.h
OndselSolver/PartFrame.h
OndselSolver/PerpendicularJoint.h
OndselSolver/PlanarJoint.h
OndselSolver/PointInLineJoint.h
OndselSolver/PointInPlaneJoint.h
OndselSolver/PosICDragLimitNewtonRaphson.h
OndselSolver/PosICDragNewtonRaphson.h
OndselSolver/PosICKineNewtonRaphson.h
OndselSolver/PosICNewtonRaphson.h
OndselSolver/PosKineNewtonRaphson.h
OndselSolver/PosNewtonRaphson.h
OndselSolver/PosVelAccData.h
OndselSolver/Power.h
OndselSolver/PrescribedMotion.h
OndselSolver/Product.h
OndselSolver/QuasiIntegrator.h
OndselSolver/RackPinConstraintIJ.h
OndselSolver/RackPinConstraintIqcJc.h
OndselSolver/RackPinConstraintIqcJqc.h
OndselSolver/RackPinJoint.h
OndselSolver/Reciprocal.h
OndselSolver/RedundantConstraint.h
OndselSolver/resource.h
OndselSolver/RevCylJoint.h
OndselSolver/RevoluteJoint.h
OndselSolver/RevRevJoint.h
OndselSolver/RotationLimitIJ.h
OndselSolver/RowTypeMatrix.h
OndselSolver/ScalarNewtonRaphson.h
OndselSolver/ScrewConstraintIJ.h
OndselSolver/ScrewConstraintIqcJc.h
OndselSolver/ScrewConstraintIqcJqc.h
OndselSolver/ScrewJoint.h
OndselSolver/SimulationStoppingError.h
OndselSolver/Sine.h
OndselSolver/SingularMatrixError.h
OndselSolver/Solver.h
OndselSolver/SparseColumn.h
OndselSolver/SparseMatrix.h
OndselSolver/SparseRow.h
OndselSolver/SparseVector.h
OndselSolver/SphericalJoint.h
OndselSolver/SphSphJoint.h
OndselSolver/StableBackwardDifference.h
OndselSolver/StateData.h
OndselSolver/Sum.h
OndselSolver/Symbolic.h
OndselSolver/SymbolicParser.h
OndselSolver/SyntaxError.h
OndselSolver/System.h
OndselSolver/SystemNewtonRaphson.h
OndselSolver/SystemSolver.h
OndselSolver/Time.h
OndselSolver/TooManyTriesError.h
OndselSolver/TooSmallStepSizeError.h
OndselSolver/Translation.h
OndselSolver/TranslationalJoint.h
OndselSolver/TranslationConstraintIJ.h
OndselSolver/TranslationConstraintIqcJc.h
OndselSolver/TranslationConstraintIqcJqc.h
OndselSolver/TranslationConstraintIqctJqc.h
OndselSolver/TranslationLimitIJ.h
OndselSolver/Units.h
OndselSolver/UniversalJoint.h
OndselSolver/UserFunction.h
OndselSolver/Variable.h
OndselSolver/VectorNewtonRaphson.h
OndselSolver/VelICKineSolver.h
OndselSolver/VelICSolver.h
OndselSolver/VelKineSolver.h
OndselSolver/VelSolver.h
OndselSolver/ZRotation.h
OndselSolver/ZTranslation.h
)
target_sources(OndselSolver PRIVATE
"${ONDSELSOLVER_SRC}"
"${ONDSELSOLVER_HEADERS}")
set_target_properties(OndselSolver
PROPERTIES VERSION ${PROJECT_VERSION}
SOVERSION 1
PUBLIC_HEADER "${ONDSELSOLVER_HEADERS}"
)
if(MSVC)
target_compile_definitions(OndselSolver PRIVATE _USE_MATH_DEFINES)
endif(MSVC)
configure_file(OndselSolver.pc.in ${CMAKE_BINARY_DIR}/OndselSolver.pc @ONLY)
install(TARGETS OndselSolver
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/OndselSolver)
install(FILES ${CMAKE_BINARY_DIR}/OndselSolver.pc
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
add_compile_definitions(TEST_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}/testapp")
add_subdirectory(OndselSolver)
add_subdirectory(OndselSolverMain)
include(CTest)
enable_testing()
add_subdirectory(tests)
target_compile_definitions(test_run PUBLIC TEST_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}/testapp")
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OndselSolverMain PROPERTY VS_STARTUP_PROJECT OndselSolverMain)

View File

@@ -1,31 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33530.505
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OndselSolver", "OndselSolver\OndselSolver.vcxproj", "{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Debug|x64.ActiveCfg = Debug|x64
{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Debug|x64.Build.0 = Debug|x64
{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Debug|x86.ActiveCfg = Debug|Win32
{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Debug|x86.Build.0 = Debug|Win32
{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Release|x64.ActiveCfg = Release|x64
{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Release|x64.Build.0 = Release|x64
{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Release|x86.ActiveCfg = Release|Win32
{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BD48A6EF-4E93-4C09-BCE1-84F0439DB2D9}
EndGlobalSection
EndGlobal

View File

@@ -55,7 +55,7 @@ std::shared_ptr<ItemIJ> MbD::ASMTAllowRotation::mbdClassNew()
return AllowZRotation::With();
}
void MbD::ASMTAllowRotation::setMotionJoint(std::string motionJoint)
void MbD::ASMTAllowRotation::setMotionJoint(const std::string& motionJoint)
{
(void) motionJoint;
}

View File

@@ -20,7 +20,7 @@ namespace MbD {
void readMotionJoint(std::vector<std::string>& lines);
void initMarkers() override;
std::shared_ptr<ItemIJ> mbdClassNew() override;
void setMotionJoint(std::string motionJoint);
void setMotionJoint(const std::string& motionJoint);
void storeOnLevel(std::ofstream& os, size_t level) override;
void storeOnTimeSeries(std::ofstream& os) override;

View File

@@ -61,6 +61,7 @@
#include "ASMTLimit.h"
#include "ASMTRotationLimit.h"
#include "ASMTTranslationLimit.h"
#include <filesystem>
using namespace MbD;
@@ -354,8 +355,11 @@ void MbD::ASMTAssembly::runSinglePendulum()
assembly->runKINEMATIC();
}
std::shared_ptr<ASMTAssembly> MbD::ASMTAssembly::assemblyFromFile(const char* fileName)
std::shared_ptr<ASMTAssembly> MbD::ASMTAssembly::assemblyFromFile(const std::string& fileName)
{
std::filesystem::path currentPath = std::filesystem::current_path();
std::cout << "Current directory: " << currentPath << std::endl;
std::ifstream stream(fileName);
if (stream.fail()) {
throw std::invalid_argument("File not found.");
@@ -376,7 +380,7 @@ std::shared_ptr<ASMTAssembly> MbD::ASMTAssembly::assemblyFromFile(const char* fi
return assembly;
}
void MbD::ASMTAssembly::runFile(const char* fileName)
void MbD::ASMTAssembly::runFile(const std::string& fileName)
{
std::ifstream stream(fileName);
if (stream.fail()) {
@@ -424,8 +428,8 @@ void MbD::ASMTAssembly::runDraggingLogTest3()
void MbD::ASMTAssembly::runDraggingTest()
{
// auto assembly = ASMTAssembly::assemblyFromFile("../testapp/pistonWithLimits.asmt");
auto assembly = ASMTAssembly::assemblyFromFile("../testapp/dragCrankSlider.asmt");
// auto assembly = ASMTAssembly::assemblyFromFile("../../testapp/pistonWithLimits.asmt");
auto assembly = ASMTAssembly::assemblyFromFile("../../testapp/dragCrankSlider.asmt");
assembly->setDebug(true);
auto limit1 = ASMTRotationLimit::With();
@@ -464,8 +468,8 @@ void MbD::ASMTAssembly::runDraggingTest()
void MbD::ASMTAssembly::runDraggingTest2()
{
// auto assembly = ASMTAssembly::assemblyFromFile("../testapp/pistonWithLimits.asmt");
auto assembly = ASMTAssembly::assemblyFromFile("../testapp/dragCrankSlider.asmt");
// auto assembly = ASMTAssembly::assemblyFromFile("../../testapp/pistonWithLimits.asmt");
auto assembly = ASMTAssembly::assemblyFromFile("../../testapp/dragCrankSlider.asmt");
assembly->setDebug(true);
auto limit1 = ASMTRotationLimit::With();
@@ -504,7 +508,7 @@ void MbD::ASMTAssembly::runDraggingTest2()
void MbD::ASMTAssembly::runDraggingTest3()
{
auto assembly = ASMTAssembly::assemblyFromFile("../testapp/rackPinion3.asmt");
auto assembly = ASMTAssembly::assemblyFromFile("../../testapp/rackPinion3.asmt");
assembly->setDebug(true);
auto dragPart = assembly->partNamed("/OndselAssembly/rackPinion#Box");
auto rotPart = assembly->partNamed("/OndselAssembly/rackPinion#Cylinder");
@@ -534,7 +538,7 @@ void MbD::ASMTAssembly::runDraggingTest3()
rotMat = rotPart->rotationMatrix;
}
void MbD::ASMTAssembly::readWriteFile(const char* fileName)
void MbD::ASMTAssembly::readWriteFile(const std::string& fileName)
{
std::ifstream stream(fileName);
if (stream.fail()) {
@@ -571,7 +575,7 @@ ASMTAssembly* MbD::ASMTAssembly::root()
return this;
}
void MbD::ASMTAssembly::setNotes(std::string str)
void MbD::ASMTAssembly::setNotes(const std::string& str)
{
notes = str;
}
@@ -1040,7 +1044,7 @@ void MbD::ASMTAssembly::readMotionSeries(std::vector<std::string>& lines)
motion->readMotionSeries(lines);
}
void MbD::ASMTAssembly::runDraggingLog(const char* fileName)
void MbD::ASMTAssembly::runDraggingLog(const std::string& fileName)
{
std::ifstream stream(fileName);
if (stream.fail()) {
@@ -1270,7 +1274,7 @@ void MbD::ASMTAssembly::createMbD(std::shared_ptr<System> mbdSys, std::shared_pt
// animationParameters = nullptr;
}
void MbD::ASMTAssembly::outputFile(std::string filename)
void MbD::ASMTAssembly::outputFile(const std::string& filename)
{
std::ofstream os(filename);
os << std::setprecision(std::numeric_limits<double>::max_digits10);
@@ -1458,7 +1462,7 @@ MbD::ASMTAssembly::spatialContainerAt(std::shared_ptr<ASMTAssembly> self,
return part;
}
std::shared_ptr<ASMTPart> MbD::ASMTAssembly::partAt(std::string& longname) const
std::shared_ptr<ASMTPart> MbD::ASMTAssembly::partAt(const std::string& longname) const
{
for (auto& part : *parts) {
if (part->fullName("") == longname) {
@@ -1468,7 +1472,7 @@ std::shared_ptr<ASMTPart> MbD::ASMTAssembly::partAt(std::string& longname) const
return nullptr;
}
std::shared_ptr<ASMTMarker> MbD::ASMTAssembly::markerAt(std::string& longname) const
std::shared_ptr<ASMTMarker> MbD::ASMTAssembly::markerAt(const std::string& longname) const
{
for (auto& refPoint : *refPoints) {
for (auto& marker : *refPoint->markers) {
@@ -1489,7 +1493,7 @@ std::shared_ptr<ASMTMarker> MbD::ASMTAssembly::markerAt(std::string& longname) c
return nullptr;
}
std::shared_ptr<ASMTJoint> MbD::ASMTAssembly::jointAt(std::string& longname) const
std::shared_ptr<ASMTJoint> MbD::ASMTAssembly::jointAt(const std::string& longname) const
{
auto it =
std::find_if(joints->begin(), joints->end(), [&](const std::shared_ptr<ASMTJoint>& jt) {
@@ -1499,7 +1503,7 @@ std::shared_ptr<ASMTJoint> MbD::ASMTAssembly::jointAt(std::string& longname) con
return joint;
}
std::shared_ptr<ASMTMotion> MbD::ASMTAssembly::motionAt(std::string& longname) const
std::shared_ptr<ASMTMotion> MbD::ASMTAssembly::motionAt(const std::string& longname) const
{
auto it =
std::find_if(motions->begin(), motions->end(), [&](const std::shared_ptr<ASMTMotion>& mt) {
@@ -1509,7 +1513,7 @@ std::shared_ptr<ASMTMotion> MbD::ASMTAssembly::motionAt(std::string& longname) c
return motion;
}
std::shared_ptr<ASMTForceTorque> MbD::ASMTAssembly::forceTorqueAt(std::string& longname) const
std::shared_ptr<ASMTForceTorque> MbD::ASMTAssembly::forceTorqueAt(const std::string& longname) const
{
auto it = std::find_if(forcesTorques->begin(),
forcesTorques->end(),
@@ -1621,7 +1625,7 @@ void MbD::ASMTAssembly::setSimulationParameters(
parameters->owner = this;
}
std::shared_ptr<ASMTPart> MbD::ASMTAssembly::partNamed(std::string partName) const
std::shared_ptr<ASMTPart> MbD::ASMTAssembly::partNamed(const std::string& partName) const
{
auto it = std::find_if(parts->begin(), parts->end(), [&](const std::shared_ptr<ASMTPart>& prt) {
return prt->fullName("") == partName;
@@ -1630,7 +1634,7 @@ std::shared_ptr<ASMTPart> MbD::ASMTAssembly::partNamed(std::string partName) con
return part;
}
std::shared_ptr<ASMTPart> MbD::ASMTAssembly::partPartialNamed(std::string partialName) const
std::shared_ptr<ASMTPart> MbD::ASMTAssembly::partPartialNamed(const std::string& partialName) const
{
auto it = std::find_if(parts->begin(), parts->end(), [&](const std::shared_ptr<ASMTPart>& prt) {
auto fullName = prt->fullName("");
@@ -1740,7 +1744,7 @@ void MbD::ASMTAssembly::storeOnTimeSeries(std::ofstream& os)
}
}
void MbD::ASMTAssembly::setFilename(std::string str)
void MbD::ASMTAssembly::setFilename(const std::string& str)
{
std::stringstream ss;
ss << "FileName = " << str << std::endl;

View File

@@ -38,8 +38,8 @@ namespace MbD {
static void runSinglePendulumSuperSimplified2();
static void runSinglePendulumSimplified();
static void runSinglePendulum();
static std::shared_ptr<ASMTAssembly> assemblyFromFile(const char* chars);
static void runFile(const char* chars);
static std::shared_ptr<ASMTAssembly> assemblyFromFile(const std::string& fileName);
static void runFile(const std::string& chars);
static void runDraggingLogTest();
static void runDraggingLogTest2();
static void runDraggingLogTest3();
@@ -47,10 +47,10 @@ namespace MbD {
static void runDraggingTest2();
static void runDraggingTest3();
static void readWriteFile(const char* chars);
static void readWriteFile(const std::string& chars);
void initialize() override;
ASMTAssembly* root() override;
void setNotes(std::string str);
void setNotes(const std::string& str);
void parseASMT(std::vector<std::string>& lines) override;
void readNotes(std::vector<std::string>& lines);
void readParts(std::vector<std::string>& lines);
@@ -75,7 +75,7 @@ namespace MbD {
void readJointSeries(std::vector<std::string>& lines);
void readMotionSeriesMany(std::vector<std::string>& lines);
void readMotionSeries(std::vector<std::string>& lines);
void runDraggingLog(const char* chars);
void runDraggingLog(const std::string& chars);
void outputFor(AnalysisType type);
void preMbDrun(std::shared_ptr<System> mbdSys);
@@ -89,7 +89,7 @@ namespace MbD {
std::shared_ptr<std::map<std::string, std::shared_ptr<ASMTMarker>>>markerMap() const;
void deleteMbD() override;
void createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits) override;
void outputFile(std::string filename);
void outputFile(const std::string& filename);
void storeOnLevel(std::ofstream& os, size_t level) override;
/* This function performs a one shot solve of the assembly.*/
@@ -102,11 +102,11 @@ namespace MbD {
void runKINEMATIC();
void initprincipalMassMarker();
std::shared_ptr<ASMTSpatialContainer> spatialContainerAt(std::shared_ptr<ASMTAssembly> self, std::string& longname) const;
std::shared_ptr<ASMTPart> partAt(std::string& longname) const;
std::shared_ptr<ASMTMarker> markerAt(std::string& longname) const;
std::shared_ptr<ASMTJoint> jointAt(std::string& longname) const;
std::shared_ptr<ASMTMotion> motionAt(std::string& longname) const;
std::shared_ptr<ASMTForceTorque> forceTorqueAt(std::string& longname) const;
std::shared_ptr<ASMTPart> partAt(const std::string& longname) const;
std::shared_ptr<ASMTMarker> markerAt(const std::string& longname) const;
std::shared_ptr<ASMTJoint> jointAt(const std::string& longname) const;
std::shared_ptr<ASMTMotion> motionAt(const std::string& longname) const;
std::shared_ptr<ASMTForceTorque> forceTorqueAt(const std::string& longname) const;
FColDsptr vOcmO() override;
FColDsptr omeOpO() override;
std::shared_ptr<ASMTTime> geoTime() const;
@@ -119,8 +119,8 @@ namespace MbD {
void addLimit(std::shared_ptr<ASMTLimit> limit);
void setConstantGravity(std::shared_ptr<ASMTConstantGravity> constantGravity);
void setSimulationParameters(std::shared_ptr<ASMTSimulationParameters> simulationParameters);
std::shared_ptr<ASMTPart> partNamed(std::string partName) const;
std::shared_ptr<ASMTPart> partPartialNamed(std::string partialName) const;
std::shared_ptr<ASMTPart> partNamed(const std::string& partName) const;
std::shared_ptr<ASMTPart> partPartialNamed(const std::string& partialName) const;
void storeOnLevelNotes(std::ofstream& os, size_t level);
void storeOnLevelParts(std::ofstream& os, size_t level);
void storeOnLevelKinematicIJs(std::ofstream& os, size_t level);
@@ -131,7 +131,7 @@ namespace MbD {
void storeOnLevelLimits(std::ofstream& os, size_t level);
void storeOnLevelGeneralConstraintSets(std::ofstream& os, size_t level);
void storeOnTimeSeries(std::ofstream& os) override;
void setFilename(std::string filename);
void setFilename(const std::string& filename);
void setDebug(bool todebug);
std::string filename = "";

View File

@@ -46,7 +46,7 @@ std::string MbD::ASMTItem::classname()
return answer;
}
void MbD::ASMTItem::setName(std::string str)
void MbD::ASMTItem::setName(const std::string& str)
{
name = str;
}
@@ -72,7 +72,7 @@ std::string MbD::ASMTItem::readStringOffTop(std::vector<std::string>& args)
return str;
}
FRowDsptr MbD::ASMTItem::readRowOfDoubles(std::string& line)
FRowDsptr MbD::ASMTItem::readRowOfDoubles(const std::string& line)
{
std::istringstream iss(line);
auto readRowOfDoubles = std::make_shared<FullRow<double>>();
@@ -89,7 +89,7 @@ FRowDsptr MbD::ASMTItem::readRowOfDoublesOffTop(std::vector<std::string>& lines)
return readRowOfDoubles(str);
}
FColDsptr MbD::ASMTItem::readColumnOfDoubles(std::string& line)
FColDsptr MbD::ASMTItem::readColumnOfDoubles(const std::string& line)
{
std::istringstream iss(line);
auto readColumnOfDoubles = std::make_shared<FullColumn<double>>();
@@ -106,7 +106,7 @@ FColDsptr MbD::ASMTItem::readColumnOfDoublesOffTop(std::vector<std::string>& lin
return readColumnOfDoubles(str);
}
double MbD::ASMTItem::readDouble(std::string& line)
double MbD::ASMTItem::readDouble(const std::string& line)
{
std::istringstream iss(line);
double d;
@@ -114,7 +114,7 @@ double MbD::ASMTItem::readDouble(std::string& line)
return d;
}
int MbD::ASMTItem::readInt(std::string& line)
int MbD::ASMTItem::readInt(const std::string& line)
{
std::istringstream iss(line);
int i;
@@ -122,7 +122,7 @@ int MbD::ASMTItem::readInt(std::string& line)
return i;
}
size_t MbD::ASMTItem::readSize_t(std::string& line)
size_t MbD::ASMTItem::readSize_t(const std::string& line)
{
std::istringstream iss(line);
size_t i;
@@ -130,7 +130,7 @@ size_t MbD::ASMTItem::readSize_t(std::string& line)
return i;
}
bool MbD::ASMTItem::readBool(std::string& line)
bool MbD::ASMTItem::readBool(const std::string& line)
{
if (line.find("true") != std::string::npos)
{
@@ -146,7 +146,7 @@ bool MbD::ASMTItem::readBool(std::string& line)
}
}
std::string MbD::ASMTItem::readString(std::string& line)
std::string MbD::ASMTItem::readString(const std::string& line)
{
std::string str = line;
str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](unsigned char ch) { return !std::isspace(ch); }));
@@ -161,7 +161,7 @@ void MbD::ASMTItem::readName(std::vector<std::string>& lines)
lines.erase(lines.begin());
}
std::string MbD::ASMTItem::fullName(std::string partialName)
std::string MbD::ASMTItem::fullName(const std::string& partialName)
{
std::string longerName = "/" + name + partialName;
if (owner == nullptr) {
@@ -172,7 +172,7 @@ std::string MbD::ASMTItem::fullName(std::string partialName)
}
}
void MbD::ASMTItem::readDoublesInto(std::string& str, std::string label, FRowDsptr& row)
void MbD::ASMTItem::readDoublesInto(std::string str, std::string label, FRowDsptr& row)
{
auto pos = str.find(label);
assert(pos != std::string::npos);
@@ -289,12 +289,7 @@ void MbD::ASMTItem::storeOnTimeSeries(std::ofstream&)
assert(false);
}
void MbD::ASMTItem::logString(std::string& str)
void MbD::ASMTItem::logString(const std::string& str)
{
std::cout << str << std::endl;
}
void MbD::ASMTItem::logString(const char* chars)
{
std::cout << chars << std::endl;
}

View File

@@ -28,22 +28,22 @@ namespace MbD {
virtual void initialize();
void noop();
virtual std::string classname();
void setName(std::string str);
void setName(const std::string& str);
virtual void parseASMT(std::vector<std::string>& lines);
std::string popOffTop(std::vector<std::string>& lines);
std::string readStringOffTop(std::vector<std::string>& lines);
FRowDsptr readRowOfDoubles(std::string& line);
FRowDsptr readRowOfDoubles(const std::string& line);
FRowDsptr readRowOfDoublesOffTop(std::vector<std::string>& lines);
FColDsptr readColumnOfDoubles(std::string& line);
FColDsptr readColumnOfDoubles(const std::string& line);
FColDsptr readColumnOfDoublesOffTop(std::vector<std::string>& lines);
double readDouble(std::string& line);
int readInt(std::string& line);
size_t readSize_t(std::string& line);
bool readBool(std::string& line);
std::string readString(std::string& line);
double readDouble(const std::string& line);
int readInt(const std::string& line);
size_t readSize_t(const std::string& line);
bool readBool(const std::string& line);
std::string readString(const std::string& line);
void readName(std::vector<std::string>& lines);
virtual std::string fullName(std::string partialName);
void readDoublesInto(std::string& str, std::string label, FRowDsptr& row);
virtual std::string fullName(const std::string& partialName);
void readDoublesInto(std::string str, std::string label, FRowDsptr& row);
virtual void deleteMbD();
virtual void createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits);
virtual void updateFromMbD();
@@ -63,8 +63,7 @@ namespace MbD {
virtual void storeOnLevelArray(std::ofstream& os, size_t level, std::vector<double> array);
virtual void storeOnLevelName(std::ofstream& os, size_t level);
virtual void storeOnTimeSeries(std::ofstream& os);
void logString(std::string& str);
void logString(const char* chars);
void logString(const std::string& str);
std::string name;
ASMTItem* owner = nullptr;

View File

@@ -35,12 +35,12 @@ void MbD::ASMTItemIJ::initialize()
tzs = std::make_shared<FullRow<double>>();
}
void MbD::ASMTItemIJ::setMarkerI(std::string mkrI)
void MbD::ASMTItemIJ::setMarkerI(const std::string& mkrI)
{
markerI = mkrI;
}
void MbD::ASMTItemIJ::setMarkerJ(std::string mkrJ)
void MbD::ASMTItemIJ::setMarkerJ(const std::string& mkrJ)
{
markerJ = mkrJ;
}

View File

@@ -17,8 +17,8 @@ namespace MbD {
public:
ASMTItemIJ();
void initialize() override;
void setMarkerI(std::string mkrI);
void setMarkerJ(std::string mkrJ);
void setMarkerI(const std::string& mkrI);
void setMarkerJ(const std::string& mkrJ);
void readMarkerI(std::vector<std::string>& lines);
void readMarkerJ(std::vector<std::string>& lines);
void readFXonIs(std::vector<std::string>& lines);

View File

@@ -95,22 +95,22 @@ void MbD::ASMTLimit::createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<U
limitIJ->tol = geotol->getValue();
}
void MbD::ASMTLimit::setmotionJoint(std::string _motionJoint)
void MbD::ASMTLimit::setmotionJoint(const std::string& _motionJoint)
{
motionJoint = _motionJoint;
}
void MbD::ASMTLimit::settype(std::string _type)
void MbD::ASMTLimit::settype(const std::string& _type)
{
type = _type;
}
void MbD::ASMTLimit::setlimit(std::string _limit)
void MbD::ASMTLimit::setlimit(const std::string& _limit)
{
limit = _limit;
}
void MbD::ASMTLimit::settol(std::string _tol)
void MbD::ASMTLimit::settol(const std::string& _tol)
{
tol = _tol;
}

View File

@@ -24,10 +24,10 @@ namespace MbD {
void readTol(std::vector<std::string>& lines);
void parseASMT(std::vector<std::string>& lines) override;
void createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits) override;
void setmotionJoint(std::string _motionJoint);
void settype(std::string _type);
void setlimit(std::string _limit);
void settol(std::string _tol);
void setmotionJoint(const std::string& _motionJoint);
void settype(const std::string& _type);
void setlimit(const std::string& _limit);
void settol(const std::string& _tol);
std::string motionJoint, type, limit, tol;

View File

@@ -19,7 +19,7 @@ void MbD::ASMTRefPoint::parseASMT(std::vector<std::string>& lines)
readMarkers(lines);
}
std::string MbD::ASMTRefPoint::fullName(std::string partialName)
std::string MbD::ASMTRefPoint::fullName(const std::string& partialName)
{
return owner->fullName(partialName);
}

View File

@@ -18,7 +18,7 @@ namespace MbD {
//
public:
void parseASMT(std::vector<std::string>& lines) override;
std::string fullName(std::string partialName) override;
std::string fullName(const std::string& partialName) override;
void createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits) override;
void storeOnLevel(std::ofstream& os, size_t level) override;

View File

@@ -89,12 +89,12 @@ std::shared_ptr<ItemIJ> MbD::ASMTRotationalMotion::mbdClassNew()
return CREATE<ZRotation>::With();
}
void MbD::ASMTRotationalMotion::setMotionJoint(std::string str)
void MbD::ASMTRotationalMotion::setMotionJoint(const std::string& str)
{
motionJoint = str;
}
void MbD::ASMTRotationalMotion::setRotationZ(std::string rotZ)
void MbD::ASMTRotationalMotion::setRotationZ(const std::string& rotZ)
{
rotationZ = rotZ;
}

View File

@@ -23,8 +23,8 @@ namespace MbD {
void initMarkers() override;
void createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits) override;
std::shared_ptr<ItemIJ> mbdClassNew() override;
void setMotionJoint(std::string motionJoint);
void setRotationZ(std::string rotZ);
void setMotionJoint(const std::string& motionJoint);
void setRotationZ(const std::string& rotZ);
void storeOnLevel(std::ofstream& os, size_t level) override;
void storeOnTimeSeries(std::ofstream& os) override;

View File

@@ -9,7 +9,7 @@
#include <cassert>
#include "ASMTTime.h"
#include "Time.h"
#include "SymTime.h"
#include "Constant.h"
#include "Product.h"

View File

@@ -13,7 +13,7 @@ using namespace MbD;
//
//AbsConstraint::AbsConstraint() {}
//
//AbsConstraint::AbsConstraint(const char* str) : Constraint(str) {}
//AbsConstraint::AbsConstraint(const std::string& str) : Constraint(str) {}
AbsConstraint::AbsConstraint(size_t i)
{

View File

@@ -15,7 +15,7 @@ namespace MbD {
//axis iqXminusOnePlusAxis
public:
//AbsConstraint();
//AbsConstraint(const char* str);
//AbsConstraint(const std::string& str);
AbsConstraint(size_t axis);
void calcPostDynCorrectorIteration() override;

View File

@@ -22,7 +22,7 @@ MbD::AllowZRotation::AllowZRotation()
//Do nothing.
}
MbD::AllowZRotation::AllowZRotation(const char* str) : PrescribedMotion(str)
MbD::AllowZRotation::AllowZRotation(const std::string& str) : PrescribedMotion(str)
{
//Do nothing.
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
AllowZRotation();
AllowZRotation(const char* str);
AllowZRotation(const std::string& str);
static std::shared_ptr<AllowZRotation> With();
void initializeGlobally() override;
void postPosIC() override;

View File

@@ -17,7 +17,7 @@ MbD::AngleJoint::AngleJoint()
{
}
MbD::AngleJoint::AngleJoint(const char* str) : Joint(str)
MbD::AngleJoint::AngleJoint(const std::string& str) : Joint(str)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//theIzJz
public:
AngleJoint();
AngleJoint(const char* str);
AngleJoint(const std::string& str);
void initializeGlobally() override;
double theIzJz = 0.0;

View File

@@ -16,7 +16,7 @@ MbD::AtPointJoint::AtPointJoint()
{
}
MbD::AtPointJoint::AtPointJoint(const char* str) : Joint(str)
MbD::AtPointJoint::AtPointJoint(const std::string& str) : Joint(str)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
AtPointJoint();
AtPointJoint(const char* str);
AtPointJoint(const std::string& str);
void createAtPointConstraints();

View File

@@ -88,7 +88,7 @@ void BasicIntegrator::initialize()
opBDF->timeNodes = tpast;
}
void BasicIntegrator::logString(std::string& str)
void BasicIntegrator::logString(const std::string& str)
{
system->logString(str);
}

View File

@@ -38,7 +38,7 @@ namespace MbD {
void selectOrder() override;
void subsequentSteps() override;
void setSystem(Solver* sys) override;
void logString(std::string& str) override;
void logString(const std::string& str) override;
virtual void setorder(size_t o);
virtual void settnew(double t);

View File

@@ -22,7 +22,7 @@
#include "Part.h"
#include "MarkerFrame.h"
#include "PartFrame.h"
#include "Time.h"
#include "SymTime.h"
#include "StateData.h"
#include "EulerParameters.h"
@@ -40,7 +40,7 @@ void CADSystem::outputFor(AnalysisType)
});
}
void CADSystem::logString(std::string& str)
void CADSystem::logString(const std::string& str)
{
std::cout << str << std::endl;
}

View File

@@ -25,7 +25,7 @@ namespace MbD {
}
void outputFor(AnalysisType type);
void logString(std::string& str);
void logString(const std::string& str);
void logString(double value);
void runOndselSinglePendulum();
void runOndselDoublePendulum();

655
OndselSolver/CMakeLists.txt Normal file
View File

@@ -0,0 +1,655 @@
if ( ONDSELSOLVER_BUILD_SHARED )
message( STATUS "[OndselSolver] Building shared library" )
add_library(OndselSolver SHARED)
else()
message( STATUS "[OndselSolver] Building static library" )
add_library(OndselSolver STATIC)
endif()
set(ONDSELSOLVER_SRC
Abs.cpp
AbsConstraint.cpp
AccICKineNewtonRaphson.cpp
AccICNewtonRaphson.cpp
AccKineNewtonRaphson.cpp
AccNewtonRaphson.cpp
AllowZRotation.cpp
AllowZRotationConstraintIqctJqc.cpp
AngleJoint.cpp
AngleZConstraintIJ.cpp
AngleZConstraintIqcJc.cpp
AngleZConstraintIqcJqc.cpp
AngleZIecJec.cpp
AngleZIeqcJec.cpp
AngleZIeqcJeqc.cpp
AnyGeneralSpline.cpp
AnyPosICNewtonRaphson.cpp
ArcSine.cpp
ArcTan.cpp
ArcTan2.cpp
Arguments.cpp
Array.cpp
ASMTAllowRotation.cpp
ASMTAngleJoint.cpp
ASMTAnimationParameters.cpp
ASMTAssembly.cpp
ASMTConeConeContact.cpp
ASMTContact.cpp
ASMTCylConeContact.cpp
ASMTCylCylContact.cpp
ASMTCompoundJoint.cpp
ASMTConstantGravity.cpp
ASMTConstantVelocityJoint.cpp
ASMTConstraintSet.cpp
ASMTCylindricalJoint.cpp
ASMTCylSphJoint.cpp
ASMTExtrusion.cpp
ASMTFixedJoint.cpp
ASMTForceTorque.cpp
ASMTGearJoint.cpp
ASMTGeneralMotion.cpp
ASMTInPlaneJoint.cpp
ASMTItem.cpp
ASMTItemIJ.cpp
ASMTJoint.cpp
ASMTKinematicIJ.cpp
ASMTLimit.cpp
ASMTLineInPlaneJoint.cpp
ASMTMarker.cpp
ASMTMotion.cpp
ASMTNoRotationJoint.cpp
ASMTParallelAxesJoint.cpp
ASMTPart.cpp
ASMTPerpendicularJoint.cpp
ASMTPlanarJoint.cpp
ASMTPointInLineJoint.cpp
ASMTPointInPlaneJoint.cpp
ASMTPrincipalMassMarker.cpp
ASMTRackPinionJoint.cpp
ASMTRefCurve.cpp
ASMTRefItem.cpp
ASMTRefPoint.cpp
ASMTRefSurface.cpp
ASMTRevCylJoint.cpp
ASMTRevoluteJoint.cpp
ASMTRevRevJoint.cpp
ASMTRotationalMotion.cpp
ASMTRotationLimit.cpp
ASMTScrewJoint.cpp
ASMTSimulationParameters.cpp
ASMTSpatialContainer.cpp
ASMTSpatialItem.cpp
ASMTSphericalJoint.cpp
ASMTSphSphJoint.cpp
ASMTTime.cpp
ASMTTranslationalJoint.cpp
ASMTTranslationalMotion.cpp
ASMTTranslationLimit.cpp
ASMTUniversalJoint.cpp
AtPointConstraintIJ.cpp
AtPointConstraintIqcJc.cpp
AtPointConstraintIqcJqc.cpp
AtPointConstraintIqctJqc.cpp
AtPointJoint.cpp
BasicIntegrator.cpp
BasicQuasiIntegrator.cpp
BasicUserFunction.cpp
CADSystem.cpp
CartesianFrame.cpp
CompoundJoint.cpp
Constant.cpp
ConstantGravity.cpp
ConstantVelocityJoint.cpp
Constraint.cpp
ConstraintIJ.cpp
ConstraintSet.cpp
ConstVelConstraintIJ.cpp
ConstVelConstraintIqcJc.cpp
ConstVelConstraintIqcJqc.cpp
Cosine.cpp
CREATE.cpp
CylindricalJoint.cpp
CylSphJoint.cpp
DiagonalMatrix.cpp
DifferenceOperator.cpp
DifferentiatedGeneralSpline.cpp
DirectionCosineConstraintIJ.cpp
DirectionCosineConstraintIqcJc.cpp
DirectionCosineConstraintIqcJqc.cpp
DirectionCosineConstraintIqctJqc.cpp
DirectionCosineIecJec.cpp
DirectionCosineIeqcJec.cpp
DirectionCosineIeqcJeqc.cpp
DirectionCosineIeqctJeqc.cpp
DiscontinuityError.cpp
DispCompIecJecIe.cpp
DispCompIecJecKec.cpp
DispCompIecJecKeqc.cpp
DispCompIecJecO.cpp
DispCompIeqcJecIe.cpp
DispCompIeqcJecKeqc.cpp
DispCompIeqcJecO.cpp
DispCompIeqcJeqcIe.cpp
DispCompIeqcJeqcKeqc.cpp
DispCompIeqcJeqcKeqct.cpp
DispCompIeqcJeqcO.cpp
DispCompIeqctJeqcIe.cpp
DispCompIeqctJeqcKeqct.cpp
DispCompIeqctJeqcO.cpp
DistanceConstraintIJ.cpp
DistanceConstraintIqcJc.cpp
DistanceConstraintIqcJqc.cpp
DistanceConstraintIqctJqc.cpp
DistancexyConstraintIJ.cpp
DistancexyConstraintIqcJc.cpp
DistancexyConstraintIqcJqc.cpp
DistIecJec.cpp
DistIeqcJec.cpp
DistIeqcJeqc.cpp
DistIeqctJeqc.cpp
DistxyIecJec.cpp
DistxyIeqcJec.cpp
DistxyIeqcJeqc.cpp
DistxyIeqctJeqc.cpp
EigenDecomposition.cpp
EndFramec.cpp
EndFrameqc.cpp
EndFrameqct.cpp
EndFrameqct2.cpp
EulerAngles.cpp
EulerAnglesDDot.cpp
EulerAnglesDot.cpp
EulerAngleszxz.cpp
EulerAngleszxzDDot.cpp
EulerAngleszxzDot.cpp
EulerArray.cpp
EulerConstraint.cpp
EulerParameters.cpp
EulerParametersDDot.cpp
EulerParametersDot.cpp
Exponential.cpp
ExpressionX.cpp
ExternalSystem.cpp
FixedJoint.cpp
ForceTorqueData.cpp
ForceTorqueItem.cpp
FullColumn.cpp
FullMatrix.cpp
FullMotion.cpp
FullRow.cpp
FullVector.cpp
Function.cpp
FunctionFromData.cpp
FunctionWithManyArgs.cpp
FunctionX.cpp
FunctionXcParameter.cpp
FunctionXY.cpp
GearConstraintIJ.cpp
GearConstraintIqcJc.cpp
GearConstraintIqcJqc.cpp
GearJoint.cpp
GEFullMat.cpp
GEFullMatFullPv.cpp
GEFullMatParPv.cpp
GeneralSpline.cpp
GESpMat.cpp
GESpMatFullPv.cpp
GESpMatFullPvPosIC.cpp
GESpMatParPv.cpp
GESpMatParPvMarko.cpp
GESpMatParPvMarkoFast.cpp
GESpMatParPvPrecise.cpp
ICKineIntegrator.cpp
IndependentVariable.cpp
InLineJoint.cpp
InPlaneJoint.cpp
Integral.cpp
Integrator.cpp
IntegratorInterface.cpp
Item.cpp
ItemIJ.cpp
Joint.cpp
KineIntegrator.cpp
KinematicIeJe.cpp
LDUFullMat.cpp
LDUFullMatParPv.cpp
LDUSpMat.cpp
LDUSpMatParPv.cpp
LDUSpMatParPvMarko.cpp
LDUSpMatParPvPrecise.cpp
LimitIJ.cpp
LinearMultiStepMethod.cpp
LineInPlaneJoint.cpp
Ln.cpp
Log10.cpp
LogN.cpp
MarkerFrame.cpp
MatrixDecomposition.cpp
MatrixGaussElimination.cpp
MatrixLDU.cpp
MatrixSolver.cpp
MaximumIterationError.cpp
MbDMath.cpp
MomentOfInertiaSolver.cpp
Negative.cpp
NewtonRaphson.cpp
NewtonRaphsonError.cpp
NoRotationJoint.cpp
NotKinematicError.cpp
Numeric.cpp
OrbitAngleZIecJec.cpp
OrbitAngleZIeqcJec.cpp
OrbitAngleZIeqcJeqc.cpp
Orientation.cpp
ParallelAxesJoint.cpp
Part.cpp
PartFrame.cpp
PerpendicularJoint.cpp
PiecewiseFunction.cpp
PlanarJoint.cpp
PointInLineJoint.cpp
PointInPlaneJoint.cpp
Polynomial.cpp
PosICDragLimitNewtonRaphson.cpp
PosICDragNewtonRaphson.cpp
PosICKineNewtonRaphson.cpp
PosICNewtonRaphson.cpp
PosKineNewtonRaphson.cpp
PosNewtonRaphson.cpp
PosVelAccData.cpp
Power.cpp
PrescribedMotion.cpp
Product.cpp
QuasiIntegrator.cpp
RackPinConstraintIJ.cpp
RackPinConstraintIqcJc.cpp
RackPinConstraintIqcJqc.cpp
RackPinJoint.cpp
RampStepFunction.cpp
Reciprocal.cpp
RedundantConstraint.cpp
RevCylJoint.cpp
RevoluteJoint.cpp
RevRevJoint.cpp
RotationLimitIJ.cpp
RowTypeMatrix.cpp
ScalarNewtonRaphson.cpp
ScrewConstraintIJ.cpp
ScrewConstraintIqcJc.cpp
ScrewConstraintIqcJqc.cpp
ScrewJoint.cpp
SimulationStoppingError.cpp
Sine.cpp
SingularMatrixError.cpp
Solver.cpp
SparseColumn.cpp
SparseMatrix.cpp
SparseRow.cpp
SparseVector.cpp
SphericalJoint.cpp
SphSphJoint.cpp
StableBackwardDifference.cpp
StateData.cpp
Sum.cpp
Symbolic.cpp
SymbolicParser.cpp
SyntaxError.cpp
System.cpp
SystemNewtonRaphson.cpp
SystemSolver.cpp
Time.cpp
TooManyTriesError.cpp
TooSmallStepSizeError.cpp
Translation.cpp
TranslationalJoint.cpp
TranslationConstraintIJ.cpp
TranslationConstraintIqcJc.cpp
TranslationConstraintIqcJqc.cpp
TranslationConstraintIqctJqc.cpp
TranslationLimitIJ.cpp
Units.cpp
UniversalJoint.cpp
UserFunction.cpp
Variable.cpp
VectorNewtonRaphson.cpp
VelICKineSolver.cpp
VelICSolver.cpp
VelKineSolver.cpp
VelSolver.cpp
ZRotation.cpp
ZTranslation.cpp
)
set(ONDSELSOLVER_HEADERS
Abs.h
AbsConstraint.h
AccICKineNewtonRaphson.h
AccICNewtonRaphson.h
AccKineNewtonRaphson.h
AccNewtonRaphson.h
AllowZRotation.h
AllowZRotationConstraintIqctJqc.h
AngleJoint.h
AngleZConstraintIJ.h
AngleZConstraintIqcJc.h
AngleZConstraintIqcJqc.h
AngleZIecJec.h
AngleZIeqcJec.h
AngleZIeqcJeqc.h
AnyGeneralSpline.h
AnyPosICNewtonRaphson.h
ArcSine.h
ArcTan.h
ArcTan2.h
Arguments.h
Array.h
ASMTAllowRotation.h
ASMTAngleJoint.h
ASMTAnimationParameters.h
ASMTAssembly.h
ASMTCompoundJoint.h
ASMTConstantGravity.h
ASMTConstantVelocityJoint.h
ASMTConstraintSet.h
ASMTCylindricalJoint.h
ASMTCylSphJoint.h
ASMTExtrusion.h
ASMTFixedJoint.h
ASMTForceTorque.h
ASMTGearJoint.h
ASMTGeneralMotion.h
ASMTInPlaneJoint.h
ASMTItem.h
ASMTItemIJ.h
ASMTJoint.h
ASMTKinematicIJ.h
ASMTLimit.h
ASMTLineInPlaneJoint.h
ASMTMarker.h
ASMTMotion.h
ASMTNoRotationJoint.h
ASMTParallelAxesJoint.h
ASMTPart.h
ASMTPerpendicularJoint.h
ASMTPlanarJoint.h
ASMTPointInLineJoint.h
ASMTPointInPlaneJoint.h
ASMTPrincipalMassMarker.h
ASMTRackPinionJoint.h
ASMTRefCurve.h
ASMTRefItem.h
ASMTRefPoint.h
ASMTRefSurface.h
ASMTRevCylJoint.h
ASMTRevoluteJoint.h
ASMTRevRevJoint.h
ASMTRotationalMotion.h
ASMTRotationLimit.h
ASMTScrewJoint.h
ASMTSimulationParameters.h
ASMTSpatialContainer.h
ASMTSpatialItem.h
ASMTSphericalJoint.h
ASMTSphSphJoint.h
ASMTTime.h
ASMTTranslationalJoint.h
ASMTTranslationalMotion.h
ASMTTranslationLimit.h
ASMTUniversalJoint.h
AtPointConstraintIJ.h
AtPointConstraintIqcJc.h
AtPointConstraintIqcJqc.h
AtPointConstraintIqctJqc.h
AtPointJoint.h
BasicIntegrator.h
BasicQuasiIntegrator.h
BasicUserFunction.h
CADSystem.h
CartesianFrame.h
CompoundJoint.h
ASMTConeConeContact.h
ASMTContact.h
ASMTCylConeContact.h
ASMTCylCylContact.h
Constant.h
ConstantGravity.h
ConstantVelocityJoint.h
Constraint.h
ConstraintIJ.h
ConstraintSet.h
ConstVelConstraintIJ.h
ConstVelConstraintIqcJc.h
ConstVelConstraintIqcJqc.h
Cosine.h
CREATE.h
CylindricalJoint.h
CylSphJoint.h
DiagonalMatrix.h
DifferenceOperator.h
DifferentiatedGeneralSpline.h
DirectionCosineConstraintIJ.h
DirectionCosineConstraintIqcJc.h
DirectionCosineConstraintIqcJqc.h
DirectionCosineConstraintIqctJqc.h
DirectionCosineIecJec.h
DirectionCosineIeqcJec.h
DirectionCosineIeqcJeqc.h
DirectionCosineIeqctJeqc.h
DiscontinuityError.h
DispCompIecJecIe.h
DispCompIecJecKec.h
DispCompIecJecKeqc.h
DispCompIecJecO.h
DispCompIeqcJecIe.h
DispCompIeqcJecKeqc.h
DispCompIeqcJecO.h
DispCompIeqcJeqcIe.h
DispCompIeqcJeqcKeqc.h
DispCompIeqcJeqcKeqct.h
DispCompIeqcJeqcO.h
DispCompIeqctJeqcIe.h
DispCompIeqctJeqcKeqct.h
DispCompIeqctJeqcO.h
DistanceConstraintIJ.h
DistanceConstraintIqcJc.h
DistanceConstraintIqcJqc.h
DistanceConstraintIqctJqc.h
DistancexyConstraintIJ.h
DistancexyConstraintIqcJc.h
DistancexyConstraintIqcJqc.h
DistIecJec.h
DistIeqcJec.h
DistIeqcJeqc.h
DistIeqctJeqc.h
DistxyIecJec.h
DistxyIeqcJec.h
DistxyIeqcJeqc.h
DistxyIeqctJeqc.h
EigenDecomposition.h
EndFramec.h
EndFrameqc.h
EndFrameqct.h
EndFrameqct2.h
enum.h
EulerAngles.h
EulerAnglesDDot.h
EulerAnglesDot.h
EulerAngleszxz.h
EulerAngleszxzDDot.h
EulerAngleszxzDot.h
EulerArray.h
EulerConstraint.h
EulerParameters.h
EulerParametersDDot.h
EulerParametersDot.h
Exponential.h
ExpressionX.h
ExternalSystem.h
FixedJoint.h
ForceTorqueData.h
ForceTorqueItem.h
FullColumn.h
FullMatrix.h
FullMotion.h
FullRow.h
FullRow.h
FullVector.h
Function.h
FunctionFromData.h
FunctionWithManyArgs.h
FunctionX.h
FunctionXcParameter.h
FunctionXY.h
GearConstraintIJ.h
GearConstraintIqcJc.h
GearConstraintIqcJqc.h
GearJoint.h
GEFullMat.h
GEFullMatFullPv.h
GEFullMatParPv.h
GeneralSpline.h
GESpMat.h
GESpMatFullPv.h
GESpMatFullPvPosIC.h
GESpMatParPv.h
GESpMatParPvMarko.h
GESpMatParPvMarkoFast.h
GESpMatParPvPrecise.h
ICKineIntegrator.h
IndependentVariable.h
InLineJoint.h
InPlaneJoint.h
Integrator.h
IntegratorInterface.h
Item.h
ItemIJ.h
Joint.h
KineIntegrator.h
KinematicIeJe.h
LDUFullMat.h
LDUFullMatParPv.h
LDUSpMat.h
LDUSpMatParPv.h
LDUSpMatParPvMarko.h
LDUSpMatParPvPrecise.h
LimitIJ.h
LinearMultiStepMethod.h
LineInPlaneJoint.h
Ln.h
Log10.h
LogN.h
MarkerFrame.h
MatrixDecomposition.h
MatrixGaussElimination.h
MatrixLDU.h
MatrixSolver.h
MaximumIterationError.h
MbDMath.h
MomentOfInertiaSolver.h
Negative.h
NewtonRaphson.h
NewtonRaphsonError.h
NoRotationJoint.h
NotKinematicError.h
Numeric.h
OrbitAngleZIecJec.h
OrbitAngleZIeqcJec.h
OrbitAngleZIeqcJeqc.h
Orientation.h
ParallelAxesJoint.h
Part.h
PartFrame.h
PerpendicularJoint.h
PlanarJoint.h
PointInLineJoint.h
PointInPlaneJoint.h
PosICDragLimitNewtonRaphson.h
PosICDragNewtonRaphson.h
PosICKineNewtonRaphson.h
PosICNewtonRaphson.h
PosKineNewtonRaphson.h
PosNewtonRaphson.h
PosVelAccData.h
Power.h
PrescribedMotion.h
Product.h
QuasiIntegrator.h
RackPinConstraintIJ.h
RackPinConstraintIqcJc.h
RackPinConstraintIqcJqc.h
RackPinJoint.h
Reciprocal.h
RedundantConstraint.h
resource.h
RevCylJoint.h
RevoluteJoint.h
RevRevJoint.h
RotationLimitIJ.h
RowTypeMatrix.h
ScalarNewtonRaphson.h
ScrewConstraintIJ.h
ScrewConstraintIqcJc.h
ScrewConstraintIqcJqc.h
ScrewJoint.h
SimulationStoppingError.h
Sine.h
SingularMatrixError.h
Solver.h
SparseColumn.h
SparseMatrix.h
SparseRow.h
SparseVector.h
SphericalJoint.h
SphSphJoint.h
StableBackwardDifference.h
StateData.h
Sum.h
Symbolic.h
SymbolicParser.h
SyntaxError.h
System.h
SystemNewtonRaphson.h
SystemSolver.h
SymTime.h
TooManyTriesError.h
TooSmallStepSizeError.h
Translation.h
TranslationalJoint.h
TranslationConstraintIJ.h
TranslationConstraintIqcJc.h
TranslationConstraintIqcJqc.h
TranslationConstraintIqctJqc.h
TranslationLimitIJ.h
Units.h
UniversalJoint.h
UserFunction.h
Variable.h
VectorNewtonRaphson.h
VelICKineSolver.h
VelICSolver.h
VelKineSolver.h
VelSolver.h
ZRotation.h
ZTranslation.h
)
target_sources(OndselSolver PRIVATE
"${ONDSELSOLVER_SRC}"
"${ONDSELSOLVER_HEADERS}")
set_target_properties(OndselSolver
PROPERTIES VERSION ${PROJECT_VERSION}
SOVERSION 1
PUBLIC_HEADER "${ONDSELSOLVER_HEADERS}"
)
if(MSVC)
target_compile_definitions(OndselSolver PRIVATE _USE_MATH_DEFINES)
endif(MSVC)
configure_file(../OndselSolver.pc.in ${CMAKE_BINARY_DIR}/OndselSolver.pc @ONLY)
install(TARGETS OndselSolver
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/OndselSolver)
install(FILES ${CMAKE_BINARY_DIR}/OndselSolver.pc
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)

View File

@@ -23,7 +23,7 @@ namespace MbD {
template<typename T>
class CREATE {
public:
static std::shared_ptr<T> With(const char* name) {
static std::shared_ptr<T> With(const std::string& name) {
auto inst = std::make_shared<T>(name);
inst->initialize();
return inst;

View File

@@ -14,7 +14,7 @@ CartesianFrame::CartesianFrame()
{
}
CartesianFrame::CartesianFrame(const char* str) : Item(str)
CartesianFrame::CartesianFrame(const std::string& str) : Item(str)
{
}

View File

@@ -15,7 +15,7 @@ namespace MbD {
{
public:
CartesianFrame();
CartesianFrame(const char* str);
CartesianFrame(const std::string& str);
void initialize() override;
};
}

View File

@@ -14,6 +14,6 @@ MbD::CompoundJoint::CompoundJoint()
{
}
MbD::CompoundJoint::CompoundJoint(const char* str) : Joint(str)
MbD::CompoundJoint::CompoundJoint(const std::string& str) : Joint(str)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//distanceIJ
public:
CompoundJoint();
CompoundJoint(const char* str);
CompoundJoint(const std::string& str);
double distanceIJ = 0.0;
};

View File

@@ -18,7 +18,7 @@ MbD::ConstantVelocityJoint::ConstantVelocityJoint()
{
}
MbD::ConstantVelocityJoint::ConstantVelocityJoint(const char* str) : AtPointJoint(str)
MbD::ConstantVelocityJoint::ConstantVelocityJoint(const std::string& str) : AtPointJoint(str)
{
}
//

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
ConstantVelocityJoint();
ConstantVelocityJoint(const char* str);
ConstantVelocityJoint(const std::string& str);
//void initializeLocally() override;
void initializeGlobally() override;
void connectsItoJ(EndFrmsptr frmI, EndFrmsptr frmJ) override;

View File

@@ -20,7 +20,7 @@ Constraint::Constraint() : Item()
aConstant = 0.0;
}
Constraint::Constraint(const char* str) : Item(str)
Constraint::Constraint(const std::string& str) : Item(str)
{
}

View File

@@ -19,7 +19,7 @@ namespace MbD {
//iG aG lam mu lamDeriv owner
public:
Constraint();
Constraint(const char* str);
Constraint(const std::string& str);
void initialize() override;
virtual void addToJointForceI(FColDsptr col);

View File

@@ -11,7 +11,7 @@ MbD::ConstraintSet::ConstraintSet()
{
}
MbD::ConstraintSet::ConstraintSet(const char* str) : ItemIJ(str)
MbD::ConstraintSet::ConstraintSet(const std::string& str) : ItemIJ(str)
{
}

View File

@@ -18,7 +18,7 @@ namespace MbD {
//
public:
ConstraintSet();
ConstraintSet(const char* str);
ConstraintSet(const std::string& str);
void constraintsDo(const std::function <void(std::shared_ptr<Constraint>)>& f);
void initialize() override;
void initializeGlobally() override;

View File

@@ -17,7 +17,7 @@ MbD::CylSphJoint::CylSphJoint()
{
}
MbD::CylSphJoint::CylSphJoint(const char* str) : CompoundJoint(str)
MbD::CylSphJoint::CylSphJoint(const std::string& str) : CompoundJoint(str)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
CylSphJoint();
CylSphJoint(const char* str);
CylSphJoint(const std::string& str);
void initializeGlobally() override;

View File

@@ -18,7 +18,7 @@ CylindricalJoint::CylindricalJoint()
{
}
CylindricalJoint::CylindricalJoint(const char* str) : InLineJoint(str)
CylindricalJoint::CylindricalJoint(const std::string& str) : InLineJoint(str)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//frmI frmJ constraints friction
public:
CylindricalJoint();
CylindricalJoint(const char* str);
CylindricalJoint(const std::string& str);
void initializeGlobally() override;
};
}

View File

@@ -19,7 +19,7 @@ using namespace MbD;
EndFramec::EndFramec() {
}
EndFramec::EndFramec(const char* str) : CartesianFrame(str) {
EndFramec::EndFramec(const std::string& str) : CartesianFrame(str) {
}
FMatDsptr MbD::EndFramec::aAeO()

View File

@@ -23,7 +23,7 @@ namespace MbD {
//markerFrame rOeO aAOe
public:
EndFramec();
EndFramec(const char* str);
EndFramec(const std::string& str);
FMatDsptr aAeO();
System* root() override;

View File

@@ -20,7 +20,7 @@ using namespace MbD;
EndFrameqc::EndFrameqc() {
}
EndFrameqc::EndFrameqc(const char* str) : EndFramec(str) {
EndFrameqc::EndFrameqc(const std::string& str) : EndFramec(str) {
}
void EndFrameqc::initialize()

View File

@@ -21,7 +21,7 @@ namespace MbD {
//prOeOpE pprOeOpEpE pAOepE ppAOepEpE
public:
EndFrameqc();
EndFrameqc(const char* str);
EndFrameqc(const std::string& str);
void initialize() override;
void initializeGlobally() override;
void initEndFrameqct() override;

View File

@@ -10,7 +10,7 @@
#include "MarkerFrame.h"
#include "System.h"
#include "Symbolic.h"
#include "Time.h"
#include "SymTime.h"
#include "EulerParameters.h"
#include "CREATE.h"
#include "EulerAngleszxz.h"
@@ -22,7 +22,7 @@ using namespace MbD;
EndFrameqct::EndFrameqct() {
}
EndFrameqct::EndFrameqct(const char* str) : EndFrameqc(str) {
EndFrameqct::EndFrameqct(const std::string& str) : EndFrameqc(str) {
}
void EndFrameqct::initialize()

View File

@@ -21,7 +21,7 @@ namespace MbD {
//rmem prmempt pprmemptpt aAme pAmept ppAmeptpt prOeOpt pprOeOpEpt pprOeOptpt pAOept ppAOepEpt ppAOeptpt
public:
EndFrameqct();
EndFrameqct(const char* str);
EndFrameqct(const std::string& str);
void initialize() override;
void initializeLocally() override;
void initializeGlobally() override;

View File

@@ -10,7 +10,7 @@
#include "MarkerFrame.h"
#include "System.h"
#include "Symbolic.h"
#include "Time.h"
#include "SymTime.h"
#include "EulerParameters.h"
#include "CREATE.h"
#include "EulerAngleszxz.h"
@@ -22,7 +22,7 @@ using namespace MbD;
EndFrameqct2::EndFrameqct2() {
}
EndFrameqct2::EndFrameqct2(const char* str) : EndFrameqct(str) {
EndFrameqct2::EndFrameqct2(const std::string& str) : EndFrameqct(str) {
}
void EndFrameqct2::initpPhiThePsiptBlks()

View File

@@ -22,7 +22,7 @@ namespace MbD {
//
public:
EndFrameqct2();
EndFrameqct2(const char* str);
EndFrameqct2(const std::string& str);
void initpPhiThePsiptBlks() override;
void initppPhiThePsiptptBlks() override;
void evalAme() override;

View File

@@ -17,7 +17,7 @@ EulerConstraint::EulerConstraint()
}
EulerConstraint::EulerConstraint(const char* str) : Constraint(str)
EulerConstraint::EulerConstraint(const std::string& str) : Constraint(str)
{
}

View File

@@ -20,7 +20,7 @@ namespace MbD {
//pGpE iqE
public:
EulerConstraint();
EulerConstraint(const char* str);
EulerConstraint(const std::string& str);
void initialize() override;
void calcPostDynCorrectorIteration() override;
void useEquationNumbers() override;

View File

@@ -59,7 +59,7 @@ void MbD::ExternalSystem::outputFor(AnalysisType type)
}
}
void MbD::ExternalSystem::logString(std::string& str)
void MbD::ExternalSystem::logString(const std::string& str)
{
std::cout << str << std::endl;
}

View File

@@ -29,7 +29,7 @@ namespace MbD {
void preMbDrunDragStep(std::shared_ptr<System> mbdSys, std::shared_ptr<std::vector<std::shared_ptr<Part>>> dragParts);
void updateFromMbD();
void outputFor(AnalysisType type);
void logString(std::string& str);
void logString(const std::string& str);
void logString(double value);
void runOndselPiston();
void runPiston();

View File

@@ -16,7 +16,7 @@ MbD::FixedJoint::FixedJoint()
{
}
MbD::FixedJoint::FixedJoint(const char* str) : AtPointJoint(str)
MbD::FixedJoint::FixedJoint(const std::string& str) : AtPointJoint(str)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
FixedJoint();
FixedJoint(const char* str);
FixedJoint(const std::string& str);
void initializeGlobally() override;

View File

@@ -16,7 +16,7 @@ MbD::FullMotion::FullMotion()
{
}
MbD::FullMotion::FullMotion(const char*)
MbD::FullMotion::FullMotion(const std::string&)
{
}

View File

@@ -19,7 +19,7 @@ namespace MbD {
//frIJI fangIJJ
public:
FullMotion();
FullMotion(const char* str);
FullMotion(const std::string& str);
void connectsItoJ(EndFrmsptr frmI, EndFrmsptr frmJ) override;
void initializeGlobally() override;
void initMotions() override;

View File

@@ -26,10 +26,9 @@ void MbD::FunctionX::arguments(Symsptr args)
xx = arguments->terms->front();
}
Symsptr MbD::FunctionX::copyWith(Symsptr)
Symsptr MbD::FunctionX::copyWith(Symsptr self)
{
assert(false);
return Symsptr();
return self;
}
Symsptr MbD::FunctionX::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)

View File

@@ -10,6 +10,7 @@
#include "GESpMatParPvPrecise.h"
#include "SingularMatrixError.h"
#include "CREATE.h"
using namespace MbD;
@@ -104,3 +105,22 @@ void GESpMatParPvPrecise::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr f
rowOrder->at(i) = i;
}
}
void MbD::GESpMatParPvPrecise::runSpMat()
{
auto spMat = std::make_shared<SparseMatrix<double>>(3, 3);
spMat->atijput(0, 0, 1.0);
spMat->atijput(0, 1, 1.0);
spMat->atijput(1, 0, 1.0);
spMat->atijput(1, 1, 1.0);
spMat->atijput(1, 2, 1.0);
spMat->atijput(2, 1, 1.0);
spMat->atijput(2, 2, 1.0);
auto fullCol = std::make_shared<FullColumn<double>>(3);
fullCol->atiput(0, 1.0);
fullCol->atiput(1, 2.0);
fullCol->atiput(2, 3.0);
auto matSolver = CREATE<GESpMatParPvPrecise>::With();
auto answer = matSolver->solvewithsaveOriginal(spMat, fullCol, true);
auto aAx = spMat->timesFullColumn(answer);
}

View File

@@ -17,6 +17,7 @@ namespace MbD {
public:
void doPivoting(size_t p) override;
void preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) override;
static void runSpMat();
};
}

View File

@@ -17,7 +17,7 @@ MbD::GearJoint::GearJoint()
{
}
MbD::GearJoint::GearJoint(const char*)
MbD::GearJoint::GearJoint(const std::string&)
{
}
//

View File

@@ -16,7 +16,7 @@ namespace MbD {
//radiusI radiusJ aConstant
public:
GearJoint();
GearJoint(const char* str);
GearJoint(const std::string& str);
//void initializeLocally() override;
void initializeGlobally() override;

View File

@@ -30,7 +30,7 @@ void ICKineIntegrator::selectOrder()
void ICKineIntegrator::preRun()
{
system->Solver::logString("MbD: Starting quasi kinematic analysis.");
system->logString("MbD: Starting quasi kinematic analysis.");
QuasiIntegrator::preRun();
}

View File

@@ -13,7 +13,7 @@ MbD::InLineJoint::InLineJoint()
{
}
MbD::InLineJoint::InLineJoint(const char*)
MbD::InLineJoint::InLineJoint(const std::string&)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//Abstract class. Create subclasses only.
public:
InLineJoint();
InLineJoint(const char* str);
InLineJoint(const std::string& str);
virtual void initializeGlobally() = 0; //To prevent instantiation of this class
void createInLineConstraints();

View File

@@ -13,7 +13,7 @@ MbD::InPlaneJoint::InPlaneJoint()
{
}
MbD::InPlaneJoint::InPlaneJoint(const char*)
MbD::InPlaneJoint::InPlaneJoint(const std::string&)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//offset
public:
InPlaneJoint();
InPlaneJoint(const char* str);
InPlaneJoint(const std::string& str);
virtual void initializeGlobally() = 0; //To prevent instantiation of this class
void createInPlaneConstraint();

View File

@@ -30,7 +30,7 @@ void IntegratorInterface::setSystem(Solver* sys)
system = static_cast<SystemSolver*>(sys);
}
void IntegratorInterface::logString(std::string& str)
void IntegratorInterface::logString(const std::string& str)
{
system->logString(str);
}

View File

@@ -24,7 +24,7 @@ namespace MbD {
virtual void checkForDiscontinuity() = 0;
void setSystem(Solver* sys) override;
void logString(std::string& str) override;
void logString(const std::string& str) override;
void run() override;
size_t orderMax();
virtual void incrementTime(double tnew);

View File

@@ -24,7 +24,7 @@ Item::Item() {
name = std::to_string(nanoseconds);
}
Item::Item(const char* str) : name(str)
Item::Item(const std::string& str) : name(str)
{
}
@@ -377,11 +377,6 @@ void Item::fillVelICJacob(SpMatDsptr)
{
}
void MbD::Item::getString(std::string)
{
assert(false);
}
void Item::setqsudotlam(FColDsptr)
{
}
@@ -549,23 +544,17 @@ void Item::useEquationNumbers()
{
}
void Item::logString(std::string& str)
void Item::logString(const std::string& str)
{
this->root()->logString(str);
}
void Item::logString(const char* chars)
{
std::string str = chars;
this->logString(str);
}
void MbD::Item::logStringwithArgument(const char*, const char*)
void MbD::Item::logStringwithArgument(const std::string&, const std::string&)
{
assert(false);
}
void MbD::Item::logStringwithArguments(const char*, std::shared_ptr<std::vector<char*>>)
void MbD::Item::logStringwithArguments(const std::string&, std::shared_ptr<std::vector<std::string>>)
{
assert(false);
}

View File

@@ -27,7 +27,7 @@ namespace MbD {
//name
public:
Item();
Item(const char* str);
Item(const std::string& str);
virtual ~Item() {}
virtual System* root();
void noop();
@@ -73,7 +73,6 @@ namespace MbD {
virtual void fillStaticJacob(FMatDsptr mat);
virtual void fillVelICError(FColDsptr col);
virtual void fillVelICJacob(SpMatDsptr mat);
virtual void getString(std::string str);
virtual void initialize();
virtual void initializeGlobally();
virtual void initializeLocally();
@@ -81,10 +80,9 @@ namespace MbD {
virtual bool isJointTorque();
virtual bool isKinedotIJ();
virtual bool isKineIJ();
virtual void logString(std::string& str);
void logString(const char* chars);
virtual void logStringwithArgument(const char* chars, const char* chars1);
virtual void logStringwithArguments(const char* chars, std::shared_ptr<std::vector<char*>> arrayOfChars);
virtual void logString(const std::string& str);
virtual void logStringwithArgument(const std::string& chars, const std::string& chars1);
virtual void logStringwithArguments(const std::string& chars, std::shared_ptr<std::vector<std::string>> arrayOfChars);
virtual void normalImpulse(double imp);
virtual void postAccIC();
virtual void postAccICIteration();

View File

@@ -6,7 +6,7 @@ MbD::ItemIJ::ItemIJ()
{
}
MbD::ItemIJ::ItemIJ(const char* str) : Item(str)
MbD::ItemIJ::ItemIJ(const std::string& str) : Item(str)
{
}

View File

@@ -19,7 +19,7 @@ namespace MbD {
//
public:
ItemIJ();
ItemIJ(const char* str);
ItemIJ(const std::string& str);
ItemIJ(EndFrmsptr frmi, EndFrmsptr frmj);
virtual void connectsItoJ(EndFrmsptr frmI, EndFrmsptr frmJ);

View File

@@ -26,7 +26,7 @@ Joint::Joint() {
}
Joint::Joint(const char* str) : ConstraintSet(str) {
Joint::Joint(const std::string& str) : ConstraintSet(str) {
}

View File

@@ -24,7 +24,7 @@ namespace MbD {
//frmI frmJ constraints friction
public:
Joint();
Joint(const char* str);
Joint(const std::string& str);
virtual ~Joint() {}
void initializeLocally() override;

View File

@@ -16,7 +16,7 @@ using namespace MbD;
void KineIntegrator::preRun()
{
system->Solver::logString("MbD: Starting kinematic analysis.");
system->logString("MbD: Starting kinematic analysis.");
QuasiIntegrator::preRun();
}

View File

@@ -16,7 +16,7 @@ MbD::LineInPlaneJoint::LineInPlaneJoint()
{
}
MbD::LineInPlaneJoint::LineInPlaneJoint(const char*)
MbD::LineInPlaneJoint::LineInPlaneJoint(const std::string&)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
LineInPlaneJoint();
LineInPlaneJoint(const char* str);
LineInPlaneJoint(const std::string& str);
void initializeGlobally() override;
};

View File

@@ -21,7 +21,7 @@ MarkerFrame::MarkerFrame()
{
}
MarkerFrame::MarkerFrame(const char* str) : CartesianFrame(str) {
MarkerFrame::MarkerFrame(const std::string& str) : CartesianFrame(str) {
}
System* MarkerFrame::root()

View File

@@ -28,7 +28,7 @@ namespace MbD {
//partFrame rpmp aApm rOmO aAOm prOmOpE pAOmpE pprOmOpEpE ppAOmpEpE endFrames
public:
MarkerFrame();
MarkerFrame(const char* str);
MarkerFrame(const std::string& str);
System* root() override;
void initialize() override;
void setPartFrame(PartFrame* partFrm);

View File

@@ -70,12 +70,12 @@ void MatrixSolver::findScalingsForRowRange(size_t begin, size_t end)
}
}
void MatrixSolver::throwSingularMatrixError(const char* chars)
void MatrixSolver::throwSingularMatrixError(const std::string& chars)
{
throw SingularMatrixError(chars);
}
void MatrixSolver::throwSingularMatrixError(const char* chars, std::shared_ptr<FullColumn<size_t>> redunEqnNos)
void MatrixSolver::throwSingularMatrixError(const std::string& chars, std::shared_ptr<FullColumn<size_t>> redunEqnNos)
{
throw SingularMatrixError(chars, redunEqnNos);
}

View File

@@ -40,8 +40,8 @@ namespace MbD {
virtual void postSolve() = 0;
virtual void findScalingsForRowRange(size_t begin, size_t end);
virtual double getmatrixArowimaxMagnitude(size_t i) = 0;
void throwSingularMatrixError(const char* chars);
void throwSingularMatrixError(const char* chars, std::shared_ptr<FullColumn<size_t>> redunEqnNos);
void throwSingularMatrixError(const std::string& chars);
void throwSingularMatrixError(const std::string& chars, std::shared_ptr<FullColumn<size_t>> redunEqnNos);
size_t m = 0, n = 0;
FColDsptr answerX, rightHandSideB, rowScalings, pivotValues;

View File

@@ -17,7 +17,7 @@ MbD::NoRotationJoint::NoRotationJoint()
{
}
MbD::NoRotationJoint::NoRotationJoint(const char*)
MbD::NoRotationJoint::NoRotationJoint(const std::string&)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
NoRotationJoint();
NoRotationJoint(const char* str);
NoRotationJoint(const std::string& str);
void initializeGlobally() override;
};

View File

@@ -16,7 +16,7 @@ MbD::Orientation::Orientation()
{
}
MbD::Orientation::Orientation(const char*)
MbD::Orientation::Orientation(const std::string&)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
Orientation();
Orientation(const char* str);
Orientation(const std::string& str);
void initializeGlobally() override;
};

View File

@@ -16,7 +16,7 @@ MbD::ParallelAxesJoint::ParallelAxesJoint()
{
}
MbD::ParallelAxesJoint::ParallelAxesJoint(const char*)
MbD::ParallelAxesJoint::ParallelAxesJoint(const std::string&)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
ParallelAxesJoint();
ParallelAxesJoint(const char* str);
ParallelAxesJoint(const std::string& str);
void initializeGlobally() override;
};

View File

@@ -22,7 +22,7 @@ using namespace MbD;
Part::Part() {
}
Part::Part(const char* str) : Item(str) {
Part::Part(const std::string& str) : Item(str) {
}
System* MbD::Part::root()

View File

@@ -22,7 +22,7 @@ namespace MbD {
//ToDo: ipX ipE m aJ partFrame pX pXdot pE pEdot mX mE mEdot pTpE ppTpEpE ppTpEpEdot
public:
Part();
Part(const char* str);
Part(const std::string& str);
System* root() override;
void initialize() override;
void initializeLocally() override;

View File

@@ -24,7 +24,7 @@ using namespace MbD;
PartFrame::PartFrame()
{
}
PartFrame::PartFrame(const char* str) : CartesianFrame(str)
PartFrame::PartFrame(const std::string& str) : CartesianFrame(str)
{
}
System* PartFrame::root()
@@ -127,7 +127,7 @@ void PartFrame::addMarkerFrame(std::shared_ptr<MarkerFrame> markerFrame)
markerFrames->push_back(markerFrame);
}
EndFrmsptr PartFrame::endFrame(std::string name)
EndFrmsptr PartFrame::endFrame(const std::string& name)
{
auto match = std::find_if(markerFrames->begin(), markerFrames->end(), [&](auto& mkr) {return mkr->name == name; });
return (*match)->endFrames->at(0);

View File

@@ -30,7 +30,7 @@ namespace MbD {
//ToDo: part iqX iqE qX qE qXdot qEdot qXddot qEddot aGeu aGabs markerFrames
public:
PartFrame();
PartFrame(const char* str);
PartFrame(const std::string& str);
System* root() override;
void initialize() override;
void initializeLocally() override;
@@ -57,7 +57,7 @@ namespace MbD {
void setPart(Part* x);
Part* getPart();
void addMarkerFrame(std::shared_ptr<MarkerFrame> x);
EndFrmsptr endFrame(std::string name);
EndFrmsptr endFrame(const std::string& name);
void aGabsDo(const std::function <void(std::shared_ptr<Constraint>)>& f);
void markerFramesDo(const std::function <void(std::shared_ptr<MarkerFrame>)>& f);
void removeRedundantConstraints(std::shared_ptr<std::vector<size_t>> redundantEqnNos) override;

View File

@@ -16,7 +16,7 @@ MbD::PerpendicularJoint::PerpendicularJoint()
{
}
MbD::PerpendicularJoint::PerpendicularJoint(const char*)
MbD::PerpendicularJoint::PerpendicularJoint(const std::string&)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
PerpendicularJoint();
PerpendicularJoint(const char* str);
PerpendicularJoint(const std::string& str);
void initializeGlobally() override;
};

View File

@@ -16,7 +16,7 @@ MbD::PlanarJoint::PlanarJoint()
{
}
MbD::PlanarJoint::PlanarJoint(const char*)
MbD::PlanarJoint::PlanarJoint(const std::string&)
{
}

View File

@@ -16,7 +16,7 @@ namespace MbD {
//
public:
PlanarJoint();
PlanarJoint(const char* str);
PlanarJoint(const std::string& str);
void initializeGlobally() override;
};

Some files were not shown because too many files have changed in this diff Show More