Changeset 3622


Ignore:
Timestamp:
04/27/10 08:27:06 (15 years ago)
Author:
Mathieu Morlighem
Message:

now iomodel constructor also specifies the id

Location:
issm/trunk/src/c/objects
Files:
2 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Beam.cpp

    r3621 r3622  
    5959}
    6060/*}}}*/
    61 /*FUNCTION Beam::Beam(int i, IoModel* iomodel){{{1*/
    62 Beam::Beam(int index,IoModel* iomodel){
    63 
     61/*FUNCTION Beam::Beam(int id, int i, IoModel* iomodel){{{1*/
     62Beam::Beam(int beam_id, int index,IoModel* iomodel){
    6463
    6564        int i;
    6665
    6766        /*beam constructor input: */
    68         int   beam_id;
    6967        int   beam_matice_id;
    7068        int   beam_matpar_id;
     
    7371
    7472        /*id: */
    75         beam_id=index+1;
    7673        this->id=beam_id;
    7774
  • issm/trunk/src/c/objects/Beam.h

    r3621 r3622  
    4242                Beam(int beam_id,int* beam_node_ids, int beam_matice_id, int beam_matpar_id);
    4343                Beam(int beam_id,Hook* beam_hnodes, Hook* beam_hmatice, Hook* beam_hmatpar, Parameters* beam_parameters, Inputs* beam_inputs);
    44                 Beam(int i, IoModel* iomodel);
     44                Beam(int beam_id,int i, IoModel* iomodel);
    4545                ~Beam();
    4646                /*}}}*/
  • issm/trunk/src/c/objects/Icefront.cpp

    r3597 r3622  
    1919               
    2020/*Object constructors and destructor*/
    21 /*FUNCTION Icefront constructor {{{1*/
     21/*FUNCTION Icefront::Icefront() {{{1*/
    2222Icefront::Icefront(){
    2323        return;
    2424}
    2525/*}}}*/
    26 /*FUNCTION Icefront constructor {{{1*/
     26/*FUNCTION Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, ...) {{{1*/
    2727Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type,
    2828                int icefront_node_ids[MAX_ICEFRONT_GRIDS],double icefront_h[MAX_ICEFRONT_GRIDS],double  icefront_b[MAX_ICEFRONT_GRIDS]){
     
    3333}
    3434/*}}}*/
    35 /*FUNCTION Init: used by  constructor {{{1*/
     35/*FUNCTION Icefront::Init {{{1*/
    3636void Icefront::Init(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type,
    3737                int icefront_node_ids[MAX_ICEFRONT_GRIDS],double icefront_h[MAX_ICEFRONT_GRIDS],double  icefront_b[MAX_ICEFRONT_GRIDS]){
     
    6262}
    6363/*}}}*/
    64 /*FUNCTION Icefront constructor from iomodel {{{1*/
    65 Icefront::Icefront(int i, IoModel* iomodel){
     64/*FUNCTION Icefront::Icefront(int id, int i, IoModel* iomodel) {{{1*/
     65Icefront::Icefront(int icefront_id,int i, IoModel* iomodel){
    6666
    6767        int segment_width;
     
    7474        int  icefront_fill;
    7575        int  icefront_element_type;
    76         int  icefront_sid;
    7776        int  icefront_eid;
    7877        int  icefront_mparid;
     
    9493        icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    9594        icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    96         icefront_sid=i+1; //matlab indexing
    9795        icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1);
    9896        icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
     
    148146        else ISSMERROR("Not supported yet!");
    149147
    150         this->Init(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
    151 }
    152 
    153 
    154 /*}}}*/
    155 /*FUNCTION Icefront destructor {{{1*/
     148        this->Init(icefront_type,icefront_fill,icefront_id,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
     149}
     150
     151
     152/*}}}*/
     153/*FUNCTION Icefront::~Icefront() {{{1*/
    156154Icefront::~Icefront(){
    157155        return;
  • issm/trunk/src/c/objects/Icefront.h

    r3511 r3622  
    5454                Icefront(char type[ICEFRONTSTRING],int fill,int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double        b[MAX_ICEFRONT_GRIDS]);
    5555                void Init(char type[ICEFRONTSTRING],int fill,int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double       b[MAX_ICEFRONT_GRIDS]);
    56                 Icefront(int i, IoModel* iomodel);
     56                Icefront(int sid, int i, IoModel* iomodel);
    5757                ~Icefront();
    5858                /*}}}*/
  • issm/trunk/src/c/objects/Matice.cpp

    r3612 r3622  
    1818               
    1919/*Object constructors and destructor*/
    20 /*FUNCTION Matice::default constructor {{{1*/
     20/*FUNCTION Matice::Matice(){{{1*/
    2121Matice::Matice(){
    2222        return;
    2323}
    2424/*}}}*/
    25 /*FUNCTION Matice::constructor {{{1*/
     25/*FUNCTION Matice::Matice(int in_mid,double in_B,double in_n){{{1*/
    2626Matice::Matice(int in_mid,double in_B,double in_n){
    2727        this->Init(in_mid,in_B,in_n);
    2828}
    2929/*}}}*/
    30 /*FUNCTION Matice::init {{{1*/
     30/*FUNCTION Matice::Init {{{1*/
    3131void Matice::Init(int in_mid,double in_B,double in_n){
    3232        this->mid=in_mid;
     
    3535}
    3636/*}}}*/
    37 /*FUNCTION Matice::constructor from iomodel {{{1*/
    38 Matice::Matice(int i, IoModel* iomodel, int num_vertices){
     37/*FUNCTION Matice::Matice(int id, int i, IoModel* iomodel, int num_vertices){{{1*/
     38Matice::Matice(int matice_mid,int i, IoModel* iomodel, int num_vertices){
    3939
    4040        int j;
    4141       
    4242        /*needed for Init routine:*/
    43         int matice_mid;
    4443        double matice_B;
    4544        double matice_n;
     
    4746        /*intermediary: */
    4847        double B_avg;
    49        
    50         /*id: */
    51         matice_mid=i+1;  //same as element it is created for
    5248 
    5349        /*Compute B on the element if provided*/
     
    8581}
    8682/*}}}*/
    87 /*FUNCTION Matice::destructor {{{1*/
     83/*FUNCTION Matice::~Matice(){{{1*/
    8884Matice::~Matice(){
    8985        return;
  • issm/trunk/src/c/objects/Matice.h

    r3463 r3622  
    2121                Matice();
    2222                Matice(int mid,double B,double n);
    23                 Matice(int i, IoModel* iomodel, int num_vertices);
     23                Matice(int mid,int i, IoModel* iomodel, int num_vertices);
    2424                void Init(int mid,double B,double n);
    2525                ~Matice();
  • issm/trunk/src/c/objects/Matpar.cpp

    r3567 r3622  
    1919               
    2020/*Object constructors and destructor*/
    21 /*FUNCTION Matpar::default constructor {{{1*/
     21/*FUNCTION Matpar::Matpar() {{{1*/
    2222Matpar::Matpar(){
    2323        return;
    2424}
    2525/*}}}1*/
    26 /*FUNCTION Matpar::constructorr {{{1*/
     26/*FUNCTION Matpar::Matpar(int matpar_mid, double matpar_rho_ice, double matpar_rho_water, double matpar_heatcapacity, ...){{{1*/
    2727Matpar::Matpar(int      matpar_mid, double      matpar_rho_ice, double  matpar_rho_water, double  matpar_heatcapacity, double  matpar_thermalconductivity, double  matpar_latentheat, double  matpar_beta, double  matpar_meltingpoint, double  matpar_mixed_layer_capacity, double  matpar_thermal_exchange_velocity, double  matpar_g){
    2828
     
    3131}
    3232/*}}}1*/
    33 /*FUNCTION Matpar::constructor  from iomodel{{{1*/
    34 Matpar::Matpar(IoModel* iomodel){
    35 
    36         int       matpar_mid;
     33/*FUNCTION Matpar::Matpar(int matpar_mid,IoModel* iomodel){{{1*/
     34Matpar::Matpar(int matpar_mid, IoModel* iomodel){
     35
    3736        double  matpar_rho_ice;
    3837        double  matpar_rho_water;
     
    4645        double  matpar_g;
    4746
    48         if (iomodel->analysis_type==DiagnosticAnalysisEnum && iomodel->sub_analysis_type==HutterAnalysisEnum){
    49                 if (strcmp(iomodel->meshtype,"2d")==0){
    50                         matpar_mid=iomodel->numberofvertices+1; //put it at the end of the materials
    51                 }
    52                 else{ matpar_mid=iomodel->numberofvertices2d*(iomodel->numlayers-1)+1;}
    53         }
    54         else{
    55                 matpar_mid=iomodel->numberofelements+1; //put it at the end of the materials
    56         }
    5747        matpar_g=iomodel->g;
    5848        matpar_rho_ice=iomodel->rho_ice;
     
    8878}
    8979/*}}}1*/
    90 /*FUNCTION Matpar::destructor{{{1*/
     80/*FUNCTION Matpar::~Matpar() {{{1*/
    9181Matpar::~Matpar(){
    9282        return;
  • issm/trunk/src/c/objects/Matpar.h

    r3463 r3622  
    3232                Matpar(int      mid, double     rho_ice, double rho_water, double  heatcapacity, double  thermalconductivity, double  latentheat, double  beta, double  meltingpoint, double  mixed_layer_capacity, double  thermal_exchange_velocity, double  g);
    3333                void Init(int   mid, double     rho_ice, double rho_water, double  heatcapacity, double  thermalconductivity, double  latentheat, double  beta, double  meltingpoint, double  mixed_layer_capacity, double  thermal_exchange_velocity, double  g);
    34                 Matpar(IoModel* iomodel);
     34                Matpar(int matpar_id, IoModel* iomodel);
    3535                ~Matpar();
    3636
  • issm/trunk/src/c/objects/Node.cpp

    r3612 r3622  
    5252}
    5353/*}}}*/
    54 /*FUNCTION Node::Node(int i, IoModel* iomodel)          -> Continuous Galerkin{{{2*/
    55 Node::Node(int i, IoModel* iomodel){ //i is the node index
     54/*FUNCTION Node::Node(int id, int i, IoModel* iomodel)          -> Continuous Galerkin{{{2*/
     55Node::Node(int node_id, int i, IoModel* iomodel){ //i is the node index
    5656
    5757        int k;
     
    6262
    6363        /*id: */
    64         this->id=i+1; //matlab indexing
     64        this->id=node_id; //matlab indexing
    6565
    6666        /*indexing:*/
     
    161161}
    162162/*}}}*/
    163 /*FUNCTION Node::Node(int i, int j, IoModel* iomodel)   -> Discontinuous Galerkin{{{2*/
    164 Node::Node(int i,int j,IoModel* iomodel){
     163/*FUNCTION Node::Node(int id, int i, int j, IoModel* iomodel)   -> Discontinuous Galerkin{{{2*/
     164Node::Node(int node_id,int i,int j,IoModel* iomodel){
    165165        /* i -> index of the vertex in C indexing
    166166         * j -> index of the node in C indexing*/
     
    171171
    172172        /*id: */
    173         this->id=j+1; //matlab indexing
     173        this->id=node_id; //matlab indexing
    174174
    175175        /*indexing:*/
  • issm/trunk/src/c/objects/Penta.cpp

    r3621 r3622  
    2121
    2222/*Object constructors and destructor*/
    23 /*FUNCTION Penta default constructor {{{1*/
     23/*FUNCTION Penta::Penta(){{{1*/
    2424Penta::Penta(){
    2525        this->inputs=NULL;
     
    2727}
    2828/*}}}*/
    29 /*FUNCTION Penta constructor {{{1*/
     29/*FUNCTION Penta::Penta(int penta_id,int* penta_node_ids, int penta_matice_id, int penta_matpar_id) {{{1*/
    3030Penta::Penta(int penta_id,int* penta_node_ids, int penta_matice_id, int penta_matpar_id):
    3131        hnodes(penta_node_ids,6),
     
    6060}
    6161/*}}}*/
    62 /*FUNCTION Penta other constructor {{{1*/
    63 Penta::Penta(int index, IoModel* iomodel){ //i is the element index
     62/*FUNCTION Penta::Penta(int id, int index, IoModel* iomodel) {{{1*/
     63Penta::Penta(int penta_id, int index, IoModel* iomodel){ //i is the element index
    6464
    6565        IssmInt i;
     
    7171
    7272        /*id: */
    73         this->id=index+1;
     73        this->id=penta_id;
    7474
    7575        /*hooks: */
     
    139139}
    140140/*}}}*/
    141 /*FUNCTION Penta destructor {{{1*/
     141/*FUNCTION Penta::~Penta(){{{1*/
    142142Penta::~Penta(){
    143143        delete inputs;
  • issm/trunk/src/c/objects/Penta.h

    r3621 r3622  
    4343                Penta(int penta_id,int* penta_node_ids, int penta_matice_id, int penta_matpar_id);
    4444                Penta(int penta_id,Hook* penta_hnodes, Hook* penta_hmatice, Hook* penta_hmatpar, Parameters* penta_parameters, Inputs* inputs);
    45                 Penta(int i, IoModel* iomodel);
     45                Penta(int penta_id,int i, IoModel* iomodel);
    4646                ~Penta();
    4747                /*}}}*/
  • issm/trunk/src/c/objects/Riftfront.cpp

    r3595 r3622  
    2020               
    2121/*Object constructors and destructor*/
    22 /*FUNCTION Riftfront::default constructor {{{1*/
     22/*FUNCTION Riftfront::Riftfront(){{{1*/
    2323Riftfront::Riftfront(){
    2424        /*in case :*/
     
    2727}
    2828/*}}}1*/
    29 /*FUNCTION Riftfront::constructor {{{1*/
     29/*FUNCTION Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], ...){{{1*/
    3030Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_fraction,double riftfront_fractionincrement, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,bool riftfront_frozen, int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){
    3131
     
    3434}
    3535/*}}}1*/
    36 /*FUNCTION Riftfront::constructor from iomodel{{{1*/
    37 Riftfront::Riftfront(int i, IoModel* iomodel){
     36/*FUNCTION Riftfront::Riftfront(int id, int i, IoModel* iomodel){{{1*/
     37Riftfront::Riftfront(int riftfront_id,int i, IoModel* iomodel){
    3838
    3939        /*rifts: */
    4040        char riftfront_type[RIFTFRONTSTRING];
    41         int  riftfront_id;
    4241        int  riftfront_node_ids[2];
    4342        int  riftfront_mparid;
     
    8483
    8584        strcpy(riftfront_type,"2d");
    86         riftfront_id=i+1; //matlab indexing
    8785        riftfront_node_ids[0]=grid1;
    8886        riftfront_node_ids[1]=grid2;
     
    120118}
    121119/*}}}1*/
    122 /*FUNCTION Riftfront::Init, used by constructor {{{1*/
     120/*FUNCTION Riftfront::Init {{{1*/
    123121void Riftfront::Init(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_fraction,double riftfront_fractionincrement, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,bool riftfront_frozen, int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){
    124122
     
    165163}
    166164/*}}}1*/
    167 /*FUNCTION Riftfront::destructor {{{1*/
     165/*FUNCTION Riftfront::~Riftfront(){{{1*/
    168166Riftfront::~Riftfront(){
    169167        return;
  • issm/trunk/src/c/objects/Riftfront.h

    r3612 r3622  
    5454                bool        material_converged;
    5555
    56 
    5756        public:
    5857
     
    6160                void Init(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double fraction, double fractionincrement, double penalty_offset, int penalty_lock,bool active,bool frozen, int counter,bool prestable,bool shelf);
    6261                Riftfront(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double fraction, double fractionincrement, double penalty_offset, int penalty_lock,bool active,bool frozen, int counter,bool prestable,bool shelf);
    63                 Riftfront(int i, IoModel* iomodel);
     62                Riftfront(int id, int i, IoModel* iomodel);
    6463                ~Riftfront();
    6564                /*}}}*/
  • issm/trunk/src/c/objects/Sing.cpp

    r3621 r3622  
    2222
    2323/*Object constructors and destructor*/
    24 /*FUNCTION Sing::constructor {{{1*/
     24/*FUNCTION Sing::Sing(){{{1*/
    2525Sing::Sing(){
    2626        this->inputs=NULL;
     
    2929}
    3030/*}}}*/
    31 /*FUNCTION Sing constructor {{{1*/
     31/*FUNCTION Sing::Sing(int sing_id,int* sing_node_ids, int sing_matice_id, int sing_matpar_id, int sing_numpar_id) {{{1*/
    3232Sing::Sing(int sing_id,int* sing_node_ids, int sing_matice_id, int sing_matpar_id):
    3333        hnodes(sing_node_ids,1),
     
    4444}
    4545/*}}}*/
    46 /*FUNCTION Sing other constructor {{{1*/
     46/*FUNCTION Sing::Sing(int sing_id,Hook* sing_hnodes, Hook* sing_hmatice, Hook* sing_hmatpar, Hook* sing_hnumpar, Inputs* sing_inputs) {{{1*/
    4747Sing::Sing(int sing_id,Hook* sing_hnodes, Hook* sing_hmatice, Hook* sing_hmatpar, Parameters* sing_parameters,Inputs* sing_inputs):
    4848        hnodes(sing_hnodes),
     
    6363}
    6464/*}}}*/
    65 /*FUNCTION Sing iomodel constructor {{{1*/
    66 Sing::Sing(int i, IoModel* iomodel){
     65/*FUNCTION Sing::Sing(int sing_id, int i, IoModel* iomodel) {{{1*/
     66Sing::Sing(int sing_id, int i, IoModel* iomodel){
    6767
    6868        int sing_matice_id;
     
    7373        double sing_k;
    7474
    75 
    7675        /*id: */
    77         this->id=i+1;
     76        this->id=sing_id;
    7877
    7978        /*hooks: */
    80         sing_matice_id=i+1; //refers to the corresponding material property card
     79        sing_matice_id=i+1;                        //refers to the corresponding material property card
    8180        sing_matpar_id=iomodel->numberofvertices+1;//refers to the corresponding matpar property card
    8281        sing_g=i+1;
     
    9796}
    9897/*}}}*/
    99 /*FUNCTION Sing::destructor {{{1*/
     98/*FUNCTION Sing::~Sing(){{{1*/
    10099Sing::~Sing(){
    101100        delete inputs;
  • issm/trunk/src/c/objects/Sing.h

    r3621 r3622  
    3636                Sing(int sing_id,int* sing_node_ids, int sing_matice_id, int sing_matpar_id);
    3737                Sing(int sing_id,Hook* sing_hnodes, Hook* sing_hmatice, Hook* sing_hmatpar, Parameters* sing_parameters,Inputs* sing_inputs);
    38                 Sing(int i, IoModel* iomodel);
     38                Sing(int sing_id, int i, IoModel* iomodel);
    3939                ~Sing();
    4040                /*}}}*/
  • issm/trunk/src/c/objects/Tria.cpp

    r3621 r3622  
    6363}
    6464/*}}}*/
    65 /*FUNCTION Tria::Tria(int i, IoModel* iomodel){{{1*/
    66 Tria::Tria(int index, IoModel* iomodel){ //i is the element index
     65/*FUNCTION Tria::Tria(int id, int i, IoModel* iomodel){{{1*/
     66Tria::Tria(int tria_id, int index, IoModel* iomodel){ //i is the element index
    6767
    6868        int i,j;
     
    7373
    7474        /*id: */
    75         this->id=index+1;
     75        this->id=tria_id;
    7676       
    7777        /*hooks: */
  • issm/trunk/src/c/objects/Tria.h

    r3621 r3622  
    3434                Tria(int tria_id,int* tria_node_ids, int tria_matice_id, int tria_matpar_id);
    3535                Tria(int tria_id,Hook* tria_hnodes, Hook* tria_hmatice, Hook* tria_hmatpar, Parameters* parameters, Inputs* tria_inputs);
    36                 Tria(int i, IoModel* iomodel);
     36                Tria(int tria_id,int i, IoModel* iomodel);
    3737                ~Tria();
    3838                /*}}}*/
  • issm/trunk/src/c/objects/Vertex.cpp

    r3612 r3622  
    2121
    2222/*Object constructors and destructor{{{1*/
    23 /*FUNCTION Vertex default constructor {{{2*/
     23/*FUNCTION Vertex::Vertex() {{{2*/
    2424Vertex::Vertex(){
    2525        return;
    2626}
    2727/*}}}*/
    28 /*FUNCTION Vertex constructor {{{2*/
    29 Vertex::Vertex(int tria_id, double tria_x, double tria_y, double tria_z, double tria_sigma){
    30         this->Init(tria_id, tria_x, tria_y, tria_z, tria_sigma);
    31 }
    32 /*}}}*/
    33 /*FUNCTION Vertex init, used by constructor {{{2*/
    34 void Vertex::Init(int tria_id, double tria_x, double tria_y, double tria_z, double tria_sigma){
     28/*FUNCTION Vertex::Vertex(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){{{2*/
     29Vertex::Vertex(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
     30        this->Init(vertex_id, vertex_x, vertex_y, vertex_z, vertex_sigma);
     31}
     32/*}}}*/
     33/*FUNCTION Vertex::Init{{{2*/
     34void Vertex::Init(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
    3535
    3636        /*all the initialization has been done by the initializer, just fill in the id: */
    37         this->id=tria_id;
    38         this->x=tria_x;
    39         this->y=tria_y;
    40         this->z=tria_z;
    41         this->sigma=tria_sigma;
     37        this->id=vertex_id;
     38        this->x=vertex_x;
     39        this->y=vertex_y;
     40        this->z=vertex_z;
     41        this->sigma=vertex_sigma;
    4242        this->dof=UNDEF;
    4343
     
    4545}
    4646/*}}}*/
    47 /*FUNCTION Vertex constructor  from iomodel{{{2*/
    48 Vertex::Vertex(int i, IoModel* iomodel){
    49 
    50         this->Init(i+1, iomodel->x[i],iomodel->y[i],iomodel->z[i],(iomodel->z[i]-iomodel->bed[i])/(iomodel->thickness[i]));
    51 
    52 }
    53 /*}}}*/
    54 /*FUNCTION Vertex destructor {{{2*/
     47/*FUNCTION Vertex::Vertex(int vertex_id, int i, IoModel* iomodel) {{{2*/
     48Vertex::Vertex(int vertex_id, int i, IoModel* iomodel){
     49
     50        this->Init(vertex_id, iomodel->x[i],iomodel->y[i],iomodel->z[i],(iomodel->z[i]-iomodel->bed[i])/(iomodel->thickness[i]));
     51
     52}
     53/*}}}*/
     54/*FUNCTION Vertex::~Vertex() {{{2*/
    5555Vertex::~Vertex(){
    5656        return;
  • issm/trunk/src/c/objects/Vertex.h

    r3612 r3622  
    3131                Vertex(int id, double x, double y, double z, double sigma);
    3232                void Init(int id, double x, double y, double z, double sigma);
    33                 Vertex(int i, IoModel* iomodel);
     33                Vertex(int id, int i, IoModel* iomodel);
    3434                ~Vertex();
    3535                /*}}}*/
Note: See TracChangeset for help on using the changeset viewer.