Forum Replies Created
-
AuthorPosts
-
JasonBlocked
Hi Hugo,
This is in the context of using runSofa in batch mode, submitted to a queuing system with finite job time limits. That is, I know the simulation won’t finish in the time allotted per job, so I perform a number of steps I know will finish in job time. I then want to restart the simulation from the state that it ended (positions, velocities, forces). I might need to resubmit a job several times for it to finish.
What’s the best way to approach this scenario, if not with ReadState/WriteState?
Thanks for your help,
Jason
JasonBlockedHi Hugo,
I seem to be misunderstanding something. What you describe under “using python:” is exactly the situation I want to avoid. If no equilibrium is reached, I want to restart the simulation in exactly the same state (positions, velocities, forces) as at the end of the simulation. I can use WriteState to write out all these vectors. Then I can use ReadState to reset all these vectors at the re-start. However, if I use ReadState to restart the simulation, I can’t then use WriteState to save the state vectors again?
What is it about these two classes that conflicts? I must be missing something simple in the design that prevents them from working together.
Thanks for your help,
Jason
JasonBlockedHi Hugo,
It seems odd to me that it’s not possible to use ReadState to read in initial state vectors, and WriteState to write out the state vector at some later point in the simulation.
It seems that lack of functionality makes it so that one can’t write out the state vectors of a restarted simulation.
Consider, for example, I run a simulation as a batch job for some number of iterations, and write out the state vectors (using WriteState) at the end. I then examine the state of the system and find that it has not come to equilibrium. So I restart the simulation (using ReadState) reading in the state vectors from the output file, and now I have no way to write the state vectors at the end of the simulation?
How should I solve this situation?
Thank you for your kind help.
-Jason
JasonBlockedHi Everyone,
I’ve got a node under the root node:
<Node name=”Object” > <MeshTopology name=”Topology” triangles=”@/Loader.triangles” /> <EulerImplicitSolver printLog=”0″ rayleighMass=”0.1″ rayleighStiffness=”1.5e0″ /> <CGLinearSolver template=”GraphScattered” printLog=”0″ iterations=”25″ tolerance=”1e-14″ threshold=”1e-14″ verbose=”0″ /> <MechanicalObject name=”Obj” template=”Vec3d” /> <ReadState filename=”step.data” /> <UniformMass name=”mass” mass=”5.0e-2″ /> <MeshSpringForceField template=”Vec3d” name=”Springs” stiffness=”5.0e10″ damping=”1.0e5″ object1=”@./” object2=”@./” /> <TSphereModel radius=”0.2″ contactStiffness=”1.0e1″ contactFriction=”1.0″ contactRestitution=”0″ selfCollision=”1″ /> <WriteState filename=”step.data” time=”0.1″ writeX=”1″ writeX0=”1″ writeV=”1″ writeF=”1″ /> </Node>
where step.data is a valid file written out by WriteState. However, when I put this through runSofa, and look at the data in the mechanical object, everything is identically zero! What am I doing wrong? It seems like I followed Raffa’s advice.
Thanks for your kind help.
-J
JasonBlockedHi Hugo,
I get everything written out with WriteState, but I can’t figure out how to repopulate the mechanical object using ReadState. Can you give a working XML example of how to do that?
Thanks for your kind help.
-Jason
JasonBlockedTo be clear, I want to plot the velocities as a vector field, i.e. a vector representing the velocity at each position in the mechanical object.
JasonBlockedThanks Hugo,
Sorry for not replying to indicate that Alex’s description allowed me to figure it out. Thanks so much for the help everyone,
JasonBlockedI don’t think this is what I am looking for. I want to generate a force field at the center of every face and at every vertex of the mesh that points along the surface normal at those points. In this example, the surface pressure is a response to the mesh spring forces. When I remove those forces, the frog deflates.
Is there a way to generate a vector force field attached to an arbitrary mesh?
JasonBlockedHi Everyone,
Clearly I am missing something. I don’t find the SofaCUDALDI plugin in the repository at all. I’m using the repository at https://gforge.inria.fr/scm/sofa/sofa.git/ and I don’t find either a sofa-dev or applications-dev directory anywhere in the tree. Where can I find this plugin?
Cheers,
-Jason
JasonBlockedHi Francois,
I didn’t try those two examples because I couldn’t find them in the git repository. I’m running off of origin/master. Are they in a different branch?
Cheers,
-Jason
JasonBlockedHi Faure,
Yes, the examples work. However, I didn’t find an example that does collisions on the GPU. Did I miss one somewhere?
-
AuthorPosts