dyn_vertex_structs.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2019 by
  4. * The Salk Institute for Biological Studies and
  5. * Pittsburgh Supercomputing Center, Carnegie Mellon University
  6. *
  7. * Use of this source code is governed by an MIT-style
  8. * license that can be found in the LICENSE file or at
  9. * https://opensource.org/licenses/MIT.
  10. *
  11. ******************************************************************************/
  12. #ifndef SRC4_DYN_VERTEX_STRUCTS_H_
  13. #define SRC4_DYN_VERTEX_STRUCTS_H_
  14. #include "defines.h"
  15. #include "../libmcell/api/shared_structs.h"
  16. namespace MCell {
  17. class Partition;
  18. struct WallMoveInfo {
  19. bool wall_changes_area;
  20. std::vector<VertexMoveInfo*> vertex_moves;
  21. };
  22. typedef std::map<wall_index_t, WallMoveInfo> WallsWithTheirMovesMap;
  23. struct VolumeMoleculeMoveInfo {
  24. VolumeMoleculeMoveInfo(const molecule_id_t molecule_id_, const wall_index_t wall_index_, const bool place_above_)
  25. : molecule_id(molecule_id_), wall_index(wall_index_), place_above(place_above_) {
  26. }
  27. // molecule to move
  28. molecule_id_t molecule_id;
  29. // which wall moved this molecule first
  30. wall_index_t wall_index;
  31. // above or below
  32. bool place_above;
  33. };
  34. typedef std::vector<VolumeMoleculeMoveInfo> VolumeMoleculeMoveInfoVector;
  35. struct SurfaceMoleculeMoveInfo {
  36. SurfaceMoleculeMoveInfo(const molecule_id_t molecule_id_, const wall_index_t wall_index_, const Vec3 pos3d_)
  37. : molecule_id(molecule_id_), wall_index(wall_index_), pos3d(pos3d_) {
  38. }
  39. // molecule to move
  40. molecule_id_t molecule_id;
  41. // which wall moved this molecule first
  42. wall_index_t wall_index;
  43. // above or below
  44. Vec3 pos3d;
  45. };
  46. typedef std::vector<SurfaceMoleculeMoveInfo> SurfaceMoleculeMoveInfoVector;
  47. } // namespace MCell
  48. #endif /* SRC4_DYN_VERTEX_STRUCTS_H_ */