Skip to contents

ActuatorBase(), PathwayBase(), WrappingGeometryBase(), BodyBase() and MethodBase() are SymPy's abstract base classes of actuators, pathways, wrapping geometries, bodies and equation of motion methods: calling one raises a TypeError, and their names are the classes that the concrete objects inherit, so inherits(x, "PathwayBase") tests for a pathway. LoadBase(location, vector) is the named pair that Force() and Torque() extend. BosonicBasis() is the base class of VarBosonicBasis() and FixedBosonicBasis(). Vector() and Dyadic() are the vectors and dyadics of sympy.physics.vector, PhysVector() and PhysDyadic().

Usage

ActuatorBase(...)

PathwayBase(...)

WrappingGeometryBase(...)

BodyBase(...)

LoadBase(location, vector)

MethodBase(...)

BosonicBasis()

Vector(inlist)

Dyadic(inlist)

Arguments

...

Ignored; abstract classes cannot be built.

location, vector

The point or frame and the vector of a load.

inlist

See PhysVector() and PhysDyadic().

Value

BosonicBasis() an empty basis; LoadBase() a load; Vector() and Dyadic() a vector and a dyadic; the others signal an error.

Examples

tryCatch(PathwayBase(), error = conditionMessage)
#> [1] "Can't instantiate abstract class PathwayBase without an implementation for abstract methods 'extension_velocity', 'length', 'to_loads'"
inherits(LinearPathway(PhysPoint("pA"), PhysPoint("pB")), "PathwayBase")
#> [1] TRUE
inherits(VarBosonicBasis(3), "BosonicBasis")
#> [1] TRUE
N <- ReferenceFrame("N")
Vector(list(list(Matrix(list(1, 2, 0)), N)))
#> N.x + 2*N.y