Changeset 9594
- Timestamp:
- 09/02/11 16:10:21 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/solutions/CorePointerFromSolutionEnum.cpp
r9571 r9594 71 71 } 72 72 73 /*if control is being run on top of a solution, change core: */74 if(control_analysis){75 #ifdef _HAVE_TAO_76 //solutioncore=&controltao_core;77 solutioncore=&control_core;78 #else79 solutioncore=&control_core;80 #endif81 }82 83 if(dakota_analysis){84 #ifndef _HAVE_DAKOTA_85 _error_(" Dakota not present, cannot do qmu!");86 #endif87 }88 89 73 /*Assign output pointer:*/ 90 74 _assert_(psolutioncore); -
issm/trunk/src/c/solutions/issm.cpp
r9571 r9594 15 15 FILE *petscoptionsfid = NULL; 16 16 bool waitonlock = false; 17 bool dakota_analysis = false; 17 bool dakota_analysis; 18 bool control_analysis; 18 19 19 20 /*FemModel: */ … … 87 88 femmodel->parameters->FindParam(&waitonlock,WaitonlockEnum); 88 89 femmodel->parameters->FindParam(&dakota_analysis,DakotaAnalysisEnum); 90 femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum); 89 91 90 92 MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime(); … … 94 96 _printf_(true,"call computational core:\n"); 95 97 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 96 if(dakota_analysis) Dakotax(femmodel); 97 else solutioncore(femmodel); 98 if(dakota_analysis){ 99 Dakotax(femmodel); 100 } 101 else if(control_analysis){ 102 #ifdef _HAVE_TAO_ 103 //controltao_core(femmodel); 104 control_core(femmodel); 105 #else 106 control_core(femmodel); 107 #endif 108 } 109 else{ 110 solutioncore(femmodel); 111 } 98 112 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 99 113 -
issm/trunk/src/m/solutions/CorePointerFromSolutionEnum.m
r9571 r9594 4 4 % Usage: 5 5 % [solutioncore]=CorePointerFromSolutionEnum(parameters,solutiontype); 6 7 control_analysis=parameters.ControlAnalysis;8 dakota_analysis=parameters.DakotaAnalysis;9 6 10 7 switch solutiontype, … … 25 22 26 23 end 27 28 %if control being run on top of solution, change core29 if(control_analysis)solutioncore='control_core';end -
issm/trunk/src/m/solutions/control_core.m
r9580 r9594 28 28 29 29 %Get core from solution type 30 solutioncore=CorePointerFromSolutionEnum( solution_type);30 solutioncore=CorePointerFromSolutionEnum(femmodel.parameters,solution_type); 31 31 adjointcore=AdjointCorePointerFromSolutionEnum(solution_type); 32 32 -
issm/trunk/src/m/solutions/issm.m
r9571 r9594 23 23 %retrieve parameters 24 24 dakota_analysis=femmodel.parameters.DakotaAnalysis; 25 control_analysis=femmodel.parameters.ControlAnalysis; 25 26 26 27 %compute solution 27 28 28 issmprintf(VerboseSolution,'%s',['call computational core']); 29 29 if dakota_analysis, 30 30 Dakota(femmodel); 31 elseif control_analysis 32 femmodel=control_core(femmodel); 31 33 else 32 34 eval(['femmodel=' solutioncore '(femmodel);']);
Note:
See TracChangeset
for help on using the changeset viewer.