Changeset 18522
- Timestamp:
- 09/16/14 08:21:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp
r18521 r18522 10 10 IssmDouble OutputDefinitionsResponsex(FemModel* femmodel,const char* output_string){ 11 11 12 Definition *definition = NULL;13 DataSet *output_definitions = NULL;14 IssmDouble return_value;15 16 12 /*Ok, go find the output definitions dataset in the parameters, where our responses are hiding: */ 17 output_definitions=((DataSetParam*)femmodel->parameters->FindParamObject(OutputdefinitionEnum))->value;13 DataSet* output_definitions=((DataSetParam*)femmodel->parameters->FindParamObject(OutputdefinitionEnum))->value; 18 14 19 15 /*Now, go through the output definitions, and retrieve the object which corresponds to our requested response, output_string: */ 20 16 for(int i=0;i<output_definitions->Size();i++){ 21 17 22 definition=xDynamicCast<Definition*>(output_definitions->GetObjectByOffset(i)); 18 //Definition* definition=xDynamicCast<Definition*>(output_definitions->GetObjectByOffset(i)); 19 Definition* definition=dynamic_cast<Definition*>(output_definitions->GetObjectByOffset(i)); 23 20 24 21 char* name = definition->Name(); 25 if 22 if(strcmp(name,output_string)==0){ 26 23 27 24 /*This is the object that we have been chasing for. compute the response and return: */ 28 return_value=definition->Response(femmodel);25 IssmDouble return_value=definition->Response(femmodel); 29 26 30 27 /*cleanup: */
Note:
See TracChangeset
for help on using the changeset viewer.