Changeset 24387
- Timestamp:
- 11/22/19 08:22:53 (5 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/bamg/BamgQuadtree.cpp
r23066 r24387 2 2 #include <string.h> 3 3 #include <stdlib.h> 4 5 4 #include "./bamgobjects.h" 6 #include "../datastructures/datastructures.h"7 5 8 6 namespace bamg { … … 68 66 this->NbVertices = 0; 69 67 70 /*Create container*/71 this->boxcontainer=new DataSet();72 73 68 /*Create Root, pointer toward the main box*/ 74 69 this->root=NewBamgQuadtreeBox(); … … 80 75 this->NbQuadtreeBox = 0; 81 76 this->NbVertices = 0; 82 83 /*Create container*/84 this->boxcontainer=new DataSet();85 77 86 78 /*Create Root, pointer toward the main box*/ … … 99 91 /*}}}*/ 100 92 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(); 102 99 root=NULL; 103 100 } … … 514 511 515 512 /*Add root to the container*/ 516 boxcontainer ->AddObject(newbox);513 boxcontainer.push_back(newbox); 517 514 this->NbQuadtreeBox++; 518 515 -
issm/trunk-jpl/src/c/bamg/BamgQuadtree.h
r21629 r24387 3 3 #define _BAMGQUADTREE_H 4 4 5 #include <vector> 5 6 #include "./include.h" 6 #include "../datastructures/datastructures.h"7 7 class BamgVertex; 8 8 … … 17 17 * - up to 4 vertices 18 18 * - 4 "sub" quadtree boxes*/ 19 class BamgQuadtreeBox : public Object{19 class BamgQuadtreeBox{ 20 20 public: 21 21 int nbitems; 22 22 BamgQuadtreeBox *box[4]; 23 23 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!"); };31 24 }; 32 25 33 26 /*BamgQuadtree private Fields*/ 34 DataSet*boxcontainer;27 std::vector<BamgQuadtreeBox*> boxcontainer; 35 28 36 29 public: -
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r24385 r24387 2962 2962 2963 2963 /*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 2978 2964 switch(this->ObjectEnum()){ 2979 2965 case TriaEnum: … … 3027 3013 xDelete<IssmDouble>(s0p); 3028 3014 xDelete<IssmDouble>(tmp); 3029 3030 3015 } 3031 3016 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.