chkpt_vol_mol.cpp 919 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2020 by
  4. * The Salk Institute for Biological Studies
  5. *
  6. * Use of this source code is governed by an MIT-style
  7. * license that can be found in the LICENSE file or at
  8. * https://opensource.org/licenses/MIT.
  9. *
  10. ******************************************************************************/
  11. #include "api/chkpt_vol_mol.h"
  12. #include "api/base_chkpt_mol.h"
  13. #include "src4/molecule.h"
  14. using namespace std;
  15. namespace MCell {
  16. namespace API {
  17. ChkptVolMol::ChkptVolMol(
  18. const MCell::Molecule& vm,
  19. const IdSpeciesMap& id_species_map, const double time_unit,
  20. const double length_unit) :
  21. GEN_CHKPT_MOL_CTOR(GenChkptVolMol, vm, id_species_map, time_unit) {
  22. assert(vm.id != MOLECULE_ID_INVALID);
  23. type = MoleculeType::VOLUME;
  24. pos = vm.v.pos * Vec3(length_unit);
  25. }
  26. } // namespace API
  27. } // namespace MCell