source: issm/oecreview/Archive/12678-13393/ISSM-12862-12863.diff

Last change on this file was 13394, checked in by Mathieu Morlighem, 13 years ago

Added 12678-13393

File size: 1.8 KB
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp

     
    4141        this->M=pM;
    4242        this->vector=NULL;
    4343        if(this->M){
    44                 this->vector=xNewZeroInit<IssmDouble>(pM);
     44                this->vector=xNew<IssmDouble>(pM);
    4545                xMemCpy<IssmDouble>(this->vector,buffer,pM);
    4646        }
    4747}
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.cpp

     
    3333
    3434}
    3535/*}}}*/
     36/*FUNCTION PetscVec::PetscVec(Vec petsc_vec){{{*/
     37PetscVec::PetscVec(Vec petsc_vec){
     38
     39        if(petsc_vec==NULL){
     40                this->vector=NewVec(0);
     41        }
     42        else{
     43                /*copy vector*/
     44                VecDuplicate(petsc_vec,&this->vector);
     45                VecCopy(petsc_vec,this->vector);
     46        }
     47
     48}
     49/*}}}*/
    3650/*FUNCTION PetscVec::PetscVec(IssmDouble* serial_vec,int M){{{*/
    3751PetscVec::PetscVec(IssmDouble* serial_vec,int M){
    3852
     
    5367    VecFree(&this->vector);
    5468}
    5569/*}}}*/
    56 /*FUNCTION Vector::Vector(Vec petsc_vec){{{*/
    57 PetscVec::PetscVec(Vec petsc_vec){
    5870
    59         if(petsc_vec==NULL){
    60                 this->vector=NewVec(0);
    61         }
    62         else{
    63                 /*copy vector*/
    64                 VecDuplicate(petsc_vec,&this->vector);
    65                 VecCopy(petsc_vec,this->vector);
    66         }
    67 
    68 }
    69 /*}}}*/
    70 
    7171/*PetscVec specific routines: */
    7272/*FUNCTION PetscVec::Echo{{{*/
    7373void PetscVec::Echo(void){
Note: See TracBrowser for help on using the repository browser.