Changeset 823
- Timestamp:
- 06/05/09 15:14:47 (16 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/DataSet/DataSet.cpp
r804 r823 338 338 } 339 339 340 int DataSet::FindResult(Vec* presult,char* name){ 341 342 /*Go through a dataset, and find a Result* object 343 *whith result name is "name" : */ 344 345 vector<Object*>::iterator object; 346 Result* result=NULL; 347 348 int found=0; 349 350 for ( object=objects.begin() ; object < objects.end(); object++ ){ 351 352 /*Find param type objects: */ 353 if((*object)->Enum()==ResultEnum()){ 354 355 /*Ok, this object is a result,recover it and ask which name it has: */ 356 result=(Result*)(*object); 357 358 if (strcmp(result->GetFieldName(),name)==0){ 359 /*Ok, this is the one! Recover the value of this result: */ 360 result->GetField(presult); 361 found=1; 362 break; 363 } 364 } 365 } 366 return found; 367 } 368 340 369 int DataSet::FindResult(void* pvalue, char* name){ 341 370 -
issm/trunk/src/c/DataSet/DataSet.h
r804 r823 44 44 int Size(); 45 45 int FindParam(void* pvalue, char* name); 46 int FindResult(Vec* presult,char* name); 46 47 Object* FindParamObject(char* name); 47 48 void NodeRank(int* ranks); -
issm/trunk/src/c/Makefile.am
r816 r823 557 557 ./parallel/ProcessResults.cpp\ 558 558 ./parallel/prognostic_core.cpp\ 559 ./parallel/transient_core.cpp\ 560 ./parallel/transient_core_2d.cpp\ 561 ./parallel/transient_core_3d.cpp\ 559 562 ./parallel/qmu.cpp\ 560 563 ./parallel/DakotaResponses.cpp\ … … 567 570 bin_PROGRAMS = 568 571 else 569 bin_PROGRAMS = diagnostic.exe control.exe thermal.exe prognostic.exe 572 bin_PROGRAMS = diagnostic.exe control.exe thermal.exe prognostic.exe transient.exe 570 573 endif 571 574 … … 584 587 prognostic_exe_CXXFLAGS= -fPIC -D_PARALLEL_ 585 588 589 transient_exe_SOURCES = parallel/transient.cpp 590 transient_exe_CXXFLAGS= -fPIC -D_PARALLEL_ 591 -
issm/trunk/src/c/ModelProcessorx/Prognostic/CreateParametersPrognostic.cpp
r765 r823 26 26 double* pressure=NULL; 27 27 double* thickness=NULL; 28 double* surface=NULL; 29 double* bed=NULL; 28 30 double* accumulation=NULL; 29 31 double* melting=NULL; … … 68 70 xfree((void**)&thickness); 69 71 72 /*Get surface: */ 73 ModelFetchData((void**)&surface,NULL,NULL,model_handle,"surface","Matrix","Mat"); 74 75 count++; 76 param= new Param(count,"s_g",DOUBLEVEC); 77 if(surface) param->SetDoubleVec(surface,model->numberofnodes,1); 78 else param->SetDoubleVec(surface,0,0); 79 parameters->AddObject(param); 80 81 /*Free surface: */ 82 xfree((void**)&surface); 83 84 /*Get bed: */ 85 ModelFetchData((void**)&bed,NULL,NULL,model_handle,"bed","Matrix","Mat"); 86 87 count++; 88 param= new Param(count,"b_g",DOUBLEVEC); 89 if(bed) param->SetDoubleVec(bed,model->numberofnodes,1); 90 else param->SetDoubleVec(bed,0,0); 91 parameters->AddObject(param); 92 93 /*Free bed: */ 94 xfree((void**)&bed); 95 96 70 97 /*Get melting: */ 71 98 ModelFetchData((void**)&melting,NULL,NULL,model_handle,"melting","Matrix","Mat"); … … 93 120 94 121 95 96 97 122 /*Assign output pointer: */ 98 123 *pparameters=parameters; -
issm/trunk/src/c/objects/Result.cpp
r803 r823 196 196 197 197 void Result::GetField(Vec* pfield){ 198 *pfield=field; 198 199 VecDuplicatePatch(pfield,field); 200 199 201 } 200 202 201 203 void Result::GetField(double** pfield){ 202 *pfield=dfield; 204 *pfield=(double*)xmalloc(size*sizeof(double)); 205 memcpy(*pfield,dfield,size*sizeof(double)); 203 206 } 204 207 -
issm/trunk/src/c/parallel/SpawnCore.cpp
r805 r823 144 144 145 145 if(debug)_printf_("Starting transient core\n"); 146 t hrow ErrorException(__FUNCT__,"not supported yet!");146 transient_core(results,femmodels,inputs); 147 147 148 148 } -
issm/trunk/src/c/parallel/parallel.h
r804 r823 19 19 void diagnostic_core_nonlinear(Vec* pug,Mat* pK_ff0,Mat* pK_fs0, FemModel* fem,ParameterInputs* inputs,int analysis_type,int sub_analysis_type); 20 20 void diagnostic_core_linear(Vec* ppg,FemModel* fem,ParameterInputs* inputs,int analysis_type,int sub_analysis_type); 21 22 void transient_core(DataSet* results,FemModel* fems, ParameterInputs* inputs); 23 void transient_core_2d(DataSet* results,FemModel* fems, ParameterInputs* inputs); 24 void transient_core_3d(DataSet* results,FemModel* fems, ParameterInputs* inputs); 21 25 22 26 //int GradJOrth(WorkspaceParams* workspaceparams); -
issm/trunk/src/m/solutions/cielo/transient2d.m
r816 r823 33 33 solution.p_g=[]; 34 34 solution.h_g=m_p.parameters.h_g; 35 solution.s_g=m d.surface;36 solution.b_g=m d.bed;35 solution.s_g=m_p.parameters.s_g; 36 solution.b_g=m_p.parameters.b_g; 37 37 38 38 %initialize inputs
Note:
See TracChangeset
for help on using the changeset viewer.