Changeset 13696


Ignore:
Timestamp:
10/16/12 11:09:05 (12 years ago)
Author:
Eric.Larour
Message:

DEL: moved TimeAdaptx to FemModel method.

Location:
issm/trunk-jpl/src/c
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Makefile.am

    r13693 r13696  
    288288                                        ./modules/InputArtificialNoisex/InputArtificialNoisex.h\
    289289                                        ./modules/InputArtificialNoisex/InputArtificialNoisex.cpp\
    290                                         ./modules/TimeAdaptx/TimeAdaptx.h\
    291                                         ./modules/TimeAdaptx/TimeAdaptx.cpp\
    292290                                        ./modules/ConfigureObjectsx/ConfigureObjectsx.h\
    293291                                        ./modules/ConfigureObjectsx/ConfigureObjectsx.cpp\
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r13693 r13696  
    3838        this->comm=incomm;
    3939        this->SetStaticComm();
    40 
    41         /*Print starting banner:*/
    42         this->PrintBanner();
    4340
    4441        /*Start profiler: */
     
    329326
    330327/*Modules:*/
    331 /*FUNCTION FemModel::UpdateVertexPositionsx(void){{{*/
    332 int FemModel::UpdateVertexPositionsx(void){
     328int FemModel::UpdateVertexPositionsx(void){ /*{{{*/
    333329
    334330        int     i;
     
    364360}
    365361/*}}}*/
    366 /*FUNCTION void FemModel::UpdateConstraintsx(void){{{*/
    367 void FemModel::UpdateConstraintsx(void){
     362void FemModel::UpdateConstraintsx(void){ /*{{{*/
    368363
    369364        IssmDouble time;
     
    384379
    385380}
     381/*}}}*/
     382void 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  
    6565                int UpdateVertexPositionsx(void);
    6666                void UpdateConstraintsx(void);
     67                void TimeAdaptx(IssmDouble* pdt);
    6768                /*}}}*/
    6869
  • issm/trunk-jpl/src/c/modules/modules.h

    r13693 r13696  
    113113#include "./SystemMatricesx/SystemMatricesx.h"
    114114#include "./CreateJacobianMatrixx/CreateJacobianMatrixx.h"
    115 #include "./TimeAdaptx/TimeAdaptx.h"
    116115#include "./TriaSearchx/TriaSearchx.h"
    117116#include "./TriMeshx/TriMeshx.h"
  • issm/trunk-jpl/src/c/solutions/transient_core.cpp

    r13689 r13696  
    7878                /*Increment*/
    7979                if(time_adapt){
    80                         TimeAdaptx(&dt,femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters);
     80                        femmodel->TimeAdaptx(&dt);
    8181                        if(time+dt>finaltime) dt=finaltime-time;
    8282                        femmodel->parameters->SetParam(dt,TimesteppingTimeStepEnum);
Note: See TracChangeset for help on using the changeset viewer.