Changeset 12345
- Timestamp:
- 06/01/12 20:48:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/objects/Node.cpp
r12014 r12345 439 439 #ifdef _HAVE_DIAGNOSTIC_ 440 440 /*FUNCTION Node::GetCoordinateSystem{{{1*/ 441 void Node::GetCoordinateSystem( double* coord_system_out){441 void Node::GetCoordinateSystem(IssmDouble* coord_system_out){ 442 442 443 443 /*Copy coord_system*/ … … 466 466 /*Node numerics:*/ 467 467 /*FUNCTION Node::ApplyConstraints{{{1*/ 468 void Node::ApplyConstraint(int dof, double value){468 void Node::ApplyConstraint(int dof,IssmDouble value){ 469 469 470 470 int index; … … 487 487 void Node::CreateVecSets(Vector* pv_g,Vector* pv_f,Vector* pv_s){ 488 488 489 double gvalue=1.0; //all nodes are in the g set;490 double value;489 IssmDouble gvalue=1.0; //all nodes are in the g set; 490 IssmDouble value; 491 491 492 492 int i; … … 498 498 499 499 /*f set: */ 500 value=( double)this->indexing.f_set[i];500 value=(IssmDouble)this->indexing.f_set[i]; 501 501 pv_f->SetValue(indexing.gdoflist[i],value,INS_VAL); 502 502 503 503 /*s set: */ 504 value=( double)this->indexing.s_set[i];504 value=(IssmDouble)this->indexing.s_set[i]; 505 505 pv_s->SetValue(indexing.gdoflist[i],value,INS_VAL); 506 506 … … 514 514 515 515 int i; 516 double* values=NULL;516 IssmDouble* values=NULL; 517 517 int count; 518 518 519 519 /*Recover values for s set and plug them in constraints vector: */ 520 520 if(this->indexing.ssize){ 521 values= (double*)xmalloc(this->indexing.ssize*sizeof(double));521 values=xNew<IssmDouble>(this->indexing.ssize); 522 522 count=0; 523 523 for(i=0;i<this->indexing.gsize;i++){ … … 534 534 535 535 /*Free ressources:*/ 536 x free((void**)&values);536 xDelete<IssmDouble>(values); 537 537 538 538 … … 634 634 /*}}}*/ 635 635 /*FUNCTION Node::GetSigma {{{1*/ 636 double Node::GetSigma(){636 IssmDouble Node::GetSigma(){ 637 637 Vertex* vertex=NULL; 638 638 … … 642 642 /*}}}*/ 643 643 /*FUNCTION Node::GetX {{{1*/ 644 double Node::GetX(){644 IssmDouble Node::GetX(){ 645 645 Vertex* vertex=NULL; 646 646 … … 650 650 /*}}}*/ 651 651 /*FUNCTION Node::GetY {{{1*/ 652 double Node::GetY(){652 IssmDouble Node::GetY(){ 653 653 Vertex* vertex=NULL; 654 654 … … 658 658 /*}}}*/ 659 659 /*FUNCTION Node::GetZ {{{1*/ 660 double Node::GetZ(){660 IssmDouble Node::GetZ(){ 661 661 Vertex* vertex=NULL; 662 662 … … 716 716 } 717 717 /*}}}*/ 718 /*FUNCTION Node::InputUpdateFromVector( double* vector, int name, int type){{{1*/719 void Node::InputUpdateFromVector( double* vector, int name, int type){718 /*FUNCTION Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){{{1*/ 719 void Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 720 720 721 721 /*Nothing updated yet*/ … … 734 734 } 735 735 /*}}}*/ 736 /*FUNCTION Node::InputUpdateFromVectorDakota( double* vector, int name, int type){{{1*/737 void Node::InputUpdateFromVectorDakota( double* vector, int name, int type){736 /*FUNCTION Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){{{1*/ 737 void Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){ 738 738 739 739 /*Nothing updated yet*/ 740 740 } 741 741 /*}}}*/ 742 /*FUNCTION Node::InputUpdateFromMatrixDakota( double* matrix, int nrows, int ncols, int name, int type){{{1*/743 void Node::InputUpdateFromMatrixDakota( double* matrix, int nrows, int ncols, int name, int type){742 /*FUNCTION Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){{{1*/ 743 void Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){ 744 744 745 745 /*Nothing updated yet*/ … … 758 758 } 759 759 /*}}}*/ 760 /*FUNCTION Node::InputUpdateFromConstant( double constant, int name){{{1*/761 void Node::InputUpdateFromConstant( double constant, int name){760 /*FUNCTION Node::InputUpdateFromConstant(IssmDouble constant, int name){{{1*/ 761 void Node::InputUpdateFromConstant(IssmDouble constant, int name){ 762 762 763 763 /*Nothing updated yet*/ … … 777 777 /*}}}*/ 778 778 /*FUNCTION Node::UpdateSpcs {{{1*/ 779 void Node::UpdateSpcs( double* ys){779 void Node::UpdateSpcs(IssmDouble* ys){ 780 780 781 781 int count=0; … … 792 792 /*}}}*/ 793 793 /*FUNCTION Node::VecMerge {{{1*/ 794 void Node::VecMerge(Vector* ug, double* vector_serial,int setenum){795 796 double* values=NULL;794 void Node::VecMerge(Vector* ug, IssmDouble* vector_serial,int setenum){ 795 796 IssmDouble* values=NULL; 797 797 int* indices=NULL; 798 798 int count=0; … … 802 802 if(this->indexing.fsize){ 803 803 indices=(int*)xmalloc(this->indexing.fsize*sizeof(int)); 804 values=( double*)xmalloc(this->indexing.fsize*sizeof(double));804 values=(IssmDouble*)xmalloc(this->indexing.fsize*sizeof(IssmDouble)); 805 805 806 806 for(i=0;i<this->indexing.gsize;i++){ … … 820 820 if(this->indexing.ssize){ 821 821 indices=(int*)xmalloc(this->indexing.ssize*sizeof(int)); 822 values=( double*)xmalloc(this->indexing.ssize*sizeof(double));822 values=(IssmDouble*)xmalloc(this->indexing.ssize*sizeof(IssmDouble)); 823 823 824 824 for(i=0;i<this->indexing.gsize;i++){ … … 843 843 /*}}}*/ 844 844 /*FUNCTION Node::VecReduce {{{1*/ 845 void Node::VecReduce(Vector* vector, double* ug_serial,int setenum){846 847 double* values=NULL;845 void Node::VecReduce(Vector* vector, IssmDouble* ug_serial,int setenum){ 846 847 IssmDouble* values=NULL; 848 848 int count=0; 849 849 int i; … … 851 851 if(setenum==FsetEnum){ 852 852 if(this->indexing.fsize){ 853 values=( double*)xmalloc(this->indexing.fsize*sizeof(double));853 values=(IssmDouble*)xmalloc(this->indexing.fsize*sizeof(IssmDouble)); 854 854 855 855 for(i=0;i<this->indexing.gsize;i++){ … … 867 867 else if(setenum==SsetEnum){ 868 868 if(this->indexing.ssize){ 869 values=( double*)xmalloc(this->indexing.ssize*sizeof(double));869 values=(IssmDouble*)xmalloc(this->indexing.ssize*sizeof(IssmDouble)); 870 870 871 871 for(i=0;i<this->indexing.gsize;i++){
Note:
See TracChangeset
for help on using the changeset viewer.