« first day (462 days earlier)      last day (991 days later) » 

4:58 PM
2
A: Define a geometry region using 'for' loop in MuMax3

TyberiusI have not used MuMax3 before, so I may be missing something, but I think you are overcomplicating things by trying to use a nested loop. It looks like you define a region in one loop and then redefine in another iteration, so its tough to reason out what values you will get. Running the equivale...

Thanks for the answer. Since MuMax3 is based on C++, unfortunately, this did not work. Mumax3 did not find the 'end' value. Could you please let me know how to replace this? — Arindam Samanta 18 hours ago
@ArindamSamanta Could you edit your question to include the result/error message you are getting? Its not clear to me what it means that the end value isn't found. — Tyberius ♦ 15 hours ago
@ArindamSamanta actually I think I may have found the issue. Let me know if my updated answer works. — Tyberius ♦ 15 hours ago
I changed the '=' sign to ':=', but still it is not working! The message looks like: script line 35: stop:=end+w1 + CategoryInfo : Not specified: (stop:=end+w1:String) [], RemoteException + FullyQualifiedErrorId: NativeCommand error : undefined: end — Arindam Samanta 6 hours ago
@ArindamSamanta Third time's the charm? Now it uses := only when a variable is newly defined and = otherwise. Also, could you include the error you were getting for your original program in the question? — Tyberius ♦ 5 hours ago
I have edited the original question with the error message. Could you please check? — Arindam Samanta 1 hour ago
@ArindamSamanta I had a typo left over from when I was changing variable names (I originally wrote stop as end, but end is sometimes a predefined keyword). This was also the error it was giving in your previous comment, where one part of the line still used stop, while the other had end. — Tyberius ♦ 53 mins ago
Thanks for the answer. It's working now. One additional point, the software needs start, stop, and swap values in the same order, i.e., the 0 should be 0e-9. Otherwise, it won't work. — Arindam Samanta 40 mins ago
I am also wondering if, there are w3 and w4, then what would be the code? In that case, would the following be the code swap=w1 w1=w2 w2=swap swap=w3 w3=w4 w4=swap or else? — Arindam Samanta 35 mins ago
@ArindamSamanta For your first point, that makes sense, though I believe it is just the data type of the variable rather than the order of magnitude (MuMax3 interprets 0 as an integer, but 0.0 or 0e-9 as a floating point number.
@ArindamSamanta For your second point, it depends what you are doing with these 4 values. In your initial question, you just need to swap two values back and forth; but with 4 are you looping through all permutations of these values or just some specific order?
 
 
4 hours later…
9:30 PM
@Tyberius With 4 values, I wish to loop through all permutations of those values. With w1, w2, w3, w4 and the regions for i=0, (-l+0.0, -l+w1); i=1, (-l+w1, -l+w2); i=2, (-l+w2, -l+w3); i=3, (-l+w3, -l+w4); How to proceed with this?
 

« first day (462 days earlier)      last day (991 days later) »