EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Mgrid.cxx File Reference
#include <cstdio>
#include <cmath>
#include <cassert>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <ayk.h>
#include <Mgrid.h>
+ Include dependency graph for Mgrid.cxx:

Go to the source code of this file.

Macros

#define quad1(x, xarr, yarr)
 
#define quad2(x, xarr, yarr)
 
#define COORD_NAMES_NUM   (sizeof(coord_names)/sizeof(coord_names[0]))
 

Functions

Mgridcreate_single_mgrid_header (char *name, CoordSystem *coord, CoordSystem *field, MgridDirection *dir[3], unsigned cell_contents_bits)
 
Mgridcreate_mgrid_heap_header (char *name, int field_calculation_method)
 
static double quad3 (double x, double xa[4], double ya[4])
 
static double trivial_assignment (double xx, double coord[1], double value[1])
 
static double linear_interpolation (double xx, double coord[2], double value[2])
 
static double quad_interpolation (double xx, double coord[3], double value[3])
 
t_coord_namefind_coord_by_name (unsigned char system_type, char name)
 
int basic_types_match (void)
 
static t_3d_cs_vector transform_coord_type (t_3d_cs_vector *X, unsigned char desired_coord_system)
 
static void transform_field_type (double mtx[2][2], t_3d_cs_vector *D, unsigned char desired_coord_system)
 

Variables

static t_coord_name coord_names []
 

Macro Definition Documentation

#define COORD_NAMES_NUM   (sizeof(coord_names)/sizeof(coord_names[0]))

Definition at line 1069 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 1069 of file Mgrid.cxx

Referenced by find_coord_by_name().

#define quad1 (   x,
  xarr,
  yarr 
)
Value:
(d3 = ((x)-(xarr)[2])/((xarr)[1]-(xarr)[0]), \
d1 = ((x)-(xarr)[1])/((xarr)[2]-(xarr)[0]), \
d2 = ((x)-(xarr)[0])/((xarr)[2]-(xarr)[1]), \
( (yarr)[2]*d1*d2 + d3*((yarr)[0]*d1-(yarr)[1]*d2) ))

Definition at line 462 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 462 of file Mgrid.cxx

Referenced by quad3(), and quad_interpolation().

#define quad2 (   x,
  xarr,
  yarr 
)
Value:
(d6 = ((x)-(xarr)[2])/((xarr)[1]-(xarr)[0]), \
d4 = ((x)-(xarr)[1])/((xarr)[2]-(xarr)[0]), \
d5 = ((x)-(xarr)[0])/((xarr)[2]-(xarr)[1]), \
( (yarr)[2]*d4*d5 + d6*((yarr)[0]*d4-(yarr)[1]*d5) ))

Definition at line 468 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 468 of file Mgrid.cxx

Referenced by quad3().

Function Documentation

int basic_types_match ( void  )

Definition at line 1098 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 1098 of file Mgrid.cxx

Referenced by Mgrid::exportFieldMap(), and import_field_map().

+ Here is the caller graph for this function:

Mgrid* create_mgrid_heap_header ( char *  name,
int  field_calculation_method 
)

Definition at line 162 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 162 of file Mgrid.cxx

References _CARTESIAN_, _MGRID_HEAP_, MgridHeader::coord, MgridHeader::field, MgridHeader::field_calculation_method, and CoordSystem::setSystemType().

Referenced by convert_cell_list_to_mgrid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Mgrid* create_single_mgrid_header ( char *  name,
CoordSystem coord,
CoordSystem field,
MgridDirection dir[3],
unsigned  cell_contents_bits 
)

Definition at line 118 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 118 of file Mgrid.cxx

References _MAX_KNOWN_CELL_CONTENTS_BIT_, _RECTANGULAR_MGRID_, MgridHeader::cell_contents_bits, MgridHeader::coord, MgridHeader::dir, CoordSystem::fake, MgridHeader::field, MgridDirection::getStep(), and printf().

Referenced by convert_cell_list_to_mgrid(), EicBeamLineElementMap::Initialize(), and HtcKalmanFilter::InitializeMgridSlice().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

t_coord_name* find_coord_by_name ( unsigned char  system_type,
char  name 
)

Definition at line 1071 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 1071 of file Mgrid.cxx

References t_coord_name::allowed_systems, COORD_NAMES_NUM, and t_coord_name::name.

Referenced by MgridInterpolation::assignSuggestedSequence(), calculate_swapping_rules(), CoordSystem::CoordSystem(), and Mgrid::switchInterpolation().

+ Here is the caller graph for this function:

static double linear_interpolation ( double  xx,
double  coord[2],
double  value[2] 
)
static

Definition at line 514 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 514 of file Mgrid.cxx

Referenced by Mgrid::cookSequentialFastInterpolation().

+ Here is the caller graph for this function:

static double quad3 ( double  x,
double  xa[4],
double  ya[4] 
)
static

Definition at line 474 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 474 of file Mgrid.cxx

References quad1, quad2, and x.

Referenced by Mgrid::cookSequentialFastInterpolation().

+ Here is the caller graph for this function:

static double quad_interpolation ( double  xx,
double  coord[3],
double  value[3] 
)
static

Definition at line 524 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 524 of file Mgrid.cxx

References quad1.

Referenced by Mgrid::cookSequentialFastInterpolation().

+ Here is the caller graph for this function:

static t_3d_cs_vector transform_coord_type ( t_3d_cs_vector X,
unsigned char  desired_coord_system 
)
static

Definition at line 1628 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 1628 of file Mgrid.cxx

References _CARTESIAN_, _CYLINDRICAL_, _F_, _R_, _X_, _Y_, _Z_, cos(), deg2rad, rad2deg, SQR, t_3d_cs_vector::system_type, and t_3d_cs_vector::xx.

Referenced by Mgrid::convertInputCoordinates(), and Mgrid::convertOutputField().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void transform_field_type ( double  mtx[2][2],
t_3d_cs_vector D,
unsigned char  desired_coord_system 
)
static

Definition at line 1668 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 1668 of file Mgrid.cxx

References _CARTESIAN_, _CYLINDRICAL_, t_3d_cs_vector::system_type, and t_3d_cs_vector::xx.

Referenced by Mgrid::convertOutputField().

+ Here is the caller graph for this function:

static double trivial_assignment ( double  xx,
double  coord[1],
double  value[1] 
)
static

Definition at line 506 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 506 of file Mgrid.cxx

Referenced by Mgrid::cookSequentialFastInterpolation().

+ Here is the caller graph for this function:

Variable Documentation

t_coord_name coord_names[]
static
Initial value:
= {
{'X', _X_, _CARTESIAN_},
{'Y', _Y_, _CARTESIAN_},
{'R', _R_, _CYLINDRICAL_},
{'F', _F_, _CYLINDRICAL_}}

Definition at line 1063 of file Mgrid.cxx.

View newest version in sPHENIX GitHub at line 1063 of file Mgrid.cxx