Changeset 17159
- Timestamp:
- 01/22/14 16:14:20 (11 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/EnumToAnalysis.cpp
r17075 r17159 36 36 case ExtrudeFromTopAnalysisEnum : return new ExtrudeFromTopAnalysis(); 37 37 case ThermalAnalysisEnum : return new ThermalAnalysis(); 38 case LevelsetAnalysisEnum : return new LevelsetAnalysis(); 38 case LevelsetAnalysisEnum : return new LevelsetAnalysis(); 39 case ExtrapolationAnalysisEnum : return new ExtrapolationAnalysis(); 39 40 #ifdef _HAVE_GIA_ 40 41 case GiaAnalysisEnum : return new GiaAnalysis(); -
issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.cpp
r17144 r17159 11 11 /*}}}*/ 12 12 void ExtrapolationAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/ 13 _error_("not implemented yet");13 //do nothing for now 14 14 } 15 15 /*}}}*/ … … 29 29 } 30 30 } 31 iomodel->FetchDataToInput(elements,ExtrapolationVariableEnum);//FIXME: is this the correct way?32 31 } 33 32 /*}}}*/ … … 38 37 /*}}}*/ 39 38 void ExtrapolationAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/ 40 41 _error_("not implemented yet"); 42 39 // do nothing for now 43 40 } 44 41 /*}}}*/ 45 42 void ExtrapolationAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 46 47 _error_("not implemented yet"); 48 43 // do nothing for now 49 44 }/*}}}*/ 50 45 … … 52 47 void ExtrapolationAnalysis::Core(FemModel* femmodel){/*{{{*/ 53 48 49 /* Intermediaries */ 50 bool save_results; 54 51 /*activate formulation: */ 55 52 femmodel->SetCurrentConfiguration(ExtrapolationAnalysisEnum); … … 58 55 UpdateConstraints(femmodel->elements); 59 56 solutionsequence_linear(femmodel); 57 58 /*recover parameters: */ 59 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 60 if(save_results){ 61 if(VerboseSolution()) _printf0_(" Warning: Adding extrapolated variable to results\n"); 62 63 int outputs; 64 femmodel->parameters->FindParam(&outputs, ExtrapolationVariableEnum); 65 femmodel->RequestedOutputsx(&femmodel->results,&outputs,1); 66 } 60 67 61 68 }/*}}}*/ … … 248 255 Node* node = NULL; 249 256 250 /* Get furtherparameters */257 /* Get parameters */ 251 258 element->FindParam(&extvar_enum, ExtrapolationVariableEnum); 252 259 253 260 Input* levelset_input=element->GetInput(MaskIceLevelsetEnum); _assert_(levelset_input); 254 261 Input* extvar_input=element->GetInput(extvar_enum); _assert_(extvar_input); 255 256 Gauss Penta* gauss=new GaussPenta();262 263 Gauss* gauss=element->NewGauss(); 257 264 for(int in=0;in<numnodes;in++){ 258 265 gauss->GaussNode(element->GetElementType(),in); 259 266 node=element->GetNode(in); 260 267 levelset_input->GetInputValue(&phi,gauss); 261 extvar_input->GetInputValue(&value,gauss);262 268 if(phi<=0.){ 263 269 /* if ice, set dirichlet BC */ 270 extvar_input->GetInputValue(&value,gauss); 264 271 node->ApplyConstraint(1,value); 265 272 } -
issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
r17156 r17159 60 60 void LevelsetAnalysis::Core(FemModel* femmodel){/*{{{*/ 61 61 62 #if !defined(_DEVELOP EMENT_)62 #if !defined(_DEVELOPMENT_) 63 63 _error_("Not implemented yet"); 64 64 #endif … … 66 66 /*parameters: */ 67 67 bool save_results; 68 69 /* extrapolate */ 70 Analysis* analysis = new ExtrapolationAnalysis(); 71 femmodel->parameters->SetParam(VxEnum,ExtrapolationVariableEnum); 72 analysis->Core(femmodel); 73 delete analysis; 68 74 69 75 /*activate formulation: */ -
issm/trunk-jpl/src/c/cores/AnalysisConfiguration.cpp
r17075 r17159 116 116 117 117 case TransientSolutionEnum: 118 numanalyses=1 3;118 numanalyses=14; 119 119 analyses=xNew<int>(numanalyses); 120 120 analyses[ 0]=StressbalanceAnalysisEnum; … … 131 131 analyses[11]=ExtrudeFromTopAnalysisEnum; 132 132 analyses[12]=LevelsetAnalysisEnum; 133 analyses[13]=ExtrapolationAnalysisEnum; 133 134 break; 134 135 -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
r17075 r17159 75 75 if(solution_enum==SteadystateSolutionEnum && analysis_enum==EnthalpyAnalysisEnum && isenthalpy==false) continue; 76 76 if(solution_enum==TransientSolutionEnum && analysis_enum==LevelsetAnalysisEnum && islevelset==false) continue; 77 if(solution_enum==TransientSolutionEnum && analysis_enum==ExtrapolationAnalysisEnum && islevelset==false) continue; 77 78 78 79 -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r17139 r17159 352 352 MeshdeformationSolutionEnum, 353 353 MeshdeformationAnalysisEnum, 354 LevelsetAnalysisEnum, 355 ExtrapolationAnalysisEnum, 354 356 /*}}}*/ 355 357 /*Approximations {{{*/ … … 674 676 /*}}}*/ 675 677 /*Levelset related enums (will be moved to appropriate place when finished){{{*/ 676 LevelsetAnalysisEnum,677 678 TransientIslevelsetEnum, 678 ExtrapolationAnalysisEnum,679 679 ExtrapolationVariableEnum, 680 680 /*}}}*/ -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r17139 r17159 353 353 case MeshdeformationSolutionEnum : return "MeshdeformationSolution"; 354 354 case MeshdeformationAnalysisEnum : return "MeshdeformationAnalysis"; 355 case LevelsetAnalysisEnum : return "LevelsetAnalysis"; 356 case ExtrapolationAnalysisEnum : return "ExtrapolationAnalysis"; 355 357 case ApproximationEnum : return "Approximation"; 356 358 case NoneApproximationEnum : return "NoneApproximation"; … … 633 635 case ArrheniusEnum : return "Arrhenius"; 634 636 case LliboutryDuvalEnum : return "LliboutryDuval"; 635 case LevelsetAnalysisEnum : return "LevelsetAnalysis";636 637 case TransientIslevelsetEnum : return "TransientIslevelset"; 637 case ExtrapolationAnalysisEnum : return "ExtrapolationAnalysis";638 638 case ExtrapolationVariableEnum : return "ExtrapolationVariable"; 639 639 case MaximumNumberOfDefinitionsEnum : return "MaximumNumberOfDefinitions"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r17139 r17159 359 359 else if (strcmp(name,"MeshdeformationSolution")==0) return MeshdeformationSolutionEnum; 360 360 else if (strcmp(name,"MeshdeformationAnalysis")==0) return MeshdeformationAnalysisEnum; 361 else if (strcmp(name,"LevelsetAnalysis")==0) return LevelsetAnalysisEnum; 362 else if (strcmp(name,"ExtrapolationAnalysis")==0) return ExtrapolationAnalysisEnum; 361 363 else if (strcmp(name,"Approximation")==0) return ApproximationEnum; 362 364 else if (strcmp(name,"NoneApproximation")==0) return NoneApproximationEnum; … … 381 383 else if (strcmp(name,"GenericParam")==0) return GenericParamEnum; 382 384 else if (strcmp(name,"AdolcParam")==0) return AdolcParamEnum; 383 else if (strcmp(name,"BoolInput")==0) return BoolInputEnum;384 else if (strcmp(name,"BoolParam")==0) return BoolParamEnum;385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"Contour")==0) return ContourEnum; 388 if (strcmp(name,"BoolInput")==0) return BoolInputEnum; 389 else if (strcmp(name,"BoolParam")==0) return BoolParamEnum; 390 else if (strcmp(name,"Contour")==0) return ContourEnum; 389 391 else if (strcmp(name,"ControlInput")==0) return ControlInputEnum; 390 392 else if (strcmp(name,"DatasetInput")==0) return DatasetInputEnum; … … 504 506 else if (strcmp(name,"Enthalpy")==0) return EnthalpyEnum; 505 507 else if (strcmp(name,"EnthalpyPicard")==0) return EnthalpyPicardEnum; 506 else if (strcmp(name,"ThicknessAbsGradient")==0) return ThicknessAbsGradientEnum;507 else if (strcmp(name,"ThicknessAlongGradient")==0) return ThicknessAlongGradientEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"ThicknessAcrossGradient")==0) return ThicknessAcrossGradientEnum; 511 if (strcmp(name,"ThicknessAbsGradient")==0) return ThicknessAbsGradientEnum; 512 else if (strcmp(name,"ThicknessAlongGradient")==0) return ThicknessAlongGradientEnum; 513 else if (strcmp(name,"ThicknessAcrossGradient")==0) return ThicknessAcrossGradientEnum; 512 514 else if (strcmp(name,"IntMatParam")==0) return IntMatParamEnum; 513 515 else if (strcmp(name,"RheologyBbarAbsGradient")==0) return RheologyBbarAbsGradientEnum; … … 627 629 else if (strcmp(name,"Verbose")==0) return VerboseEnum; 628 630 else if (strcmp(name,"TriangleInterp")==0) return TriangleInterpEnum; 629 else if (strcmp(name,"BilinearInterp")==0) return BilinearInterpEnum;630 else if (strcmp(name,"NearestInterp")==0) return NearestInterpEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"XY")==0) return XYEnum; 634 if (strcmp(name,"BilinearInterp")==0) return BilinearInterpEnum; 635 else if (strcmp(name,"NearestInterp")==0) return NearestInterpEnum; 636 else if (strcmp(name,"XY")==0) return XYEnum; 635 637 else if (strcmp(name,"XYZ")==0) return XYZEnum; 636 638 else if (strcmp(name,"Dense")==0) return DenseEnum; … … 648 650 else if (strcmp(name,"Arrhenius")==0) return ArrheniusEnum; 649 651 else if (strcmp(name,"LliboutryDuval")==0) return LliboutryDuvalEnum; 650 else if (strcmp(name,"LevelsetAnalysis")==0) return LevelsetAnalysisEnum;651 652 else if (strcmp(name,"TransientIslevelset")==0) return TransientIslevelsetEnum; 652 else if (strcmp(name,"ExtrapolationAnalysis")==0) return ExtrapolationAnalysisEnum;653 653 else if (strcmp(name,"ExtrapolationVariable")==0) return ExtrapolationVariableEnum; 654 654 else if (strcmp(name,"MaximumNumberOfDefinitions")==0) return MaximumNumberOfDefinitionsEnum; -
issm/trunk-jpl/src/m/enum/EnumDefinitions.py
r17139 r17159 345 345 def MeshdeformationSolutionEnum(): return StringToEnum("MeshdeformationSolution")[0] 346 346 def MeshdeformationAnalysisEnum(): return StringToEnum("MeshdeformationAnalysis")[0] 347 def LevelsetAnalysisEnum(): return StringToEnum("LevelsetAnalysis")[0] 348 def ExtrapolationAnalysisEnum(): return StringToEnum("ExtrapolationAnalysis")[0] 347 349 def ApproximationEnum(): return StringToEnum("Approximation")[0] 348 350 def NoneApproximationEnum(): return StringToEnum("NoneApproximation")[0] … … 625 627 def ArrheniusEnum(): return StringToEnum("Arrhenius")[0] 626 628 def LliboutryDuvalEnum(): return StringToEnum("LliboutryDuval")[0] 627 def LevelsetAnalysisEnum(): return StringToEnum("LevelsetAnalysis")[0]628 629 def TransientIslevelsetEnum(): return StringToEnum("TransientIslevelset")[0] 629 def ExtrapolationAnalysisEnum(): return StringToEnum("ExtrapolationAnalysis")[0]630 630 def ExtrapolationVariableEnum(): return StringToEnum("ExtrapolationVariable")[0] 631 631 def MaximumNumberOfDefinitionsEnum(): return StringToEnum("MaximumNumberOfDefinitions")[0]
Note:
See TracChangeset
for help on using the changeset viewer.