Changeset 11422


Ignore:
Timestamp:
02/13/12 18:26:55 (13 years ago)
Author:
cborstad
Message:

cleanup after merge

Location:
issm/trunk-jpl-damage/src/c/objects
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl-damage/src/c/objects/Elements/Penta.h

    r11419 r11422  
    8888                void   CreateKMatrix(Mat Kff, Mat Kfs,Vec df);
    8989                void   CreatePVector(Vec pf);
     90                void   CreateJacobianMatrix(Mat Jff);
    9091                void   DeleteResults(void);
    9192                int    GetNodeIndex(Node* node);
  • issm/trunk-jpl-damage/src/c/objects/Elements/Tria.cpp

    r11417 r11422  
    31033103                thickness_input->GetInputValue(&thickness, gauss);
    31043104                this->GetStrainRate2d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
    3105                 matice->GetViscosity2dDerivativeEpsSquare(&mu_prime,&epsilon[0]);
     3105                matice->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]);
    31063106                eps1[0]=2*epsilon[0]+epsilon[1];   eps2[0]=epsilon[2];
    31073107                eps1[1]=epsilon[2];                eps2[1]=epsilon[0]+2*epsilon[1];
  • issm/trunk-jpl-damage/src/c/objects/Elements/Tria.h

    r11419 r11422  
    141141                #ifdef _HAVE_CONTROL_
    142142                double DragCoefficientAbsGradient(bool process_units,int weight_index);
     143                void   GradientIndexing(int* indexing,int control_index);
    143144                void   Gradj(Vec gradient,int control_type);
    144145                void   GradjBGradient(Vec gradient,int weight_index);
  • issm/trunk-jpl-damage/src/c/objects/KML/KML_File.cpp

    r11419 r11422  
    6565        _printf_(flag,"%sKML_File:\n",indent);
    6666        KML_Object::DeepEcho(indent);
    67 
    68 /*  loop over the kml objects for the file  */
    69 
    70         memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
    71 
    72         strcat(indent2,"  ");
    73 
    74         if (kmlobj->Size())
    75                 for (i=0; i<kmlobj->Size(); i++) {
    76                         _printf_(flag,"%s        kmlobj: -------- begin [%d] --------\n" ,indent,i);
    77                         ((KML_Object *)kmlobj->GetObjectByOffset(i))->DeepEcho(indent2);
    78                         _printf_(flag,"%s        kmlobj: --------  end  [%d] --------\n" ,indent,i);
    79                 }
    80         else
    81                 _printf_(flag,"%s        kmlobj: [empty]\n"    ,indent);
    8267
    8368        return;
  • issm/trunk-jpl-damage/src/c/objects/KML/KML_Object.cpp

    r11419 r11422  
    117117void  KML_Object::Write(FILE* filout,const char* indent){
    118118
     119        int   i;
     120        char  indent2[81];
     121
    119122//  attributes always written in keyword line of derived classes
    120123//  comments always written after keyword line of derived classes
    121124
    122         ;
     125/*  loop over the unknown objects for the object  */
    123126
    124127        memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
     
    135138/*FUNCTION KML_Object::Read {{{1*/
    136139void  KML_Object::Read(FILE* fid,char* kstr){
     140
     141        KML_Object*  kobj;
    137142
    138143/*  process field within opening and closing tags  */
     
    249254        else if (!strncmp(kstr,"<",1)) {
    250255                _printf_(true,"KML_Object::Read -- Unrecognized opening tag %s.\n",kstr);
    251 <<<<<<< .working
    252                 KMLFileTagSkip(kstr,
    253                                            fid);
    254 =======
    255256//              KMLFileTagSkip(kstr,
    256257//                                         fid);
  • issm/trunk-jpl-damage/src/c/objects/KML/KML_Unknown.cpp

    r11419 r11422  
    107107        WriteCommnt(filout,indent);
    108108
    109         KML_Object::Write(filout,indent);
    110 
    111         if (value     )
    112                 fprintf(filout,"%s  %s\n",indent,value);
    113109        if (value     ) {
    114110                valuei=(char *) xmalloc((strlen(value)+1)*sizeof(char));
     
    139135        char         nl[]={'\n','\0'};
    140136
     137/*  get object name  */
     138
     139        /*name=KMLFileTagName(NULL,
     140                                                kstr);*/
     141//      _printf_(true,"KML_Unknown::Read -- opening name=%s.\n",name);
     142
    141143/*  get object attributes and check for solo tag  */
    142144
     
    149151        while (kstri=KMLFileToken(fid,
    150152                                                          &ncom,&pcom)) {
     153//              _printf_(true,"KML_Unknown::Read -- kstri=%s.\n",kstri);
    151154                if      (!strncmp(&kstri[0],"</", 2) &&
    152155                                 !strncmp(&kstri[2],name,strlen(name))) {
     156//                      _printf_(true,"KML_Unknown::Read -- closing name=%s.\n",name);
    153157                        xfree((void**)&kstri);
    154158                        break;
     
    157161                        _error_("KML_Unknown::Read -- Unexpected closing tag %s.\n",kstri);
    158162
    159                 else if (strncmp(kstri,"<",1))
    160                         KMLFileTokenParse( value     ,NULL,0,
    161                                                           NULL,
    162                                                           fid);
    163163                else if (strncmp(kstri,"<",1)) {
    164164                        if (value) {
  • issm/trunk-jpl-damage/src/c/objects/Loads/Penpair.h

    r11247 r11422  
    6464                void  CreateKMatrix(Mat Kff, Mat Kfs);
    6565                void  CreatePVector(Vec pf);
    66                 void  PenaltyCreateKMatrix(Mat Kff, Mat kfs, double kmax);
     66                void  CreateJacobianMatrix(Mat Jff);
     67                void  PenaltyCreateKMatrix(Mat Kff, Mat Kfs,double kmax);
    6768                void  PenaltyCreatePVector(Vec pf, double kmax);
     69                void  PenaltyCreateJacobianMatrix(Mat Jff,double kmax);
    6870                bool  InAnalysis(int analysis_type);
    6971                /*}}}*/
  • issm/trunk-jpl-damage/src/c/objects/Materials/Matice.cpp

    r11417 r11422  
    608608}
    609609/*}}}*/
    610 /*FUNCTION Matice::GetViscosity2dDerivativeEpsSquare{{{1*/
    611 void  Matice::GetViscosity2dDerivativeEpsSquare(double* pmu_prime, double* epsilon){
     610/*FUNCTION Matice::GetViscosityDerivativeEpsSquare{{{1*/
     611void  Matice::GetViscosityDerivativeEpsSquare(double* pmu_prime, double* epsilon){
    612612
    613613        /*output: */
  • issm/trunk-jpl-damage/src/c/objects/Materials/Matice.h

    r11417 r11422  
    6969                void   GetViscosityComplement(double* pviscosity_complement, double* pepsilon);
    7070                void   GetViscosityZComplement(double* pviscosity_complement, double* pepsilon);
    71                 void   GetViscosity2dDerivativeEpsSquare(double* pmu_prime, double* pepsilon);
     71                void   GetViscosityDerivativeEpsSquare(double* pmu_prime, double* pepsilon);
    7272                double GetB();
    7373                double GetBbar();
  • issm/trunk-jpl-damage/src/c/objects/Numerics/ElementMatrix.cpp

    r9320 r11422  
    251251        double* localvalues=NULL;
    252252
     253        /*If Kfs is not provided, call the other function*/
     254        if(!Kfs){
     255                this->AddToGlobal(Kff);
     256                return;
     257        }
     258
    253259        /*In debugging mode, check consistency (no NaN, and values not too big)*/
    254260        this->CheckConsistency();
     
    294300}
    295301/*}}}*/
     302/*FUNCTION ElementMatrix::AddToGlobal(Mat Jff){{{1*/
     303void ElementMatrix::AddToGlobal(Mat Jff){
     304         
     305        int i,j;
     306        double* localvalues=NULL;
     307       
     308        /*Check that Jff is not NULL*/
     309        _assert_(Jff);
     310       
     311        /*In debugging mode, check consistency (no NaN, and values not too big)*/
     312        this->CheckConsistency();
     313       
     314        if(this->dofsymmetrical){
     315                /*only use row dofs to add values into global matrices: */
     316               
     317                if(this->row_fsize){
     318                        /*first, retrieve values that are in the f-set from the g-set values matrix: */
     319                        localvalues=(double*)xmalloc(this->row_fsize*this->row_fsize*sizeof(double));
     320                        for(i=0;i<this->row_fsize;i++){
     321                                for(j=0;j<this->row_fsize;j++){
     322                                        *(localvalues+this->row_fsize*i+j)=*(this->values+this->ncols*this->row_flocaldoflist[i]+this->row_flocaldoflist[j]);
     323                                }
     324                        }
     325                        /*add local values into global  matrix, using the fglobaldoflist: */
     326                        MatSetValues(Jff,this->row_fsize,this->row_fglobaldoflist,this->row_fsize,this->row_fglobaldoflist,(const double*)localvalues,ADD_VALUES);
     327                       
     328                        /*Free ressources:*/
     329                        xfree((void**)&localvalues);
     330                }
     331               
     332        }
     333        else{
     334                _error_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
     335        }
     336       
     337}
     338/*}}}*/
    296339/*FUNCTION ElementMatrix::CheckConsistency{{{1*/
    297340void ElementMatrix::CheckConsistency(void){
  • issm/trunk-jpl-damage/src/c/objects/Numerics/ElementMatrix.h

    r8800 r11422  
    5959                /*ElementMatrix specific routines {{{1*/
    6060                void AddToGlobal(Mat Kff, Mat Kfs);
     61                void AddToGlobal(Mat Jff);
    6162                void Echo(void);
    6263                void CheckConsistency(void);
Note: See TracChangeset for help on using the changeset viewer.