Changeset 5502


Ignore:
Timestamp:
Jul 15, 2008, 3:02:41 PM (11 years ago)
Author:
jack
Message:

More work on height quantities.

Location:
anuga_work/development/anugavis/src
Files:
2 added
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • anuga_work/development/anugavis/src/Makefile.am

    r5488 r5502  
    1313                        globals.c \
    1414                        globals.h \
    15                         height_quantity.c \
     15                        height_quantity_c.c \
    1616                        height_quantity.h \
    1717                        init.c \
     
    2525libanugavis_cxx_a_SOURCES = anugavis.cc \
    2626                            anugavis.hh \
     27                            height_quantity.cc \
     28                            height_quantity.hh \
    2729                            output.cc \
    2830                            output.hh \
  • anuga_work/development/anugavis/src/sww_file.cc

    r5493 r5502  
    3838}
    3939
     40
     41int SWWFile::nc_inq_varndims_by_name(const string &name) const{
     42  int ncstatus;
     43  int dimid;
     44  int ndims;
     45  if(((ncstatus = nc_inq_dimid(this->netcdf_id,
     46                               name.c_str(), &dimid)) != NC_NOERR) ||
     47     ((ncstatus = nc_inq_varndims(this->netcdf_id,
     48                                  dimid, &ndims)) != NC_NOERR))
     49    throw nc_strerror(ncstatus);
     50  return ndims;
     51}
     52
    4053void SWWFile::compute_extents(void){
    4154  this->minX = this->x[0];
     
    5164}
    5265
    53 void SWWFile::nc_get_var_float_by_name(const string &name, float array[]){
     66void SWWFile::nc_get_var_float_by_name(const string &name, float array[]) const{
    5467  int ncstatus;
    5568  int varid;
     
    6174}
    6275
    63 void SWWFile::nc_get_var_int_by_name(const string &name, int array[]){
     76void SWWFile::nc_get_var_int_by_name(const string &name, int array[]) const{
    6477  int ncstatus;
    6578  int varid;
     
    7184}
    7285
    73 size_t SWWFile::nc_inq_dimlen_by_name(const string &name){
     86size_t SWWFile::nc_inq_dimlen_by_name(const string &name) const{
    7487  int ncstatus;
    7588  int dimid;
  • anuga_work/development/anugavis/src/sww_file.hh

    r5493 r5502  
    2121  SWWFile(const string &file_name);
    2222  ~SWWFile(void);
     23  int nc_inq_varndims_by_name(const string &name) const;
    2324private:
     25  void nc_get_var_float_by_name(const string &name, float array[]) const;
     26  void nc_get_var_int_by_name(const string &name, int array[]) const;
     27  size_t nc_inq_dimlen_by_name(const string &name) const;
    2428  void compute_extents(void);
    25   void nc_get_var_float_by_name(const string &name, float array[]);
    26   void nc_get_var_int_by_name(const string &name, int array[]);
    27   size_t nc_inq_dimlen_by_name(const string &name);
    2829  int netcdf_id;
    2930  int number_of_points;
Note: See TracChangeset for help on using the changeset viewer.