Changeset 24387


Ignore:
Timestamp:
11/22/19 08:22:53 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: disconnecting bamg from dataset to speed up compilation

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/bamg/BamgQuadtree.cpp

    r23066 r24387  
    22#include <string.h>
    33#include <stdlib.h>
    4 
    54#include "./bamgobjects.h"
    6 #include "../datastructures/datastructures.h"
    75
    86namespace bamg {
     
    6866                this->NbVertices    = 0;
    6967
    70                 /*Create container*/
    71                 this->boxcontainer=new DataSet();
    72 
    7368                /*Create Root, pointer toward the main box*/
    7469                this->root=NewBamgQuadtreeBox();
     
    8075                this->NbQuadtreeBox = 0;
    8176                this->NbVertices    = 0;
    82 
    83                 /*Create container*/
    84                 this->boxcontainer=new DataSet();
    8577
    8678                /*Create Root, pointer toward the main box*/
     
    9991        /*}}}*/
    10092        BamgQuadtree::~BamgQuadtree() {/*{{{*/
    101                 delete boxcontainer;
     93
     94                vector<BamgQuadtreeBox*>::reverse_iterator object;
     95                for(object=boxcontainer.rbegin() ; object <boxcontainer.rend(); object++ ){
     96                        delete (*object);
     97                }
     98                boxcontainer.clear();
    10299                root=NULL;
    103100        }
     
    514511
    515512                /*Add root to the container*/
    516                 boxcontainer->AddObject(newbox);
     513                boxcontainer.push_back(newbox);
    517514                this->NbQuadtreeBox++;
    518515
  • issm/trunk-jpl/src/c/bamg/BamgQuadtree.h

    r21629 r24387  
    33#define _BAMGQUADTREE_H
    44
     5#include <vector>
    56#include "./include.h"
    6 #include "../datastructures/datastructures.h"
    77class BamgVertex;
    88
     
    1717                         * - up to 4 vertices
    1818                         * - 4 "sub" quadtree boxes*/
    19                         class BamgQuadtreeBox: public Object{
     19                        class BamgQuadtreeBox{
    2020                                public:
    2121                                        int              nbitems;
    2222                                        BamgQuadtreeBox *box[4];
    2323                                        BamgVertex      *v[4];
    24                                         /*Object functions*/
    25                                         void    Echo()       {_error_("not implemented yet"); };
    26                                         void    DeepEcho()   {_error_("not implemented yet"); };
    27                                         int     Id()         {_error_("not implemented yet"); };
    28                                         int     ObjectEnum() {_error_("not implemented yet"); };
    29                                         Object *copy()       {_error_("not implemented yet"); };
    30                                         void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
    3124                        };
    3225
    3326                        /*BamgQuadtree private Fields*/
    34                         DataSet* boxcontainer;
     27                        std::vector<BamgQuadtreeBox*> boxcontainer;
    3528
    3629                public:
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r24385 r24387  
    29622962
    29632963        /*Update inputs*/
    2964         // TransientInput* NewTemperatureInput = new TransientInput(SmbMonthlytemperaturesEnum);
    2965         // TransientInput* NewPrecipitationInput = new TransientInput(SmbPrecipitationEnum);
    2966         // for (int imonth=0;imonth<12;imonth++) {
    2967         //   for(i=0;i<NUM_VERTICES;i++) tmp[i]=monthlytemperatures[i*12+imonth];
    2968         //   TriaInput* newmonthinput1 = new TriaInput(SmbMonthlytemperaturesEnum,&tmp[0],P1Enum);
    2969         //   NewTemperatureInput->AddTimeInput(newmonthinput1,time+imonth/12.*yts);
    2970         //
    2971         //   for(i=0;i<NUM_VERTICES;i++) tmp[i]=monthlyprec[i*12+imonth]/yts;
    2972         //   TriaInput* newmonthinput2 = new TriaInput(SmbPrecipitationEnum,&tmp[0],P1Enum);
    2973         //   NewPrecipitationInput->AddTimeInput(newmonthinput2,time+imonth/12.*yts);
    2974         // }
    2975         // NewTemperatureInput->Configure(this->parameters);
    2976         // NewPrecipitationInput->Configure(this->parameters);
    2977 
    29782964        switch(this->ObjectEnum()){
    29792965                case TriaEnum:
     
    30273013        xDelete<IssmDouble>(s0p);
    30283014        xDelete<IssmDouble>(tmp);
    3029 
    30303015}
    30313016/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.