dynamic_geometry.rst 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .. _dynamic_geometry_section:
  2. ****************
  3. Dynamic Geometry
  4. ****************
  5. Overview
  6. ########
  7. Dynamic geometry allows manipulation with individual mesh geometry vertices during simulation.
  8. This section provides an overview of related methods.
  9. NOTE: this documentation is not generated automatically and may get out of date.
  10. Check the generated API reference when needed.
  11. Vertex Representation
  12. #####################
  13. In MCell, vertices are represented with class Vec3.
  14. It has attributes: x, y, z, and a method .tolist() that returns the coordinates as a Python list with three elements.
  15. Class Vec3 also provides usual operators such as +, -, *, /, ==.
  16. Geometry Introspection
  17. ######################
  18. This subsection lists several methods used for introspecting geometry state:
  19. * :ref:`Model.get_vertex <Model__get_vertex>` - Returns coordinates of a vertex as Vec3.
  20. * :ref:`Model.get_wall <Model__get_wall>` - Returns information about a wall belonging to a given object.
  21. * :ref:`Model.get_vertex_unit_normal <Model__get_vertex_unit_normal>` - Returns sum of all wall normals that use this vertex normalized to a unit vector of length 1um. This represents the unit vector pointing outwards from the vertex.
  22. * :ref:`Model.get_wall_unit_normal <Model__get_wall_unit_normal>` - Returns wall normal of length 1um.
  23. Geometry Modifications
  24. ######################
  25. * :ref:`Model.add_vertex_move <Model__add_vertex_move>` - Adds a displacement for a given object's vertex, only stored until apply_vertex_moves is called.
  26. * :ref:`Model.apply_vertex_moves <Model__apply_vertex_moves>` - Applies all the vertex moves specified with add_vertex_move call. See API documentation for more details.
  27. Wall Hit Callbacks
  28. ##################
  29. * :ref:`Model.register_mol_wall_hit_callback <Model__register_mol_wall_hit_callback>` -
  30. Special Attributes and Methods
  31. ##############################
  32. * :ref:`Wall.is_movable <Wall__is_movable>` - The attribute says whether the wall can be moved through calls to Model.apply_vertex_moves. If False, all changes to vertices are ignored.
  33. * :ref:`Model.pair_molecules <Model__pair_molecules>` - Allows to pair surface molecules on different objects. When a wall of one molecule is moved, wall of the second paired molecule is also moved. See :ref:`Model.apply_vertex_moves <Model__apply_vertex_moves>` for more details.