GCLgrid :: GCLgrid | classes |
class GCLgrid3d | ? ^ |
Three-dimensional version of a GCLgrid object.
Adds additional attributes required to deal with an added dimension and uses a higher dimensional array to contain points.
- Source:
- gclgrid.h:484
- Author:
- unascribed
- Version:
- unknown
Contents | ^ |
Entity Inherited From Type Scope Short Description ~GCLgrid3d destructor public Destructor. GCLgrid3d constructor public Default constructor. GCLgrid3d constructor public Simple constructor. GCLgrid3d constructor public Constructor for what we call a "regular" GCLgrid in 3D in the Fan and Pavlis (in review) paper. GCLgrid3d constructor public Antelope database driven constructor. GCLgrid3d constructor public Standard copy constructor. compute_extents method public undocumented ctog BasicGCLgrid method public Convert Cartesian coordinates to geographical coordinates. ctog BasicGCLgrid method public Convert from Cartesian coordinates to geographical coordinates. depth method public Get the depth below the standard reference ellipsoid of a grid point. dx3_nom attribute public Nominal spacing (km) of grid lines along the 3 position gridlines. fetch_transformation_matrix BasicGCLgrid method public Returns the transformation matrix for this grid as a 3x3 dmatrix object. fetch_translation_vector BasicGCLgrid method public Returns a newly allocated 3 vector of double containing a copy of the translation vector defining the GCLgrid transformation property. geo_coordinates method public Returns the geographical coordinates of a point in the grid specified by grid index positions. get_index method public See BasicGCLgrid::get_index gtoc BasicGCLgrid method public Convert from geographical to Cartesian coordinates in the GCLgrid coordinate system. gtoc BasicGCLgrid method public Convert from geographical to Cartesian coordinates in the GCLgrid coordinate system. k0 attribute public Offset in third index to origin grid point. lat method public Get the latitude (in radians) of a grid point. lookup method public Save grid to an Antelope (Datascope) database. n3 attribute public Number of grid points in generalized coordinate index 3 direction (second array index). operator = operator public Standard assignment operator. r method public Get the longitude (in radians) of a grid point. reset_index method public See BasicGCLgrid::reset_index set_transformation_matrix BasicGCLgrid method public Set or reset the transformation properties for the grid. x1 attribute public n1 x n2 x n3 Three-dimensional array that holds the Cartesian x1 component of the positions of each grid point. x2 attribute public n1 x n2 x n3 Three-dimensional array that holds the Cartesian x2 component of the positions of each grid point. x3 attribute public n1 x n2 x n3 Three-dimensional array that holds the Cartesian x3 component of the positions of each grid point.
destructor ~GCLgrid3d | ? ^ > |
Destructor.Nontrivial destructor has to destroy the coordinate arrays correctly and handle case when they are never defined. Handles this by checking for NULL pointers for these arrays. If the pointers are NULL the free routines are not called. This is important to know if you try to create a GCLgrid object by the default constructor.
- Source:
- gclgrid.h:683
- Code:
public ~ GCLgrid3d ( )
constructor GCLgrid3d | ? ^ < > |
Default constructor.Note sets pointers to NULL to make destructor work correctly when a grid is created by this constructor.
- Source:
- gclgrid.h:523
- Code:
public GCLgrid3d ( )
constructor GCLgrid3d | ? ^ < > |
Simple constructor.Allocates space for x1, x2, and x3 arrays and initializes other data attributes to zero.
- Source:
- gclgrid.h:532
- Params:
n1size number of grid points on generalized coordinate axis 1. n2size number of grid points on generalized coordinate axis 2. n3size number of grid points on generalized coordinate axis 3.
- Code:
public GCLgrid3d ( int n1size , int n2size , int n3size )
constructor GCLgrid3d | ? ^ < > |
Constructor for what we call a "regular" GCLgrid in 3D in the Fan and Pavlis (in review) paper.
The object this constructs is spherical shell, boxlike object built up of elemental spherical shell cube-like grid components. The top surface of the box is defined by the reference ellipsoid. The bottom is a constant depth below this. Note that the grid this creates is oriented with the third generalized coordinate index running from the bottom (deeper inside the Earth) upward as the grid index increases. Note no index is allowed for index 3 for the origin. This constuctor always puts the origin at the bottom of the grid. This isn't necessary, but something that is just frozen into this implementation. For the same reason r0 is ignored and just set internally by this constructor.
Note that the makegclgrid program is little more than a wrapper around this and the 2d version of this constructor.
- Source:
- gclgrid.h:566
- Params:
n1 number of grid points on generalized coordinate axis 1. n2 number of grid points on generalized coordinate axis 2. n3 number of grid points on generalized coordinate axis 3. n name to assign this grid. la0 latitude to use for origin. lo0 longitude to use for origin. radius0 Earth radius to use for origin. If 0 or negative will use r0_ellipse at la0. az azimuth of great circle path through the origin that defines the generalized coordinate 2 axis direction. dx1n nominal spacing of grid points on the generalized coordinate 1 axis. dx2n nominal spacing of grid points on the generalized coordinate 2 axis. dx3n nominal spacing of grid points on the generalized coordinate 3 axis. iorigin 1 axis grid index of the origin in generalized coordinate grid frame. jorigin 2 axis grid index of the origin in generalized coordinate grid frame.
- Code:
public GCLgrid3d ( int n1size , int n2size , int n3size , string n , double la0 , double lo0 , double az , double radius0 , double dx1n , double dx2n , double dx3n , int iorigin , int jorigin )
constructor GCLgrid3d | ? ^ < > |
Antelope database driven constructor.This is a specialized constructor that loads a grid tagged with the name nm from a database using a specialized table. Users who do not wish to connect with Antelope should remove this constructor from the object definition.
- Source:
- gclgrid.h:576
- Params:
db Antelope database pointer. nm name of grid to be loaded from the database.
- Code:
public GCLgrid3d ( Dbptr db , string nm )
constructor GCLgrid3d | ? ^ < > |
Standard copy constructor.
- Source:
- gclgrid.h:578
- Code:
public GCLgrid3d ( const GCLgrid3d & )
method compute_extents | ? ^ < > |
undocumented
- Source:
- gclgrid.h:675
- Code:
public void compute_extents ( )
method ctog | ? ^ < > |
Convert Cartesian coordinates to geographical coordinates.
- Inherited From:
- BasicGCLgrid
- Source:
- gclgrid.h:208
- Params:
x1p - Cartesian x1 coordinate of point to convert x2p - Cartesian x2 coordinate of point to convert x3p - Cartesian x3 coordinate of point to convert - Returns:
- Geographic_point data structure (see Geographic_point )
- Code:
public Geographic_point ctog ( double x1p , double x2p , double x3p )
method ctog | ? ^ < > |
Convert from Cartesian coordinates to geographical coordinates.
- Inherited From:
- BasicGCLgrid
- Source:
- gclgrid.h:214
- Param:
p point to convert stored in a Cartesian_point data structure - Returns:
- Geographic_point data structure (see Geographic_point )
- Code:
public Geographic_point ctog ( Cartesian_point p )
method depth | ? ^ < > |
Get the depth below the standard reference ellipsoid of a grid point.
- Source:
- gclgrid.h:673
- Params:
i1 Value of grid index 1 for point desired. i2 Value of grid index 2 for point desired. i3 Value of grid index 3 for point desired. - Returns:
- depth in kilometers of the requested grid point.
- Code:
public double depth ( int , int , int )
attribute dx3_nom | ? ^ < > |
Nominal spacing (km) of grid lines along the 3 position gridlines.
- Source:
- gclgrid.h:490
- Code:
- public double dx3_nom
method fetch_transformation_matrix | ? ^ < > |
Returns the transformation matrix for this grid as a 3x3 dmatrix object.
- Inherited From:
- BasicGCLgrid
- Source:
- gclgrid.h:194
- Code:
public dmatrix fetch_transformation_matrix ( )
method fetch_translation_vector | ? ^ < > |
Returns a newly allocated 3 vector of double containing a copy of the translation vector defining the GCLgrid transformation property.The user must be sure to call delete [] after using this vector to avoid a memory leak.
- Inherited From:
- BasicGCLgrid
- Source:
- gclgrid.h:200
- Code:
public double * fetch_translation_vector ( )
method geo_coordinates | ? ^ < > |
Returns the geographical coordinates of a point in the grid specified by grid index positions.
If you need the actual coordinates of the points that define the grid converted to geographic coordinates use this function. Use the ctog function to convert an arbitrary ordered triplet.
- Source:
- gclgrid.h:638
- Params:
i1 Value of grid index 1 for point desired. i2 Value of grid index 2 for point desired. i3 Value of grid index 3 for point desired. - Returns:
- grid point requested in an Geographic_point data structure.
- Code:
public Geographic_point geo_coordinates ( int i1 , int i2 , int i3 )
method get_index | ? ^ < > |
See BasicGCLgrid::get_index
- Source:
- gclgrid.h:625
- Code:
public void get_index ( int * ind )
method gtoc | ? ^ < > |
Convert from geographical to Cartesian coordinates in the GCLgrid coordinate system.
- Inherited From:
- BasicGCLgrid
- Source:
- gclgrid.h:224
- Params:
plat Latitude (radians) of point to convert. plon Longitude (radians) of point to convert. pr Earth radius (km) of point to convert. - Returns:
- Cartesian_point data structure (see @endlink)
- Code:
public Cartesian_point gtoc ( double plat , double plon , double pr )
method gtoc | ? ^ < > |
Convert from geographical to Cartesian coordinates in the GCLgrid coordinate system.
- Inherited From:
- BasicGCLgrid
- Source:
- gclgrid.h:232
- Param:
p point to convert stored in a @link Geographic_point @endlink data structure. - Returns:
- Cartesian_point data structure (see @endlink) )
- Code:
public Cartesian_point gtoc ( Geographic_point p )
attribute k0 | ? ^ < > |
Offset in third index to origin grid point.i.e. origin is at third coordinate index k0. ([i0][j0][k0])
- Source:
- gclgrid.h:498
- Code:
- public int k0
method lat | ? ^ < > |
Get the latitude (in radians) of a grid point.
- Source:
- gclgrid.h:647
- Params:
i1 Value of grid index 1 for point desired. i2 Value of grid index 2 for point desired. i3 Value of grid index 3 for point desired. - Returns:
- latitude in radians of the requested grid point.
- Code:
public double lat ( int , int , int )
method lookup | ? ^ < > |
Save grid to an Antelope (Datascope) database.
This routine writes the object attributes to a special table and writes the grid coordinate data an output file. Note the file name used to store the grid is the same as the name parameter passed to this function.
- Source:
- gclgrid.h:621
- Params:
db Antelope database pointer. nm name used to save the grid. void dbsave(Dbptr db, string nm) throw(int); Find the index position of a point in a GCLgrid3d object. This is a low level function to find the location of a point specified as the Cartesian, ordered triplet (x1p,x2p,x3p) in a grid. It does not return the actual index positions, but only sets the internal index. The routine is very procedural returning an integer code (see below) indicating success or failure of the lookup. This was intentional as this routine is called millions of times in some contexts so efficiency is critical. The alternative would be to throw an exception when a lookup failed, but since this is viewed as a common problem that could happen millions of times this was a potential efficiency problems (the books all say throwing exceptions is an expensive operation). x1p - Cartesian x1 coordinate of point to find within the grid x2p - Cartesian x2 coordinate of point to find within the grid x3p - Cartesian x3 coordinate of point to find within the grid - Returns:
- 2 when point is in gray area within on nominal grid spacing of the edge 1 when the point is outside the bounding box. 0 on success.\ -1 if the lookup function did not converge.
- Exception:
int Exception is thrown if save failed. A simple int exception is used because errors are posted to the Antelope elog mechanism. If this exception is caught, call elog_complain to flush the elog buffer.
- Code:
public int lookup ( double , double , double )
attribute n3 | ? ^ < > |
Number of grid points in generalized coordinate index 3 direction (second array index).
- Source:
- gclgrid.h:494
- Code:
- public int n3
operator = | ? ^ < > |
Standard assignment operator.
- Source:
- gclgrid.h:580
- Code:
public GCLgrid3d & operator = ( const GCLgrid3d & )
method r | ? ^ < > |
Get the longitude (in radians) of a grid point.
- Source:
- gclgrid.h:664
- Params:
i1 Value of grid index 1 for point desired. i2 Value of grid index 2 for point desired. i3 Value of grid index 3 for point desired. double lon(int,int,int); Get the radius from the center of the Earth of a grid point.
i1 Value of grid index 1 for point desired. i2 Value of grid index 2 for point desired. i3 Value of grid index 3 for point desired. - Returns:
- latitude in radians of the requested grid point. Earth radius in kilometers of the requested grid point.
- Code:
public double r ( int , int , int )
method reset_index | ? ^ < > |
See BasicGCLgrid::reset_index
- Source:
- gclgrid.h:623
- Code:
public void reset_index ( )
method set_transformation_matrix | ? ^ < > |
Set or reset the transformation properties for the grid.The transformation properties are uniquely defined by the coordinate system origin and azimuth_y so if these are all that are known this low level member function can be called to set the transformation properties. It is of minimal use to most users and should be used cautiously and only if you thoroughly understand the way this all works.
- Inherited From:
- BasicGCLgrid
- Source:
- gclgrid.h:190
- Code:
public void set_transformation_matrix ( )
attribute x1 | ? ^ < > |
n1 x n2 x n3 Three-dimensional array that holds the Cartesian x1 component of the positions of each grid point.
- Source:
- gclgrid.h:503
- Code:
- public double * * * x1
attribute x2 | ? ^ < > |
n1 x n2 x n3 Three-dimensional array that holds the Cartesian x2 component of the positions of each grid point.
- Source:
- gclgrid.h:508
- Code:
- public double * * * x2
attribute x3 | ? ^ < > |
n1 x n2 x n3 Three-dimensional array that holds the Cartesian x3 component of the positions of each grid point.
- Source:
- gclgrid.h:513
- Code:
- public double * * * x3
Created Fri Jan 21 08:54:54 2005.
This documentation was generated automatically by
ccdoc v08r41 2004/09/29 bin_opt_suncc_sun4-solaris-2.8.
Click here to submit a bug report or feature request for ccdoc.
Click here to return to the top of the page.