## SaveLine, first two points are always in reverse order?

Clearly defined bug reports and their fixes
NJank
Posts: 98
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

### SaveLine, first two points are always in reverse order?

Whenever calling the SaveLine using polyline coordinates, i noticed that the first two points in the output are always in reverse order. example, calling the solver as:

Code: Select all

``````Solver 2
Equation = String "SaveLine"
Exec Solver = String "After Simulation"
Procedure = File "SaveData" "SaveLine"
Filename = File "topsurfdata.dat"
File Append = Logical False
Polyline Coordinates (2,2) = Real 0.0 0.4e-3 0.5e-3 0.4e-3
End
``````
always produces results like the following:

Code: Select all

``````Data on different columns
1: Iteration step
2: Boundary condition
3: Node index
4: coordinate 1
5: coordinate 2
6: coordinate 3
7: temperature

1 1 92   2.50000000000E-004  6.97674418605E-006  0.00000000000E+000  2.76428785160E+001
1 1 37   2.50000000000E-004  0.00000000000E+000  0.00000000000E+000  2.76427746673E+001
1 1 147   2.50000000000E-004  1.39534883721E-005  0.00000000000E+000  2.76429851960E+001
1 1 202   2.50000000000E-004  2.09302325581E-005  0.00000000000E+000  2.76430947073E+001
1 1 257   2.50000000000E-004  2.79069767442E-005  0.00000000000E+000  2.76432070495E+001
1 1 312   2.50000000000E-004  3.48837209302E-005  0.00000000000E+000  2.76433222225E+001
1 1 367   2.50000000000E-004  4.18604651163E-005  0.00000000000E+000  2.76434402255E+001
1 1 422   2.50000000000E-004  4.88372093023E-005  0.00000000000E+000  2.76435610579E+001
1 1 477   2.50000000000E-004  5.58139534884E-005  0.00000000000E+000  2.76436847186E+001
1 1 532   2.50000000000E-004  6.27906976744E-005  0.00000000000E+000  2.76438112062E+001
1 1 587   2.50000000000E-004  6.97674418605E-005  0.00000000000E+000  2.76439405187E+001
1 1 642   2.50000000000E-004  7.67441860465E-005  0.00000000000E+000  2.76440726540E+001
1 1 697   2.50000000000E-004  8.37209302326E-005  0.00000000000E+000  2.76442076091E+001
1 1 752   2.50000000000E-004  9.06976744186E-005  0.00000000000E+000  2.76443453803E+001
1 1 807   2.50000000000E-004  9.76744186047E-005  0.00000000000E+000  2.76444859631E+001
1 1 862   2.50000000000E-004  1.04651162791E-004  0.00000000000E+000  2.76446293520E+001
``````
as can be seen, the coordinates are almost always in the right order, except the first two are always reversed. It's not critical, but it means I have to add a few lines in my post processing scripts to correct it.
raback
Posts: 3889
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

### Re: SaveLine, first two points are always in reverse order?

Hi

Does this apply to serial cases as well? Looking at the code the serial system at least tries to do minimization of bandwidth in ordering the points. The default order is such that the code goes through elements, tags all nodes, and continues to the next element. Hence if boundary elements are initially ordered differently than nodes within elements you may get this. I thought that the order optimization should remove the problem for singly continuous lines at least.

-Peter
NJank
Posts: 98
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

### Re: SaveLine, first two points are always in reverse order?

what do you mean by serial cases? do you mean cases where the saveline moves along a continuous set of nodes in index order? the answer is 'sometimes'?

i have 'numbering horizontal' on in my grd file.

here's a case where I'm grabbing the topmost set of nodes (on boundary 1) from left to right, and it's okay, called with polyline:
Polyline Coordinates (2,2) = Real 0.0 0.4e-3 1.0e-3 0.4e-3

Code: Select all

``````      0 boundary nodes for each step
124 polyline nodes for each step
1: Iteration step
2: Boundary condition
3: Node index
4: coordinate 1
5: coordinate 2
6: coordinate 3
7: temperature

1 1 5054   0.00000000000E+000  4.00000000000E-004  0.00000000000E+000  2.55164500514E+001
1 1 5055   8.19672131148E-006  4.00000000000E-004  0.00000000000E+000  2.55166771744E+001
1 1 5056   1.63934426230E-005  4.00000000000E-004  0.00000000000E+000  2.55168884104E+001
1 1 5057   2.45901639344E-005  4.00000000000E-004  0.00000000000E+000  2.55170839276E+001
1 1 5058   3.27868852459E-005  4.00000000000E-004  0.00000000000E+000  2.55172639016E+001
1 1 5059   4.09836065574E-005  4.00000000000E-004  0.00000000000E+000  2.55174285287E+001
1 1 5060   4.91803278689E-005  4.00000000000E-004  0.00000000000E+000  2.55175780235E+001
1 1 5061   5.73770491803E-005  4.00000000000E-004  0.00000000000E+000  2.55177126126E+001
1 1 5062   6.55737704918E-005  4.00000000000E-004  0.00000000000E+000  2.55178325277E+001
1 1 5063   7.37704918033E-005  4.00000000000E-004  0.00000000000E+000  2.55179379990E+001
...
``````
here's the same model, saving a vertical line, not on a boundary (in the middle of a body) using:
Polyline Coordinates (2,2) = Real 0.625e-3 0.0 0.625e-3 0.3e-3

Code: Select all

``````      0 boundary nodes for each step
75 polyline nodes for each step
1: Iteration step
2: Boundary condition
3: Node index
4: coordinate 1
5: coordinate 2
6: coordinate 3
7: temperature

1 1 171   6.25000000000E-004  4.05405405405E-006  0.00000000000E+000  2.54891114062E+001
1 1 77   6.25000000000E-004  0.00000000000E+000  0.00000000000E+000  2.54890006484E+001
1 1 171   6.25000000000E-004  8.10810810811E-006  0.00000000000E+000  2.54892222017E+001
1 1 264   6.25000000000E-004  1.21621621622E-005  0.00000000000E+000  2.54893342482E+001
1 1 264   6.25000000000E-004  1.62162162162E-005  0.00000000000E+000  2.54894463274E+001
1 1 357   6.25000000000E-004  2.02702702703E-005  0.00000000000E+000  2.54895596701E+001
1 1 357   6.25000000000E-004  2.43243243243E-005  0.00000000000E+000  2.54896730427E+001
1 1 450   6.25000000000E-004  2.83783783783E-005  0.00000000000E+000  2.54897876931E+001
1 1 450   6.25000000000E-004  3.24324324324E-005  0.00000000000E+000  2.54899023740E+001
1 1 543   6.25000000000E-004  3.64864864865E-005  0.00000000000E+000  2.54900183471E+001
1 1 543   6.25000000000E-004  4.05405405405E-005  0.00000000000E+000  2.54901343559E+001
1 1 636   6.25000000000E-004  4.45945945946E-005  0.00000000000E+000  2.54902516694E+001
...
``````
and a third one where I go left and then down along a body boundary (but not a defined boundary condition), with two polyline segments defined as
Polyline Coordinates (4,2) = Real 0.0 0.3e-3 0.5e-3 0.3e-3 0.5e-3 0.3e-3 0.5e-3 0.0

node that it reverses at the first one (segment is in node order), as well as the second segment halfway through (node 155)

Code: Select all

``````      0 boundary nodes for each step
100 polyline nodes for each step
1: Iteration step
2: Boundary condition
3: Node index
4: coordinate 1
5: coordinate 2
6: coordinate 3
7: temperature

1 1 3443   8.19672131148E-006  3.00000000000E-004  0.00000000000E+000  2.55152418492E+001
1 1 3442   0.00000000000E+000  3.00000000000E-004  0.00000000000E+000  2.55150512241E+001
1 1 3444   1.63934426230E-005  3.00000000000E-004  0.00000000000E+000  2.55154199328E+001
1 1 3445   2.45901639344E-005  3.00000000000E-004  0.00000000000E+000  2.55155851543E+001
1 1 3446   3.27868852459E-005  3.00000000000E-004  0.00000000000E+000  2.55157374735E+001
1 1 3447   4.09836065574E-005  3.00000000000E-004  0.00000000000E+000  2.55158769006E+001
1 1 3448   4.91803278689E-005  3.00000000000E-004  0.00000000000E+000  2.55160034596E+001
1 1 3449   5.73770491803E-005  3.00000000000E-004  0.00000000000E+000  2.55161171816E+001
1 1 3450   6.55737704918E-005  3.00000000000E-004  0.00000000000E+000  2.55162181029E+001
1 1 3451   7.37704918033E-005  3.00000000000E-004  0.00000000000E+000  2.55163062647E+001
1 1 3452   8.19672131148E-005  3.00000000000E-004  0.00000000000E+000  2.55163817120E+001
1 1 3453   9.01639344262E-005  3.00000000000E-004  0.00000000000E+000  2.55164444929E+001
1 1 3454   9.83606557377E-005  3.00000000000E-004  0.00000000000E+000  2.55164946582E+001
1 1 3455   1.06557377049E-004  3.00000000000E-004  0.00000000000E+000  2.55165322609E+001
1 1 3456   1.14754098361E-004  3.00000000000E-004  0.00000000000E+000  2.55165573552E+001
1 1 3457   1.22950819672E-004  3.00000000000E-004  0.00000000000E+000  2.55165699964E+001
1 1 3458   1.31147540984E-004  3.00000000000E-004  0.00000000000E+000  2.55165702408E+001
1 1 3459   1.39344262295E-004  3.00000000000E-004  0.00000000000E+000  2.55165581444E+001
1 1 3460   1.47540983607E-004  3.00000000000E-004  0.00000000000E+000  2.55165337637E+001
1 1 3461   1.55737704918E-004  3.00000000000E-004  0.00000000000E+000  2.55164971547E+001
1 1 3462   1.63934426230E-004  3.00000000000E-004  0.00000000000E+000  2.55164483730E+001
1 1 3463   1.72131147541E-004  3.00000000000E-004  0.00000000000E+000  2.55163874736E+001
1 1 3464   1.80327868852E-004  3.00000000000E-004  0.00000000000E+000  2.55163145108E+001
1 1 3465   1.88524590164E-004  3.00000000000E-004  0.00000000000E+000  2.55162295380E+001
1 1 3466   1.96721311475E-004  3.00000000000E-004  0.00000000000E+000  2.55161326079E+001
1 1 3467   2.04918032787E-004  3.00000000000E-004  0.00000000000E+000  2.55160237721E+001
1 1 3468   2.13114754098E-004  3.00000000000E-004  0.00000000000E+000  2.55159030811E+001
1 1 3469   2.21311475410E-004  3.00000000000E-004  0.00000000000E+000  2.55157705847E+001
1 1 3470   2.29508196721E-004  3.00000000000E-004  0.00000000000E+000  2.55156263313E+001
1 1 3471   2.37704918033E-004  3.00000000000E-004  0.00000000000E+000  2.55154703683E+001
1 1 3472   2.45901639344E-004  3.00000000000E-004  0.00000000000E+000  2.55153027419E+001
1 1 3473   2.54098360656E-004  3.00000000000E-004  0.00000000000E+000  2.55151234970E+001
1 1 3474   2.62295081967E-004  3.00000000000E-004  0.00000000000E+000  2.55149326769E+001
1 1 3475   2.70491803279E-004  3.00000000000E-004  0.00000000000E+000  2.55147303234E+001
1 1 3476   2.78688524590E-004  3.00000000000E-004  0.00000000000E+000  2.55145164765E+001
1 1 3477   2.86885245902E-004  3.00000000000E-004  0.00000000000E+000  2.55142911735E+001
1 1 3478   2.95081967213E-004  3.00000000000E-004  0.00000000000E+000  2.55140544493E+001
1 1 3479   3.03278688525E-004  3.00000000000E-004  0.00000000000E+000  2.55138063353E+001
1 1 3480   3.11475409836E-004  3.00000000000E-004  0.00000000000E+000  2.55135468586E+001
1 1 3481   3.19672131148E-004  3.00000000000E-004  0.00000000000E+000  2.55132760410E+001
1 1 3482   3.27868852459E-004  3.00000000000E-004  0.00000000000E+000  2.55129938974E+001
1 1 3483   3.36065573770E-004  3.00000000000E-004  0.00000000000E+000  2.55127004341E+001
1 1 3484   3.44262295082E-004  3.00000000000E-004  0.00000000000E+000  2.55123956463E+001
1 1 3485   3.52459016393E-004  3.00000000000E-004  0.00000000000E+000  2.55120795151E+001
1 1 3486   3.60655737705E-004  3.00000000000E-004  0.00000000000E+000  2.55117520029E+001
1 1 3487   3.68852459016E-004  3.00000000000E-004  0.00000000000E+000  2.55114130486E+001
1 1 3488   3.77049180328E-004  3.00000000000E-004  0.00000000000E+000  2.55110625601E+001
1 1 3489   3.85245901639E-004  3.00000000000E-004  0.00000000000E+000  2.55107004049E+001
1 1 3490   3.93442622951E-004  3.00000000000E-004  0.00000000000E+000  2.55103263977E+001
1 1 3491   4.01639344262E-004  3.00000000000E-004  0.00000000000E+000  2.55099402830E+001
1 1 3492   4.09836065574E-004  3.00000000000E-004  0.00000000000E+000  2.55095417117E+001
1 1 3493   4.18032786885E-004  3.00000000000E-004  0.00000000000E+000  2.55091302076E+001
1 1 3494   4.26229508197E-004  3.00000000000E-004  0.00000000000E+000  2.55087051196E+001
1 1 3495   4.34426229508E-004  3.00000000000E-004  0.00000000000E+000  2.55082655500E+001
1 1 3496   4.42622950820E-004  3.00000000000E-004  0.00000000000E+000  2.55078102422E+001
1 1 3497   4.50819672131E-004  3.00000000000E-004  0.00000000000E+000  2.55073373966E+001
1 1 3498   4.59016393443E-004  3.00000000000E-004  0.00000000000E+000  2.55068443420E+001
1 1 3499   4.67213114754E-004  3.00000000000E-004  0.00000000000E+000  2.55063268885E+001
1 1 3500   4.75409836066E-004  3.00000000000E-004  0.00000000000E+000  2.55057778594E+001
1 1 3501   4.83606557377E-004  3.00000000000E-004  0.00000000000E+000  2.55051830999E+001
1 1 3502   4.91803278689E-004  3.00000000000E-004  0.00000000000E+000  2.55045082352E+001
1 1 3503   5.00000000000E-004  3.00000000000E-004  0.00000000000E+000  2.55036459785E+001
1 2 155   5.00000000000E-004  8.10810810811E-006  0.00000000000E+000  2.54917874951E+001
1 2 62   5.00000000000E-004  0.00000000000E+000  0.00000000000E+000  2.54915986272E+001
1 2 248   5.00000000000E-004  1.62162162162E-005  0.00000000000E+000  2.54919815599E+001
1 2 341   5.00000000000E-004  2.43243243243E-005  0.00000000000E+000  2.54921807605E+001
1 2 434   5.00000000000E-004  3.24324324324E-005  0.00000000000E+000  2.54923851128E+001
1 2 527   5.00000000000E-004  4.05405405405E-005  0.00000000000E+000  2.54925946483E+001
1 2 620   5.00000000000E-004  4.86486486486E-005  0.00000000000E+000  2.54928094055E+001
1 2 713   5.00000000000E-004  5.67567567568E-005  0.00000000000E+000  2.54930294294E+001
1 2 806   5.00000000000E-004  6.48648648649E-005  0.00000000000E+000  2.54932547715E+001
1 2 899   5.00000000000E-004  7.29729729730E-005  0.00000000000E+000  2.54934854914E+001
1 2 992   5.00000000000E-004  8.10810810811E-005  0.00000000000E+000  2.54937216573E+001
1 2 1085   5.00000000000E-004  8.91891891892E-005  0.00000000000E+000  2.54939633471E+001
1 2 1178   5.00000000000E-004  9.72972972973E-005  0.00000000000E+000  2.54942106494E+001
1 2 1271   5.00000000000E-004  1.05405405405E-004  0.00000000000E+000  2.54944636653E+001
1 2 1364   5.00000000000E-004  1.13513513514E-004  0.00000000000E+000  2.54947225098E+001
1 2 1457   5.00000000000E-004  1.21621621622E-004  0.00000000000E+000  2.54949873133E+001
1 2 1550   5.00000000000E-004  1.29729729730E-004  0.00000000000E+000  2.54952582247E+001
1 2 1643   5.00000000000E-004  1.37837837838E-004  0.00000000000E+000  2.54955354135E+001
1 2 1736   5.00000000000E-004  1.45945945946E-004  0.00000000000E+000  2.54958190736E+001
1 2 1829   5.00000000000E-004  1.54054054054E-004  0.00000000000E+000  2.54961094274E+001
1 2 1922   5.00000000000E-004  1.62162162162E-004  0.00000000000E+000  2.54964067307E+001
1 2 2015   5.00000000000E-004  1.70270270270E-004  0.00000000000E+000  2.54967112797E+001
1 2 2108   5.00000000000E-004  1.78378378378E-004  0.00000000000E+000  2.54970234189E+001
1 2 2201   5.00000000000E-004  1.86486486486E-004  0.00000000000E+000  2.54973435518E+001
1 2 2294   5.00000000000E-004  1.94594594595E-004  0.00000000000E+000  2.54976721549E+001
1 2 2387   5.00000000000E-004  2.02702702703E-004  0.00000000000E+000  2.54980097963E+001
1 2 2480   5.00000000000E-004  2.10810810811E-004  0.00000000000E+000  2.54983571610E+001
1 2 2573   5.00000000000E-004  2.18918918919E-004  0.00000000000E+000  2.54987150859E+001
1 2 2666   5.00000000000E-004  2.27027027027E-004  0.00000000000E+000  2.54990846109E+001
1 2 2759   5.00000000000E-004  2.35135135135E-004  0.00000000000E+000  2.54994670545E+001
1 2 2852   5.00000000000E-004  2.43243243243E-004  0.00000000000E+000  2.54998641317E+001
1 2 2945   5.00000000000E-004  2.51351351351E-004  0.00000000000E+000  2.55002781487E+001
1 2 3038   5.00000000000E-004  2.59459459459E-004  0.00000000000E+000  2.55007123494E+001
1 2 3131   5.00000000000E-004  2.67567567568E-004  0.00000000000E+000  2.55011715983E+001
1 2 3224   5.00000000000E-004  2.75675675676E-004  0.00000000000E+000  2.55016639234E+001
1 2 3317   5.00000000000E-004  2.83783783784E-004  0.00000000000E+000  2.55022046486E+001
1 2 3410   5.00000000000E-004  2.91891891892E-004  0.00000000000E+000  2.55028296906E+001
1 2 3503   5.00000000000E-004  3.00000000000E-004  0.00000000000E+000  2.55036459785E+001
``````