Changeset 13700
- Timestamp:
- 10/16/12 13:40:42 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r13699 r13700 318 318 ./modules/ConstraintsStatex/ConstraintsStatex.h\ 319 319 ./modules/ConstraintsStatex/ConstraintsStateLocal.h\ 320 ./modules/RequestedDependentsx/RequestedDependentsx.h\321 ./modules/RequestedDependentsx/RequestedDependentsx.cpp\322 320 ./modules/ResetConstraintsx/ResetConstraintsx.h\ 323 321 ./modules/ResetConstraintsx/ResetConstraintsx.cpp\ -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r13699 r13700 508 508 } 509 509 /*}}}*/ 510 void FemModel::RequestedDependentsx(void){/*{{{*/ 511 512 513 int i; 514 bool isautodiff = false; 515 IssmDouble output_value; 516 517 int num_dependents; 518 IssmPDouble *dependents; 519 DataSet* dependent_objects=NULL; 520 521 /*AD mode on?: */ 522 parameters->FindParam(&isautodiff,AutodiffIsautodiffEnum); 523 524 if(isautodiff){ 525 #ifdef _HAVE_ADOLC_ 526 parameters->FindParam(&num_dependents,AutodiffNumDependentsEnum); 527 parameters->FindParam(&dependent_objects,AutodiffDependentObjectsEnum); 528 if(num_dependents){ 529 dependents=xNew<IssmPDouble>(num_dependents); 530 531 /*Go through our dependent variables, and compute the response:*/ 532 for(i=0;i<dependent_objects->Size();i++){ 533 DependentObject* dep=(DependentObject*)dependent_objects->GetObjectByOffset(i); 534 dep->Responsex(&output_value,this); 535 output_value>>=dependents[i]; 536 } 537 } 538 delete dependent_objects; 539 #else 540 _error_("Should not be requesting dependents when an AD library is not available!"); 541 #endif 542 } 543 } 544 /*}}}*/ 510 545 #ifdef _HAVE_CONTROL_ 511 546 void FemModel::ThicknessAbsGradientx( IssmDouble* pJ, bool process_units, int weight_index){/*{{{*/ … … 537 572 } 538 573 /*}}}*/ 539 #endif540 541 #ifdef _HAVE_DAKOTA_542 574 void FemModel::CostFunctionx(IssmDouble* pJ){/*{{{*/ 543 575 … … 568 600 } 569 601 /*}}}*/ 602 #endif 603 604 #ifdef _HAVE_DAKOTA_ 570 605 void FemModel::DakotaResponsesx(double* d_responses,char** responses_descriptors,int numresponsedescriptors,int d_numresponses){/*{{{*/ 571 606 -
issm/trunk-jpl/src/c/classes/FemModel.h
r13699 r13700 64 64 /*Modules: {{{*/ 65 65 #ifdef _HAVE_DAKOTA_ 66 void CostFunctionx( IssmDouble* pJ);67 66 void DakotaResponsesx(double* d_responses,char** responses_descriptors,int numresponsedescriptors,int d_numresponses); 68 67 #endif 69 68 70 69 void RequestedOutputsx(int* requested_outputs, int numoutputs); 70 void RequestedDependentsx(void); 71 71 void Responsex(IssmDouble* presponse,int response_descriptor_enum,bool process_units,int weight_index); 72 72 void Responsex(IssmDouble* presponse,const char* response_descriptor,bool process_units,int weight_index); 73 73 #ifdef _HAVE_CONTROL_ 74 void CostFunctionx( IssmDouble* pJ); 74 75 void ThicknessAbsGradientx( IssmDouble* pJ, bool process_units,int weight_index); 75 76 #endif -
issm/trunk-jpl/src/c/modules/modules.h
r13699 r13700 98 98 #include "./Reducevectorgtosx/Reducevectorgtosx.h" 99 99 #include "./Reducevectorgtofx/Reducevectorgtofx.h" 100 #include "./RequestedDependentsx/RequestedDependentsx.h"101 100 #include "./ResetConstraintsx/ResetConstraintsx.h" 102 101 #include "./ResetCoordinateSystemx/ResetCoordinateSystemx.h" -
issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp
r13699 r13700 105 105 } 106 106 107 if(solution_type==DiagnosticSolutionEnum) RequestedDependentsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);107 if(solution_type==DiagnosticSolutionEnum)femmodel->RequestedDependentsx(); 108 108 109 109 /*Free ressources:*/ -
issm/trunk-jpl/src/c/solutions/prognostic_core.cpp
r13699 r13700 54 54 } 55 55 56 if(solution_type==PrognosticSolutionEnum) RequestedDependentsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);56 if(solution_type==PrognosticSolutionEnum)femmodel->RequestedDependentsx(); 57 57 58 58 /*Free ressources:*/ -
issm/trunk-jpl/src/c/solutions/transient_core.cpp
r13699 r13700 152 152 } 153 153 154 RequestedDependentsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);154 femmodel->RequestedDependentsx(); 155 155 156 156 /*Free ressources:*/
Note:
See TracChangeset
for help on using the changeset viewer.