Closed keurfonluu closed 2 years ago
Hi @keurfonluu, for historical reasons, LaGriT input lines are a max of, I believe, 72 characters. Lines that exceed that length are truncated. That truncation is probably what you're seeing in the distorted first mesh:
>>> len('quadxy, nx ny, 1000.0 -500.0 0.0, 1000.0 500.0 0.0, 1000.0 500.0 1000.0, 1000.0 -500.0 1000.0')
93
>>> len('quadxy, nx ny, 10.0 -5.0 0.0, 10.0 5.0 0.0, 10.0 5.0 10.0, 10.0 -5.0 10.0')
73
>>> len('quadxy, nx ny, x1 y1 z1, x2 y2 z2, x3 y3 z3, x4 y4 z4')
53
You can split a single long command into multiple lines with the &
character, like so:
quadxy, nx ny, &
1000.0 -500.0 0.0, &
1000.0 500.0 0.0, &
1000.0 500.0 1000.0, &
1000.0 -500.0 1000.0
Hope this helps!
@millerta Should this throw an error (or at least a warning)?
Thanks @daniellivingston ! It works like a charm.
On a side note, isn't modern Fortran capable of reading longer strings?
This problem was solved by using a line continuation character '&' for long command lines. The character string sizes and buffer sizes were first established in the f77 codes and would take some effort to change. The line continuation fixes the problem.
Hi,
First, I apologize if I am doing something wrong, I am new to LaGriT.
Long story short, when I create the following quad with the point coordinates explicitly defined (not stored in a variable), it generates a twisted quad:
If I divide all the coordinates by 100, I get the expected quad:
If I define the point coordinates in different variables, it works too:
Is it working as intended?
Thank you.