The Basic Knowledge of AMRVAC – 2. LASY

Actually, all the .t files in AMRVAC are wrote in Loop Annotation Syntax(LASY). then, when you do the “make” commend, .t files will converted to .f files, which are standard F90 files, through a tool in AMRVAC called vacpp.pl. then, the compiling are done with this .f files. So you AMRVAC is basically a Fortran code, you can write your own part, meaning mod_usr.t, in Fortran Syntax, that is no problem. But at least, I think you should know some basic idea of LASY, which would be much more convenient.

The details of LASY could be fould in Prof. Garbor Toth’s paper, which could be found on this website http://www-personal.umich.edu/~gtoth/Papers/lasy.html. The basic idea is that you use some notations to shorten your code based on kind of symmetry. It will expand to 1D, 2D or 3D automatically due to the “-d=” parameter you set before you do “make”. Here, I will only introduce some widely used patterns, using 2D for example

LASY Fortran
ix^D ix1,ix2
ixI^S ixImin1:ixImax1,ixImin2:ixImax2
ixO^S ixOmin1:ixOmax1,ixOmin2:ixOmax2
ixI^L ixImin1,ixImax1,ixImin2,ixImax2
ixO^L ixOmin1,ixOmax1,ixOmin2,ixOmax2

I think knowing that is quite enough for beginners, for further usage, you can check the link above or $AMRVAC_DIR/doc/source.md for details.

Next part I will introduce how to set initial conditions in AMRVAC.

发表评论

邮箱地址不会被公开。 必填项已用*标注