get complete particle from particle ID
Hi,
I'm looking for a function that takes the ID of a particle and returns the complete particle. Something like
particle = function(
The description of getParticleList makes it sound like it does the job, but it doesn't.
particleList = getParticleList
seems to only work for SimpleSpheres, because when I use RotSpheres I get an error:
TypeError: No registered converter was able to extract a C++ reference to type esys::lsm:
Any suggestions?
More context: Checkpointers save bond information as
ID1 ID2 BondTag
I am trying to recreate those bonds after loading the information from a checkpointer file. The ConnectionFinder looks something like
ConnectionFinder(
maxDist = someNumber,
bondTag = BondTag,
pList = getParticleList
but as I said, the part with getParticleList doesn't work.
Best Regards,
Lukas
edit: Actually the problem is that ConnectionFinder only takes SimpleSphere objects and not RotSphere objects. Had I read the documentation more carefully I wouldn't have asked the question.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Lukas Liebisch
- Solved:
- 2020-03-10
- Last query:
- 2020-03-10
- Last reply:
Lukas Liebisch (lliebisch) said : | #1 |
problem changed
Dion Weatherley (d-weatherley) said : | #2 |
Hi Lukas,
It sounds like you have resolved this question yourself. In any case, thought I'd suggest two possible alternative solutions for reconstructing particles and bonds from a checkpoint file:
1) use dump2geo
dump2geo works in a similar manner as dump2vtk except that it will convert checkpoint files into ESyS-Particle geometry files; the same format that GenGeo produces. These can then be imported into a new ESyS-Particle simulation using sim.readGeometr
2) use a RestartCheckpointer instead
If particle and bond state information needs to be recovered in the new simulation, best to use ESyS-Particle's checkpoint-restart feature. This will require adding a RestartCheckpointer to the first simulation using sim.restartChec
Also, it is worth mentioning that ConnectionFinder is now deprecated. It is part of ESyS-Particle's in-simulation geometry creation tools (including for example, RandomBoxPacker). These tools are now quite outdated and users are encouraged to use GenGeo instead.
I hope this helps.
Cheers,
Dion