Changeset 27681
- Timestamp:
- 04/05/23 12:43:53 (2 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Cfdragcoeffabsgrad.cpp
r27626 r27681 29 29 this->definitionenum = -1; 30 30 this->name = NULL; 31 this->weights_enum = UNDEF;32 this->timepassedflag = false;33 31 } 34 32 /*}}}*/ 35 Cfdragcoeffabsgrad::Cfdragcoeffabsgrad(char* in_name, int in_definitionenum , int in_weights_enum, bool in_timepassedflag){/*{{{*/33 Cfdragcoeffabsgrad::Cfdragcoeffabsgrad(char* in_name, int in_definitionenum){/*{{{*/ 36 34 37 35 this->definitionenum=in_definitionenum; … … 39 37 this->name = xNew<char>(strlen(in_name)+1); 40 38 xMemCpy<char>(this->name,in_name,strlen(in_name)+1); 41 42 this->weights_enum=in_weights_enum;43 this->timepassedflag=in_timepassedflag;44 39 } 45 40 /*}}}*/ … … 50 45 /*Object virtual function resolutoin: */ 51 46 Object* 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); 53 48 return (Object*) mf; 54 49 } … … 60 55 void Cfdragcoeffabsgrad::Echo(void){/*{{{*/ 61 56 _printf_(" Cfdragcoeffabsgrad: " << name << " " << this->definitionenum << "\n"); 62 _printf_(" weights_enum: " << weights_enum << " " << EnumToStringx(weights_enum) << "\n");63 _printf_(" timepassedflag: "<<timepassedflag<<"\n");64 57 } 65 58 /*}}}*/ … … 76 69 marshallhandle->call(this->definitionenum); 77 70 marshallhandle->call(this->name); 78 marshallhandle->call(this->weights_enum);79 marshallhandle->call(this->timepassedflag);80 71 } 81 72 /*}}}*/ … … 104 95 for(Object* & object : femmodel->elements->objects){ 105 96 Element* element=xDynamicCast<Element*>(object); 106 J+=this->Cfdragcoeffabsgrad_Calculation(element ,weights_enum);97 J+=this->Cfdragcoeffabsgrad_Calculation(element); 107 98 } 108 99 … … 111 102 J=J_sum; 112 103 113 timepassedflag = true;114 104 return J; 115 105 }/*}}}*/ 116 IssmDouble Cfdragcoeffabsgrad::Cfdragcoeffabsgrad_Calculation(Element* element , int weights_enum){/*{{{*/106 IssmDouble Cfdragcoeffabsgrad::Cfdragcoeffabsgrad_Calculation(Element* element){/*{{{*/ 117 107 118 108 int domaintype,numcomponents,frictionlaw; -
issm/trunk-jpl/src/c/classes/Cfdragcoeffabsgrad.h
r26918 r27681 16 16 public: 17 17 18 int definitionenum; 19 char* name; 20 int weights_enum; 21 bool timepassedflag; 18 int definitionenum; 19 char *name; 22 20 23 21 /*Cfdragcoeffabsgrad constructors, destructors :*/ 24 22 Cfdragcoeffabsgrad(); 25 Cfdragcoeffabsgrad(char* in_name, int in_definitionenum , int in_weights_enum, bool timepassedflag);23 Cfdragcoeffabsgrad(char* in_name, int in_definitionenum); 26 24 ~Cfdragcoeffabsgrad(); 27 25 28 26 /*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); 35 33 36 34 /*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); 41 39 }; 42 40 #endif /* _CFDRAGCOEFFABSGRAD_H_ */ -
issm/trunk-jpl/src/c/classes/Cflevelsetmisfit.cpp
r26888 r27681 30 30 this->name = NULL; 31 31 this->model_enum = UNDEF; 32 this->observation_enum = UNDEF;33 this->weights_enum = UNDEF;34 32 this->datatime=0.; 35 33 this->timepassedflag = false; 36 34 } 37 35 /*}}}*/ 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){/*{{{*/36 Cflevelsetmisfit::Cflevelsetmisfit(char* in_name, int in_definitionenum, int in_model_enum, IssmDouble in_datatime, bool in_timepassedflag){/*{{{*/ 39 37 40 38 this->definitionenum=in_definitionenum; … … 44 42 45 43 this->model_enum=in_model_enum; 46 this->observation_enum=in_observation_enum;47 this->weights_enum=in_weights_enum;48 44 this->datatime=in_datatime; 49 45 this->timepassedflag=in_timepassedflag; … … 56 52 /*Object virtual function resolutoin: */ 57 53 Object* 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); 59 55 return (Object*) mf; 60 56 } … … 67 63 _printf_(" Cflevelsetmisfit: " << name << " " << this->definitionenum << "\n"); 68 64 _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");71 65 _printf_(" datatime: " << datatime << "\n"); 72 66 _printf_(" timepassedflag: "<<timepassedflag<<"\n"); … … 86 80 marshallhandle->call(this->model_enum); 87 81 marshallhandle->call(this->name); 88 marshallhandle->call(this->observation_enum);89 marshallhandle->call(this->weights_enum);90 82 marshallhandle->call(this->datatime); 91 83 marshallhandle->call(this->timepassedflag); … … 121 113 for(Object* & object : femmodel->elements->objects){ 122 114 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); 124 116 } 125 117 … … 128 120 J=J_sum; 129 121 130 t imepassedflag = true;122 this->timepassedflag = true; 131 123 return J; 132 124 } … … 134 126 } 135 127 /*}}}*/ 136 IssmDouble Cflevelsetmisfit::Cflevelsetmisfit_Calculation(Element* element, int model_enum , int observation_enum, int weights_enum){/*{{{*/128 IssmDouble Cflevelsetmisfit::Cflevelsetmisfit_Calculation(Element* element, int model_enum){/*{{{*/ 137 129 138 130 int domaintype,numcomponents; -
issm/trunk-jpl/src/c/classes/Cflevelsetmisfit.h
r26918 r27681 18 18 int definitionenum; 19 19 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; 25 23 26 24 /*Cflevelsetmisfit constructors, destructors :*/ 27 25 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); 29 27 ~Cflevelsetmisfit(); 30 28 … … 41 39 char* Name(); 42 40 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); 44 42 IssmDouble Heaviside(IssmDouble x); 45 43 }; -
issm/trunk-jpl/src/c/classes/Cfsurfacelogvel.h
r26918 r27681 27 27 28 28 /*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); 35 35 36 36 /*Definition virtual function resolutoin: */ -
issm/trunk-jpl/src/c/classes/Cfsurfacesquare.cpp
r26888 r27681 30 30 this->name = NULL; 31 31 this->model_enum = UNDEF; 32 this->observation_enum = UNDEF;33 this->weights_enum = UNDEF;34 32 this->datatime = 0.; 35 33 this->timepassedflag = false; 36 34 } 37 35 /*}}}*/ 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){/*{{{*/36 Cfsurfacesquare::Cfsurfacesquare(char* in_name, int in_definitionenum, int in_model_enum, IssmDouble in_datatime, bool in_timepassedflag){/*{{{*/ 39 37 40 38 this->definitionenum=in_definitionenum; … … 44 42 45 43 this->model_enum=in_model_enum; 46 this->observation_enum=in_observation_enum;47 this->weights_enum=in_weights_enum;48 44 this->datatime=in_datatime; 49 45 this->timepassedflag=in_timepassedflag; … … 57 53 /*Object virtual function resolutoin: */ 58 54 Object* 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); 60 56 return (Object*) mf; 61 57 } … … 68 64 _printf_(" Cfsurfacesquare: " << name << " " << this->definitionenum << "\n"); 69 65 _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");72 66 _printf_(" datatime: " << datatime << "\n"); 73 67 _printf_(" timepassedflag: "<<timepassedflag<<"\n"); … … 84 78 85 79 marshallhandle->call(this->definitionenum); 86 marshallhandle->call(this->local);87 80 marshallhandle->call(this->model_enum); 88 81 marshallhandle->call(this->name); 89 marshallhandle->call(this->observation_enum);90 marshallhandle->call(this->weights_enum);91 82 marshallhandle->call(this->datatime); 92 83 marshallhandle->call(this->timepassedflag); … … 124 115 for(Object* & object : femmodel->elements->objects){ 125 116 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); 127 118 } 128 119 … … 138 129 } 139 130 /*}}}*/ 140 IssmDouble Cfsurfacesquare::Cfsurfacesquare_Calculation(Element* element, int model_enum , int observation_enum, int weights_enum){/*{{{*/131 IssmDouble Cfsurfacesquare::Cfsurfacesquare_Calculation(Element* element, int model_enum){/*{{{*/ 141 132 142 133 int domaintype,numcomponents; -
issm/trunk-jpl/src/c/classes/Cfsurfacesquare.h
r26918 r27681 17 17 18 18 int definitionenum; 19 int local;20 19 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; 26 23 27 24 /*Cfsurfacesquare constructors, destructors :*/ 28 25 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); 30 27 ~Cfsurfacesquare(); 31 28 32 29 /*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); 39 36 40 37 /*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); 45 42 }; 46 43 #endif /* _CFSURFACESQUARE_H_ */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp
r27102 r27681 205 205 206 206 /*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)); 208 208 209 209 /*Now, for this particular cfsurfacesquare object, make sure we plug into the elements: the observation, and the weights.*/ … … 275 275 276 276 /*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]))); 278 278 279 279 /*Now, for this particular cfdragcoeffabsgrad object, make sure we plug into the elements: the observation, and the weights.*/ … … 453 453 454 454 /*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)); 456 456 457 457 /*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.