Solver

class tissue_forge.models.vertex.solver.MeshSolverTimers

Mesh solver performance timers

reset()

Reset the timers

str()

Get a string representation of the current timer average values

class tissue_forge.models.vertex.solver.MeshSolver

Vertex model mesh solver

A singleton solver performs all vertex model dynamics simulation at runtime.

property timers

Performance timers

static init()

Initialize the solver

static get()

Get the solver singleton

static compact()

Reduce internal buffers and storage

static engine_lock()

Locks the engine for thread-safe engine operations

static engine_unlock()

Unlocks the engine for thread-safe engine operations

static is_dirty()

Test whether the current mesh state needs updated

static set_dirty(_isDirty)

Set whether the current mesh state needs updated

static get_mesh()

Get the mesh

static register_type(*args)

Overload 1:

Register a body type

Parameters:

_type (BodyType) – type


Overload 2:

Register a surface type

Parameters:

_type (SurfaceType) – type

static find_surface_from_name(_name)

Find a registered surface type by name

Parameters:

_name (string) – type name

static find_body_from_name(_name)

Find a registered body type by name

Parameters:

_name (string) – type name

static get_body_type(typeId)

Get a body type by id

Parameters:

typeId (int) – type id

static get_surface_type(typeId)

Get a surface type by id

Parameters:

typeId (int) – type id

static num_body_types()

Get the number of registered body types

static num_surface_types()

Get the number of registered surface types

static num_vertices()

Get the number of vertices

static num_surfaces()

Get the number of surfaces

static num_bodies()

Get the number of bodies

static size_vertices()

Get the size of the list of vertices

static size_surfaces()

Get the size of the list of surfaces

static size_bodies()

Get the size of the list of bodies

static position_changed()

Update internal data due to a change in position

static update(_force=0)

Update the solver if dirty

Parameters:

_force (boolean, optional) – flag to force an update and ignore whether the solver is dirty

static get_log()

Get the current logger events

static log(*args, **kwargs)

Log an event

Parameters:
  • type (int) – type of event

  • objIDs (std::vector< int,std::allocator< int > >) – object ids

  • objTypes (std::vector< TissueForge::models::vertex::MeshObjTypeLabel,std::allocator< TissueForge::models::vertex::MeshObjTypeLabel > >) – object type ids

  • name (string, optional) – name of event

static is_3d()

Test whether the mesh is 3D.

A 3D mesh has at least one body.

Return type:

boolean

Returns:

true if the mesh is 3D