Changeset 18190
- Timestamp:
- 06/26/14 10:27:52 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r18173 r18190 2879 2879 IssmDouble values[NUMVERTICES]; 2880 2880 int vertexpidlist[NUMVERTICES],control_init; 2881 Input *input = NULL;2882 Input *new_input = NULL;2883 2881 2884 2882 /*Specific case for depth averaged quantities*/ … … 2903 2901 values[i]=vector[vertexpidlist[i]]; 2904 2902 } 2905 new_input = new PentaInput(control_enum,values,P1Enum); 2906 input=(Input*)this->inputs->GetInput(control_enum); _assert_(input); 2907 2908 if (input->ObjectEnum()!=ControlInputEnum){ 2903 Input* new_input = new PentaInput(control_enum,values,P1Enum); 2904 Input* input=(Input*)this->inputs->GetInput(control_enum); _assert_(input); 2905 if(input->ObjectEnum()!=ControlInputEnum){ 2909 2906 _error_("input " << EnumToStringx(control_enum) << " is not a ControlInput"); 2910 2907 } -
issm/trunk-jpl/src/c/classes/Elements/Seg.cpp
r18078 r18190 102 102 *pxyz_front=xyz_front; 103 103 }/*}}}*/ 104 void Seg::NodalFunctionsP1(IssmDouble* basis, Gauss* gauss){/*{{{*/ 105 106 _assert_(gauss->Enum()==GaussSegEnum); 107 this->GetNodalFunctions(basis,(GaussSeg*)gauss,P1Enum); 108 109 } 110 /*}}}*/ 104 111 int Seg::GetNumberOfNodes(void){/*{{{*/ 105 112 return this->NumberofNodes(this->element_type); -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r18135 r18190 83 83 IssmDouble MinEdgeLength(IssmDouble* xyz_list){_error_("not implemented yet");}; 84 84 void NodalFunctions(IssmDouble* basis,Gauss* gauss); 85 void NodalFunctionsP1(IssmDouble* basis,Gauss* gauss) {_error_("not implemented yet");};85 void NodalFunctionsP1(IssmDouble* basis,Gauss* gauss); 86 86 void NodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");}; 87 87 void NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r18179 r18190 2714 2714 2715 2715 IssmDouble values[NUMVERTICES]; 2716 int vertexpidlist[NUMVERTICES]; 2717 Input *input = NULL; 2718 Input *new_input = NULL; 2716 int vertexpidlist[NUMVERTICES],control_init; 2717 2718 2719 /*Get Domain type*/ 2720 int domaintype; 2721 parameters->FindParam(&domaintype,DomainTypeEnum); 2722 2723 /*Specific case for depth averaged quantities*/ 2724 control_init=control_enum; 2725 if(domaintype==Domain2DverticalEnum){ 2726 if(control_enum==MaterialsRheologyBbarEnum){ 2727 control_enum=MaterialsRheologyBEnum; 2728 if(!IsOnBase()) return; 2729 } 2730 if(control_enum==DamageDbarEnum){ 2731 control_enum=DamageDEnum; 2732 if(!IsOnBase()) return; 2733 } 2734 } 2719 2735 2720 2736 /*Get out if this is not an element input*/ … … 2725 2741 2726 2742 /*Get values on vertices*/ 2727 for 2743 for(int i=0;i<NUMVERTICES;i++){ 2728 2744 values[i]=vector[vertexpidlist[i]]; 2729 2745 } 2730 new_input = new TriaInput(control_enum,values,P1Enum); 2731 2732 input=(Input*)this->inputs->GetInput(control_enum); _assert_(input); 2733 if (input->ObjectEnum()!=ControlInputEnum){ 2746 Input* new_input = new TriaInput(control_enum,values,P1Enum); 2747 Input* input = (Input*)this->inputs->GetInput(control_enum); _assert_(input); 2748 if(input->ObjectEnum()!=ControlInputEnum){ 2734 2749 _error_("input " << EnumToStringx(control_enum) << " is not a ControlInput"); 2735 2750 } -
issm/trunk-jpl/src/c/cores/control_core.cpp
r18138 r18190 22 22 void control_core(FemModel* femmodel){/*{{{*/ 23 23 24 int i;25 26 24 /*parameters: */ 27 int num_controls,nsize; 28 int nsteps; 29 IssmDouble tol_cm; 30 int solution_type; 31 bool isFS; 32 bool dakota_analysis = false; 33 34 int *control_type = NULL; 35 int* maxiter = NULL; 36 IssmDouble *cm_jump = NULL; 37 38 /*intermediary: */ 39 OptPars optpars; 25 int num_controls,nsize,nsteps; 26 int solution_type; 27 bool isFS,dakota_analysis; 28 int *control_type = NULL; 29 int *maxiter = NULL; 30 IssmDouble *cm_jump = NULL; 31 IssmDouble *J = NULL; 40 32 41 33 /*Solution and Adjoint core pointer*/ 42 34 void (*solutioncore)(FemModel*) = NULL; 43 35 void (*adjointcore)(FemModel*) = NULL; 44 45 /*output: */46 IssmDouble* J=NULL;47 36 48 37 /*Recover parameters used throughout the solution*/ … … 52 41 femmodel->parameters->FindParam(&maxiter,NULL,InversionMaxiterPerStepEnum); 53 42 femmodel->parameters->FindParam(&cm_jump,NULL,InversionStepThresholdEnum); 54 femmodel->parameters->FindParam(&tol_cm,InversionCostFunctionThresholdEnum);55 43 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 56 44 femmodel->parameters->FindParam(&isFS,FlowequationIsFSEnum); … … 74 62 75 63 /*Initialize some of the BrentSearch arguments: */ 64 OptPars optpars; 76 65 optpars.xmin = 0; 77 66 optpars.xmax = 1; … … 110 99 #ifdef _HAVE_ADOLC_ 111 100 IssmPDouble* J_passive=xNew<IssmPDouble>(nsteps); 112 for(i =0;i<nsteps;i++) J_passive[i]=reCast<IssmPDouble>(J[i]);101 for(int i=0;i<nsteps;i++) J_passive[i]=reCast<IssmPDouble>(J[i]); 113 102 femmodel->results->AddObject(new GenericExternalResult<IssmPDouble*>(femmodel->results->Size()+1,JEnum,J_passive,nsteps,1,1,0)); 114 103 xDelete<IssmPDouble>(J_passive);
Note:
See TracChangeset
for help on using the changeset viewer.