# 2.2.15. averageDown

## Purpose

 Figure 1: Packing stencil concept exemplified in two dimensions.

For a periodic and regular grid stored in an ASCII table with x as fastest and z as slowest varying coordinate, calculate the average per block of given size. Grid resolution is reduced by the factor resulting from the chosen size of the packing stencil.

Figure 1 illustrates the concept in two dimensions with a 2 by 2 packing stencil. The original 4 by 4 grid is shown in light gray and might result from a 2 by 2 finite element mesh (black lines) with linear interpolation functions, thus containing four integration points each. During averaging, the stencil is moved across the whole grid in steps of 2 grid points along x and 2 grid points along y, i.e., in a non-overlapping fashion.

The (black) points of the resulting 4/2 by 4/2 = 2 by 2 grid fall into the center of the finite elements since a stencil shift of (0, 0) was employed in this example.

Using a stencil shift of either (-1,-1), (-1,1), (1,1), or (1,-1) in the example of Figure 1 would result in the new grid coinciding with the nodes of the finite elements and averaged from their four neighboring integration points (light gray; periodicity of the original data is always implied).

Operates on given file(s) or STDIN STDOUT.

## Usage

> averageDown options [file(s)]


## Options

--coordinates / -c string [ ip ]
column heading for coordinates
--packing / -p integer × 3 [ 2 2 2 ]
dimension of packing stencil along x, y, and z
--shift / -s integer × 3 [ 0 0 0 ]
shift vector of packing stencil in units of grid points

## Examples

• distance between origin and node coordinates
--label 'nodeDistance' --formula 'math.sqrt( #node.x#**2 + #node.y#**2 + #node.z#**2 )'
Topic attachments
I Attachment Action Size Date Who Comment
pdf averageDown.pdf manage 258 K 16 Feb 2012 - 10:04 PhilipEisenlohr packing stencil concept used in averageDown postprocessing script
png averageDown.png manage 9 K 16 Feb 2012 - 10:20 PhilipEisenlohr packing stencil concept used in averageDown postprocessing script
Topic revision: r6 - 29 Jan 2013, MartinDiehl

• News
01 Dec 2018
DAMASK overview paper now online
17 Sep 2018
CMCn2018 & DAMASK user meeting to be hosted at Max-Planck-Institut für Eisenforschung
22 May 2018
Release of version v2.0.2
01 Sep 2016
CMCn2016 & DAMASK user meeting to be hosted at Max-Planck-Institut für Eisenforschung
25 Jul 2016
Release of version v2.0.1
08 Mar 2016
Release of version v2.0.0
22 Feb 2016
New webserver up and running
09 Feb 2016
Migrated code repository from Subversion to GitLab
17 Dec 2014
Release of revision 3813
14 May 2014
Release of revision 3108
02 Apr 2014
Release of revision 3062
16 Oct 2013
Release of revision 2689
15 Jul 2013
Release of revision 2555
15 Feb 2013
Release of revision 2174
13 Feb 2013
documentation
16 Dec 2012
rendering
23 Nov 2012
Release of revision 1955
15 Nov 2012
Release of revision 1924
01 Nov 2012
Updated sidebar
30 Oct 2012
Significant website updates and content extensions

Copyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DAMASK? Send feedback
§ Imprint § Data Protection