- Timestamp:
- 08/02/12 17:13:12 (13 years ago)
- Location:
- issm/branches/trunk-jpl-damage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-jpl-damage ¶
- Property svn:mergeinfo changed
-
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Inputs.cpp ¶
r10522 r12878 4 4 */ 5 5 6 /*Headers: {{{ 1*/6 /*Headers: {{{*/ 7 7 #ifdef HAVE_CONFIG_H 8 8 #include <config.h> … … 25 25 26 26 /*Object constructors and destructor*/ 27 /*FUNCTION Inputs::Inputs(){{{ 1*/27 /*FUNCTION Inputs::Inputs(){{{*/ 28 28 Inputs::Inputs(){ 29 29 return; 30 30 } 31 31 /*}}}*/ 32 /*FUNCTION Inputs::~Inputs(){{{ 1*/32 /*FUNCTION Inputs::~Inputs(){{{*/ 33 33 Inputs::~Inputs(){ 34 34 return; … … 37 37 38 38 /*Object management*/ 39 /*FUNCTION Inputs::GetInputValue(bool* pvalue,int enum-type){{{ 1*/39 /*FUNCTION Inputs::GetInputValue(bool* pvalue,int enum-type){{{*/ 40 40 void Inputs::GetInputValue(bool* pvalue,int enum_type){ 41 41 … … 57 57 /*we could not find an input with the correct enum type. No defaults values were provided, 58 58 * error out: */ 59 _error _("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));59 _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")"); 60 60 } 61 61 … … 65 65 } 66 66 /*}}}*/ 67 /*FUNCTION Inputs::GetInputValue(int* pvalue,int enum-type){{{ 1*/67 /*FUNCTION Inputs::GetInputValue(int* pvalue,int enum-type){{{*/ 68 68 void Inputs::GetInputValue(int* pvalue,int enum_type){ 69 69 … … 85 85 /*we could not find an input with the correct enum type. No defaults values were provided, 86 86 * error out: */ 87 _error _("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));87 _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")"); 88 88 } 89 89 … … 93 93 } 94 94 /*}}}*/ 95 /*FUNCTION Inputs::GetInputValue( double* pvalue,int enum-type){{{1*/96 void Inputs::GetInputValue( double* pvalue,int enum_type){95 /*FUNCTION Inputs::GetInputValue(IssmDouble* pvalue,int enum-type){{{*/ 96 void Inputs::GetInputValue(IssmDouble* pvalue,int enum_type){ 97 97 98 98 vector<Object*>::iterator object; … … 113 113 /*we could not find an input with the correct enum type. No defaults values were provided, 114 114 * error out: */ 115 _error _("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));115 _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")"); 116 116 } 117 117 … … 121 121 } 122 122 /*}}}*/ 123 /*FUNCTION Inputs::GetInputAverage{{{ 1*/124 void Inputs::GetInputAverage( double* pvalue,int enum_type){123 /*FUNCTION Inputs::GetInputAverage{{{*/ 124 void Inputs::GetInputAverage(IssmDouble* pvalue,int enum_type){ 125 125 126 126 vector<Object*>::iterator object; … … 141 141 /*we could not find an input with the correct enum type. No defaults values were provided, 142 142 * error out: */ 143 _error _("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));143 _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")"); 144 144 } 145 145 … … 149 149 } 150 150 /*}}}*/ 151 /*FUNCTION Inputs::AddInput{{{ 1*/151 /*FUNCTION Inputs::AddInput{{{*/ 152 152 int Inputs::AddInput(Input* in_input){ 153 153 … … 175 175 } 176 176 /*}}}*/ 177 /*FUNCTION Inputs::ChangeEnum{{{ 1*/177 /*FUNCTION Inputs::ChangeEnum{{{*/ 178 178 void Inputs::ChangeEnum(int oldenumtype,int newenumtype){ 179 179 … … 205 205 } 206 206 /*}}}*/ 207 /*FUNCTION Inputs::ConstrainMin{{{ 1*/208 void Inputs::ConstrainMin(int constrain_enum, double minimum){207 /*FUNCTION Inputs::ConstrainMin{{{*/ 208 void Inputs::ConstrainMin(int constrain_enum, IssmDouble minimum){ 209 209 210 210 Input* constrain_input=NULL; … … 213 213 214 214 /*some checks: */ 215 if(!constrain_input) _error _(" input %s could not be found!",EnumToStringx(constrain_enum));215 if(!constrain_input) _error2_("input " << EnumToStringx(constrain_enum) << " could not be found!"); 216 216 217 217 /*Apply ContrainMin: */ … … 219 219 } 220 220 /*}}}*/ 221 /*FUNCTION Inputs::InfinityNorm{{{ 1*/222 double Inputs::InfinityNorm(int enumtype){223 224 /*Output*/ 225 double norm;221 /*FUNCTION Inputs::InfinityNorm{{{*/ 222 IssmDouble Inputs::InfinityNorm(int enumtype){ 223 224 /*Output*/ 225 IssmDouble norm; 226 226 227 227 /*Get input*/ … … 240 240 } 241 241 /*}}}*/ 242 /*FUNCTION Inputs::Max{{{ 1*/243 double Inputs::Max(int enumtype){244 245 /*Output*/ 246 double max;242 /*FUNCTION Inputs::Max{{{*/ 243 IssmDouble Inputs::Max(int enumtype){ 244 245 /*Output*/ 246 IssmDouble max; 247 247 248 248 /*Get input*/ … … 254 254 } 255 255 else{ 256 _error _("Input %s not found",EnumToStringx(enumtype));256 _error2_("Input " << EnumToStringx(enumtype) << " not found"); 257 257 } 258 258 … … 261 261 } 262 262 /*}}}*/ 263 /*FUNCTION Inputs::MaxAbs{{{ 1*/264 double Inputs::MaxAbs(int enumtype){265 266 /*Output*/ 267 double max;263 /*FUNCTION Inputs::MaxAbs{{{*/ 264 IssmDouble Inputs::MaxAbs(int enumtype){ 265 266 /*Output*/ 267 IssmDouble max; 268 268 269 269 /*Get input*/ … … 275 275 } 276 276 else{ 277 _error _("Input %s not found",EnumToStringx(enumtype));277 _error2_("Input " << EnumToStringx(enumtype) << " not found"); 278 278 } 279 279 … … 282 282 } 283 283 /*}}}*/ 284 /*FUNCTION Inputs::Min{{{ 1*/285 double Inputs::Min(int enumtype){286 287 /*Output*/ 288 double min;284 /*FUNCTION Inputs::Min{{{*/ 285 IssmDouble Inputs::Min(int enumtype){ 286 287 /*Output*/ 288 IssmDouble min; 289 289 290 290 /*Get input*/ … … 296 296 } 297 297 else{ 298 _error _("Input %s not found",EnumToStringx(enumtype));298 _error2_("Input " << EnumToStringx(enumtype) << " not found"); 299 299 } 300 300 … … 303 303 } 304 304 /*}}}*/ 305 /*FUNCTION Inputs::MinAbs{{{ 1*/306 double Inputs::MinAbs(int enumtype){307 308 /*Output*/ 309 double min;305 /*FUNCTION Inputs::MinAbs{{{*/ 306 IssmDouble Inputs::MinAbs(int enumtype){ 307 308 /*Output*/ 309 IssmDouble min; 310 310 311 311 /*Get input*/ … … 317 317 } 318 318 else{ 319 _error _("Input %s not found",EnumToStringx(enumtype));319 _error2_("Input " << EnumToStringx(enumtype) << " not found"); 320 320 } 321 321 … … 324 324 } 325 325 /*}}}*/ 326 /*FUNCTION Inputs::GetInput{{{ 1*/326 /*FUNCTION Inputs::GetInput{{{*/ 327 327 Input* Inputs::GetInput(int enum_name){ 328 328 … … 341 341 } 342 342 /*}}}*/ 343 /*FUNCTION Inputs::DeleteInput{{{ 1*/343 /*FUNCTION Inputs::DeleteInput{{{*/ 344 344 int Inputs::DeleteInput(int enum_type){ 345 345 … … 361 361 } 362 362 /*}}}*/ 363 /*FUNCTION Inputs::DuplicateInput{{{ 1*/363 /*FUNCTION Inputs::DuplicateInput{{{*/ 364 364 void Inputs::DuplicateInput(int original_enum,int new_enum){ 365 365 … … 369 369 /*Make a copy of the original input: */ 370 370 original=(Input*)this->GetInput(original_enum); 371 if(!original)_error _("could not find input with enum: %s",EnumToStringx(original_enum));371 if(!original)_error2_("could not find input with enum: " << EnumToStringx(original_enum)); 372 372 copy=(Input*)original->copy(); 373 373 … … 379 379 } 380 380 /*}}}*/ 381 /*FUNCTION Inputs::SpawnTriaInputs{{{ 1*/381 /*FUNCTION Inputs::SpawnTriaInputs{{{*/ 382 382 Inputs* Inputs::SpawnTriaInputs(int* indices){ 383 383 … … 405 405 } 406 406 /*}}}*/ 407 /*FUNCTION Inputs::AXPY{{{ 1*/408 void Inputs::AXPY(int MeshYEnum, double scalar, int MeshXEnum){407 /*FUNCTION Inputs::AXPY{{{*/ 408 void Inputs::AXPY(int MeshYEnum, IssmDouble scalar, int MeshXEnum){ 409 409 410 410 Input* xinput=NULL; … … 416 416 417 417 /*some checks: */ 418 if(!xinput) _error _(" input %s could not be found!",EnumToStringx(MeshXEnum));419 if(!yinput) _error _(" input %s could not be found!",EnumToStringx(MeshYEnum));418 if(!xinput) _error2_("input " << EnumToStringx(MeshXEnum) << " could not be found!"); 419 if(!yinput) _error2_("input " << EnumToStringx(MeshYEnum) << " could not be found!"); 420 420 421 421 /*Apply AXPY: */ … … 423 423 } 424 424 /*}}}*/ 425 /*FUNCTION Inputs::Configure{{{ 1*/425 /*FUNCTION Inputs::Configure{{{*/ 426 426 void Inputs::Configure(Parameters* parameters){ 427 427
Note:
See TracChangeset
for help on using the changeset viewer.