Streamer fluid modeling - An overview of ARCoS  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs
mapper.h File Reference

Definitions for mapper objects. More...

#include "interpol2.h"
Include dependency graph for mapper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mapper_t
 

Macros

#define _coarsen_params_
 
#define _copy_params_
 
#define _interpol_set_params_
 
#define _interpol_params_
 
#define decl_mapper_funcs(_VAR)
 
#define mk_mapper_staggered(_C, _INTERPOL_METHOD, _SHIFT_R, _SHIFT_Z)
 
#define mk_mapper(_C, _INTERPOL_METHOD)   mk_mapper_staggered (_C, _INTERPOL_METHOD, 0, 0)
 
#define mk_mapper_down(_C, _INTERPOL_METHOD)
 
#define _MAPPER_H_
 

Typedefs

typedef struct mapper_t mapper_t
 

Detailed Description

Definitions for mapper objects.

A mapper objects defines how and what to map between two grid families. For example, a mapper object can be used to map the charge from a cdr grid to a Poisson grid, or to map the potential of a Poisson grid into one of the components of the electric field in a cdr grid. For that, a mapper object has to implement some methods that tell us how to map things in the cases
a) the source grid is coarser than the target grid (interpolation),
b) the source and the target are at the same level (copy),
c) the target grid is coarser (coarsening).

Definition in file mapper.h.

Macro Definition Documentation

#define _coarsen_params_
Value:
(mapper_t *mapper, grid_t *source, grid_t *target, \
int ir, int iz, int itheta)

Definition at line 23 of file mapper.h.

#define _copy_params_
Value:
(mapper_t *mapper, grid_t *source, grid_t *target, \
int ir, int iz, int itheta)

Definition at line 25 of file mapper.h.

#define _interpol_set_params_
Value:
(mapper_t *mapper, grid_t *source, \
interpol_t *interpol, int ir, \
int iz, int itheta)

Definition at line 27 of file mapper.h.

#define _interpol_params_
Value:
(mapper_t *mapper, grid_t *source, grid_t *target, \
interpol_t *interpol, int ir, int iz, int itheta)

Definition at line 30 of file mapper.h.

#define decl_mapper_funcs (   _VAR)
Value:
void _VAR ## _coarsen _coarsen_params_; \
void _VAR ## _copy _copy_params_; \
int _VAR ## _interpol_set _interpol_set_params_; \
void _VAR ## _interpol _interpol_params_

Usually, we will define functions called xxxx_coarsen, xxxx_copy, etc to implement the above interface. We define these macros to facilitate the declaration of such functions.

Definition at line 71 of file mapper.h.

#define mk_mapper_staggered (   _C,
  _INTERPOL_METHOD,
  _SHIFT_R,
  _SHIFT_Z 
)
Value:
{_INTERPOL_METHOD, _C ## _coarsen, _C ## _copy, \
_C ## _interpol_set, _C ##_interpol, _SHIFT_R, _SHIFT_Z, 0}

Useful to init a staggered mapper object

Definition at line 78 of file mapper.h.

#define mk_mapper (   _C,
  _INTERPOL_METHOD 
)    mk_mapper_staggered (_C, _INTERPOL_METHOD, 0, 0)

Useful to init a mapper object

Definition at line 83 of file mapper.h.

#define mk_mapper_down (   _C,
  _INTERPOL_METHOD 
)
Value:
{_INTERPOL_METHOD, NULL, _C ## _copy, \
_C ## _interpol_set, _C ##_interpol, 0, 0, 0}

Mappers that only copy or interpolate.

Definition at line 87 of file mapper.h.

#define _MAPPER_H_

Definition at line 91 of file mapper.h.

Typedef Documentation

typedef struct mapper_t mapper_t

Definition at line 17 of file mapper.h.