Changeset 13696
- Timestamp:
- 10/16/12 11:09:05 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r13693 r13696 288 288 ./modules/InputArtificialNoisex/InputArtificialNoisex.h\ 289 289 ./modules/InputArtificialNoisex/InputArtificialNoisex.cpp\ 290 ./modules/TimeAdaptx/TimeAdaptx.h\291 ./modules/TimeAdaptx/TimeAdaptx.cpp\292 290 ./modules/ConfigureObjectsx/ConfigureObjectsx.h\ 293 291 ./modules/ConfigureObjectsx/ConfigureObjectsx.cpp\ -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r13693 r13696 38 38 this->comm=incomm; 39 39 this->SetStaticComm(); 40 41 /*Print starting banner:*/42 this->PrintBanner();43 40 44 41 /*Start profiler: */ … … 329 326 330 327 /*Modules:*/ 331 /*FUNCTION FemModel::UpdateVertexPositionsx(void){{{*/ 332 int FemModel::UpdateVertexPositionsx(void){ 328 int FemModel::UpdateVertexPositionsx(void){ /*{{{*/ 333 329 334 330 int i; … … 364 360 } 365 361 /*}}}*/ 366 /*FUNCTION void FemModel::UpdateConstraintsx(void){{{*/ 367 void FemModel::UpdateConstraintsx(void){ 362 void FemModel::UpdateConstraintsx(void){ /*{{{*/ 368 363 369 364 IssmDouble time; … … 384 379 385 380 } 381 /*}}}*/ 382 void FemModel::TimeAdaptx(IssmDouble* pdt){/*{{{*/ 383 384 int i; 385 386 /*output: */ 387 IssmDouble dt; 388 389 /*intermediary: */ 390 Element *element = NULL; 391 IssmDouble min_dt = 0; 392 IssmDouble node_min_dt = 0; 393 394 /*Go through elements, and figure out the minimum of the time steps for each element (using CFL criterion): */ 395 element=(Element*)elements->GetObjectByOffset(0); min_dt=element->TimeAdapt(); 396 397 for (i=1;i<elements->Size();i++){ 398 element=(Element*)elements->GetObjectByOffset(i); 399 dt=element->TimeAdapt(); 400 if(dt<min_dt)min_dt=dt; 401 } 402 403 /*Figure out minimum across the cluster: */ 404 #ifdef _HAVE_MPI_ 405 MPI_Reduce (&min_dt,&node_min_dt,1,MPI_DOUBLE,MPI_MIN,0,IssmComm::GetComm() ); 406 MPI_Bcast(&node_min_dt,1,MPI_DOUBLE,0,IssmComm::GetComm()); 407 min_dt=node_min_dt; 408 #endif 409 410 /*Assign output pointers:*/ 411 *pdt=min_dt; 412 } 413 /*}}}*/ -
issm/trunk-jpl/src/c/classes/FemModel.h
r13693 r13696 65 65 int UpdateVertexPositionsx(void); 66 66 void UpdateConstraintsx(void); 67 void TimeAdaptx(IssmDouble* pdt); 67 68 /*}}}*/ 68 69 -
issm/trunk-jpl/src/c/modules/modules.h
r13693 r13696 113 113 #include "./SystemMatricesx/SystemMatricesx.h" 114 114 #include "./CreateJacobianMatrixx/CreateJacobianMatrixx.h" 115 #include "./TimeAdaptx/TimeAdaptx.h"116 115 #include "./TriaSearchx/TriaSearchx.h" 117 116 #include "./TriMeshx/TriMeshx.h" -
issm/trunk-jpl/src/c/solutions/transient_core.cpp
r13689 r13696 78 78 /*Increment*/ 79 79 if(time_adapt){ 80 TimeAdaptx(&dt,femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters);80 femmodel->TimeAdaptx(&dt); 81 81 if(time+dt>finaltime) dt=finaltime-time; 82 82 femmodel->parameters->SetParam(dt,TimesteppingTimeStepEnum);
Note:
See TracChangeset
for help on using the changeset viewer.