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

Magali Billen mibillen at ucdavis.edu
Thu Mar 12 09:49:32 PDT 2015

We should discuss the X, Y, Z issue at the hackathon (I will come for a couple days).

I would be happier seeing the names of the variables become more user friendly rather
than have to deal with preprocessing the input file etc.

Two points:

1) I know it seems arbitrary which variable is used for the vertical direction, but in geology
the vertical coordinate in 3D is either Z or radius. If one then considers the 2D case to be an approximation
of the 3D model, the Z direction should be retained as the vertical coordinate. 

2) One option would be to change " Y extent" (2D) and "Z extent" (3D)  to "Vertical extent" and the one or two horizontal dimensions to be "Horizontal-1 extent" (2D & 3D) "Horizontal-2 Extent" (3D).  This would then be self explanatory and perhaps the backward compatibility could be taken care of inside the code.


On Mar 11, 2015, at 8:14 PM, Jonathan Perry-Houts <jperryh2 at uoregon.edu> wrote:

> Yeah, the problem is that mpirun only sends stdin to process 0, so I
> just write a temp file on process 0, tell the other processes where to
> find it, and let them all open it independently, then delete it once
> they've all had a chance to read it.
> It would also be possible to just let process 0 deal with the input (be
> it a file, or stdin) and send the whole thing as a string to all other
> instances via MPI. Or something like that. If this is actually something
> that anyone would use I could change it to work that way, but otherwise
> I won't bother.
> On 03/11/2015 07:27 PM, Wolfgang Bangerth wrote:
>> On 03/11/2015 09:09 PM, Jonathan Perry-Houts wrote:
>>> I don't know if this would be helpful, but I added a quick hack to allow
>>> Aspect to accept parameter files via stdin
>>> (ie `cat input.prm | mpirun aspect`). This would allow arbitrary
>>> modification by shell tools before Aspect ever sees the parameter file.
>>> https://github.com/jperryhouts/aspect/tree/read_stdin
>> I think that's too complicated.
>> First, do you need to write the tmp parameter file? What happens with
>> whatever you pipe into mpirun? Is it passed to every instance of aspect,
>> or only to the first?
>> Second, there is a Unix convention by which you indicate that you want
>> to write input from stdin rather than from an input file by using the
>> special "filename" '--' as argument. I.e., you could do something like
>> this:
>>  Assert (argc==2);
>>  std_cxx11::shared_ptr<std::ifstream> input_file_stream;
>>  std::ifstream *input_stream;
>>  if (std::string(argv[1]) != std::string("--"))
>>    {
>>      input_file_stream.reset (new std::ifstream(argv[1]));
>>      Assert (*input_file_stream);
>>      input_stream = input_file_stream.get();
>>    }
>>  else
>>    {
>>      input_stream = &std::cin;
>>    }
>>  ...read parameters from *input_stream...;
>>  // input_file_stream goes out of scope and automatically deletes the
>>  // std::ifstream object if it was assigned
>> Best
>> W.
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20150312/8427e765/attachment-0001.html>

More information about the Aspect-devel mailing list