Boundary Conditions

mechanica.BoundaryCondition

alias of mechanica.mechanica.MxBoundaryCondition

class mechanica.MxBoundaryCondition

A condition on a boundary of the universe.

property kind_str: mechanica.mechanica.MxBoundaryCondition.str

The name of the kind of boundary condition.

restore

restoring percent.

When objects hit this boundary, they get reflected back at restore percent, so if restore is 0.5, and object hitting the boundary at 3 length / time recoils with a velocity of 1.5 lengths / time.

velocity

the velocity on the boundary

name

name of the boundary

normal

vector normal to the boundary

mechanica.BoundaryConditions

alias of mechanica.mechanica.MxBoundaryConditions

class mechanica.MxBoundaryConditions(*args)

The BoundaryConditions class serves as a container for the six instances of the MxBoundaryCondition object

left

The left boundary

right

The right boundary

front

The front boundary

back

The back boundary

bottom

The bottom boundary

top

The top boundary

toString() std::string

Get a JSON string representation

Return type

string

Returns

std::string

static fromString(str: std::string const &) MxBoundaryConditions *

Create from a JSON string representation.

Parameters

str (string) –

Return type

MxBoundaryConditions

Returns

MxBoundaryConditions*

__reduce__()

Helper for pickle.