REPEAT around HISTORY AT() clauses - ... Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » REPEAT around HISTORY AT() clauses - what am I doing wrong? « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Chris Bailey (c_bailey)
New member
Username: c_bailey

Post Number: 1
Registered: 01-2010
Posted on Monday, February 01, 2010 - 09:11 am:   

I am writing this (in a 1D problem) to get a history of P at 11 points along "length":

history(P) repeat i = 0 to 10 at (i*length/10) endrepeat

But I get an error saying "Parser expects ACUMESH" with my "at" highlighted. If I write out "... at (0.0*length) at (0.1*length)" et cetera, it works.

What am I doing wrong?

Thanks!
Top of pagePrevious messageNext messageBottom of page Link to this message

Marek Nelson (mgnelson)
Moderator
Username: mgnelson

Post Number: 177
Registered: 07-2007
Posted on Monday, February 01, 2010 - 03:16 pm:   

There are several forms that HISTORY will accept for multiple points:
HISTORY(P) AT (p1) AT (p2) AT (p3)...
HISTORY(P) AT (p1), (p2), (p3),...
HISTORY(P) AT (p1) (p2) (p3)...

To use REPEAT, you need place the AT before the REPEAT statement, i.e.
HISTORY(P) AT REPEAT i = 0 to 10 (i*length/10) ENDREPEAT

This is equivelant to the form HISTORY(P) AT (p1) (p2) (p3)...

The AT needs to be before the REPEAT so that the statement is grammatically unambiguous, since the HISTORY statement could be complete without the AT clause.
Top of pagePrevious messageNext messageBottom of page Link to this message

Chris Bailey (c_bailey)
New member
Username: c_bailey

Post Number: 2
Registered: 01-2010
Posted on Monday, February 01, 2010 - 03:55 pm:   

That fixed me! "at" is outside now! Thanks!

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration