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

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

Added 12678-13393

File size: 1.8 KB
RevLine 
[13394]1Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
2===================================================================
3--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp (revision 12862)
4+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp (revision 12863)
5@@ -41,7 +41,7 @@
6 this->M=pM;
7 this->vector=NULL;
8 if(this->M){
9- this->vector=xNewZeroInit<IssmDouble>(pM);
10+ this->vector=xNew<IssmDouble>(pM);
11 xMemCpy<IssmDouble>(this->vector,buffer,pM);
12 }
13 }
14Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.cpp
15===================================================================
16--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.cpp (revision 12862)
17+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.cpp (revision 12863)
18@@ -33,6 +33,20 @@
19
20 }
21 /*}}}*/
22+/*FUNCTION PetscVec::PetscVec(Vec petsc_vec){{{*/
23+PetscVec::PetscVec(Vec petsc_vec){
24+
25+ if(petsc_vec==NULL){
26+ this->vector=NewVec(0);
27+ }
28+ else{
29+ /*copy vector*/
30+ VecDuplicate(petsc_vec,&this->vector);
31+ VecCopy(petsc_vec,this->vector);
32+ }
33+
34+}
35+/*}}}*/
36 /*FUNCTION PetscVec::PetscVec(IssmDouble* serial_vec,int M){{{*/
37 PetscVec::PetscVec(IssmDouble* serial_vec,int M){
38
39@@ -53,21 +67,7 @@
40 VecFree(&this->vector);
41 }
42 /*}}}*/
43-/*FUNCTION Vector::Vector(Vec petsc_vec){{{*/
44-PetscVec::PetscVec(Vec petsc_vec){
45
46- if(petsc_vec==NULL){
47- this->vector=NewVec(0);
48- }
49- else{
50- /*copy vector*/
51- VecDuplicate(petsc_vec,&this->vector);
52- VecCopy(petsc_vec,this->vector);
53- }
54-
55-}
56-/*}}}*/
57-
58 /*PetscVec specific routines: */
59 /*FUNCTION PetscVec::Echo{{{*/
60 void PetscVec::Echo(void){
Note: See TracBrowser for help on using the repository browser.