mpacts.commands.geometry. modifymesh

In order to be able to use this module import it like this:

import mpacts.commands.geometry.modifymesh
#or assign it to a shorter name
import mpacts.commands.geometry.modifymesh as mod

DynamicMeshUniformizationCommand

class mpacts.commands.geometry.modifymesh.DynamicMeshUniformizationCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Displaces nodes in a mesh to ‘equalize’ its connected edge lengths in a dynamic way with a given ‘relaxation time’.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • nodeIndexList — Array of std::vector<R3::Index_t> containing list of primitives connected to each node
    • pc — Particle container on which the command is applied
    • relaxation_time — Relaxation time of the uniformization process
    • triangles — Array Manager containing the triangles of the deformable body.
  • Optional keywords:
    • Deff (m^2 . s^-1) (default value = 0) — Effective diffusivity, if given, nodes will (on top of the remeshing) receive a random displacement. The idea is that this would prevent the remeshing of getting stuck in a local minimum. Magnitude of the displacement is given by sqrt(2*D)*dt.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • weight_with_area (default value = 0) — If ‘true’, the relative ara of one triangle compared to the total ngon’s neighbourhoods area is used to weight the displacement (bigger is more) of the uniformization correction.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, nodeIndexList, triangles, relaxation_time, [gate, predicate, weight_with_area, Deff]
DynamicMeshUniformizationCommand(name, parent, **kwargs)