[aspect-devel] inconsistency in use of x, y, and z

Jonathan Perry-Houts jperryh2 at uoregon.edu
Tue Mar 10 10:45:24 PDT 2015


I agree it's annoying to move between 2D and 3D because of this. The way
I've been dealing with it is by adding C style preprocessing macros to
my parameter files like:

  #define __DIM__ 2

  #define __LENGTH__ 1500e3
  #define __WIDTH__ 1500e3
  #define __DEPTH__ 660e3

  set Dimension = __DIM__
  subsection Geometry model
      set Model name = box
      set X extent = __WIDTH__
  #if __DIM__ == 2
      set Y extent = __DEPTH__
  #else
      set Y extent = __LENGTH__
      set Z extent = __DEPTH__
  #endif

(Note, now I have to comment the parameter file with ## rather than #)

And before I run Aspect, I run the parameter file through gcc:

  sed -e 's/##.*//g' input.prm | gcc -E -x c - -o output/parameters.prm
  mpirun aspect output/parameters.prm

I put all the execution stuff in a Makefile, so I don't have to remember
all of it.

That sounds really kludgey (because it is) but it's actually pretty
useful. Not only can I switch between 2D and 3D by just swapping out the
__DIM__ parameter, but my parameter file can be generalized to deal with
all kinds of other things that I might want to change relatively frequently.

That said, the X,Y,Z inconsistency is pretty annoying. Can we do
something about that?

On 03/10/2015 10:19 AM, Magali Billen wrote:
> Hello,
> 
> I'm working through issue with my undergraduate student, and I just want
> to point out an inconsistency
> that leads to unnecessary confusion. I'm not sure what the fix is however.
> 
> In 2D the dimension of the box are set with X extent and Y extent.
> However, for the initial temperature
> function, the variables that need to be used are x and z.
> 
> 
> It seems to me that the dimension and axis of the 2D model should be X
> and Z and that adding the third
> dimension should add the Y dimension.
> 
> Is there any chance of making this change - or is it just too late??
> 
> 
> This is also an issue with the boundary indicators.  To easily move from
> a 2D to a 3D model, the boundary
> indicators for left, right, bottom, top should remain 0-3 and adding the
> third dimension should add the boundary indicators 4 and 5 for the front
> and back.  I know you can get around this by using the words "front",
>  "back", etc...
> but this seems like a weird way of counting things 
> -----------------------------------------------------------
> Professor of Geophysics & UCD Chancellor Fellow
> Chair, Geology Graduate Program
> Earth & Planetary Sciences Dept., UC Davis
> Davis, CA 95616
> Room 2129 Earth & Physical Sciences Bldg.
> Office Phone: (530) 752-4169
> http://mygeologypage.ucdavis.edu/billen/
> -----------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20150310/db1618e1/attachment.sig>


More information about the Aspect-devel mailing list