Changeset 18190


Ignore:
Timestamp:
06/26/14 10:27:52 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: minor

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r18173 r18190  
    28792879        IssmDouble  values[NUMVERTICES];
    28802880        int         vertexpidlist[NUMVERTICES],control_init;
    2881         Input      *input     = NULL;
    2882         Input      *new_input = NULL;
    28832881
    28842882        /*Specific case for depth averaged quantities*/
     
    29032901                values[i]=vector[vertexpidlist[i]];
    29042902        }
    2905         new_input = new PentaInput(control_enum,values,P1Enum);
    2906         input=(Input*)this->inputs->GetInput(control_enum);   _assert_(input);
    2907 
    2908         if (input->ObjectEnum()!=ControlInputEnum){
     2903        Input* new_input = new PentaInput(control_enum,values,P1Enum);
     2904        Input* input=(Input*)this->inputs->GetInput(control_enum);   _assert_(input);
     2905        if(input->ObjectEnum()!=ControlInputEnum){
    29092906                _error_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    29102907        }
  • issm/trunk-jpl/src/c/classes/Elements/Seg.cpp

    r18078 r18190  
    102102        *pxyz_front=xyz_front;
    103103}/*}}}*/
     104void       Seg::NodalFunctionsP1(IssmDouble* basis, Gauss* gauss){/*{{{*/
     105
     106        _assert_(gauss->Enum()==GaussSegEnum);
     107        this->GetNodalFunctions(basis,(GaussSeg*)gauss,P1Enum);
     108
     109}
     110/*}}}*/
    104111int        Seg::GetNumberOfNodes(void){/*{{{*/
    105112        return this->NumberofNodes(this->element_type);
  • issm/trunk-jpl/src/c/classes/Elements/Seg.h

    r18135 r18190  
    8383                IssmDouble  MinEdgeLength(IssmDouble* xyz_list){_error_("not implemented yet");};
    8484                void        NodalFunctions(IssmDouble* basis,Gauss* gauss);
    85                 void        NodalFunctionsP1(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");};
     85                void        NodalFunctionsP1(IssmDouble* basis,Gauss* gauss);
    8686                void        NodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");};
    8787                void        NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r18179 r18190  
    27142714
    27152715        IssmDouble  values[NUMVERTICES];
    2716         int     vertexpidlist[NUMVERTICES];
    2717         Input  *input     = NULL;
    2718         Input  *new_input = NULL;
     2716        int         vertexpidlist[NUMVERTICES],control_init;
     2717
     2718
     2719        /*Get Domain type*/
     2720        int domaintype;
     2721        parameters->FindParam(&domaintype,DomainTypeEnum);
     2722
     2723        /*Specific case for depth averaged quantities*/
     2724        control_init=control_enum;
     2725        if(domaintype==Domain2DverticalEnum){
     2726                if(control_enum==MaterialsRheologyBbarEnum){
     2727                        control_enum=MaterialsRheologyBEnum;
     2728                        if(!IsOnBase()) return;
     2729                }
     2730                if(control_enum==DamageDbarEnum){
     2731                        control_enum=DamageDEnum;
     2732                        if(!IsOnBase()) return;
     2733                }
     2734        }
    27192735
    27202736        /*Get out if this is not an element input*/
     
    27252741
    27262742        /*Get values on vertices*/
    2727         for (int i=0;i<NUMVERTICES;i++){
     2743        for(int i=0;i<NUMVERTICES;i++){
    27282744                values[i]=vector[vertexpidlist[i]];
    27292745        }
    2730         new_input = new TriaInput(control_enum,values,P1Enum);
    2731 
    2732         input=(Input*)this->inputs->GetInput(control_enum);   _assert_(input);
    2733         if (input->ObjectEnum()!=ControlInputEnum){
     2746        Input* new_input = new TriaInput(control_enum,values,P1Enum);
     2747        Input* input     = (Input*)this->inputs->GetInput(control_enum);   _assert_(input);
     2748        if(input->ObjectEnum()!=ControlInputEnum){
    27342749                _error_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    27352750        }
  • issm/trunk-jpl/src/c/cores/control_core.cpp

    r18138 r18190  
    2222void control_core(FemModel* femmodel){/*{{{*/
    2323
    24         int     i;
    25 
    2624        /*parameters: */
    27         int        num_controls,nsize;
    28         int        nsteps;
    29         IssmDouble tol_cm;
    30         int        solution_type;
    31         bool       isFS;
    32         bool       dakota_analysis = false;
    33 
    34         int        *control_type   = NULL;
    35         int*        maxiter        = NULL;
    36         IssmDouble *cm_jump        = NULL;
    37 
    38         /*intermediary: */
    39         OptPars    optpars;
     25        int         num_controls,nsize,nsteps;
     26        int         solution_type;
     27        bool        isFS,dakota_analysis;
     28        int        *control_type  = NULL;
     29        int        *maxiter       = NULL;
     30        IssmDouble *cm_jump       = NULL;
     31        IssmDouble *J             = NULL;
    4032
    4133        /*Solution and Adjoint core pointer*/
    4234        void (*solutioncore)(FemModel*) = NULL;
    4335        void (*adjointcore)(FemModel*)  = NULL;
    44 
    45         /*output: */
    46         IssmDouble* J=NULL;
    4736
    4837        /*Recover parameters used throughout the solution*/
     
    5241        femmodel->parameters->FindParam(&maxiter,NULL,InversionMaxiterPerStepEnum);
    5342        femmodel->parameters->FindParam(&cm_jump,NULL,InversionStepThresholdEnum);
    54         femmodel->parameters->FindParam(&tol_cm,InversionCostFunctionThresholdEnum);
    5543        femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
    5644        femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum);
     
    7462
    7563        /*Initialize some of the BrentSearch arguments: */
     64        OptPars optpars;
    7665        optpars.xmin    = 0;
    7766        optpars.xmax    = 1;
     
    11099                #ifdef _HAVE_ADOLC_
    111100                IssmPDouble* J_passive=xNew<IssmPDouble>(nsteps);
    112                 for(i=0;i<nsteps;i++) J_passive[i]=reCast<IssmPDouble>(J[i]);
     101                for(int i=0;i<nsteps;i++) J_passive[i]=reCast<IssmPDouble>(J[i]);
    113102                femmodel->results->AddObject(new GenericExternalResult<IssmPDouble*>(femmodel->results->Size()+1,JEnum,J_passive,nsteps,1,1,0));
    114103                xDelete<IssmPDouble>(J_passive);
Note: See TracChangeset for help on using the changeset viewer.