Changeset 346


Ignore:
Timestamp:
Mar 14, 2006 1:29:49 PM (18 years ago)
Author:
cxsong
Message:

added constructor with name input

Location:
trunk/src/mesh
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mesh/grid1d.cc

    r336 r346  
    33//
    44
    5 #include "serializable.h"
    6 #include "rp_types.h"
    75#include "grid1d.h"
    86
     
    1311}
    1412
     13RpGrid1d::RpGrid1d(const char* name)
     14{
     15        objectName(name);
     16}
     17
    1518RpGrid1d::RpGrid1d(int size)
    1619{
     
    2225{
    2326        m_data.reserve(size);
    24         m_name = name;
     27        objectName(name);
    2528}
    2629
  • trunk/src/mesh/grid1d.h

    r336 r346  
    1010#include "serializable.h"
    1111#include "byte_order.h"
     12#include "rp_types.h"
    1213#include "util.h"
    1314
     
    1819        // constructors
    1920        RpGrid1d();
     21        RpGrid1d(const char* name);
    2022        RpGrid1d(int size);
    2123        RpGrid1d(const char* objectName, int size);
  • trunk/src/mesh/grid2d.cc

    r342 r346  
    1010}
    1111
     12RpGrid2d::RpGrid2d(const char* name)
     13{
     14        objectName(name);
     15}
     16
    1217RpGrid2d::RpGrid2d(int npoints)
    1318{
    1419        m_data.reserve(npoints*2);
     20}
     21
     22RpGrid2d::RpGrid2d(const char* name, int npts)
     23{
     24        objectName(name);
     25        m_data.reserve(npts*2);
    1526}
    1627
  • trunk/src/mesh/grid2d.h

    r342 r346  
    1616        // constructors
    1717        RpGrid2d();
     18        RpGrid2d(const char* name);
    1819        RpGrid2d(int npoints);
     20        RpGrid2d(const char* name, int npts);
    1921
    2022        // constructor - input as 1d array of points {x, y, x, y ,...}
Note: See TracChangeset for help on using the changeset viewer.