Changeset 301
- Timestamp:
- 05/07/09 12:10:59 (16 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Element.h
r246 r301 38 38 virtual void GradjB(Vec grad_g,double* u_g,double* lambda_g,void* inputs,int analysis_type)=0; 39 39 virtual double Misfit(double* u_g,double* u_g_obs,void* inputs,int analysis_type)=0; 40 virtual void ComputePressure(Vec p_g)=0; 40 41 41 42 int Enum(); -
issm/trunk/src/c/objects/Input.cpp
r258 r301 150 150 151 151 /*Get 1d dof of this node: */ 152 dof1=node->GetDof list1();152 dof1=node->GetDofList1(); 153 153 154 154 for(j=0;j<ndofin;j++){ -
issm/trunk/src/c/objects/Node.cpp
r246 r301 426 426 } 427 427 428 int Node::GetDofList1(void){ 429 return doflist1[0]; 430 } 428 431 429 432 double Node::GetX(){return x[0];} … … 488 491 } 489 492 490 int Node::GetDoflist1(void){491 return doflist1[0];492 } -
issm/trunk/src/c/objects/Node.h
r246 r301 66 66 void CreateVecSets(Vec pv_g,Vec pv_m,Vec pv_n,Vec pv_f,Vec pv_s); 67 67 void GetDofList(int* outdoflist,int* pnumberofdofspernode); 68 int GetDof list1(void);68 int GetDofList1(void); 69 69 double GetX(); 70 70 double GetY(); -
issm/trunk/src/c/objects/Penta.cpp
r272 r301 947 947 } 948 948 949 949 void Penta::GetDofList1(int* doflist){ 950 951 int i; 952 for(i=0;i<6;i++){ 953 doflist[i]=nodes[i]->GetDofList1(); 954 } 955 956 } 950 957 #undef __FUNCT__ 951 958 #define __FUNCT__ "Penta::GetStrainRate" … … 1753 1760 1754 1761 } 1762 1763 #undef __FUNCT__ 1764 #define __FUNCT__ "Penta::ComputePressure" 1765 void Penta::ComputePressure(Vec pg){ 1766 1767 int i; 1768 const int numgrids=6; 1769 int doflist[numgrids]; 1770 double pressure[numgrids]; 1771 double rho_ice,g; 1772 double xyz_list[numgrids][3]; 1773 1774 /*Get node data: */ 1775 GetElementNodeData( &xyz_list[0][0], nodes, numgrids); 1776 1777 /*pressure is lithostatic: */ 1778 //md.pressure=md.rho_ice*md.g*(md.surface-md.z); a la matlab 1779 1780 /*Get dof list on which we will plug the pressure values: */ 1781 GetDofList1(&doflist[0]); 1782 1783 /*pressure is lithostatic: */ 1784 rho_ice=matpar->GetRhoIce(); 1785 g=matpar->GetG(); 1786 for(i=0;i<numgrids;i++){ 1787 pressure[i]=rho_ice*g*(s[i]-xyz_list[i][2]); 1788 } 1789 1790 /*plug local pressure values into global pressure vector: */ 1791 VecSetValues(pg,numgrids,doflist,(const double*)pressure,INSERT_VALUES); 1792 1793 } -
issm/trunk/src/c/objects/Penta.h
r246 r301 78 78 void UpdateFromInputs(void* inputs); 79 79 void GetDofList(int* doflist,int* pnumberofdofs); 80 void GetDofList1(int* doflist); 80 81 void* GetMatPar(); 81 82 int GetShelf(); … … 109 110 void GetNodalFunctions(double* l1l2l3l4l5l6, double* gauss_l1l2l3l4); 110 111 void VelocityExtrude(Vec ug,double* ug_serial); 112 void ComputePressure(Vec p_g); 111 113 112 114 }; -
issm/trunk/src/c/objects/Tria.cpp
r262 r301 905 905 } 906 906 907 void Tria::GetDofList1(int* doflist){ 908 909 int i; 910 for(i=0;i<3;i++){ 911 doflist[i]=nodes[i]->GetDofList1(); 912 } 913 914 } 915 907 916 908 917 #undef __FUNCT__ … … 1742 1751 /* node data: */ 1743 1752 const int numgrids=3; 1753 const int NDOF1=1; 1744 1754 const int NDOF2=2; 1745 1755 const int numdofs=NDOF2*numgrids; … … 2366 2376 2367 2377 } 2378 2379 #undef __FUNCT__ 2380 #define __FUNCT__ "Tria::ComputePressure" 2381 void Tria::ComputePressure(Vec pg){ 2382 2383 int i; 2384 const int numgrids=3; 2385 int doflist[numgrids]; 2386 double pressure[numgrids]; 2387 double rho_ice,g; 2388 2389 /*Get dof list on which we will plug the pressure values: */ 2390 GetDofList1(&doflist[0]); 2391 2392 /*pressure is lithostatic: */ 2393 rho_ice=matpar->GetRhoIce(); 2394 g=matpar->GetG(); 2395 for(i=0;i<numgrids;i++){ 2396 pressure[i]=rho_ice*g*h[i]; 2397 } 2398 2399 /*plug local pressure values into global pressure vector: */ 2400 VecSetValues(pg,numgrids,doflist,(const double*)pressure,INSERT_VALUES); 2401 2402 } -
issm/trunk/src/c/objects/Tria.h
r246 r301 69 69 void UpdateFromInputs(void* inputs); 70 70 void GetDofList(int* doflist,int* pnumberofdofs); 71 71 void GetDofList1(int* doflist); 72 72 void CreateKMatrixDiagnosticHoriz(Mat Kgg,void* inputs,int analysis_type); 73 73 void CreateKMatrixDiagnosticHorizFriction(Mat Kgg,void* inputs,int analysis_type); … … 105 105 void MaticeConfiguration(Matice* matice,int matice_offset); 106 106 void MatparConfiguration(Matpar* matpar,int matpar_offset); 107 void ComputePressure(Vec p_g); 107 108 108 109
Note:
See TracChangeset
for help on using the changeset viewer.