[ET Trac] [Einstein Toolkit] #666: have CarpetIOScalar output grid scalar directly rather than applying reductions to them

Einstein Toolkit trac-noreply at einsteintoolkit.org
Sun Nov 13 08:53:43 CST 2011


#666: have CarpetIOScalar output grid scalar directly rather than applying
reductions to them
--------------------------+-------------------------------------------------
  Reporter:  rhaas        |       Owner:  eschnett
      Type:  enhancement  |      Status:  review  
  Priority:  minor        |   Milestone:          
 Component:  Carpet       |     Version:          
Resolution:               |    Keywords:          
--------------------------+-------------------------------------------------

Comment (by eschnett):

 Several reductions modify the value, e.g. the L2 norm which always returns
 a non-negative value, or norms of complex numbers. Thus applying
 reductions to scalars makes sense. I would prefer not to have a special
 case for grid scalars in reductions. For example, a 1-element array and a
 scalar should yield the same value when reduced.

 On the other hand, improving the output format of CarpetIOASCII is always
 a good idea. I think you want:
 - Don't extend lower-dimensional quantities to 3 dimensions, adding
 (meaningless) columns
 - Don't output grid structure information for grid arrays and grid
 scalars, which have a trivial grid structure
 - Don't output # comment lines if they separate only a single line of data
 - Maybe: don't output coordinates for grid arrays and grid scalars, which
 don't have a natural coordinate system associated with them
 This should not be difficult (probably ten lines of code). Since it
 changes the output format, it would need to depend on a new parameter and
 could not be the default.

 Another approach could be:
 - Implement a new "reduction" called "origin" that yields the value at the
 origin

 [How do I classify this as "reject patch; back to discussion"?]

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/666#comment:2>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list