Changeset 3529
- Timestamp:
- 04/14/10 10:22:05 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 6 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp
r3446 r3529 10 10 #include "../EnumDefinitions/EnumDefinitions.h" 11 11 12 void ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,DataSet* parameters){ 12 void ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,DataSet* parameters, 13 ParameterInputs* inputs,int analysis_type,int sub_analysis_type){ 13 14 14 15 int i; … … 31 32 32 33 /*Call on dataset driver: */ 33 elements->ComputePressure(p_g );34 elements->ComputePressure(p_g,inputs,analysis_type,sub_analysis_type); 34 35 35 36 /*Assemble vector: */ -
issm/trunk/src/c/ComputePressurex/ComputePressurex.h
r3446 r3529 7 7 8 8 #include "../DataSet/DataSet.h" 9 #include "../objects/objects.h" 9 10 10 11 /* local prototypes: */ 11 void ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, DataSet* parameters); 12 void ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, DataSet* parameters, 13 ParameterInputs* inputs,int analysis_type,int sub_analysis_type); 12 14 13 15 #endif /* _COMPUTEPRESSUREX_H */ -
issm/trunk/src/c/DataSet/DataSet.cpp
r3514 r3529 789 789 790 790 /*Objects methods*/ 791 /*FUNCTION DataSet::ComputeBasalStress{{{1*/ 792 void DataSet::ComputeBasalStress(Vec sigma_b,void* inputs,int analysis_type,int sub_analysis_type){ 793 794 vector<Object*>::iterator object; 795 Element* element=NULL; 796 797 for ( object=objects.begin() ; object < objects.end(); object++ ){ 798 799 if(EnumIsElement((*object)->Enum())){ 800 801 element=(Element*)(*object); 802 element->ComputeBasalStress(sigma_b,inputs,analysis_type,sub_analysis_type); 803 } 804 } 805 806 } 807 /*}}}*/ 791 808 /*FUNCTION DataSet::ComputePressure{{{1*/ 792 void DataSet::ComputePressure(Vec p_g ){809 void DataSet::ComputePressure(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type){ 793 810 794 811 vector<Object*>::iterator object; … … 800 817 801 818 element=(Element*)(*object); 802 element->ComputePressure(p_g); 819 element->ComputePressure(p_g,inputs,analysis_type,sub_analysis_type); 820 } 821 } 822 823 } 824 /*}}}*/ 825 /*FUNCTION DataSet::ComputeStrainRate{{{1*/ 826 void DataSet::ComputeStrainRate(Vec eps,void* inputs,int analysis_type,int sub_analysis_type){ 827 828 vector<Object*>::iterator object; 829 Element* element=NULL; 830 831 for ( object=objects.begin() ; object < objects.end(); object++ ){ 832 833 if(EnumIsElement((*object)->Enum())){ 834 835 element=(Element*)(*object); 836 element->ComputeStrainRate(eps,inputs,analysis_type,sub_analysis_type); 803 837 } 804 838 } -
issm/trunk/src/c/DataSet/DataSet.h
r3464 r3529 91 91 void FieldDepthAverageAtBase(Vec field,double* field_serial,char* fieldname); 92 92 int DeleteObject(Object* object); 93 void ComputePressure(Vec p_g); 93 void ComputeBasalStress(Vec sigma_b,void* inputs,int analysis_type,int sub_analysis_type); 94 void ComputePressure(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type); 95 void ComputeStrainRate(Vec eps,void* inputs,int analysis_type,int sub_analysis_type); 94 96 int FindResult(void* pvalue, char* name); 95 97 void FieldExtrude(Vec field,double* field_serial,char* field_name, int collapse); -
issm/trunk/src/c/Makefile.am
r3446 r3529 274 274 ./ConfigureObjectsx/ConfigureObjectsx.h\ 275 275 ./ConfigureObjectsx/ConfigureObjectsx.cpp\ 276 ./ComputeBasalStressx/ComputeBasalStressx.h\ 277 ./ComputeBasalStressx/ComputeBasalStressx.cpp\ 276 278 ./ComputePressurex/ComputePressurex.h\ 277 279 ./ComputePressurex/ComputePressurex.cpp\ 280 ./ComputeStrainRatex/ComputeStrainRatex.h\ 281 ./ComputeStrainRatex/ComputeStrainRatex.cpp\ 278 282 ./BuildNodeSetsx/BuildNodeSetsx.h\ 279 283 ./BuildNodeSetsx/BuildNodeSetsx.cpp\ … … 670 674 ./ConfigureObjectsx/ConfigureObjectsx.h\ 671 675 ./ConfigureObjectsx/ConfigureObjectsx.cpp\ 676 ./ComputeBasalStressx/ComputeBasalStressx.h\ 677 ./ComputeBasalStressx/ComputeBasalStressx.cpp\ 672 678 ./ComputePressurex/ComputePressurex.h\ 673 679 ./ComputePressurex/ComputePressurex.cpp\ 680 ./ComputeStrainRatex/ComputeStrainRatex.h\ 681 ./ComputeStrainRatex/ComputeStrainRatex.cpp\ 674 682 ./BuildNodeSetsx/BuildNodeSetsx.h\ 675 683 ./BuildNodeSetsx/BuildNodeSetsx.cpp\ -
issm/trunk/src/c/issm.h
r3446 r3529 58 58 #include "./FieldAverageOntoVerticesx/FieldAverageOntoVerticesx.h" 59 59 #include "./FieldDepthAveragex/FieldDepthAveragex.h" 60 #include "./ComputeBasalStressx/ComputeBasalStressx.h" 60 61 #include "./ComputePressurex/ComputePressurex.h" 62 #include "./ComputeStrainRatex/ComputeStrainRatex.h" 61 63 #include "./FieldExtrudex/FieldExtrudex.h" 62 64 #include "./Qmux/Qmux.h" … … 68 70 #include "./BamgConvertMeshx/BamgConvertMeshx.h" 69 71 70 71 72 #endif -
issm/trunk/src/c/objects/Beam.cpp
r3516 r3529 306 306 307 307 /*Object functions*/ 308 /*FUNCTION Beam::ComputeBasalStress{{{1*/ 309 void Beam::ComputeBasalStress(Vec eps,void* inputs,int analysis_type,int sub_analysis_type){ 310 311 ISSMERROR("Not implemented yet"); 312 313 } 314 /*}}}*/ 308 315 /*FUNCTION Beam::ComputePressure{{{1*/ 309 void Beam::ComputePressure(Vec p_g ){316 void Beam::ComputePressure(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type){ 310 317 311 318 int i; … … 346 353 /*plug local pressure values into global pressure vector: */ 347 354 VecSetValues(p_g,numgrids,doflist,(const double*)pressure,INSERT_VALUES); 355 356 } 357 /*}}}*/ 358 /*FUNCTION Beam::ComputeStrainRate{{{1*/ 359 void Beam::ComputeStrainRate(Vec eps,void* inputs,int analysis_type,int sub_analysis_type){ 360 361 ISSMERROR("Not implemented yet"); 348 362 349 363 } -
issm/trunk/src/c/objects/Beam.h
r3454 r3529 74 74 void MaticeConfiguration(Matice* matice,int matice_offset); 75 75 void MatparConfiguration(Matpar* matpar,int matpar_offset); 76 void ComputePressure(Vec p_g); 76 void ComputeBasalStress(Vec sigma_b,void* inputs,int analysis_type,int sub_analysis_type); 77 void ComputePressure(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type); 78 void ComputeStrainRate(Vec eps,void* inputs,int analysis_type,int sub_analysis_type); 77 79 void GetNodes(void** vpnodes); 78 80 /*}}}*/ -
issm/trunk/src/c/objects/Element.h
r3467 r3529 34 34 virtual double CostFunction(void* inputs,int analysis_type,int sub_analysis_type)=0; 35 35 virtual double SurfaceArea(void* inputs,int analysis_type,int sub_analysis_type)=0; 36 virtual void ComputePressure(Vec p_g)=0; 36 virtual void ComputeBasalStress(Vec sigma_b,void* inputs,int analysis_type,int sub_analysis_type)=0; 37 virtual void ComputePressure(Vec p_g, void* inputs,int analysis_type,int sub_analysis_type)=0; 38 virtual void ComputeStrainRate(Vec eps, void* inputs,int analysis_type,int sub_analysis_type)=0; 37 39 virtual double MassFlux(double* segment,double* ug)=0; 38 40 -
issm/trunk/src/c/objects/Penta.cpp
r3523 r3529 336 336 337 337 /*Object functions*/ 338 /*FUNCTION ComputeBasalStress {{{1*/ 339 void Penta::ComputeBasalStress(Vec sigma_b,void* vinputs,int analysis_type,int sub_analysis_type){ 340 341 int i,j; 342 const int numgrids=6; 343 int doflist[numgrids]; 344 double xyz_list[numgrids][3]; 345 double xyz_list_tria[3][3]; 346 347 /*Parameters*/ 348 double rho_ice,gravity; 349 double surface_normal[3]; 350 double bed_normal[3]; 351 double bed; 352 double basalforce[3]; 353 double vxvyvz_list[numgrids][3]; 354 double pressure_list[numgrids]; 355 double epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ 356 double devstresstensor[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ 357 double stresstensor[6]={0.0}; 358 double viscosity; 359 360 int dofv[3]={0,1,2}; 361 int dofp[1]={3}; 362 ParameterInputs* inputs=NULL; 363 double Jdet2d; 364 Tria* tria=NULL; 365 366 /*Gauss*/ 367 int num_gauss,ig; 368 double* first_gauss_area_coord = NULL; 369 double* second_gauss_area_coord = NULL; 370 double* third_gauss_area_coord = NULL; 371 double* gauss_weights = NULL; 372 double gauss_weight; 373 double gauss_coord[4]; 374 375 /*Output*/ 376 double pressure; 377 double sigma_xx,sigma_yy,sigma_zz; 378 double sigma_xy,sigma_xz,sigma_yz; 379 double surface=0; 380 double value=0; 381 382 /*dynamic objects pointed to by hooks: */ 383 Node** nodes=NULL; 384 Matpar* matpar=NULL; 385 Matice* matice=NULL; 386 Numpar* numpar=NULL; 387 388 /*Check analysis_types*/ 389 if (analysis_type!=DiagnosticAnalysisEnum() || sub_analysis_type!=StokesAnalysisEnum()) ISSMERROR("Not supported yet!"); 390 391 /*recover pointers: */ 392 inputs=(ParameterInputs*)vinputs; 393 394 /*recover objects from hooks: */ 395 nodes=(Node**)hnodes.deliverp(); 396 matpar=(Matpar*)hmatpar.delivers(); 397 matice=(Matice*)hmatice.delivers(); 398 numpar=(Numpar*)hnumpar.delivers(); 399 400 if(!this->properties.onbed){ 401 //put zero 402 VecSetValue(sigma_b,id-1,0.0,INSERT_VALUES); 403 return; 404 } 405 406 /*recovre material parameters: */ 407 rho_ice=matpar->GetRhoIce(); 408 gravity=matpar->GetG(); 409 410 /*recover extra inputs from users, at current convergence iteration: */ 411 inputs->Recover("velocity",&vxvyvz_list[0][0],3,dofv,numgrids,(void**)nodes); 412 inputs->Recover("velocity",&pressure_list[0] ,1,dofp,numgrids,(void**)nodes); 413 414 /* Get node coordinates and dof list: */ 415 GetVerticesCoordinates(&xyz_list[0][0], nodes, numgrids); 416 for(i=0;i<3;i++){ 417 for(j=0;j<3;j++){ 418 xyz_list_tria[i][j]=xyz_list[i][j]; 419 } 420 } 421 422 /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */ 423 GaussTria(&num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights,2); 424 425 /* Start looping on the number of gaussian points: */ 426 for (ig=0; ig<num_gauss; ig++){ 427 428 /*Pick up the gaussian point: */ 429 gauss_weight=*(gauss_weights+ig); 430 gauss_coord[0]=*(first_gauss_area_coord+ig); 431 gauss_coord[1]=*(second_gauss_area_coord+ig); 432 gauss_coord[2]=*(third_gauss_area_coord+ig); 433 gauss_coord[3]=-1.0; //take the base 434 435 /*Compute strain rate viscosity and pressure: */ 436 GetStrainRateStokes(&epsilon[0],&vxvyvz_list[0][0],&xyz_list[0][0],gauss_coord); 437 matice->GetViscosity3dStokes(&viscosity,&epsilon[0]); 438 GetParameterValue(&pressure,&pressure_list[0],&gauss_coord[0]); 439 440 /*Compute Stress*/ 441 sigma_xx=viscosity*epsilon[0]-pressure*numpar->stokesreconditioning; // sigma = nu eps - pressure 442 sigma_yy=viscosity*epsilon[1]-pressure*numpar->stokesreconditioning; 443 sigma_zz=viscosity*epsilon[2]-pressure*numpar->stokesreconditioning; 444 sigma_xy=viscosity*epsilon[3]; 445 sigma_xz=viscosity*epsilon[4]; 446 sigma_yz=viscosity*epsilon[5]; 447 448 /*Get normal vector to the bed */ 449 SurfaceNormal(&surface_normal[0],xyz_list_tria); 450 bed_normal[0] = - surface_normal[0]; //Program is for surface, so the normal to the bed is the opposite of the result 451 bed_normal[1] = - surface_normal[1]; 452 bed_normal[2] = - surface_normal[2]; 453 454 /*basalforce*/ 455 basalforce[0] += sigma_xx*bed_normal[0] + sigma_xy*bed_normal[1] + sigma_xz*bed_normal[2]; 456 basalforce[1] += sigma_xy*bed_normal[0] + sigma_yy*bed_normal[1] + sigma_yz*bed_normal[2]; 457 basalforce[2] += sigma_xz*bed_normal[0] + sigma_yz*bed_normal[1] + sigma_zz*bed_normal[2]; 458 459 /*Get the Jacobian determinant */ 460 tria->GetJacobianDeterminant3d(&Jdet2d, &xyz_list_tria[0][0],gauss_coord); 461 value+=sigma_zz*Jdet2d*gauss_weight; 462 surface+=Jdet2d*gauss_weight; 463 } 464 value=value/surface; 465 466 /*Add value to output*/ 467 VecSetValue(sigma_b,id-1,(const double)value,INSERT_VALUES); 468 } 469 /*}}}*/ 338 470 /*FUNCTION ComputePressure {{{1*/ 339 void Penta::ComputePressure(Vec pg ){471 void Penta::ComputePressure(Vec pg,void* vinputs,int analysis_type,int sub_analysis_type){ 340 472 341 473 int i; … … 375 507 /*plug local pressure values into global pressure vector: */ 376 508 VecSetValues(pg,numgrids,doflist,(const double*)pressure,INSERT_VALUES); 509 510 } 511 /*}}}*/ 512 /*FUNCTION ComputeStrainRate {{{1*/ 513 void Penta::ComputeStrainRate(Vec eps,void* vinputs,int analysis_type,int sub_analysis_type){ 514 515 ISSMERROR("Not implemented yet"); 377 516 378 517 } … … 4057 4196 } 4058 4197 /*}}}*/ 4059 /* *FUNCTION ReduceVectorStokes {{{1*/4198 /*FUNCTION ReduceVectorStokes {{{1*/ 4060 4199 void Penta::ReduceVectorStokes(double* Pe_reduced, double* Ke_temp, double* Pe_temp){ 4061 4200 … … 4099 4238 } 4100 4239 /*}}}*/ 4101 /*FUNCTION Penta::SetClone {{{1*/4240 /*FUNCTION SetClone {{{1*/ 4102 4241 void Penta::SetClone(int* minranks){ 4103 4242 -
issm/trunk/src/c/objects/Penta.h
r3470 r3529 103 103 void GetNodalFunctions(double* l1l6, double* gauss_coord); 104 104 void FieldExtrude(Vec field,double* field_serial,char* field_name, int iscollapsed); 105 void ComputePressure(Vec p_g); 105 void ComputeBasalStress(Vec sigma_b,void* inputs,int analysis_type,int sub_analysis_type); 106 void ComputePressure(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type); 107 void ComputeStrainRate(Vec eps,void* inputs,int analysis_type,int sub_analysis_type); 106 108 void CreateKMatrixSlopeCompute(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type); 107 109 void CreatePVectorSlopeCompute( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type); -
issm/trunk/src/c/objects/Sing.cpp
r3454 r3529 290 290 291 291 /*Object functions*/ 292 /*FUNCTION Sing::ComputeBasalStress {{{1*/ 293 void Sing::ComputeBasalStress(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type){ 294 295 ISSMERROR("Not implemented yet"); 296 297 } 298 /*}}}*/ 292 299 /*FUNCTION Sing::ComputePressure {{{1*/ 293 void Sing::ComputePressure(Vec p_g ){300 void Sing::ComputePressure(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type){ 294 301 295 302 int i; … … 321 328 /*plug local pressure values into global pressure vector: */ 322 329 VecSetValues(p_g,numgrids,doflist,(const double*)pressure,INSERT_VALUES); 330 331 } 332 /*}}}*/ 333 /*FUNCTION Sing::ComputeStrainRate {{{1*/ 334 void Sing::ComputeStrainRate(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type){ 335 336 ISSMERROR("Not implemented yet"); 323 337 324 338 } -
issm/trunk/src/c/objects/Sing.h
r3454 r3529 68 68 void MaticeConfiguration(Matice* matice,int matice_offset); 69 69 void MatparConfiguration(Matpar* matpar,int matpar_offset); 70 void ComputePressure(Vec p_g); 70 void ComputeBasalStress(Vec sigma_b,void* inputs,int analysis_type,int sub_analysis_type); 71 void ComputePressure(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type); 72 void ComputeStrainRate(Vec eps,void* inputs,int analysis_type,int sub_analysis_type); 71 73 void GetNodes(void** vpnodes); 72 74 /*}}}*/ -
issm/trunk/src/c/objects/Tria.cpp
r3483 r3529 349 349 350 350 /*Object functions*/ 351 /*FUNCTION Tria::ComputeBasalStress {{{1*/ 352 void Tria::ComputeBasalStress(Vec eps,void* vinputs,int analysis_type,int sub_analysis_type){ 353 354 int i; 355 const int numgrids=3; 356 int doflist[numgrids]; 357 double value; 358 359 /*dynamic objects pointed to by hooks: */ 360 Node** nodes=NULL; 361 Matpar* matpar=NULL; 362 Matice* matice=NULL; 363 Numpar* numpar=NULL; 364 365 /*recover objects from hooks: */ 366 nodes=(Node**)hnodes.deliverp(); 367 matpar=(Matpar*)hmatpar.delivers(); 368 matice=(Matice*)hmatice.delivers(); 369 numpar=(Numpar*)hnumpar.delivers(); 370 371 /*plug local pressure values into global pressure vector: */ 372 ISSMERROR("Not Implemented yet"); 373 //VecSetValues(eps,1,2,(const double*)&value,INSERT_VALUES); 374 375 } 376 /*}}}*/ 351 377 /*FUNCTION Tria::ComputePressure {{{1*/ 352 void Tria::ComputePressure(Vec pg ){378 void Tria::ComputePressure(Vec pg,void* vinputs,int analysis_type,int sub_analysis_type){ 353 379 354 380 int i; … … 383 409 /*plug local pressure values into global pressure vector: */ 384 410 VecSetValues(pg,numgrids,doflist,(const double*)pressure,INSERT_VALUES); 411 412 } 413 /*}}}*/ 414 /*FUNCTION Tria::ComputeStrainRate {{{1*/ 415 void Tria::ComputeStrainRate(Vec eps,void* vinputs,int analysis_type,int sub_analysis_type){ 416 417 int i; 418 const int numgrids=3; 419 int doflist[numgrids]; 420 double value; 421 422 /*dynamic objects pointed to by hooks: */ 423 Node** nodes=NULL; 424 Matpar* matpar=NULL; 425 Matice* matice=NULL; 426 Numpar* numpar=NULL; 427 428 /*recover objects from hooks: */ 429 nodes=(Node**)hnodes.deliverp(); 430 matpar=(Matpar*)hmatpar.delivers(); 431 matice=(Matice*)hmatice.delivers(); 432 numpar=(Numpar*)hnumpar.delivers(); 433 434 /*plug local pressure values into global pressure vector: */ 435 ISSMERROR("Not Implemented yet"); 436 //VecSetValues(eps,1,2,(const double*)&value,INSERT_VALUES); 385 437 386 438 } -
issm/trunk/src/c/objects/Tria.h
r3454 r3529 104 104 void GetThicknessList(double* thickness_list); 105 105 void GetBedList(double* bed_list); 106 void ComputePressure(Vec p_g); 106 void ComputeBasalStress(Vec sigma_b,void* inputs,int analysis_type,int sub_analysis_type); 107 void ComputePressure(Vec p_g,void* inputs,int analysis_type,int sub_analysis_type); 108 void ComputeStrainRate(Vec eps,void* inputs,int analysis_type,int sub_analysis_type); 107 109 void CreateKMatrixThermal(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type); 108 110 void CreateKMatrixMelting(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type); -
issm/trunk/src/c/parallel/ControlInitialization.cpp
r3446 r3529 113 113 //Create 4d u_g 114 114 if(verbose)_printf_("%s\n"," computing pressure according to Pattyn..."); 115 ComputePressurex( &pg,fem_dh->elements, fem_dh->nodes, fem_dh->vertices,fem_dh->loads, fem_dh->materials, fem_dh->parameters );115 ComputePressurex( &pg,fem_dh->elements, fem_dh->nodes, fem_dh->vertices,fem_dh->loads, fem_dh->materials, fem_dh->parameters,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 116 116 VecScale(pg,1.0/stokesreconditioning); 117 117 ug_stokes=NewVec(fem_ds->nodesets->GetGSize()); -
issm/trunk/src/c/parallel/ProcessResults.cpp
r3373 r3529 100 100 double* gradient=NULL; 101 101 102 Vec sigma_zz=NULL; 103 double* sigma_zz_serial=NULL; 104 102 105 Vec v_g=NULL; 103 106 double* v_g_serial=NULL; 104 107 105 int numberofnodes ;108 int numberofnodes,numberofelements; 106 109 107 110 /*Initialize new results: */ … … 516 519 517 520 } 521 else if(strcmp(result->GetFieldName(),"sigma_zz")==0){ 522 /*easy, param_g is of size numberofelements, on 1 dof, just repartition: */ 523 fem_ds->parameters->FindParam(&numberofelements,"numberofelements"); 524 result->GetField(&sigma_zz); 525 VecToMPISerial(&sigma_zz_serial,sigma_zz); 526 527 /*Ok, add parameter to newresults: */ 528 newresult=new Result(newresults->Size()+1,result->GetTime(),result->GetStep(),"sigma_zz",sigma_zz_serial,numberofelements); 529 newresults->AddObject(newresult); 530 531 /*do some cleanup: */ 532 xfree((void**)&sigma_zz_serial); 533 534 } 518 535 else{ 519 536 /*Just copy the result into the new results dataset: */ -
issm/trunk/src/c/parallel/diagnostic_core.cpp
r3446 r3529 109 109 110 110 if(verbose)_printf_("%s\n"," computing pressure according to MacAyeal..."); 111 ComputePressurex( &pg,fem_dhu->elements,fem_dhu->nodes,fem_dhu->vertices,fem_dhu->loads,fem_dhu->materials, fem_dhu->parameters);111 ComputePressurex(&pg,fem_dhu->elements,fem_dhu->nodes, fem_dhu->vertices,fem_dhu->loads,fem_dhu->materials,fem_dhu->parameters,inputs,DiagnosticAnalysisEnum(),HutterAnalysisEnum()); 112 112 113 113 if(verbose)_printf_("%s\n"," update boundary conditions for macyeal pattyn using hutter results..."); … … 127 127 if(dim==2){ 128 128 if(verbose)_printf_("%s\n"," computing pressure according to MacAyeal..."); 129 ComputePressurex( &pg,fem_dh->elements, fem_dh->nodes, fem_dh->vertices,fem_dh->loads, fem_dh->materials, fem_dh->parameters);129 ComputePressurex(&pg,fem_dh->elements,fem_dh->nodes, fem_dh->vertices,fem_dh->loads,fem_dh->materials,fem_dh->parameters,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 130 130 } 131 131 … … 150 150 151 151 if(verbose)_printf_("%s\n"," computing pressure according to Pattyn..."); 152 ComputePressurex( &pg,fem_dh->elements, fem_dh->nodes, fem_dh->vertices,fem_dh->loads, fem_dh->materials,fem_dh->parameters);152 ComputePressurex(&pg,fem_dh->elements, fem_dh->nodes, fem_dh->vertices,fem_dh->loads, fem_dh->materials,fem_dh->parameters,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 153 153 154 154 if (isstokes){ -
issm/trunk/src/m/solutions/jpl/ControlInitialization.m
r3485 r3529 55 55 % get pressure (reconditionned) and create 4d u_g 56 56 displaystring(verbose,'\n%s',['computing pressure according to Pattyn...']); 57 p_g=ComputePressure(m_dh.elements,m_dh.nodes,mdh.vertices,m_dh.loads,m_dh.materials,m_dh.parameters,inputs );57 p_g=ComputePressure(m_dh.elements,m_dh.nodes,mdh.vertices,m_dh.loads,m_dh.materials,m_dh.parameters,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 58 58 p_g=p_g/m_ds.parameters.stokesreconditioning; 59 59 u_g_stokes=zeros(m_ds.nodesets.gsize,1); -
issm/trunk/src/m/solutions/jpl/diagnostic_core.m
r3485 r3529 43 43 44 44 displaystring(verbose,'\n%s',['computing pressure according to MacAyeal...']); 45 p_g=ComputePressure(m_dhu.elements,m_dhu.nodes,m_dhu.vertices,m_dhu.loads,m_dhu.materials,m_dhu.parameters,inputs );45 p_g=ComputePressure(m_dhu.elements,m_dhu.nodes,m_dhu.vertices,m_dhu.loads,m_dhu.materials,m_dhu.parameters,inputs,DiagnosticAnalysisEnum(),HutterAnalysisEnum()); 46 46 47 47 displaystring(verbose,'\n%s',['update boundary conditions for macyeal pattyn using hutter results...']); … … 59 59 60 60 displaystring(verbose,'\n%s',['computing pressure according to MacAyeal...']); 61 p_g=ComputePressure(m_dh.elements,m_dh.nodes,m_dh.vertices,m_dh.loads,m_dh.materials,m_dh.parameters,inputs );61 p_g=ComputePressure(m_dh.elements,m_dh.nodes,m_dh.vertices,m_dh.loads,m_dh.materials,m_dh.parameters,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 62 62 end 63 63 … … 77 77 78 78 displaystring(verbose,'\n%s',['computing pressure according to Pattyn...']); 79 p_g=ComputePressure(m_dh.elements,m_dh.nodes,m_dh.vertices,m_dh.loads,m_dh.materials,m_dh.parameters,inputs );79 p_g=ComputePressure(m_dh.elements,m_dh.nodes,m_dh.vertices,m_dh.loads,m_dh.materials,m_dh.parameters,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 80 80 81 81 if isstokes, -
issm/trunk/src/mex/ComputePressure/ComputePressure.cpp
r3484 r3529 19 19 ParameterInputs* inputs=NULL; 20 20 int numberofnodes; 21 int analysis_type; 22 int sub_analysis_type; 21 23 22 24 /* output datasets: */ … … 36 38 FetchData(&materials,MATERIALS); 37 39 FetchParams(¶meters,PARAMETERS); 40 FetchData(&analysis_type,ANALYSIS); 41 FetchData(&sub_analysis_type,SUBANALYSIS); 38 42 39 43 /*!Generate internal degree of freedom numbers: */ … … 45 49 46 50 /*!Generate internal degree of freedom numbers: */ 47 ComputePressurex(&p_g, elements,nodes,vertices,loads,materials,parameters );51 ComputePressurex(&p_g, elements,nodes,vertices,loads,materials,parameters,inputs,analysis_type,sub_analysis_type); 48 52 49 53 /*write output datasets: */ -
issm/trunk/src/mex/ComputePressure/ComputePressure.h
r3445 r3529 24 24 #define PARAMETERS (mxArray*)prhs[5] 25 25 #define INPUTS (mxArray*)prhs[6] 26 #define ANALYSIS (mxArray*)prhs[7] 27 #define SUBANALYSIS (mxArray*)prhs[8] 26 28 27 29 /* serial output macros: */ … … 32 34 #define NLHS 1 33 35 #undef NRHS 34 #define NRHS 736 #define NRHS 9 35 37 36 38 -
issm/trunk/src/mex/Makefile.am
r3445 r3529 9 9 BamgConvertMesh\ 10 10 BuildNodeSets\ 11 ComputeBasalStress\ 11 12 ComputePressure\ 12 13 ConfigureObjects \ … … 93 94 BamgConvertMesh/BamgConvertMesh.h 94 95 96 ComputeBasalStress_SOURCES = ComputeBasalStress/ComputeBasalStress.cpp\ 97 ComputeBasalStress/ComputeBasalStress.h 98 95 99 ComputePressure_SOURCES = ComputePressure/ComputePressure.cpp\ 96 100 ComputePressure/ComputePressure.h
Note:
See TracChangeset
for help on using the changeset viewer.