Changeset 4942
- Timestamp:
- 08/03/10 09:04:37 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/BeamRef.cpp
r4921 r4942 60 60 } 61 61 /*}}}*/ 62 /*FUNCTION BeamRef::GetJacobianDeterminant2d {{{1*/ 63 void BeamRef::GetJacobianDeterminant2d(double* Jdet, double* xyz_list,double gauss){ 64 65 /*Jdet = 0.5 * length*/ 66 *Jdet=1.0/2.0*(sqrt(pow(xyz_list[3*1+0]-xyz_list[3*0+0],2)+pow(xyz_list[3*1+1]-xyz_list[3*0+1],2))); 67 if(*Jdet<0) ISSMERROR(" negative jacobian determinant!"); 68 69 } 70 /*}}}*/ 62 71 /*FUNCTION BeamRef::GetNodalFunctions {{{1*/ 63 72 void BeamRef::GetNodalFunctions(double* l1l2, double gauss){ -
issm/trunk/src/c/objects/Elements/BeamRef.h
r4921 r4942 24 24 /*Numerics*/ 25 25 void GetJacobianDeterminant(double* Jdet, double* z_list,double gauss); 26 void GetJacobianDeterminant2d(double* Jdet, double* xyz_list,double gauss); 26 27 void GetNodalFunctions(double* l1l2, double gauss); 27 28 void GetParameterValue(double* pvalue, double* value_list,double gauss_coord); -
issm/trunk/src/c/objects/Elements/Element.h
r4935 r4942 36 36 virtual bool GetOnBed()=0; 37 37 virtual void GetThicknessList(double* thickness_list)=0; 38 virtual void GetParameterValue(double* pvalue,Node* node,int enumtype)=0; 39 virtual void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,Input* input_in)=0; 38 40 virtual void GetBedList(double* bed_list)=0; 39 41 virtual void Gradj(Vec gradient,int control_type)=0; -
issm/trunk/src/c/objects/Elements/Penta.cpp
r4935 r4942 4148 4148 delete tria; 4149 4149 } 4150 extern int my_rank;4151 4150 4152 4151 xfree((void**)&first_gauss_area_coord); … … 4236 4235 } 4237 4236 /*}}}*/ 4238 /*FUNCTION Penta::GetParameterValue(double* pvalue,Node* node 1,Node* node2,double gauss_seg,int enumtype) {{{1*/4237 /*FUNCTION Penta::GetParameterValue(double* pvalue,Node* node,int enumtype) {{{1*/ 4239 4238 void Penta::GetParameterValue(double* pvalue,Node* node,int enumtype){ 4240 4239 … … 4264 4263 return; 4265 4264 4265 } 4266 /*}}}*/ 4267 /*FUNCTION Penta::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,Input* input_in) {{{1*/ 4268 void Penta::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,Input* input_in){ 4269 4270 /*Output*/ 4271 double value; 4272 4273 /*Intermediaries*/ 4274 const int numnodes=6; 4275 int grid1=-1,grid2=-1; 4276 int grid3; 4277 int i; 4278 double gauss_penta[numnodes]; 4279 4280 /*go through 6 nodes (all nodes for penta) and identify 1st and 2nd nodes: */ 4281 ISSMASSERT(nodes); 4282 for(i=0;i<numnodes;i++){ 4283 if (node1==nodes[i]) grid1=i; 4284 if (node2==nodes[i]) grid2=i; 4285 } 4286 4287 /*Reverse grid1 and 2 if necessary*/ 4288 if (grid1>grid2){ 4289 4290 /*Reverse grid1 and grid2*/ 4291 grid3=grid1; grid1=grid2; grid2=grid3; 4292 4293 /*Change segment gauss point (between -1 and +1)*/ 4294 gauss_seg=-gauss_seg; 4295 } 4296 4297 /*Build Penta Gauss point*/ 4298 if (grid2<3){ 4299 4300 /*We are on the basal triangle*/ 4301 gauss_penta[3]=-1.; 4302 4303 if (grid1==0 && grid2==1){ 4304 /*gauss_seg is between 0 and 1*/ 4305 gauss_penta[0]=0.5*(1.-gauss_seg); 4306 gauss_penta[1]=1.-0.5*(1.-gauss_seg); 4307 gauss_penta[2]=0.; 4308 } 4309 else if (grid1==0 && grid2==2){ 4310 /*gauss_seg is between 0 and 2*/ 4311 gauss_penta[0]=0.5*(1.-gauss_seg); 4312 gauss_penta[1]=0.; 4313 gauss_penta[2]=1.-0.5*(1.-gauss_seg); 4314 } 4315 else if (grid1==1 && grid2==2){ 4316 /*gauss_seg is between 1 and 2*/ 4317 gauss_penta[0]=0.; 4318 gauss_penta[1]=0.5*(1.-gauss_seg); 4319 gauss_penta[2]=1.-0.5*(1.-gauss_seg); 4320 } 4321 else{ 4322 ISSMERROR("The 2 nodes provided are either the same or did not match current Penta nodes"); 4323 } 4324 } 4325 else if(grid1>2){ 4326 4327 /*We are on the surface triangle*/ 4328 gauss_penta[3]=+1.; 4329 4330 if (grid1==3 && grid2==4){ 4331 /*gauss_seg is between 0 and 1*/ 4332 gauss_penta[0]=0.5*(1.-gauss_seg); 4333 gauss_penta[1]=1.-0.5*(1.-gauss_seg); 4334 gauss_penta[2]=0.; 4335 } 4336 else if (grid1==3 && grid2==5){ 4337 /*gauss_seg is between 0 and 2*/ 4338 gauss_penta[0]=0.5*(1.-gauss_seg); 4339 gauss_penta[1]=0.; 4340 gauss_penta[2]=1.-0.5*(1.-gauss_seg); 4341 } 4342 else if (grid1==4 && grid2==5){ 4343 /*gauss_seg is between 1 and 2*/ 4344 gauss_penta[0]=0.; 4345 gauss_penta[1]=0.5*(1.-gauss_seg); 4346 gauss_penta[2]=1.-0.5*(1.-gauss_seg); 4347 } 4348 else{ 4349 ISSMERROR("The 2 nodes provided are either the same or did not match current Penta nodes"); 4350 } 4351 } 4352 else{ 4353 ISSMERROR("vertical segments not implemented yet"); 4354 } 4355 4356 /*OK, now we can call input method*/ 4357 input_in->GetParameterValue(&value, &gauss_penta[0]); 4358 4359 /*Assign output pointers:*/ 4360 *pvalue=value; 4266 4361 } 4267 4362 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Penta.h
r4935 r4942 147 147 void GetNodalFunctionsStokes(double* l1l7, double* gauss_coord); 148 148 void GetParameterValue(double* pvalue,Node* node,int enumtype); 149 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,Input* input_in); 149 150 void GetPhi(double* phi, double* epsilon, double viscosity); 150 151 void GetSolutionFromInputsDiagnosticHoriz(Vec solutiong); -
issm/trunk/src/c/objects/Elements/Tria.h
r4931 r4942 142 142 void GetDofList(int* doflist,int* pnumberofdofs); 143 143 void GetDofList1(int* doflist); 144 void GetParameterValue(double* pp, double* plist, double* gauss_l1l2l3);145 144 void GetParameterValue(double* pvalue,Node* node,int enumtype); 146 145 void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype); -
issm/trunk/src/c/objects/Loads/Numericalflux.cpp
r4904 r4942 880 880 } 881 881 /*}}}*/ 882 /*FUNCTION Numericalflux::GetParameterValue {{{1*/882 /*FUNCTION Numericalflux::GetParameterValue(double* pvalue, double gauss_coord,int enumtype) {{{1*/ 883 883 void Numericalflux::GetParameterValue(double* pvalue, double gauss_coord,int enumtype){ 884 884 … … 901 901 } 902 902 /*}}}*/ 903 /*FUNCTION Numericalflux::GetParameterValue {{{1*/903 /*FUNCTION Numericalflux::GetParameterValue(double* pvalue, double gauss_coord,Input* input_in) {{{1*/ 904 904 void Numericalflux::GetParameterValue(double* pvalue, double gauss_coord,Input* input_in){ 905 905
Note:
See TracChangeset
for help on using the changeset viewer.