Changeset 20134
- Timestamp:
- 02/11/16 19:38:56 (9 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r20043 r20134 58 58 59 59 /*First things first, store the communicator, and set it as a global variable: */ 60 this->comm=incomm; 61 this->SetStaticComm(); 60 IssmComm::SetComm(incomm); 62 61 63 62 /*Now, initialize PETSC: */ 64 63 #ifdef _HAVE_PETSC_ 65 PETSC_COMM_WORLD= this->comm;64 PETSC_COMM_WORLD=incomm; 66 65 ierr=PetscInitialize(&argc,&argv,(char*)0,""); if(ierr) _error_("Could not initialize Petsc"); 67 66 #endif … … 79 78 profiler->Tag(FinishInit); 80 79 80 /*Save communicator in the parameters dataset: */ 81 this->parameters->AddObject(new IntParam(FemModelCommEnum,incomm)); 81 82 82 83 /*Free resources */ … … 97 98 /*Store the communicator, but do not set it as a global variable, as this has already 98 99 * been done by the FemModel that called this copy constructor: */ 99 this->comm=incomm; 100 this->SetStaticComm(); 100 IssmComm::SetComm(incomm); 101 101 102 102 /*Create femmodel from input files, with trace activated: */ 103 103 this->InitFromFiles(rootpath,inputfilename,outputfilename,toolkitsfilename,lockfilename,restartfilename, solution_type,traceon,X); 104 105 /*Save communicator in the parameters dataset: */ 106 this->parameters->AddObject(new IntParam(FemModelCommEnum,incomm)); 104 107 105 108 } … … 266 269 } 267 270 /*}}}*/ 268 void FemModel::SetStaticComm(void){/*{{{*/269 270 /*This routine sets the global communicator variable hidden inside the IssmComm271 *class: */272 IssmComm::SetComm(this->comm);273 274 }275 /*}}}*/276 271 void FemModel::SetCurrentConfiguration(int configuration_type,int analysis_type){/*{{{*/ 277 272 … … 381 376 output=new FemModel(*this); //Use default copy constructor. 382 377 383 output->comm = this->comm;384 378 output->nummodels = this->nummodels; 385 379 output->solution_type = this->solution_type; … … 547 541 548 542 case TransientSolutionEnum:{ 549 bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,islevelset,ishydrology,isdamage,issmb ;543 bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,islevelset,ishydrology,isdamage,issmb,isslr; 550 544 iomodel->Constant(&isSIA,FlowequationIsSIAEnum); 551 545 iomodel->Constant(&isFS,FlowequationIsFSEnum); … … 559 553 iomodel->Constant(&ishydrology,TransientIshydrologyEnum); 560 554 iomodel->Constant(&issmb,TransientIssmbEnum); 555 iomodel->Constant(&isslr,TransientIsslrEnum); 561 556 if(isstressbalance){ 562 557 int fe_FS; … … 599 594 if(isdamage){ 600 595 analyses_temp[numanalyses++]=DamageEvolutionAnalysisEnum; 596 } 597 if(isslr){ 598 analyses_temp[numanalyses++]=SealevelriseAnalysisEnum; 601 599 } 602 600 … … 2552 2550 /*First things first, store the communicator, and set it as a global variable: */ 2553 2551 this->comm=incomm; 2554 this->SetStaticComm();2552 IssmComm::SetComm(this->comm); 2555 2553 2556 2554 /*Start profiler: */ -
issm/trunk-jpl/src/c/classes/FemModel.h
r20016 r20134 43 43 Parameters *parameters; //one set of parameters, independent of the analysis_type 44 44 Results *results; //results that cannot be fit into the elements 45 ISSM_MPI_Comm comm; //communicator for this particular model46 45 47 46 /*constructors, destructors: */ … … 57 56 void CleanUp(void); 58 57 void Solve(void); 59 void SetStaticComm();60 58 void SetCurrentConfiguration(int configuration_type); 61 59 void SetCurrentConfiguration(int configuration_type,int analysis_type); -
issm/trunk-jpl/src/c/classes/Node.cpp
r20117 r20134 59 59 _assert_(sqrt( coord_system[0][0]*coord_system[0][0] + coord_system[1][0]*coord_system[1][0]) >1.e-4); 60 60 61 if(iomodel->domaintype!=Domain2DhorizontalEnum ){61 if(iomodel->domaintype!=Domain2DhorizontalEnum & iomodel->domaintype!=Domain3DsurfaceEnum){ 62 62 /*We have a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */ 63 63 _assert_(iomodel->Data(MeshVertexonbaseEnum)); … … 97 97 analysis_enum==LevelsetAnalysisEnum 98 98 ){ 99 if(iomodel->domaintype!=Domain2DhorizontalEnum ){99 if(iomodel->domaintype!=Domain2DhorizontalEnum & iomodel->domaintype!=Domain3DsurfaceEnum & iomodel->domaintype!=Domain3DsurfaceEnum){ 100 100 /*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */ 101 101 _assert_(iomodel->Data(MeshVertexonbaseEnum));
Note:
See TracChangeset
for help on using the changeset viewer.