Changeset 27681


Ignore:
Timestamp:
04/05/23 12:43:53 (2 years ago)
Author:
Mathieu Morlighem
Message:

CHG: cleanup

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

Legend:

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

    r27626 r27681  
    2929        this->definitionenum = -1;
    3030        this->name = NULL;
    31         this->weights_enum = UNDEF;
    32         this->timepassedflag = false;
    3331}
    3432/*}}}*/
    35 Cfdragcoeffabsgrad::Cfdragcoeffabsgrad(char* in_name, int in_definitionenum, int in_weights_enum, bool in_timepassedflag){/*{{{*/
     33Cfdragcoeffabsgrad::Cfdragcoeffabsgrad(char* in_name, int in_definitionenum){/*{{{*/
    3634
    3735        this->definitionenum=in_definitionenum;
     
    3937        this->name              = xNew<char>(strlen(in_name)+1);
    4038        xMemCpy<char>(this->name,in_name,strlen(in_name)+1);
    41 
    42         this->weights_enum=in_weights_enum;
    43         this->timepassedflag=in_timepassedflag;
    4439}
    4540/*}}}*/
     
    5045/*Object virtual function resolutoin: */
    5146Object* Cfdragcoeffabsgrad::copy() {/*{{{*/
    52         Cfdragcoeffabsgrad* mf = new Cfdragcoeffabsgrad(this->name,this->definitionenum, this->weights_enum,this->timepassedflag);
     47        Cfdragcoeffabsgrad* mf = new Cfdragcoeffabsgrad(this->name,this->definitionenum);
    5348        return (Object*) mf;
    5449}
     
    6055void Cfdragcoeffabsgrad::Echo(void){/*{{{*/
    6156        _printf_(" Cfdragcoeffabsgrad: " << name << " " << this->definitionenum << "\n");
    62         _printf_("    weights_enum: " << weights_enum << " " << EnumToStringx(weights_enum) << "\n");
    63         _printf_("        timepassedflag: "<<timepassedflag<<"\n");
    6457}
    6558/*}}}*/
     
    7669        marshallhandle->call(this->definitionenum);
    7770        marshallhandle->call(this->name);
    78         marshallhandle->call(this->weights_enum);
    79         marshallhandle->call(this->timepassedflag);
    8071}
    8172/*}}}*/
     
    10495        for(Object* & object : femmodel->elements->objects){
    10596                Element* element=xDynamicCast<Element*>(object);
    106                 J+=this->Cfdragcoeffabsgrad_Calculation(element,weights_enum);
     97                J+=this->Cfdragcoeffabsgrad_Calculation(element);
    10798        }
    10899
     
    111102        J=J_sum;
    112103
    113         timepassedflag = true;
    114104        return J;
    115105}/*}}}*/
    116 IssmDouble Cfdragcoeffabsgrad::Cfdragcoeffabsgrad_Calculation(Element* element, int weights_enum){/*{{{*/
     106IssmDouble Cfdragcoeffabsgrad::Cfdragcoeffabsgrad_Calculation(Element* element){/*{{{*/
    117107
    118108        int        domaintype,numcomponents,frictionlaw;
  • issm/trunk-jpl/src/c/classes/Cfdragcoeffabsgrad.h

    r26918 r27681  
    1616        public:
    1717
    18                 int         definitionenum;
    19                 char*       name;
    20                 int         weights_enum;
    21                 bool                    timepassedflag;
     18                int   definitionenum;
     19                char *name;
    2220
    2321                /*Cfdragcoeffabsgrad constructors, destructors :*/
    2422                Cfdragcoeffabsgrad();
    25                 Cfdragcoeffabsgrad(char* in_name, int in_definitionenum, int in_weights_enum,  bool timepassedflag);
     23                Cfdragcoeffabsgrad(char* in_name, int in_definitionenum);
    2624                ~Cfdragcoeffabsgrad();
    2725
    2826                /*Object virtual function resolutoin: */
    29                 Object* copy();
    30                 void DeepEcho(void);
    31                 void Echo(void);
    32                 int Id(void);
    33                 void Marshall(MarshallHandle* marshallhandle);
    34                 int ObjectEnum(void);
     27                Object *copy();
     28                void    DeepEcho(void);
     29                void    Echo(void);
     30                int     Id(void);
     31                void    Marshall(MarshallHandle  *marshallhandle);
     32                int     ObjectEnum(void);
    3533
    3634                /*Definition virtual function resolutoin: */
    37                 int DefinitionEnum();
    38                 char* Name();
    39                 IssmDouble Response(FemModel* femmodel);
    40                 IssmDouble Cfdragcoeffabsgrad_Calculation(Element* element, int weights_enum);
     35                int         DefinitionEnum();
     36                char       *Name();
     37                IssmDouble  Response(FemModel                       *femmodel);
     38                IssmDouble  Cfdragcoeffabsgrad_Calculation(Element  *element);
    4139};
    4240#endif  /* _CFDRAGCOEFFABSGRAD_H_ */
  • issm/trunk-jpl/src/c/classes/Cflevelsetmisfit.cpp

    r26888 r27681  
    3030        this->name = NULL;
    3131        this->model_enum = UNDEF;
    32         this->observation_enum = UNDEF;
    33         this->weights_enum = UNDEF;
    3432        this->datatime=0.;
    3533        this->timepassedflag = false;
    3634}
    3735/*}}}*/
    38 Cflevelsetmisfit::Cflevelsetmisfit(char* in_name, int in_definitionenum, int in_model_enum, int in_observation_enum, int in_weights_enum, IssmDouble in_datatime, bool in_timepassedflag){/*{{{*/
     36Cflevelsetmisfit::Cflevelsetmisfit(char* in_name, int in_definitionenum, int in_model_enum, IssmDouble in_datatime, bool in_timepassedflag){/*{{{*/
    3937
    4038        this->definitionenum=in_definitionenum;
     
    4442
    4543        this->model_enum=in_model_enum;
    46         this->observation_enum=in_observation_enum;
    47         this->weights_enum=in_weights_enum;
    4844        this->datatime=in_datatime;
    4945        this->timepassedflag=in_timepassedflag;
     
    5652/*Object virtual function resolutoin: */
    5753Object* Cflevelsetmisfit::copy() {/*{{{*/
    58         Cflevelsetmisfit* mf = new Cflevelsetmisfit(this->name,this->definitionenum, this->model_enum,this->observation_enum,this->weights_enum,this->datatime,this->timepassedflag);
     54        Cflevelsetmisfit* mf = new Cflevelsetmisfit(this->name,this->definitionenum, this->model_enum,this->datatime,this->timepassedflag);
    5955        return (Object*) mf;
    6056}
     
    6763        _printf_(" Cflevelsetmisfit: " << name << " " << this->definitionenum << "\n");
    6864        _printf_("    model_enum: " << model_enum << " " << EnumToStringx(model_enum) << "\n");
    69         _printf_("    observation_enum: " << observation_enum << " " << EnumToStringx(observation_enum) << "\n");
    70         _printf_("    weights_enum: " << weights_enum << " " << EnumToStringx(weights_enum) << "\n");
    7165        _printf_("    datatime: " << datatime << "\n");
    7266        _printf_("        timepassedflag: "<<timepassedflag<<"\n");
     
    8680        marshallhandle->call(this->model_enum);
    8781        marshallhandle->call(this->name);
    88         marshallhandle->call(this->observation_enum);
    89         marshallhandle->call(this->weights_enum);
    9082        marshallhandle->call(this->datatime);
    9183        marshallhandle->call(this->timepassedflag);
     
    121113                 for(Object* & object : femmodel->elements->objects){
    122114                         Element* element=xDynamicCast<Element*>(object);
    123                          J+=this->Cflevelsetmisfit_Calculation(element,model_enum,observation_enum,weights_enum);
     115                         J+=this->Cflevelsetmisfit_Calculation(element,model_enum);
    124116                 }
    125117
     
    128120                 J=J_sum;
    129121
    130                  timepassedflag = true;
     122                 this->timepassedflag = true;
    131123                 return J;
    132124         }
     
    134126 }
    135127        /*}}}*/
    136 IssmDouble Cflevelsetmisfit::Cflevelsetmisfit_Calculation(Element* element, int model_enum, int observation_enum, int weights_enum){/*{{{*/
     128IssmDouble Cflevelsetmisfit::Cflevelsetmisfit_Calculation(Element* element, int model_enum){/*{{{*/
    137129
    138130        int        domaintype,numcomponents;
  • issm/trunk-jpl/src/c/classes/Cflevelsetmisfit.h

    r26918 r27681  
    1818                int         definitionenum;
    1919                int         model_enum;
    20                 char*       name;
    21                 int         observation_enum;
    22                 int         weights_enum;
    23                 IssmDouble      datatime;
    24                 bool                    timepassedflag;
     20                char       *name;
     21                IssmDouble  datatime;
     22                bool        timepassedflag;
    2523
    2624                /*Cflevelsetmisfit constructors, destructors :*/
    2725                Cflevelsetmisfit();
    28                 Cflevelsetmisfit(char* in_name, int in_definitionenum, int in_model_enum, int in_observation_enum, int in_weights_enum, IssmDouble in_datatime, bool timepassedflag);
     26                Cflevelsetmisfit(char* in_name, int in_definitionenum, int in_model_enum, IssmDouble in_datatime, bool timepassedflag);
    2927                ~Cflevelsetmisfit();
    3028
     
    4139                char* Name();
    4240                IssmDouble Response(FemModel* femmodel);
    43                 IssmDouble Cflevelsetmisfit_Calculation(Element* element, int model_enum, int observation_enum, int weights_enum);
     41                IssmDouble Cflevelsetmisfit_Calculation(Element* element, int model_enum);
    4442                IssmDouble Heaviside(IssmDouble x);
    4543};
  • issm/trunk-jpl/src/c/classes/Cfsurfacelogvel.h

    r26918 r27681  
    2727
    2828                /*Object virtual function resolutoin: */
    29                 Object* copy();
    30                 void DeepEcho(void);
    31                 void Echo(void);
    32                 int Id(void);
    33                 void Marshall(MarshallHandle* marshallhandle);
    34                 int ObjectEnum(void);
     29                Object *copy();
     30                void    DeepEcho(void);
     31                void    Echo(void);
     32                int     Id(void);
     33                void    Marshall(MarshallHandle  *marshallhandle);
     34                int     ObjectEnum(void);
    3535
    3636                /*Definition virtual function resolutoin: */
  • issm/trunk-jpl/src/c/classes/Cfsurfacesquare.cpp

    r26888 r27681  
    3030        this->name             = NULL;
    3131        this->model_enum       = UNDEF;
    32         this->observation_enum = UNDEF;
    33         this->weights_enum     = UNDEF;
    3432        this->datatime         = 0.;
    3533        this->timepassedflag   = false;
    3634}
    3735/*}}}*/
    38 Cfsurfacesquare::Cfsurfacesquare(char* in_name, int in_definitionenum, int in_model_enum, int in_observation_enum, int in_weights_enum, IssmDouble in_datatime, bool in_timepassedflag){/*{{{*/
     36Cfsurfacesquare::Cfsurfacesquare(char* in_name, int in_definitionenum, int in_model_enum, IssmDouble in_datatime, bool in_timepassedflag){/*{{{*/
    3937
    4038        this->definitionenum=in_definitionenum;
     
    4442
    4543        this->model_enum=in_model_enum;
    46         this->observation_enum=in_observation_enum;
    47         this->weights_enum=in_weights_enum;
    4844        this->datatime=in_datatime;
    4945        this->timepassedflag=in_timepassedflag;
     
    5753/*Object virtual function resolutoin: */
    5854Object* Cfsurfacesquare::copy() {/*{{{*/
    59         Cfsurfacesquare* mf = new Cfsurfacesquare(this->name,this->definitionenum, this->model_enum,this->observation_enum,this->weights_enum,this->datatime,this->timepassedflag);
     55        Cfsurfacesquare* mf = new Cfsurfacesquare(this->name,this->definitionenum, this->model_enum,this->datatime,this->timepassedflag);
    6056        return (Object*) mf;
    6157}
     
    6864        _printf_(" Cfsurfacesquare: " << name << " " << this->definitionenum << "\n");
    6965        _printf_("    model_enum: " << model_enum << " " << EnumToStringx(model_enum) << "\n");
    70         _printf_("    observation_enum: " << observation_enum << " " << EnumToStringx(observation_enum) << "\n");
    71         _printf_("    weights_enum: " << weights_enum << " " << EnumToStringx(weights_enum) << "\n");
    7266        _printf_("    datatime: " << datatime << "\n");
    7367        _printf_("        timepassedflag: "<<timepassedflag<<"\n");
     
    8478
    8579        marshallhandle->call(this->definitionenum);
    86         marshallhandle->call(this->local);
    8780        marshallhandle->call(this->model_enum);
    8881        marshallhandle->call(this->name);
    89         marshallhandle->call(this->observation_enum);
    90         marshallhandle->call(this->weights_enum);
    9182        marshallhandle->call(this->datatime);
    9283        marshallhandle->call(this->timepassedflag);
     
    124115                for(Object* & object : femmodel->elements->objects){
    125116                        Element* element=xDynamicCast<Element*>(object);
    126                         J+=this->Cfsurfacesquare_Calculation(element,model_enum,observation_enum,weights_enum);
     117                        J+=this->Cfsurfacesquare_Calculation(element,model_enum);
    127118                }
    128119
     
    138129}
    139130/*}}}*/
    140 IssmDouble Cfsurfacesquare::Cfsurfacesquare_Calculation(Element* element, int model_enum, int observation_enum, int weights_enum){/*{{{*/
     131IssmDouble Cfsurfacesquare::Cfsurfacesquare_Calculation(Element* element, int model_enum){/*{{{*/
    141132
    142133        int        domaintype,numcomponents;
  • issm/trunk-jpl/src/c/classes/Cfsurfacesquare.h

    r26918 r27681  
    1717
    1818                int         definitionenum;
    19                 int         local;     
    2019                int         model_enum;
    21                 char*       name;
    22                 int         observation_enum;
    23                 int         weights_enum;
    24                 IssmDouble      datatime;
    25                 bool                    timepassedflag;
     20                char       *name;
     21                IssmDouble  datatime;
     22                bool        timepassedflag;
    2623
    2724                /*Cfsurfacesquare constructors, destructors :*/
    2825                Cfsurfacesquare();
    29                 Cfsurfacesquare(char* in_name, int in_definitionenum, int in_model_enum, int in_observation_enum, int in_weights_enum, IssmDouble in_datatime, bool timepassedflag);
     26                Cfsurfacesquare(char* in_name, int in_definitionenum, int in_model_enum, IssmDouble in_datatime, bool timepassedflag);
    3027                ~Cfsurfacesquare();
    3128
    3229                /*Object virtual function resolutoin: */
    33                 Object* copy();
    34                 void DeepEcho(void);
    35                 void Echo(void);
    36                 int Id(void);
    37                 void Marshall(MarshallHandle* marshallhandle);
    38                 int ObjectEnum(void);
     30                Object *copy();
     31                void    DeepEcho(void);
     32                void    Echo(void);
     33                int     Id(void);
     34                void    Marshall(MarshallHandle  *marshallhandle);
     35                int     ObjectEnum(void);
    3936
    4037                /*Definition virtual function resolutoin: */
    41                 int DefinitionEnum();
    42                 char* Name();
    43                 IssmDouble Response(FemModel* femmodel);
    44                 IssmDouble Cfsurfacesquare_Calculation(Element* element, int model_enum, int observation_enum, int weights_enum);
     38                int         DefinitionEnum();
     39                char       *Name();
     40                IssmDouble  Response(FemModel                    *femmodel);
     41                IssmDouble  Cfsurfacesquare_Calculation(Element  *element, int model_enum);
    4542};
    4643#endif  /* _CFSURFACESQUARE_H_ */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp

    r27102 r27681  
    205205
    206206                                        /*First create a cfsurfacesquare object for that specific string (cfsurfacesquare_model_string_s[j]):*/
    207                                         output_definitions->AddObject(new Cfsurfacesquare(cfsurfacesquare_name_s[j],StringToEnumx(cfsurfacesquare_definitionstring_s[j]),StringToEnumx(cfsurfacesquare_model_string_s[j]),StringToEnumx(cfsurfacesquare_observation_string_s[j]),StringToEnumx(cfsurfacesquare_weights_string_s[j]),cfsurfacesquare_datatime_s[j],false));
     207                                        output_definitions->AddObject(new Cfsurfacesquare(cfsurfacesquare_name_s[j],StringToEnumx(cfsurfacesquare_definitionstring_s[j]),StringToEnumx(cfsurfacesquare_model_string_s[j]),cfsurfacesquare_datatime_s[j],false));
    208208
    209209                                        /*Now, for this particular cfsurfacesquare object, make sure we plug into the elements: the observation, and the weights.*/
     
    275275
    276276                                        /*First create a cfdragcoeffabsgrad object for that specific string (cfdragcoeffabsgrad_model_string_s[j]):*/
    277                                         output_definitions->AddObject(new Cfdragcoeffabsgrad(cfdragcoeffabsgrad_name_s[j],StringToEnumx(cfdragcoeffabsgrad_definitionstring_s[j]),StringToEnumx(cfdragcoeffabsgrad_weights_string_s[j]),false));
     277                                        output_definitions->AddObject(new Cfdragcoeffabsgrad(cfdragcoeffabsgrad_name_s[j],StringToEnumx(cfdragcoeffabsgrad_definitionstring_s[j])));
    278278
    279279                                        /*Now, for this particular cfdragcoeffabsgrad object, make sure we plug into the elements: the observation, and the weights.*/
     
    453453
    454454                                        /*First create a cflevelsetmisfit object for that specific string (cflevelsetmisfit_model_string_s[j]):*/
    455                                         output_definitions->AddObject(new Cflevelsetmisfit(cflevelsetmisfit_name_s[j],StringToEnumx(cflevelsetmisfit_definitionstring_s[j]),StringToEnumx(cflevelsetmisfit_model_string_s[j]),StringToEnumx(cflevelsetmisfit_observation_string_s[j]),StringToEnumx(cflevelsetmisfit_weights_string_s[j]),cflevelsetmisfit_datatime_s[j],false));
     455                                        output_definitions->AddObject(new Cflevelsetmisfit(cflevelsetmisfit_name_s[j],StringToEnumx(cflevelsetmisfit_definitionstring_s[j]),StringToEnumx(cflevelsetmisfit_model_string_s[j]),cflevelsetmisfit_datatime_s[j],false));
    456456
    457457                                        /*Now, for this particular cflevelsetmisfit object, make sure we plug into the elements: the observation, and the weights.*/
Note: See TracChangeset for help on using the changeset viewer.