How are types defined in input files and scripts? #9
Unanswered
IsaacPincus
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Dear Isaac, Thank you for your message. Types are defined in each object, i.e, vertices, edges and faces. When you load the mesh, I set-up the types to a given value. You can check them like so, Now, Mesh>Constant Area uses the faces as such:
The reason for which I didn't want to read all of the information from the file is that people might want to do it by themselves but perhaps I should been more clear on the tutorials. Please let me know.. Regards D. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I've been trying to mess around with adding local area constraints to a membrane simulation through
potentialConstantAreaTriangle
, and I've become a bit confused about how vertex types are defined. In the first example, thefaces_N*.inp
andvertices_N*.inp
files denote every vertex and face with type1
, which seems to be read in via__add_vertex(...)
, meaning that each vertex will havevertex.type = 1
.However, the scripts seem to have the forces added to type
0
vertices, for example indisclination.py
:evolver.add_force("Mesh>Harmonic", {"k":{"0":k}, "l0":{"0":l0}})
When I step through
potentialHarmonic.cpp
with a debugger, the type of the edges does indeed seem to be0
during runtime, but then I'm not sure exactly how this relates to the properties read in from the input files. When I tried the same withpotentialConstantAreaTriangle.cpp
, there the face type seems to be1
despite apparently defining things in a similar way:evolver.add_force("Mesh>Constant Area", { "sigma": {"0": str(1e2)}, "target_area": {"0": str(target_area_per_face)} })
and at this point I'm fairly confused and not sure if I'm making simple mistakes.
Is there some easier way to understand how types are defined in pyMembrane? Happy to provide some minimal working examples if that makes things clearer! Thanks in advance for any help.
Beta Was this translation helpful? Give feedback.
All reactions