Changeset 16233
- Timestamp:
- 09/23/13 11:01:34 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 62 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/bamg/AdjacentTriangle.cpp ¶
r16232 r16233 16 16 int AdjacentTriangle::Locked() const { 17 17 return t->AdjEdgeIndex[a] & 4; 18 }19 /*}}}*/20 /*FUNCTION AdjacentTriangle::MarkUnSwap {{{*/21 int AdjacentTriangle::MarkUnSwap() const {22 return t->AdjEdgeIndex[a] & 8;23 18 } 24 19 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/bamg/AdjacentTriangle.h ¶
r16232 r16233 31 31 //Methods 32 32 int Locked() const; 33 int MarkUnSwap() const;34 33 int GetAllFlag_UnSwap() const; 35 34 void SetLock(); -
TabularUnified issm/trunk-jpl/src/c/bamg/BamgQuadtree.cpp ¶
r16158 r16233 391 391 } 392 392 /*}}}*/ 393 /*FUNCTION BamgQuadtree::NearestVertexWithNormal{{{*/394 BamgVertex* BamgQuadtree::NearestVertexWithNormal(Icoor1 i,Icoor1 j) {395 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/NearestVertexWithNormal)*/396 397 BamgQuadtreeBox * pb[ MaxDepth ];398 int pi[ MaxDepth ];399 Icoor1 ii[ MaxDepth ], jj [ MaxDepth];400 int l; // level401 BamgQuadtreeBox * b;402 long h =MaxISize,h0;403 long hb=MaxISize;404 Icoor1 i0=0,j0=0;405 Icoor1 iplus( i<MaxISize?(i<0?0:i):MaxISize-1);406 Icoor1 jplus( j<MaxISize?(j<0?0:j):MaxISize-1);407 408 BamgVertex *vn=0;409 410 // init for optimisation ---411 b = root;412 register long n0;413 if (!root->nbitems)414 return vn; // empty tree415 416 while( (n0 = b->nbitems) < 0)417 {418 // search the non empty419 // BamgQuadtreeBox containing the point (i,j)420 register Icoor1 hb2 = hb >> 1 ;421 register int k = IJ(iplus,jplus,hb2);// BamgQuadtreeBox number of size hb2 contening i;j422 register BamgQuadtreeBox * b0= b->b[k];423 if ( ( b0 == 0) || (b0->nbitems == 0) )424 break; // null box or empty => break425 b=b0;426 i0 += I_IJ(k,hb2); // i orign of BamgQuadtreeBox427 j0 += J_IJ(k,hb2); // j orign of BamgQuadtreeBox428 hb = hb2;429 }430 431 if ( n0 > 0)432 {433 for(register int k=0;k<n0;k++)434 {435 I2 i2 = b->v[k]->i;436 // try if is in the right direction --437 h0 = NORM(iplus,i2.x,jplus,i2.y);438 if (h0 <h) {439 h = h0;440 vn = b->v[k];}441 }442 if (vn) return vn;443 }444 // general case -----445 // INITIALISATION OF THE HEAP446 l =0; // level447 pb[0]= b;448 pi[0]=b->nbitems>0 ?(int) b->nbitems : 4 ;449 ii[0]=i0;450 jj[0]=j0;451 h=hb;452 do { // walk on the tree453 b= pb[l];454 while (pi[l]--) // loop on 4 element of the box455 {456 int k = pi[l];457 458 if (b->nbitems>0) // BamgVertex BamgQuadtreeBox none empty459 {460 I2 i2 = b->v[k]->i;461 // if good direction when try --462 463 h0 = NORM(iplus,i2.x,jplus,i2.y);464 if (h0 <h)465 {466 h = h0;467 vn = b->v[k];468 }469 }470 else // Pointer BamgQuadtreeBox471 {472 register BamgQuadtreeBox *b0=b;473 if ((b=b->b[k]))474 {475 hb >>=1 ; // div by 2476 register Icoor1 iii = ii[l]+I_IJ(k,hb);477 register Icoor1 jjj = jj[l]+J_IJ(k,hb);478 479 if (INTER_SEG(iii,iii+hb,iplus-h,iplus+h) && INTER_SEG(jjj,jjj+hb,jplus-h,jplus+h))480 {481 pb[++l]= b;482 pi[l]= b->nbitems>0 ?(int) b->nbitems : 4 ;483 ii[l]= iii;484 jj[l]= jjj;485 486 }487 else488 b=b0, hb <<=1 ;489 }490 else491 b=b0;492 }493 }494 hb <<= 1; // mul by 2495 } while (l--);496 497 return vn;498 }499 /*}}}*/500 393 /*FUNCTION BamgQuadtree::NewBamgQuadtreeBox {{{*/ 501 394 BamgQuadtree::BamgQuadtreeBox* BamgQuadtree::NewBamgQuadtreeBox(void){ -
TabularUnified issm/trunk-jpl/src/c/bamg/BamgQuadtree.h ¶
r15067 r16233 52 52 53 53 BamgVertex *NearestVertex(Icoor1 i,Icoor1 j); 54 BamgVertex *NearestVertexWithNormal(Icoor1 i,Icoor1 j);55 54 BamgQuadtreeBox *NewBamgQuadtreeBox(void); 56 55 BamgVertex *ToClose(BamgVertex &,double ,Icoor1,Icoor1); -
TabularUnified issm/trunk-jpl/src/c/bamg/EigenMetric.cpp ¶
r15104 r16233 131 131 return sqrt(1/bamg::Max(bamg::Min(lambda1,lambda2),1e-30)); 132 132 }/*}}}*/ 133 /*FUNCTION EigenMetric::Isotrope{{{*/134 void EigenMetric::Isotrope() {135 lambda1=lambda2=bamg::Max(lambda1,lambda2);136 }/*}}}*/137 133 /*FUNCTION EigenMetric::lmax{{{*/ 138 134 double EigenMetric::lmax() const { -
TabularUnified issm/trunk-jpl/src/c/bamg/ListofIntersectionTriangles.cpp ¶
r16158 r16233 178 178 } 179 179 return nbv-nbvold; 180 }181 /*}}}*/182 /*FUNCTION ListofIntersectionTriangles::NewSubSeg{{{*/183 void ListofIntersectionTriangles::NewSubSeg(GeomEdge *e,double s0,double s1){184 long int verbosity=0;185 if (NbSeg>=MaxNbSeg) {186 int mneo= MaxNbSeg;187 MaxNbSeg *= 2;188 if (verbosity>3){189 _printf_(" reshape lSegsI from " << mneo << " to " << MaxNbSeg << "\n");190 }191 _assert_(lSegsI && NbSeg<MaxNbSeg);192 SegInterpolation * lEn = new SegInterpolation[MaxNbSeg];193 for (int i=0;i< NbSeg;i++) lEn[i] = lSegsI[MaxNbSeg]; // copy old to new194 delete [] lSegsI; // remove old195 lSegsI = lEn;196 }197 if (NbSeg) lSegsI[NbSeg-1].last=Size;198 lSegsI[NbSeg].e=e;199 lSegsI[NbSeg].sBegin=s0;200 lSegsI[NbSeg].sEnd=s1;201 NbSeg++;202 180 } 203 181 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/bamg/ListofIntersectionTriangles.h ¶
r13036 r16233 66 66 double Length(); 67 67 long NewPoints(BamgVertex *,long &nbv,long maxnbv); 68 void NewSubSeg(GeomEdge *e,double s0,double s1);69 68 void ReShape(); 70 69 }; -
TabularUnified issm/trunk-jpl/src/c/bamg/Metric.h ¶
r15067 r16233 72 72 void Minh(double h); 73 73 void Maxh(double h); 74 void Isotrope();75 74 double hmin() const; 76 75 double hmax() const; -
TabularUnified issm/trunk-jpl/src/c/bamg/Triangle.cpp ¶
r16231 r16233 53 53 return AdjacentTriangle(adj[i],AdjEdgeIndex[i]&3); 54 54 };/*}}}*/ 55 /*FUNCTION Triangle::Anisotropy{{{*/56 double Triangle::Anisotropy() const{57 58 double lmin,lmax;59 60 /*Get three vertices A,B and C*/61 R2 A=*this->vertices[0];62 R2 B=*this->vertices[1];63 R2 C=*this->vertices[2];64 65 /*Compute edges*/66 R2 e1=B-A;67 R2 e2=C-A;68 R2 e3=B-C;69 70 /*Compute edge length*/71 double l1=Norme2(e1);72 double l2=Norme2(e2);73 double l3=Norme2(e3);74 75 lmin=l1;76 lmin=min(lmin,l2);77 lmin=min(lmin,l3);78 lmax=l1;79 lmax=max(lmax,l2);80 lmax=max(lmax,l3);81 82 return lmax/lmin;83 };/*}}}*/84 55 /*FUNCTION Triangle::Length{{{*/ 85 56 double Triangle::Length() const{ … … 133 104 134 105 return; 135 }136 /*}}}*/137 /*FUNCTION Triangle::FindBoundaryEdge{{{*/138 AdjacentTriangle Triangle::FindBoundaryEdge(int i) const{139 /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FindBoundaryEdge)*/140 141 /*Intermediary*/142 Triangle* ttc=NULL;143 int k,j,jc;144 145 // call current triangle t146 Triangle* t = (Triangle*)this;147 148 //is the current triangle inside or outside?149 int outside=!link ;150 151 // EdgesVertexTriangle[3][2] = {{1,2},{2,0},{0,1}};152 // initialize j as the first vertex of the ith edge153 j=EdgesVertexTriangle[i][0];154 155 //Loop over the adjacent triangle of t156 k=0;157 do{158 //keep track of outside159 int outsidep = outside;160 //increment k161 k++;162 //Get ttc, adjacent triangle of t with respect to vertex j163 ttc = t->adj[j];164 //is the current triangle inside or outside?165 outside = !ttc->link;166 //if both previous triangle are outside, return167 if (outside+outsidep == 1) return AdjacentTriangle(t,j);168 169 //update t and j170 t = ttc;171 //NextEdge[3] = {1,2,0};172 jc = NextEdge[t->AdjEdgeIndex[j]&3];173 j = NextEdge[jc];174 175 //check number of iterations176 if (k>=2000){177 _error_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");178 }179 } while (this!= t);180 //not found, return empty triangle181 return AdjacentTriangle(NULL,0);182 106 } 183 107 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/bamg/Triangle.h ¶
r16231 r16233 40 40 //Methods 41 41 void Echo(); 42 double Anisotropy() const;43 42 double Length() const; 44 43 int swap(short a1,int=0); … … 50 49 double QualityQuad(int a,int option=1) const; 51 50 short NuEdgeTriangleAdj(int i) const; 52 AdjacentTriangle FindBoundaryEdge(int i) const;53 51 AdjacentTriangle Adj(int i) const; 54 52 Triangle *TriangleAdj(int i) const; -
TabularUnified issm/trunk-jpl/src/c/classes/Elements/Penta.cpp ¶
r16231 r16233 1531 1531 break; 1532 1532 case StressbalanceVerticalAnalysisEnum: 1533 //GetSolutionFromInputsStressbalanceVert(solution);1534 1533 GetSolutionFromInputsOneDof(solution, VzEnum); 1535 1534 break; … … 1537 1536 #ifdef _HAVE_THERMAL_ 1538 1537 case ThermalAnalysisEnum: 1539 //GetSolutionFromInputsThermal(solution);1540 1538 GetSolutionFromInputsOneDof(solution, TemperatureEnum); 1541 1539 break; 1542 1540 case EnthalpyAnalysisEnum: 1543 //GetSolutionFromInputsEnthalpy(solution);1544 1541 GetSolutionFromInputsOneDof(solution, EnthalpyEnum); 1545 1542 break; … … 4851 4848 delete friction; 4852 4849 return pe; 4853 }4854 /*}}}*/4855 /*FUNCTION Penta::GetSolutionFromInputsThermal{{{*/4856 void Penta::GetSolutionFromInputsThermal(Vector<IssmDouble>* solution){4857 4858 const int numdof=NDOF1*NUMVERTICES;4859 4860 int i;4861 int *doflist = NULL;4862 IssmDouble values[numdof];4863 IssmDouble temp;4864 GaussPenta *gauss = NULL;4865 4866 /*Get dof list: */4867 GetDofList(&doflist,NoneApproximationEnum,GsetEnum);4868 Input* t_input=inputs->GetInput(TemperatureEnum); _assert_(t_input);4869 4870 gauss=new GaussPenta();4871 for(i=0;i<NUMVERTICES;i++){4872 /*Recover temperature*/4873 gauss->GaussVertex(i);4874 t_input->GetInputValue(&temp,gauss);4875 values[i]=temp;4876 }4877 4878 /*Add value to global vector*/4879 solution->SetValues(numdof,doflist,values,INS_VAL);4880 4881 /*Free ressources:*/4882 delete gauss;4883 xDelete<int>(doflist);4884 }4885 /*}}}*/4886 /*FUNCTION Penta::GetSolutionFromInputsEnthalpy{{{*/4887 void Penta::GetSolutionFromInputsEnthalpy(Vector<IssmDouble>* solution){4888 4889 const int numdof=NDOF1*NUMVERTICES;4890 4891 int* doflist=NULL;4892 IssmDouble values[numdof];4893 IssmDouble enthalpy;4894 GaussPenta *gauss=NULL;4895 4896 /*Get dof list: */4897 GetDofList(&doflist,NoneApproximationEnum,GsetEnum);4898 Input* h_input=inputs->GetInput(EnthalpyEnum); _assert_(h_input);4899 4900 gauss=new GaussPenta();4901 for(int i=0;i<NUMVERTICES;i++){4902 /*Recover temperature*/4903 gauss->GaussVertex(i);4904 h_input->GetInputValue(&enthalpy,gauss);4905 values[i]=enthalpy;4906 }4907 4908 /*Add value to global vector*/4909 solution->SetValues(numdof,doflist,values,INS_VAL);4910 4911 /*Free ressources:*/4912 delete gauss;4913 xDelete<int>(doflist);4914 4850 } 4915 4851 /*}}}*/ … … 9848 9784 } 9849 9785 /*}}}*/ 9850 /*FUNCTION Penta::GetSolutionFromInputsStressbalanceVert{{{*/9851 void Penta::GetSolutionFromInputsStressbalanceVert(Vector<IssmDouble>* solution){9852 9853 const int numdof=NDOF1*NUMVERTICES;9854 9855 int i;9856 int* doflist=NULL;9857 IssmDouble vz;9858 IssmDouble values[numdof];9859 GaussPenta* gauss=NULL;9860 9861 /*Get dof list: */9862 GetDofList(&doflist,NoneApproximationEnum,GsetEnum);9863 Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input);9864 9865 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */9866 /*P1 element only for now*/9867 gauss=new GaussPenta();9868 for(i=0;i<NUMVERTICES;i++){9869 /*Recover vz */9870 gauss->GaussVertex(i);9871 vz_input->GetInputValue(&vz,gauss);9872 values[i]=vz;9873 }9874 9875 /*Add value to global vector*/9876 solution->SetValues(numdof,doflist,values,INS_VAL);9877 9878 /*Free ressources:*/9879 delete gauss;9880 xDelete<int>(doflist);9881 }9882 /*}}}*/9883 9786 /*FUNCTION Penta::GetSolutionFromInputsStressbalanceFS{{{*/ 9884 9787 void Penta::GetSolutionFromInputsStressbalanceFS(Vector<IssmDouble>* solution){ -
TabularUnified issm/trunk-jpl/src/c/classes/Elements/Penta.h ¶
r16231 r16233 203 203 void GetPhi(IssmDouble* phi, IssmDouble* epsilon, IssmDouble viscosity); 204 204 void GetQuadNormal(IssmDouble* normal,IssmDouble xyz_list[4][3]); 205 void GetSolutionFromInputsEnthalpy(Vector<IssmDouble>* solutiong);206 205 IssmDouble GetStabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa); 207 206 void GetStrainRate3dHO(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input); … … 278 277 void GetSolutionFromInputsStressbalanceSIA(Vector<IssmDouble>* solutiong); 279 278 void GetSolutionFromInputsStressbalanceFS(Vector<IssmDouble>* solutiong); 280 void GetSolutionFromInputsStressbalanceVert(Vector<IssmDouble>* solutiong);281 279 ElementVector* CreatePVectorCouplingSSAFS(void); 282 280 ElementVector* CreatePVectorCouplingSSAFSViscous(void); … … 348 346 ElementVector* CreatePVectorThermalShelf(void); 349 347 ElementVector* CreatePVectorThermalSheet(void); 350 void GetSolutionFromInputsThermal(Vector<IssmDouble>* solutiong);351 348 void InputUpdateFromSolutionThermal(IssmDouble* solutiong); 352 349 void InputUpdateFromSolutionEnthalpy(IssmDouble* solutiong); -
TabularUnified issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp ¶
r16158 r16233 1894 1894 } 1895 1895 /*}}}*/ 1896 /*FUNCTION PentaRef::GetQuadNodalFunctions {{{*/1897 void PentaRef::GetQuadNodalFunctions(IssmDouble* l1l4,GaussPenta* gauss,int index1,int index2,int index3,int index4){1898 /*This routine returns the values of the nodal functions at the gaussian point.*/1899 1900 IssmDouble BasisFunctions[6];1901 1902 GetNodalFunctionsP1(&BasisFunctions[0],gauss);1903 1904 _assert_(index1>=0 && index1<6);1905 _assert_(index2>=0 && index2<6);1906 _assert_(index3>=0 && index3<6);1907 _assert_(index4>=0 && index4<6);1908 1909 l1l4[0]=BasisFunctions[index1];1910 l1l4[1]=BasisFunctions[index2];1911 l1l4[2]=BasisFunctions[index3];1912 l1l4[3]=BasisFunctions[index4];1913 1914 }1915 /*}}}*/1916 1896 /*FUNCTION PentaRef::GetQuadJacobianDeterminant{{{*/ 1917 1897 void PentaRef::GetQuadJacobianDeterminant(IssmDouble* Jdet,IssmDouble xyz_list[4][3],GaussPenta* gauss){ -
TabularUnified issm/trunk-jpl/src/c/classes/Elements/PentaRef.h ¶
r15872 r16233 35 35 void GetNodalFunctionsP1DerivativesReference(IssmDouble* dl1dl6,GaussPenta* gauss); 36 36 void GetNodalFunctionsMINIDerivativesReference(IssmDouble* dl1dl7,GaussPenta* gauss); 37 void GetQuadNodalFunctions(IssmDouble* l1l4,GaussPenta* gauss,int index1,int index2,int index3,int index4);38 37 void GetQuadJacobianDeterminant(IssmDouble* Jdet, IssmDouble xyz_list[4][3],GaussPenta* gauss); 39 38 void GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussPenta* gauss); -
TabularUnified issm/trunk-jpl/src/c/classes/Hook.cpp ¶
r15439 r16233 206 206 } 207 207 /*}}}*/ 208 /*FUNCTION Hook::GetObjects{{{*/209 Object** Hook::GetObjects(void){210 return this->objects;211 }212 /*}}}*/213 /*FUNCTION Hook::GetOffsets{{{*/214 int* Hook::GetOffsets(void){215 return this->offsets;216 }217 /*}}}*/218 208 /*FUNCTION Hook::Spawn{{{*/ 219 209 Hook* Hook::Spawn(int* indices, int numindices){ -
TabularUnified issm/trunk-jpl/src/c/classes/Hook.h ¶
r15067 r16233 40 40 void configure(DataSet* dataset); 41 41 Hook* Spawn(int* indices, int numindices); 42 Object** GetObjects(void);43 42 int* Ids(void); 44 int* GetOffsets(void);45 43 int GetNum(void); 46 44 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Materials/Material.h ¶
r16146 r16233 38 38 virtual IssmDouble GetBbar()=0; 39 39 virtual IssmDouble GetN()=0; 40 virtual IssmDouble GetZ()=0;41 40 virtual IssmDouble GetD()=0; 42 virtual IssmDouble GetZbar()=0;43 41 virtual IssmDouble GetDbar()=0; 44 42 -
TabularUnified issm/trunk-jpl/src/c/classes/Materials/Matice.cpp ¶
r16167 r16233 183 183 inputs->GetInputAverage(&D,DamageDEnum); 184 184 return D; 185 }186 /*}}}*/187 /*FUNCTION Matice::GetZ {{{*/188 IssmDouble Matice::GetZ(){189 190 /*Output*/191 IssmDouble D;192 193 inputs->GetInputAverage(&D,DamageDEnum);194 return 1/(1-D);195 }196 /*}}}*/197 /*FUNCTION Matice::GetZbar {{{*/198 IssmDouble Matice::GetZbar(){199 200 /*Output*/201 IssmDouble Dbar;202 inputs->GetInputAverage(&Dbar,DamageDbarEnum);203 return 1/(1-Dbar);204 185 } 205 186 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Materials/Matice.h ¶
r16167 r16233 64 64 IssmDouble GetB(); 65 65 IssmDouble GetBbar(); 66 IssmDouble GetZ();67 66 IssmDouble GetD(); 68 IssmDouble GetZbar();69 67 IssmDouble GetDbar(); 70 68 IssmDouble GetN(); -
TabularUnified issm/trunk-jpl/src/c/classes/Materials/Matpar.h ¶
r16146 r16233 96 96 IssmDouble GetN(){_error_("not supported");}; 97 97 IssmDouble GetD(){_error_("not supported");}; 98 IssmDouble GetZ(){_error_("not supported");};99 IssmDouble GetZbar(){_error_("not supported");};100 98 IssmDouble GetDbar(){_error_("not supported");}; 101 99 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Node.cpp ¶
r16228 r16233 401 401 DofInFSet(dof-1); 402 402 this->indexing.svalues[dof-1]=0.; 403 }404 /*}}}*/405 /*FUNCTION Node::CreateVecSets {{{*/406 void Node::CreateVecSets(Vector<IssmDouble>* pv_g,Vector<IssmDouble>* pv_f,Vector<IssmDouble>* pv_s){407 408 IssmDouble gvalue=1.; //all nodes are in the g set;409 IssmDouble value;410 411 for(int i=0;i<this->indexing.gsize;i++){412 413 /*g set: */414 pv_g->SetValue(indexing.gdoflist[i],gvalue,INS_VAL);415 416 /*f set: */417 value=(IssmDouble)this->indexing.f_set[i];418 pv_f->SetValue(indexing.gdoflist[i],value,INS_VAL);419 420 /*s set: */421 value=(IssmDouble)this->indexing.s_set[i];422 pv_s->SetValue(indexing.gdoflist[i],value,INS_VAL);423 424 }425 426 403 } 427 404 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Node.h ¶
r16228 r16233 68 68 void DofInFSet(int dof); 69 69 int GetDof(int dofindex,int setenum); 70 void CreateVecSets(Vector<IssmDouble>* pv_g,Vector<IssmDouble>* pv_f,Vector<IssmDouble>* pv_s);71 70 void GetDofList(int* poutdoflist,int approximation_enum,int setenum); 72 71 void GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum); -
TabularUnified issm/trunk-jpl/src/c/classes/Params/BoolParam.cpp ¶
r15128 r16233 65 65 } 66 66 /*}}}*/ 67 68 /*BoolParam virtual functions definitions: */69 /*FUNCTION BoolParam::GetParameterName{{{*/70 void BoolParam::GetParameterName(char**pname){71 EnumToStringx(pname,this->enum_type);72 }73 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/BoolParam.h ¶
r15128 r16233 68 68 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 69 69 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 70 71 void GetParameterName(char**pname);72 70 /*}}}*/ 73 71 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DataSetParam.cpp ¶
r15128 r16233 68 68 69 69 /*DataSetParam virtual functions definitions: */ 70 /*FUNCTION DataSetParam::GetParameterName{{{*/71 void DataSetParam::GetParameterName(char**pname){72 EnumToStringx(pname,this->enum_type);73 }74 /*}}}*/75 70 /*FUNCTION DataSetParam::GetParameterValue{{{*/ 76 71 void DataSetParam::GetParameterValue(DataSet** pdataset){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DataSetParam.h ¶
r15128 r16233 69 69 void SetValue(DataSet* dataset){_error_("DataSet param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a DataSet yet");} 70 70 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DataSet param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");} 71 72 void GetParameterName(char**pname);73 74 71 /*}}}*/ 75 72 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DoubleMatArrayParam.cpp ¶
r15128 r16233 183 183 } 184 184 /*}}}*/ 185 /*FUNCTION DoubleMatArrayParam::GetParameterName{{{*/186 void DoubleMatArrayParam::GetParameterName(char**pname){187 EnumToStringx(pname,this->enum_type);188 }189 /*}}}*/190 185 /*FUNCTION DoubleMatArrayParam::SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){{{*/ 191 186 void DoubleMatArrayParam::SetValue(IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DoubleMatArrayParam.h ¶
r15128 r16233 71 71 void SetValue(FILE* fid){_error_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");} 72 72 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array); 73 74 void GetParameterName(char**pname);75 76 73 /*}}}*/ 77 74 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DoubleMatParam.cpp ¶
r16149 r16233 101 101 } 102 102 /*}}}*/ 103 /*FUNCTION DoubleMatParam::GetParameterName{{{*/104 void DoubleMatParam::GetParameterName(char**pname){105 EnumToStringx(pname,this->enum_type);106 }107 /*}}}*/108 103 /*FUNCTION DoubleMatParam::SetValue{{{*/ 109 104 void DoubleMatParam::SetValue(IssmDouble* IssmDoublearray,int in_M,int in_N){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DoubleMatParam.h ¶
r15128 r16233 70 70 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 71 71 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 72 73 void GetParameterName(char**pname);74 75 72 /*}}}*/ 76 73 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DoubleParam.cpp ¶
r15128 r16233 64 64 65 65 /*DoubleParam virtual functions definitions: */ 66 /*FUNCTION DoubleParam::GetParameterName{{{*/67 void DoubleParam::GetParameterName(char**pname){68 EnumToStringx(pname,this->enum_type);69 }70 /*}}}*/71 66 /*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{*/ 72 67 void DoubleParam::GetParameterValue(int* pinteger){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DoubleParam.h ¶
r15128 r16233 69 69 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 70 70 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 71 72 void GetParameterName(char**pname);73 74 71 /*}}}*/ 75 72 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DoubleVecParam.cpp ¶
r15128 r16233 116 116 } 117 117 /*}}}*/ 118 /*FUNCTION DoubleVecParam::GetParameterName{{{*/119 void DoubleVecParam::GetParameterName(char**pname){120 EnumToStringx(pname,this->enum_type);121 }122 /*}}}*/123 118 /*FUNCTION DoubleVecParam::SetValue{{{*/ 124 119 void DoubleVecParam::SetValue(IssmDouble* IssmDoublearray,int in_M){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/DoubleVecParam.h ¶
r15128 r16233 69 69 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 70 70 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 71 72 void GetParameterName(char**pname);73 71 /*}}}*/ 74 72 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/FileParam.cpp ¶
r15128 r16233 65 65 } 66 66 /*}}}*/ 67 68 /*FileParam virtual functions definitions: */69 /*FUNCTION FileParam::GetParameterName{{{*/70 void FileParam::GetParameterName(char**pname){71 EnumToStringx(pname,this->enum_type);72 }73 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/FileParam.h ¶
r15128 r16233 68 68 void SetValue(FILE* fid){_error_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");} 69 69 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");} 70 71 void GetParameterName(char**pname);72 73 70 /*}}}*/ 74 71 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/GenericParam.h ¶
r15128 r16233 55 55 /*Param vritual function definitions: {{{*/ 56 56 int InstanceEnum(){return myEnumVal;} 57 void GetParameterName(char**pname) {EnumToStringx(pname,this->myEnumVal);}58 59 57 P& GetParameterValue() { return myP;} 60 58 const P& GetParameterValue()const { return myP;}; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/IntMatParam.cpp ¶
r16149 r16233 96 96 } 97 97 /*}}}*/ 98 /*FUNCTION IntMatParam::GetParameterName{{{*/99 void IntMatParam::GetParameterName(char**pname){100 EnumToStringx(pname,this->enum_type);101 }102 /*}}}*/103 98 /*FUNCTION IntMatParam::SetValue{{{*/ 104 99 void IntMatParam::SetValue(int* intarray,int in_M,int in_N){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/IntMatParam.h ¶
r15128 r16233 70 70 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 71 71 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 72 73 void GetParameterName(char**pname);74 75 72 /*}}}*/ 76 73 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/IntParam.cpp ¶
r15128 r16233 65 65 } 66 66 /*}}}*/ 67 68 /*IntParam virtual functions definitions: */69 /*FUNCTION IntParam::GetParameterName{{{*/70 void IntParam::GetParameterName(char**pname){71 EnumToStringx(pname,this->enum_type);72 }73 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/IntParam.h ¶
r15128 r16233 69 69 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 70 70 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 71 72 void GetParameterName(char**pname);73 74 71 /*}}}*/ 75 72 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/IntVecParam.cpp ¶
r15128 r16233 110 110 } 111 111 /*}}}*/ 112 /*FUNCTION IntVecParam::GetParameterName{{{*/113 void IntVecParam::GetParameterName(char**pname){114 EnumToStringx(pname,this->enum_type);115 }116 /*}}}*/117 112 /*FUNCTION IntVecParam::SetValue{{{*/ 118 113 void IntVecParam::SetValue(int* intarray,int in_M){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/IntVecParam.h ¶
r15128 r16233 70 70 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 71 71 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 72 73 void GetParameterName(char**pname);74 72 /*}}}*/ 75 73 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/MatrixParam.cpp ¶
r15128 r16233 84 84 } 85 85 /*}}}*/ 86 /*FUNCTION MatrixParam::GetParameterName{{{*/87 void MatrixParam::GetParameterName(char**pname){88 EnumToStringx(pname,this->enum_type);89 }90 /*}}}*/91 86 /*FUNCTION MatrixParam::SetValue{{{*/ 92 87 void MatrixParam::SetValue(Matrix<IssmDouble>* matrix){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/MatrixParam.h ¶
r15128 r16233 69 69 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 70 70 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 71 72 void GetParameterName(char**pname);73 74 71 /*}}}*/ 75 72 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/Param.h ¶
r15128 r16233 55 55 virtual void SetValue(FILE* fid)=0; 56 56 virtual void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array)=0; 57 virtual void GetParameterName(char**pname)=0;58 57 }; 59 58 #endif -
TabularUnified issm/trunk-jpl/src/c/classes/Params/StringArrayParam.cpp ¶
r15128 r16233 128 128 } 129 129 /*}}}*/ 130 /*FUNCTION StringArrayParam::GetParameterName{{{*/131 void StringArrayParam::GetParameterName(char**pname){132 EnumToStringx(pname,this->enum_type);133 }134 /*}}}*/135 130 /*FUNCTION StringArrayParam::SetValue{{{*/ 136 131 void StringArrayParam::SetValue(char** stringarray,int M){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/StringArrayParam.h ¶
r15128 r16233 70 70 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 71 71 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 72 73 void GetParameterName(char**pname);74 72 /*}}}*/ 75 73 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/StringParam.cpp ¶
r15128 r16233 83 83 } 84 84 /*}}}*/ 85 /*FUNCTION StringParam::GetParameterName{{{*/86 void StringParam::GetParameterName(char**pname){87 EnumToStringx(pname,this->enum_type);88 }89 /*}}}*/90 85 /*FUNCTION StringParam::SetValue{{{*/ 91 86 void StringParam::SetValue(char* string){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/StringParam.h ¶
r15128 r16233 69 69 void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");} 70 70 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 71 72 void GetParameterName(char**pname);73 74 71 /*}}}*/ 75 72 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/TransientParam.cpp ¶
r15128 r16233 127 127 } 128 128 /*}}}*/ 129 /*FUNCTION TransientParam::GetParameterName{{{*/130 void TransientParam::GetParameterName(char**pname){131 EnumToStringx(pname,this->enum_type);132 }133 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/TransientParam.h ¶
r15128 r16233 70 70 void SetValue(FILE* fid){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a FILE");} 71 71 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold an array of matrices");} 72 73 void GetParameterName(char**pname);74 75 72 /*}}}*/ 76 73 }; -
TabularUnified issm/trunk-jpl/src/c/classes/Params/VectorParam.cpp ¶
r15128 r16233 87 87 } 88 88 /*}}}*/ 89 /*FUNCTION VectorParam::GetParameterName{{{*/90 void VectorParam::GetParameterName(char**pname){91 EnumToStringx(pname,this->enum_type);92 }93 /*}}}*/94 89 /*FUNCTION VectorParam::SetValue{{{*/ 95 90 void VectorParam::SetValue(Vector<IssmDouble>* vector){ -
TabularUnified issm/trunk-jpl/src/c/classes/Params/VectorParam.h ¶
r15128 r16233 69 69 void SetValue(FILE* fid){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");} 70 70 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");} 71 72 void GetParameterName(char**pname);73 74 71 /*}}}*/ 75 72 }; -
TabularUnified issm/trunk-jpl/src/c/classes/gauss/GaussPenta.cpp ¶
r16074 r16233 495 495 } 496 496 /*}}}*/ 497 /*FUNCTION GaussPenta::GaussCenter{{{*/498 void GaussPenta::GaussCenter(void){499 500 /*update static arrays*/501 coord1=ONETHIRD;502 coord2=ONETHIRD;503 coord3=ONETHIRD;504 coord4=0.0;505 506 }507 /*}}}*/508 497 /*FUNCTION GaussPenta::GaussPoint{{{*/ 509 498 void GaussPenta::GaussPoint(int ig){ -
TabularUnified issm/trunk-jpl/src/c/classes/gauss/GaussPenta.h ¶
r16074 r16233 47 47 void GaussNode(int finitelement,int iv); 48 48 void GaussFaceTria(int index1, int index2, int index3, int order); 49 void GaussCenter(void);50 49 void SynchronizeGaussTria(GaussTria* gauss_tria); 51 50 }; -
TabularUnified issm/trunk-jpl/src/c/classes/gauss/GaussTria.cpp ¶
r16200 r16233 341 341 } 342 342 /*}}}*/ 343 /*FUNCTION GaussTria::GaussCenter{{{*/344 void GaussTria::GaussCenter(void){345 346 /*update static arrays*/347 coord1=ONETHIRD;348 coord2=ONETHIRD;349 coord3=ONETHIRD;350 351 }352 /*}}}*/353 343 /*FUNCTION GaussTria::GaussEdgeCenter{{{*/ 354 344 void GaussTria::GaussEdgeCenter(int index1,int index2){ -
TabularUnified issm/trunk-jpl/src/c/classes/gauss/GaussTria.h ¶
r16140 r16233 42 42 void GaussVertex(int iv); 43 43 void GaussNode(int finitelement,int iv); 44 void GaussCenter(void);45 44 void GaussEdgeCenter(int index1,int index2); 46 45 }; -
TabularUnified issm/trunk-jpl/src/c/kml/KML_Object.cpp ¶
r15104 r16233 295 295 } 296 296 /*}}}*/ 297 /*FUNCTION KML_Object::FindAttrib {{{*/298 void KML_Object::FindAttrib(char** pvalue,char* name,char* deflt){299 300 int i;301 KML_Attribute* katt=NULL;302 303 /* loop over any attributes for the object */304 305 if (attrib->Size())306 for (i=0; i<attrib->Size(); i++)307 if (!strcmp(((KML_Attribute *)attrib->GetObjectByOffset(i))->name,name)) {308 katt=(KML_Attribute *)attrib->GetObjectByOffset(i);309 break;310 }311 312 /* if found, get the value; otherwise use the default */313 314 if (katt)315 katt->Get(pvalue,deflt);316 else {317 *pvalue=xNew<char>(strlen(deflt)+1);318 memcpy(*pvalue,deflt,(strlen(deflt)+1)*sizeof(char));319 }320 321 return;322 }323 /*}}}*/324 297 /*FUNCTION KML_Object::WriteAttrib {{{*/ 325 298 void KML_Object::WriteAttrib(FILE* filout,const char* indent){ … … 363 336 } 364 337 /*}}}*/ 365 /*FUNCTION KML_Object::FindCommnt {{{*/366 void KML_Object::FindCommnt(char** pvalue,int inum){367 368 KML_Comment* kcom=NULL;369 370 /* loop over any comments for the object */371 372 if (inum <= commnt->Size())373 kcom=(KML_Comment *)commnt->GetObjectByOffset(inum-1);374 375 /* if found, get the value; otherwise use the NULL */376 377 if (kcom)378 kcom->Get(pvalue);379 380 return;381 }382 /*}}}*/383 338 /*FUNCTION KML_Object::WriteCommnt {{{*/ 384 339 void KML_Object::WriteCommnt(FILE* filout,const char* indent){ -
TabularUnified issm/trunk-jpl/src/c/kml/KML_Object.h ¶
r15068 r16233 37 37 virtual void WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp); 38 38 virtual void AddAttrib(const char* name,const char* value); 39 virtual void FindAttrib(char** pvalue,char* name,char* deflt);40 39 virtual void WriteAttrib(FILE* fid,const char* indent); 41 40 virtual void AddCommnt(int ncom,char** pcom); 42 41 virtual void AddCommnt(char* value); 43 virtual void FindCommnt(char** pvalue,int inum);44 42 virtual void WriteCommnt(FILE* fid,const char* indent); 45 43 -
TabularUnified issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp ¶
r15688 r16233 367 367 368 368 }/*}}}*/ 369 /*FUNCTION MatrixTranspose(IssmDouble* Adet,IssmDouble* A) {{{*/370 void MatrixTranspose(IssmDouble* tA,IssmDouble* A, int nrows, int ncols){371 /*Transpose a n*m matrix*/372 373 int i,j;374 375 /*Check the the matrix has been allocated*/376 _assert_(tA);377 378 /*Transpose*/379 for(i=0;i<ncols;i++){380 for(j=0;j<nrows;j++){381 tA[i*nrows+j]=A[j*ncols+i];382 }383 }384 385 }386 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/shared/Matrix/matrix.h ¶
r14983 r16233 15 15 void Matrix3x3Invert(IssmDouble* Ainv, IssmDouble* A); 16 16 void Matrix3x3Determinant(IssmDouble* Adet,IssmDouble* A); 17 void MatrixTranspose(IssmDouble* tA,IssmDouble* A,int nrows, int ncols);18 17 19 18 #endif //ifndef _MATRIXUTILS_H_
Note:
See TracChangeset
for help on using the changeset viewer.