Changeset 4990
- Timestamp:
- 08/04/10 16:36:54 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r4983 r4990 703 703 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face). 704 704 J=tria->CostFunction(process_units); 705 delete tria ;705 delete tria->matice; delete tria; 706 706 707 707 /*delete B average*/ … … 717 717 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face). 718 718 J=tria->CostFunction(process_units); 719 delete tria ;719 delete tria->matice; delete tria; 720 720 721 721 /*delete B average*/ … … 1577 1577 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face). 1578 1578 J=tria->Misfit(process_units); 1579 delete tria ;1579 delete tria->matice; delete tria; 1580 1580 return J; 1581 1581 } … … 1584 1584 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face). 1585 1585 J=tria->Misfit(process_units); 1586 delete tria ;1586 delete tria->matice; delete tria; 1587 1587 return J; 1588 1588 } … … 1712 1712 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face). 1713 1713 S=tria->SurfaceArea(); 1714 delete tria ;1714 delete tria->matice; delete tria; 1715 1715 return S; 1716 1716 } … … 1719 1719 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face). 1720 1720 S=tria->SurfaceArea(); 1721 delete tria ;1721 delete tria->matice; delete tria; 1722 1722 return S; 1723 1723 } … … 1982 1982 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 1983 1983 tria->CreateKMatrix(Kgg); 1984 delete tria ;1984 delete tria->matice; delete tria; 1985 1985 1986 1986 /*Delete Vx and Vy averaged*/ … … 2020 2020 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2021 2021 tria->CreateKMatrix(Kgg); 2022 delete tria ;2022 delete tria->matice; delete tria; 2023 2023 2024 2024 /*Delete Vx and Vy averaged*/ … … 2151 2151 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2152 2152 tria->CreateKMatrix(Kgg); 2153 delete tria ;2153 delete tria->matice; delete tria; 2154 2154 2155 2155 /*Delete B averaged*/ … … 2251 2251 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2252 2252 tria->CreateKMatrixDiagnosticHorizFriction(Kgg); 2253 delete tria ;2253 delete tria->matice; delete tria; 2254 2254 } 2255 2255 … … 2689 2689 tria=(Tria*)SpawnTria(3,4,5); //nodes 3,4 and 5 are on the surface 2690 2690 tria->CreateKMatrixDiagnosticSurfaceVert(Kgg); 2691 delete tria ;2691 delete tria->matice; delete tria; 2692 2692 } 2693 2693 … … 2780 2780 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2781 2781 tria->CreateKMatrixMelting(Kgg); 2782 delete tria ;2782 delete tria->matice; delete tria; 2783 2783 return; 2784 2784 } … … 2812 2812 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2813 2813 tria->CreateKMatrix(Kgg); 2814 delete tria ;2814 delete tria->matice; delete tria; 2815 2815 2816 2816 /*Delete Vx and Vy averaged*/ … … 2846 2846 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2847 2847 tria->CreateKMatrix(Kgg); 2848 delete tria ;2848 delete tria->matice; delete tria; 2849 2849 return; 2850 2850 … … 3092 3092 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 3093 3093 tria->CreateKMatrixThermal(Kgg); 3094 delete tria ;3094 delete tria->matice; delete tria; 3095 3095 } 3096 3096 } … … 3123 3123 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 3124 3124 tria->CreatePVector(pg); 3125 delete tria ;3125 delete tria->matice; delete tria; 3126 3126 3127 3127 /*Delete Vx and Vy averaged*/ … … 3159 3159 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 3160 3160 tria->CreatePVector(pg); 3161 delete tria ;3161 delete tria->matice; delete tria; 3162 3162 3163 3163 /*Delete Vx and Vy averaged*/ … … 3245 3245 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 3246 3246 tria->CreatePVector(pg); 3247 delete tria ;3247 delete tria->matice; delete tria; 3248 3248 return; 3249 3249 } … … 3355 3355 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face). 3356 3356 tria->CreatePVectorAdjointHoriz(p_g); 3357 delete tria ;3357 delete tria->matice; delete tria; 3358 3358 return; 3359 3359 } … … 3362 3362 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face). 3363 3363 tria->CreatePVectorAdjointHoriz(p_g); 3364 delete tria ;3364 delete tria->matice; delete tria; 3365 3365 return; 3366 3366 } … … 3793 3793 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face). 3794 3794 tria->CreatePVectorAdjointStokes(p_g); 3795 delete tria ;3795 delete tria->matice; delete tria; 3796 3796 return; 3797 3797 } … … 3862 3862 tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 are on the bedrock 3863 3863 tria->CreatePVectorDiagnosticBaseVert(pg); 3864 delete tria ;3864 delete tria->matice; delete tria; 3865 3865 } 3866 3866 … … 3961 3961 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 3962 3962 tria->CreatePVector(pg); 3963 delete tria ;3963 delete tria->matice; delete tria; 3964 3964 3965 3965 /*Delete Vx and Vy averaged*/ … … 3993 3993 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 3994 3994 tria->CreatePVector(pg); 3995 delete tria ;3995 delete tria->matice; delete tria; 3996 3996 return; 3997 3997 } … … 4166 4166 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 4167 4167 tria->CreatePVectorThermalShelf(pg); 4168 delete tria ;4168 delete tria->matice; delete tria; 4169 4169 } 4170 4170 … … 4174 4174 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 4175 4175 tria->CreatePVectorThermalSheet(pg); 4176 delete tria ;4176 delete tria->matice; delete tria; 4177 4177 } 4178 4178 … … 4702 4702 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face). 4703 4703 tria->GradjB(gradient); 4704 delete tria ;4704 delete tria->matice; delete tria; 4705 4705 4706 4706 /*delete B average*/ … … 4714 4714 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face). 4715 4715 tria->GradjB(gradient); 4716 delete tria ;4716 delete tria->matice; delete tria; 4717 4717 4718 4718 /*delete B average*/ … … 4758 4758 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 4759 4759 tria->GradjDrag(gradient); 4760 delete tria ;4760 delete tria->matice; delete tria; 4761 4761 } 4762 4762 else if (analysis_type==AdjointStokesAnalysisEnum){ … … 4765 4765 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 4766 4766 tria->GradjDragStokes(gradient); 4767 delete tria ;4767 delete tria->matice; delete tria; 4768 4768 } 4769 4769 else ISSMERROR("analysis %s not supported yet",EnumAsString(analysis_type)); … … 5595 5595 tria->results=tria_results; 5596 5596 tria->parameters=tria_parameters; 5597 tria->element_type=P1Enum; //Only P1 CG for now 5597 tria->element_type=P1Enum; //Only P1 CG for now (TO BE CHANGED) 5598 5598 this->SpawnTriaHook(dynamic_cast<TriaHook*>(tria),&indices[0]); 5599 5600 /*Spawn matice*/ 5601 tria->matice=NULL; 5602 tria->matice=(Matice*)this->matice->copy(); 5603 delete tria->matice->inputs; 5604 tria->matice->inputs=(Inputs*)this->matice->inputs->SpawnTriaInputs(indices); 5599 5605 5600 5606 /*recover nodes, matice and matpar: */ 5601 5607 tria->nodes=(Node**)tria->hnodes[analysis_counter]->deliverp(); 5602 tria->matice=(Matice*)tria->hmatice->delivers();5603 5608 tria->matpar=(Matpar*)tria->hmatpar->delivers(); 5604 5609 -
issm/trunk/src/c/objects/Elements/PentaHook.cpp
r4546 r4990 92 92 } 93 93 } 94 triahook->hmatice=(Hook*)this->hmatice->copy(); 94 // do not spawn hmatice. matice will be taken care of by Penta 95 triahook->hmatice=NULL; 95 96 triahook->hmatpar=(Hook*)this->hmatpar->copy(); 96 97 } -
issm/trunk/src/c/objects/Elements/PentaRef.cpp
r4921 r4990 871 871 double A1,A2,A3,z; 872 872 873 A1=gauss[0]; //first area coordinate value. In term of xi and eta: A1=(1-xi)/2-eta/(2*SQRT3); 874 A2=gauss[1]; //second area coordinate value In term of xi and eta: A2=(1+xi)/2-eta/(2*SQRT3); 875 A3=gauss[2]; //third area coordinate value In term of xi and eta: A3=y/SQRT3; 876 z=gauss[3]; //fourth vertical coordinate value. Corresponding nodal function: (1-z)/2 and (1+z)/2 877 873 A1=gauss[0]; ISSMASSERT(A1>=0 && A1<=1);//first area coordinate value. In term of xi and eta: A1=(1-xi)/2-eta/(2*SQRT3); 874 A2=gauss[1]; ISSMASSERT(A2>=0 && A2<=1);//second area coordinate value In term of xi and eta: A2=(1+xi)/2-eta/(2*SQRT3); 875 A3=gauss[2]; ISSMASSERT(A3>=0 && A3<=1);//third area coordinate value In term of xi and eta: A3=y/SQRT3; 876 z=gauss[3]; ISSMASSERT(z>=-1 && z<=1);//fourth vertical coordinate value. Corresponding nodal function: (1-z)/2 and (1+z)/2 878 877 879 878 /*First nodal function derivatives. The corresponding nodal function is N=A1*(1-z)/2. Its derivatives follow*/ -
issm/trunk/src/c/objects/Materials/Matice.cpp
r4978 r4990 220 220 Matice* matice=NULL; 221 221 222 /*Initialize output*/ 223 matice=new Matice(); 224 222 225 /*copy fields: */ 223 226 matice->mid=this->mid;
Note:
See TracChangeset
for help on using the changeset viewer.