Changeset 5578
- Timestamp:
- 08/25/10 15:56:38 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 3 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Makefile.am
r5574 r5578 469 469 ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h\ 470 470 ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp\ 471 ./modules/InputArtificialNoisex/InputArtificialNoisex.h\ 472 ./modules/InputArtificialNoisex/InputArtificialNoisex.cpp\ 471 473 ./modules/UpdateGeometryx/UpdateGeometryx.h\ 472 474 ./modules/UpdateGeometryx/UpdateGeometryx.cpp\ … … 1020 1022 ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h\ 1021 1023 ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp\ 1024 ./modules/InputArtificialNoisex/InputArtificialNoisex.h\ 1025 ./modules/InputArtificialNoisex/InputArtificialNoisex.cpp\ 1022 1026 ./modules/UpdateGeometryx/UpdateGeometryx.h\ 1023 1027 ./modules/UpdateGeometryx/UpdateGeometryx.cpp\ -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r5196 r5578 43 43 parameters->AddObject(new DoubleParam(EpsRelEnum,iomodel->eps_rel)); 44 44 parameters->AddObject(new DoubleParam(EpsAbsEnum,iomodel->eps_abs)); 45 parameters->AddObject(new IntParam(MaxNonlinearIterationsEnum, iomodel->max_nonlinear_iterations));45 parameters->AddObject(new IntParam(MaxNonlinearIterationsEnum,(IssmInt)iomodel->max_nonlinear_iterations)); 46 46 parameters->AddObject(new DoubleParam(EpsVelEnum,iomodel->epsvel)); 47 47 parameters->AddObject(new DoubleParam(YtsEnum,iomodel->yts)); -
issm/trunk/src/c/modules/modules.h
r5478 r5578 42 42 #include "./InputUpdateFromVectorx/InputUpdateFromVectorx.h" 43 43 #include "./InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h" 44 #include "./InputArtificialNoisex/InputArtificialNoisex.h" 44 45 #include "./MassFluxx/MassFluxx.h" 45 46 #include "./MaxAbsVxx/MaxAbsVxx.h" -
issm/trunk/src/c/objects/Elements/Element.h
r5518 r5578 77 77 virtual void GetVectorFromInputs(Vec vector,int NameEnum)=0; 78 78 virtual void InputControlUpdate(double scalar,bool save_parameter)=0; 79 virtual void InputArtificialNoise(int enum_type,double min,double max)=0; 79 80 virtual bool InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums)=0; 80 81 virtual void AverageOntoPartition(Vec partition_contributions,Vec partition_areas,double* vertex_response,double* qmu_part)=0; -
issm/trunk/src/c/objects/Elements/Penta.cpp
r5547 r5578 1255 1255 if (IsInput(original_enum)) inputs->DuplicateInput(original_enum,new_enum); 1256 1256 1257 } 1258 /*}}}*/ 1259 /*FUNCTION Penta::InputArtificialNoise{{{1*/ 1260 void Penta::InputArtificialNoise(int enum_type,double min,double max){ 1261 1262 Input* input=NULL; 1263 1264 /*Make a copy of the original input: */ 1265 input=(Input*)this->inputs->GetInput(enum_type); 1266 if(!input)ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type)); 1267 1268 /*ArtificialNoise: */ 1269 input->ArtificialNoise(min,max); 1257 1270 } 1258 1271 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Penta.h
r5518 r5578 91 91 void GradjDrag(Vec gradient); 92 92 void InputControlUpdate(double scalar,bool save_parameter); 93 void InputArtificialNoise(int enum_type,double min, double max); 93 94 bool InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums); 94 95 void InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum=ElementsEnum); -
issm/trunk/src/c/objects/Elements/Tria.cpp
r5571 r5578 1526 1526 /*Scale: */ 1527 1527 input->Scale(scale_factor); 1528 } 1529 /*}}}*/ 1530 /*FUNCTION Tria::InputArtificialNoise{{{1*/ 1531 void Tria::InputArtificialNoise(int enum_type,double min,double max){ 1532 1533 Input* input=NULL; 1534 1535 /*Make a copy of the original input: */ 1536 input=(Input*)this->inputs->GetInput(enum_type); 1537 if(!input)ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type)); 1538 1539 /*ArtificialNoise: */ 1540 input->ArtificialNoise(min,max); 1528 1541 } 1529 1542 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Tria.h
r5518 r5578 88 88 void GradjDhDt(Vec gradient); 89 89 void InputControlUpdate(double scalar,bool save_parameter); 90 void InputArtificialNoise(int enum_type,double min, double max); 90 91 bool InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums); 91 92 void InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum=ElementsEnum); -
issm/trunk/src/c/objects/Inputs/BoolInput.h
r5513 r5578 62 62 double InfinityNorm(void){ISSMERROR("InfinityNorm not implemented for booleans");}; 63 63 void Scale(double scale_factor); 64 void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");}; 64 65 void AXPY(Input* xinput,double scalar); 65 66 void Constrain(double cm_min, double cm_max); -
issm/trunk/src/c/objects/Inputs/DoubleInput.h
r5513 r5578 60 60 void ConstrainMin(double minimum); 61 61 void Scale(double scale_factor); 62 void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");}; 62 63 void AXPY(Input* xinput,double scalar); 63 64 void Constrain(double cm_min, double cm_max); -
issm/trunk/src/c/objects/Inputs/Input.h
r5513 r5578 41 41 virtual double InfinityNorm(void)=0; 42 42 virtual void Scale(double scale_factor)=0; 43 virtual void ArtificialNoise(double min,double max)=0; 43 44 virtual void AXPY(Input* xinput,double scalar)=0; 44 45 virtual void Constrain(double cm_min, double cm_max)=0; -
issm/trunk/src/c/objects/Inputs/IntInput.h
r5513 r5578 61 61 void ConstrainMin(double minimum){ISSMERROR("not implemented yet");}; 62 62 void Scale(double scale_factor); 63 void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");}; 63 64 void AXPY(Input* xinput,double scalar); 64 65 void Constrain(double cm_min, double cm_max); -
issm/trunk/src/c/objects/Inputs/PentaVertexInput.h
r5513 r5578 62 62 void ConstrainMin(double minimum); 63 63 void Scale(double scale_factor); 64 void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");}; 64 65 void AXPY(Input* xinput,double scalar); 65 66 void Constrain(double cm_min, double cm_max); -
issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp
r5529 r5578 310 310 } 311 311 /*}}}*/ 312 /*FUNCTION TriaVertexInput::ArtificialNoise{{{1*/ 313 void TriaVertexInput::ArtificialNoise(double min,double max){ 314 315 int i; 316 const int numgrids=3; 317 double noise; 318 319 /*Compute random number between bounds: 320 * rand() outputs an integer in [0 RAND_MAX] 321 * (double)rand()/RAND_MAX is in [0 1] 322 */ 323 noise=min+(max-min)*(double)rand()/RAND_MAX; 324 325 for(i=0;i<numgrids;i++)values[i]=values[i]+noise; 326 } 327 /*}}}*/ 312 328 /*FUNCTION TriaVertexInput::AXPY{{{1*/ 313 329 void TriaVertexInput::AXPY(Input* xinput,double scalar){ -
issm/trunk/src/c/objects/Inputs/TriaVertexInput.h
r5513 r5578 62 62 void ConstrainMin(double minimum); 63 63 void Scale(double scale_factor); 64 void ArtificialNoise(double min,double max); 64 65 void AXPY(Input* xinput,double scalar); 65 66 void Constrain(double cm_min, double cm_max); -
issm/trunk/src/c/objects/Loads/Numericalflux.cpp
r5456 r5578 472 472 473 473 UdotN=vx*normal[0]+vy*normal[1]; 474 if (fabs(UdotN)<1.0e-9 && analysis_type==BalancedthicknessAnalysisEnum) printf("Edge number %i has a flux very small (u.n = %g ), which could lead to unaccurate results\n",id,UdotN);474 // if (fabs(UdotN)<1.0e-9 && analysis_type==BalancedthicknessAnalysisEnum) printf("Edge number %i has a flux very small (u.n = %g ), which could lead to unaccurate results\n",id,UdotN); 475 475 476 476 /*Get L and B: */ -
issm/trunk/src/c/objects/Node.cpp
r5557 r5578 83 83 if (iomodel->gridoniceshelf) this->inputs->AddInput(new BoolInput(NodeOnIceShelfEnum,(IssmBool)iomodel->gridoniceshelf[io_index])); 84 84 if (iomodel->gridonicesheet) this->inputs->AddInput(new BoolInput(NodeOnIceSheetEnum,(IssmBool)iomodel->gridonicesheet[io_index])); 85 if (iomodel->numbernodetoelementconnectivity) this->inputs->AddInput(new IntInput(NumberNodeToElementConnectivityEnum, iomodel->numbernodetoelementconnectivity[io_index]));86 if (analysis_type==DiagnosticHorizAnalysisEnum) this->inputs->AddInput(new IntInput(ApproximationEnum, iomodel->vertices_type[io_index]));85 if (iomodel->numbernodetoelementconnectivity) this->inputs->AddInput(new IntInput(NumberNodeToElementConnectivityEnum,(IssmInt)iomodel->numbernodetoelementconnectivity[io_index])); 86 if (analysis_type==DiagnosticHorizAnalysisEnum) this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->vertices_type[io_index])); 87 87 88 88 /*set single point constraints: */ -
issm/trunk/src/c/objects/objects.h
r5143 r5578 102 102 #include "./Bamg/AdjacentTriangle.h" 103 103 #include "./Bamg/Edge.h" 104 #include "./Bamg/Geom etricalVertex.h"105 #include "./Bamg/Geom etricalEdge.h"104 #include "./Bamg/GeomVertex.h" 105 #include "./Bamg/GeomEdge.h" 106 106 #include "./Bamg/Curve.h" 107 107 #include "./Bamg/Triangle.h" 108 108 #include "./Bamg/ListofIntersectionTriangles.h" 109 #include "./Bamg/Geom etricalSubDomain.h"109 #include "./Bamg/GeomSubDomain.h" 110 110 #include "./Bamg/SubDomain.h" 111 111 #include "./Bamg/VertexOnGeom.h" -
issm/trunk/src/c/solutions/gradient_core.cpp
r5378 r5578 53 53 54 54 /*plug back into inputs: */ 55 InputUpdateFromVectorx( femmodel-> elements,femmodel-> nodes, femmodel-> vertices,femmodel-> loads, femmodel-> materials, femmodel->parameters,gradient,GradientEnum,VertexEnum); 56 InputUpdateFromVectorx( femmodel-> elements,femmodel-> nodes, femmodel-> vertices,femmodel-> loads, femmodel-> materials, femmodel->parameters,old_gradient,OldGradientEnum,VertexEnum); 55 InputUpdateFromVectorx(femmodel-> elements,femmodel-> nodes, femmodel-> vertices,femmodel-> loads, femmodel-> materials, femmodel->parameters,gradient,GradientEnum,VertexEnum); 56 InputUpdateFromVectorx(femmodel-> elements,femmodel-> nodes, femmodel-> vertices,femmodel-> loads, femmodel-> materials, femmodel->parameters,old_gradient,OldGradientEnum,VertexEnum); 57 //InputArtificialNoisex( femmodel-> elements,femmodel-> nodes, femmodel-> vertices,femmodel-> loads, femmodel-> materials, femmodel->parameters,GradientEnum,-0.5,0.5); 57 58 58 59 /*Free ressources and return:*/
Note:
See TracChangeset
for help on using the changeset viewer.