Changeset 3751
- Timestamp:
- 05/15/10 19:36:18 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 85 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ControlConstrainx/ControlConstrainx.cpp
r3570 r3751 10 10 #include "../EnumDefinitions/EnumDefinitions.h" 11 11 12 void ControlConstrainx( double* p_g, int numdofnodes, double cm_min, double cm_max, char*control_type){12 void ControlConstrainx( double* p_g, int numdofnodes, double cm_min, double cm_max,int control_type){ 13 13 14 14 int i; -
issm/trunk/src/c/ControlConstrainx/ControlConstrainx.h
r2354 r3751 9 9 10 10 /* local prototypes: */ 11 void ControlConstrainx( double* p_g, int numberofnodes, double cm_min, double cm_max, char*control_type);11 void ControlConstrainx( double* p_g, int numberofnodes, double cm_min, double cm_max,int control_type); 12 12 13 13 #endif /* _CONTROLCONSTRAINX_H */ -
issm/trunk/src/c/DataSet/DataSet.cpp
r3732 r3751 1402 1402 } 1403 1403 /*}}}*/ 1404 /*FUNCTION DataSet::UpdateInputsFromVector{{{1*/ 1405 void DataSet::UpdateInputsFromVector(int* vec, int name, int type){ 1406 1407 vector<Object*>::iterator object; 1408 for ( object=objects.begin() ; object < objects.end(); object++ ){ 1409 1410 (*object)->UpdateInputsFromVector(vec,name,type); 1411 } 1412 } 1413 /*}}}*/ 1414 /*FUNCTION DataSet::UpdateInputsFromVector{{{1*/ 1415 void DataSet::UpdateInputsFromVector(bool* vec, int name, int type){ 1416 1417 vector<Object*>::iterator object; 1418 for ( object=objects.begin() ; object < objects.end(); object++ ){ 1419 1420 (*object)->UpdateInputsFromVector(vec,name,type); 1421 } 1422 } 1423 /*}}}*/ 1404 1424 /*FUNCTION DataSet::UpdateVertexPositions{{{1*/ 1405 1425 void DataSet::UpdateVertexPositions(double* thickness,double* bed){ -
issm/trunk/src/c/DataSet/DataSet.h
r3732 r3751 75 75 void UpdateInputsFromConstant(bool constant, int name); 76 76 void UpdateInputsFromVector(double* vector,int name, int type); 77 void UpdateInputsFromVector(int* vector,int name, int type); 78 void UpdateInputsFromVector(bool* vector,int name, int type); 77 79 void UpdateInputsFromSolution(double* solution,int analysis_type,int sub_analysis_type); 78 80 void PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type); -
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r3729 r3751 41 41 SteadyAnalysisEnum, 42 42 //slope 43 SurfaceAnalysisEnum, 43 44 SlopecomputeAnalysisEnum, 44 45 BedXAnalysisEnum, 45 46 BedYAnalysisEnum, 47 BedAnalysisEnum, 46 48 SurfaceXAnalysisEnum, 47 49 SurfaceYAnalysisEnum, … … 200 202 SurfaceSlopeyEnum, 201 203 TemperatureEnum, 204 TemperatureAverageEnum, 202 205 ThicknessEnum, 203 206 TypeEnum, -
issm/trunk/src/c/Makefile.am
r3723 r3751 885 885 bin_PROGRAMS = 886 886 else 887 dnl bin_PROGRAMS = diagnostic.exe thermal.exe prognostic.exe prognostic2.exe balancedthickness.exe balancedthickness2.exe balancedvelocities.exe transient.exe steadystate.exe slopecompute.exe 888 bin_PROGRAMS = diagnostic.exe 887 bin_PROGRAMS = diagnostic.exe thermal.exe prognostic.exe prognostic2.exe balancedthickness.exe balancedthickness2.exe balancedvelocities.exe transient.exe steadystate.exe slopecompute.exe 889 888 endif 890 889 -
issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.cpp
r3703 r3751 9 9 #include "../EnumDefinitions/EnumDefinitions.h" 10 10 11 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,Vec vector, int NameEnum, int TypeEnum){ 12 13 double* serial_vector=NULL; 14 15 VecToMPISerial(&serial_vector,vector); 16 17 UpdateInputsFromVectorx( elements,nodes, vertices, loads, materials, parameters,serial_vector,NameEnum, TypeEnum); 18 19 /*Free ressources:*/ 20 xfree((void**)&serial_vector); 21 } 22 23 11 24 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,double* vector, int NameEnum, int TypeEnum){ 12 25 … … 26 39 27 40 } 41 42 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,int* vector, int NameEnum, int TypeEnum){ 43 44 /*First, get elements and loads configured: */ 45 elements->Configure(elements,loads, nodes,vertices, materials,parameters); 46 loads->Configure(elements, loads, nodes,vertices, materials,parameters); 47 nodes->Configure(elements, loads, nodes,vertices, materials,parameters); 48 parameters->Configure(elements,loads, nodes,vertices, materials,parameters); 49 50 /*Update elements, nodes, loads and materials from inputs: */ 51 elements->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 52 nodes->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 53 vertices->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 54 loads->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 55 materials->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 56 parameters->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 57 58 } 59 60 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices, DataSet* loads, DataSet* materials, Parameters* parameters,bool* vector, int NameEnum, int TypeEnum){ 61 62 /*First, get elements and loads configured: */ 63 elements->Configure(elements,loads, nodes,vertices, materials,parameters); 64 loads->Configure(elements, loads, nodes,vertices, materials,parameters); 65 nodes->Configure(elements, loads, nodes,vertices, materials,parameters); 66 parameters->Configure(elements,loads, nodes,vertices, materials,parameters); 67 68 /*Update elements, nodes, loads and materials from inputs: */ 69 elements->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 70 nodes->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 71 vertices->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 72 loads->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 73 materials->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 74 parameters->UpdateInputsFromVector(vector,NameEnum,TypeEnum); 75 76 } -
issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h
r3715 r3751 10 10 11 11 /* local prototypes: */ 12 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,Vec vector, int NameEnum,int TypeEnum); 12 13 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,double* vector, int NameEnum,int TypeEnum); 14 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,int* vector, int NameEnum,int TypeEnum); 15 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,bool* vector, int NameEnum,int TypeEnum); 13 16 14 17 #endif /* _UPDATEINPUTSFROMVECTORXX_H */ -
issm/trunk/src/c/objects/Constraints/Rgb.h
r3732 r3751 35 35 int MyRank(); 36 36 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 37 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 38 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 37 39 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 38 40 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Constraints/Spc.h
r3732 r3751 40 40 Object* copy(); 41 41 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 42 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 43 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 42 44 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 43 45 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/DofVec.h
r3732 r3751 48 48 int Size(); 49 49 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 50 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 51 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 50 52 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 51 53 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Elements/Beam.cpp
r3732 r3751 774 774 } 775 775 /*}}}*/ 776 776 /*FUNCTION Beam::UpdateInputsFromVector(int* vector, int name, int type);{{{1*/ 777 void Beam::UpdateInputsFromVector(int* vector, int name, int type){ 778 ISSMERROR(" not supported yet!"); 779 } 780 /*}}}*/ 781 /*FUNCTION Beam::UpdateInputsFromVector(bool* vector, int name, int type);{{{1*/ 782 void Beam::UpdateInputsFromVector(bool* vector, int name, int type){ 783 ISSMERROR(" not supported yet!"); 784 } 785 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Beam.h
r3732 r3751 54 54 void SetClone(int* minranks); 55 55 void UpdateInputsFromVector(double* vector, int name, int type); 56 void UpdateInputsFromVector(int* vector, int name, int type); 57 void UpdateInputsFromVector(bool* vector, int name, int type); 56 58 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 57 59 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Elements/Penta.cpp
r3732 r3751 4485 4485 } 4486 4486 /*}}}*/ 4487 /*FUNCTION Penta::UpdateInputsFromVector(int* vector, int name, int type);{{{1*/ 4488 void Penta::UpdateInputsFromVector(int* vector, int name, int type){ 4489 ISSMERROR(" not supported yet!"); 4490 } 4491 /*}}}*/ 4492 /*FUNCTION Penta::UpdateInputsFromVector(bool* vector, int name, int type);{{{1*/ 4493 void Penta::UpdateInputsFromVector(bool* vector, int name, int type){ 4494 ISSMERROR(" not supported yet!"); 4495 } 4496 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Penta.h
r3732 r3751 141 141 void UpdateInputsFromSolutionBalancedvelocities( double* solution,int analysis_type,int sub_analysis_type); 142 142 void UpdateInputsFromVector(double* vector, int name, int type); 143 void UpdateInputsFromVector(int* vector, int name, int type); 144 void UpdateInputsFromVector(bool* vector, int name, int type); 143 145 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 144 146 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Elements/Sing.cpp
r3732 r3751 562 562 } 563 563 /*}}}*/ 564 /*FUNCTION Sing::UpdateInputsFromVector(int* vector, int name, int type);{{{1*/ 565 void Sing::UpdateInputsFromVector(int* vector, int name, int type){ 566 ISSMERROR(" not supported yet!"); 567 } 568 /*}}}*/ 569 /*FUNCTION Sing::UpdateInputsFromVector(bool* vector, int name, int type);{{{1*/ 570 void Sing::UpdateInputsFromVector(bool* vector, int name, int type){ 571 ISSMERROR(" not supported yet!"); 572 } 573 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Sing.h
r3732 r3751 54 54 int MyRank(); 55 55 void UpdateInputsFromVector(double* vector, int name, int type); 56 void UpdateInputsFromVector(int* vector, int name, int type); 57 void UpdateInputsFromVector(bool* vector, int name, int type); 56 58 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 57 59 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Elements/Tria.cpp
r3732 r3751 5177 5177 } 5178 5178 /*}}}*/ 5179 /*FUNCTION Tria::UpdateInputsFromVector(int* vector, int name, int type);{{{1*/ 5180 void Tria::UpdateInputsFromVector(int* vector, int name, int type){ 5181 ISSMERROR(" not supported yet!"); 5182 } 5183 /*}}}*/ 5184 /*FUNCTION Tria::UpdateInputsFromVector(bool* vector, int name, int type);{{{1*/ 5185 void Tria::UpdateInputsFromVector(bool* vector, int name, int type){ 5186 ISSMERROR(" not supported yet!"); 5187 } 5188 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Tria.h
r3732 r3751 51 51 void SetClone(int* minranks); 52 52 void UpdateInputsFromVector(double* vector, int name, int type); 53 void UpdateInputsFromVector(int* vector, int name, int type); 54 void UpdateInputsFromVector(bool* vector, int name, int type); 53 55 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/FemModel.cpp
r3732 r3751 319 319 } 320 320 /*}}}*/ 321 /*FUNCTION FemModel::UpdateInputsFromVector(Vec vector, int name, int type){{{1*/ 322 void FemModel::UpdateInputsFromVector(Vec vector, int name, int type){ 323 324 double* serial_vector=NULL; 325 326 if(vector==NULL)return; //don't bother 327 328 VecToMPISerial(&serial_vector,vector); 329 330 this->UpdateInputsFromVector(serial_vector,name,type); 331 332 /*Free ressources:*/ 333 xfree((void**)&serial_vector); 334 } 335 /*}}}*/ 321 336 /*FUNCTION FemModel::UpdateInputsFromVector(double* vector, int name, int type){{{1*/ 322 337 void FemModel::UpdateInputsFromVector(double* vector, int name, int type){ … … 333 348 } 334 349 /*}}}*/ 350 /*FUNCTION FemModel::UpdateInputsFromVector(int* vector, int name, int type){{{1*/ 351 void FemModel::UpdateInputsFromVector(int* vector, int name, int type){ 352 353 if(vector==NULL)return; //don't bother 354 355 elements->UpdateInputsFromVector(vector,name,type); 356 nodes->UpdateInputsFromVector(vector,name,type); 357 vertices->UpdateInputsFromVector(vector,name,type); 358 loads->UpdateInputsFromVector(vector,name,type); 359 materials->UpdateInputsFromVector(vector,name,type); 360 parameters->UpdateInputsFromVector(vector,name,type); 361 362 } 363 /*}}}*/ 364 /*FUNCTION FemModel::UpdateInputsFromVector(bool* vector, int name, int type){{{1*/ 365 void FemModel::UpdateInputsFromVector(bool* vector, int name, int type){ 366 367 if(vector==NULL)return; //don't bother 368 369 elements->UpdateInputsFromVector(vector,name,type); 370 nodes->UpdateInputsFromVector(vector,name,type); 371 vertices->UpdateInputsFromVector(vector,name,type); 372 loads->UpdateInputsFromVector(vector,name,type); 373 materials->UpdateInputsFromVector(vector,name,type); 374 parameters->UpdateInputsFromVector(vector,name,type); 375 376 } 377 /*}}}*/ 335 378 /*FUNCTION FemModel::UpdateInputsFromConstant(double constant, int name){{{1*/ 336 379 void FemModel::UpdateInputsFromConstant(double constant, int name){ -
issm/trunk/src/c/objects/FemModel.h
r3732 r3751 81 81 Mat get_Gmn(void); 82 82 83 void UpdateInputsFromVector(Vec vector, int name, int type); 83 84 void UpdateInputsFromVector(double* vector, int name, int type); 85 void UpdateInputsFromVector(bool* vector, int name, int type); 86 void UpdateInputsFromVector(int* vector, int name, int type); 87 84 88 void UpdateInputsFromConstant(double constant, int name); 85 89 void UpdateInputsFromConstant(int constant, int name); 86 90 void UpdateInputsFromConstant(bool constant, int name); 91 87 92 void UpdateInputsFromSolution(Vec solution, int analysis_type, int sub_analysis_type); 88 93 void UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type); -
issm/trunk/src/c/objects/Inputs/BeamVertexInput.h
r3732 r3751 39 39 int EnumType(); 40 40 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 42 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 43 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 42 44 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Inputs/BoolInput.h
r3732 r3751 39 39 int EnumType(); 40 40 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 42 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 43 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 42 44 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Inputs/DoubleInput.h
r3732 r3751 39 39 int EnumType(); 40 40 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 42 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 43 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 42 44 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Inputs/IntInput.h
r3732 r3751 39 39 int EnumType(); 40 40 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 42 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 43 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 42 44 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Inputs/PentaVertexInput.h
r3732 r3751 38 38 int EnumType(); 39 39 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 40 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 40 42 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 41 43 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Inputs/SingVertexInput.h
r3732 r3751 38 38 int EnumType(); 39 39 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 40 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 40 42 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 41 43 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Inputs/TriaVertexInput.h
r3732 r3751 38 38 int EnumType(); 39 39 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 40 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 41 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 40 42 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 41 43 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Loads/Icefront.h
r3732 r3751 51 51 int MyRank(); 52 52 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 53 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 53 55 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Loads/Load.h
r3683 r3751 34 34 virtual void PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type)=0; 35 35 virtual void PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type)=0; 36 37 int Enum();38 39 36 }; 40 37 #endif -
issm/trunk/src/c/objects/Loads/Numericalflux.h
r3732 r3751 46 46 int MyRank(); 47 47 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 48 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 49 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 48 50 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 49 51 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Loads/Pengrid.h
r3732 r3751 52 52 int MyRank(); 53 53 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 55 57 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Loads/Penpair.h
r3732 r3751 44 44 Object* copy(); 45 45 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 46 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 47 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 46 48 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 47 49 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Loads/Riftfront.h
r3732 r3751 61 61 int MyRank(); 62 62 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 63 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 64 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 63 65 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 64 66 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Materials/Material.h
r3732 r3751 27 27 virtual void UpdateFromInputs(void* inputs)=0; 28 28 virtual void UpdateInputsFromVector(double* vector, int name, int type)=0; 29 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 30 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} 31 void UpdateInputsFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");} 32 29 virtual void UpdateInputsFromVector(int* vector, int name, int type)=0; 30 virtual void UpdateInputsFromVector(bool* vector, int name, int type)=0; 33 31 virtual void UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type)=0; 34 35 int Enum();36 32 37 33 }; -
issm/trunk/src/c/objects/Materials/Matice.h
r3732 r3751 46 46 double GetN(); 47 47 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 48 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 49 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 48 50 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 49 51 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} 50 52 void UpdateInputsFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");} 51 52 53 void UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type){ISSMERROR("Not implemented yet!");} 53 54 -
issm/trunk/src/c/objects/Materials/Matpar.h
r3732 r3751 58 58 Object* copy(); 59 59 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 60 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 61 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 60 62 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 61 63 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Model.cpp
r3732 r3751 313 313 } 314 314 /*}}}1*/ 315 /*FUNCTION Model::FindParam (bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/316 int Model::FindParam (bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type){315 /*FUNCTION Model::FindParamByAnalysisAndSub(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/ 316 int Model::FindParamByAnalysisAndSub(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type){ 317 317 318 318 FemModel* femmodel=NULL; … … 327 327 } 328 328 /*}}}1*/ 329 /*FUNCTION Model::FindParam (int* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/330 int Model::FindParam (int* pparameter,int enum_type,int analysis_type,int sub_analysis_type){329 /*FUNCTION Model::FindParamByAnalysisAndSub(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/ 330 int Model::FindParamByAnalysisAndSub(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type){ 331 331 332 332 FemModel* femmodel=NULL; … … 341 341 } 342 342 /*}}}1*/ 343 /*FUNCTION Model::FindParam (double* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/344 int Model::FindParam (double* pparameter,int enum_type,int analysis_type,int sub_analysis_type){343 /*FUNCTION Model::FindParamByAnalysisAndSub(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/ 344 int Model::FindParamByAnalysisAndSub(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type){ 345 345 346 346 FemModel* femmodel=NULL; … … 355 355 } 356 356 /*}}}1*/ 357 /*FUNCTION Model::FindParam (double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/358 int Model::FindParam (double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type){357 /*FUNCTION Model::FindParamByAnalysisAndSub(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/ 358 int Model::FindParamByAnalysisAndSub(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type){ 359 359 360 360 FemModel* femmodel=NULL; … … 369 369 } 370 370 /*}}}1*/ 371 /*FUNCTION Model::FindParam (double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type) {{{1*/372 int Model::FindParam (double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type){371 /*FUNCTION Model::FindParamByAnalysisAndSub(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type) {{{1*/ 372 int Model::FindParamByAnalysisAndSub(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type){ 373 373 374 374 FemModel* femmodel=NULL; … … 383 383 } 384 384 /*}}}1*/ 385 /*FUNCTION Model::FindParam (char** pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/386 int Model::FindParam (char** pparameter,int enum_type,int analysis_type,int sub_analysis_type){385 /*FUNCTION Model::FindParamByAnalysisAndSub(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type) {{{1*/ 386 int Model::FindParamByAnalysisAndSub(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type){ 387 387 388 388 FemModel* femmodel=NULL; … … 397 397 } 398 398 /*}}}1*/ 399 /*FUNCTION Model::FindParam (bool* pparameter,int enum_type,int analysis_type) {{{1*/400 int Model::FindParam (bool* pparameter,int enum_type,int analysis_type){399 /*FUNCTION Model::FindParamByAnalysis(bool* pparameter,int enum_type,int analysis_type) {{{1*/ 400 int Model::FindParamByAnalysis(bool* pparameter,int enum_type,int analysis_type){ 401 401 402 402 FemModel* femmodel=NULL; … … 411 411 } 412 412 /*}}}1*/ 413 /*FUNCTION Model::FindParam (int* pparameter,int enum_type,int analysis_type) {{{1*/414 int Model::FindParam (int* pparameter,int enum_type,int analysis_type){413 /*FUNCTION Model::FindParamByAnalysis(int* pparameter,int enum_type,int analysis_type) {{{1*/ 414 int Model::FindParamByAnalysis(int* pparameter,int enum_type,int analysis_type){ 415 415 416 416 FemModel* femmodel=NULL; … … 425 425 } 426 426 /*}}}1*/ 427 /*FUNCTION Model::FindParam (double* pparameter,int enum_type,int analysis_type) {{{1*/428 int Model::FindParam (double* pparameter,int enum_type,int analysis_type){427 /*FUNCTION Model::FindParamByAnalysis(double* pparameter,int enum_type,int analysis_type) {{{1*/ 428 int Model::FindParamByAnalysis(double* pparameter,int enum_type,int analysis_type){ 429 429 430 430 FemModel* femmodel=NULL; … … 439 439 } 440 440 /*}}}1*/ 441 /*FUNCTION Model::FindParam (double** pparameter,int* pM, int* pN,int enum_type,int analysis_type) {{{1*/442 int Model::FindParam (double** pparameter,int* pM, int* pN,int enum_type,int analysis_type){441 /*FUNCTION Model::FindParamByAnalysis(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type) {{{1*/ 442 int Model::FindParamByAnalysis(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type){ 443 443 444 444 FemModel* femmodel=NULL; … … 453 453 } 454 454 /*}}}1*/ 455 /*FUNCTION Model::FindParam (double** pparameter,int* pM, int enum_type,int analysis_type) {{{1*/456 int Model::FindParam (double** pparameter,int* pM, int enum_type,int analysis_type){455 /*FUNCTION Model::FindParamByAnalysis(double** pparameter,int* pM, int enum_type,int analysis_type) {{{1*/ 456 int Model::FindParamByAnalysis(double** pparameter,int* pM, int enum_type,int analysis_type){ 457 457 458 458 FemModel* femmodel=NULL; … … 467 467 } 468 468 /*}}}1*/ 469 /*FUNCTION Model::FindParam (char** pparameter,int enum_type,int analysis_type) {{{1*/470 int Model::FindParam (char** pparameter,int enum_type,int analysis_type){469 /*FUNCTION Model::FindParamByAnalysis(char** pparameter,int enum_type,int analysis_type) {{{1*/ 470 int Model::FindParamByAnalysis(char** pparameter,int enum_type,int analysis_type){ 471 471 472 472 FemModel* femmodel=NULL; … … 600 600 } 601 601 /*}}}1*/ 602 /*FUNCTION Model::UpdateInputsFromVector(Vec vector,int name, int type);{{{1*/ 603 void Model::UpdateInputsFromVector(Vec vector,int name, int type){ 604 605 int i; 606 FemModel* femmodel=NULL; 607 double* serial_vector=NULL; 608 609 if(vector==NULL)return; //don't bother 610 611 VecToMPISerial(&serial_vector,vector); 612 613 //call double* idential routine. 614 this->UpdateInputsFromVector(serial_vector,name,type); 615 616 /*Free ressources:*/ 617 xfree((void**)&serial_vector); 618 } 619 /*}}}1*/ 602 620 /*FUNCTION Model::UpdateInputsFromSolution(double* vector,int analysis_type, int sub_analysis_type);{{{1*/ 603 621 void Model::UpdateInputsFromSolution(double* vector,int analysis_type, int sub_analysis_type){ -
issm/trunk/src/c/objects/Model.h
r3732 r3751 42 42 int FindParam(char** pparameter,int enum_type); 43 43 44 int FindParam (bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type);45 int FindParam (int* pparameter,int enum_type,int analysis_type,int sub_analysis_type);46 int FindParam (double* pparameter,int enum_type,int analysis_type,int sub_analysis_type);47 int FindParam (double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type);48 int FindParam (double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type);49 int FindParam (char** pparameter,int enum_type,int analysis_type,int sub_analysis_type);44 int FindParamByAnalysisAndSub(bool* pparameter,int enum_type,int analysis_type,int sub_analysis_type); 45 int FindParamByAnalysisAndSub(int* pparameter,int enum_type,int analysis_type,int sub_analysis_type); 46 int FindParamByAnalysisAndSub(double* pparameter,int enum_type,int analysis_type,int sub_analysis_type); 47 int FindParamByAnalysisAndSub(double** pparameter,int* pM, int enum_type,int analysis_type,int sub_analysis_type); 48 int FindParamByAnalysisAndSub(double** pparameter,int* pM, int* pN,int enum_type,int analysis_type,int sub_analysis_type); 49 int FindParamByAnalysisAndSub(char** pparameter,int enum_type,int analysis_type,int sub_analysis_type); 50 50 51 int FindParam (bool* pparameter,int enum_type,int analysis_type);52 int FindParam (int* pparameter,int enum_type,int analysis_type);53 int FindParam (double* pparameter,int enum_type,int analysis_type);54 int FindParam (double** pparameter,int* pM,int enum_type,int analysis_type);55 int FindParam (double** pparameter,int* pM,int* pN,int enum_type,int analysis_type);56 int FindParam (char** pparameter,int enum_type,int analysis_type);51 int FindParamByAnalysis(bool* pparameter,int enum_type,int analysis_type); 52 int FindParamByAnalysis(int* pparameter,int enum_type,int analysis_type); 53 int FindParamByAnalysis(double* pparameter,int enum_type,int analysis_type); 54 int FindParamByAnalysis(double** pparameter,int* pM,int enum_type,int analysis_type); 55 int FindParamByAnalysis(double** pparameter,int* pM,int* pN,int enum_type,int analysis_type); 56 int FindParamByAnalysis(char** pparameter,int enum_type,int analysis_type); 57 57 58 58 FemModel* GetFormulation(int analysis_type,int sub_analysis_type); 59 59 FemModel* GetFormulation(int analysis_type); 60 60 61 void UpdateInputsFromVector(Vec vector, int name, int type); 61 62 void UpdateInputsFromVector(double* vector, int name, int type); 63 void UpdateInputsFromVector(int* vector, int name, int type); 64 void UpdateInputsFromVector(bool* vector, int name, int type); 62 65 void UpdateInputsFromConstant(double constant, int name); 63 66 void UpdateInputsFromConstant(int constant, int name); -
issm/trunk/src/c/objects/Node.h
r3732 r3751 52 52 void SetVertexDof(int in_dof); 53 53 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 55 57 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Object.h
r3732 r3751 26 26 virtual Object* copy()=0; 27 27 virtual void UpdateInputsFromVector(double* vector, int name, int type)=0; 28 virtual void UpdateInputsFromVector(int* vector, int name, int type)=0; 29 virtual void UpdateInputsFromVector(bool* vector, int name, int type)=0; 28 30 virtual void UpdateInputsFromConstant(double constant, int name)=0; 29 31 virtual void UpdateInputsFromConstant(int constant, int name)=0; -
issm/trunk/src/c/objects/Params/BoolParam.h
r3732 r3751 30 30 class BoolParam: public Param{ 31 31 32 p rivate:32 public: 33 33 /*just hold 3 values for 3 vertices: */ 34 34 int enum_type; 35 35 IssmBool value; 36 36 37 public:38 37 /*constructors, destructors: {{{1*/ 39 38 BoolParam(); … … 52 51 int MyRank(); 53 52 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 53 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 55 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 55 56 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Params/DoubleMatParam.h
r3732 r3751 54 54 int MyRank(); 55 55 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 56 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 57 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 56 58 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 57 59 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Params/DoubleParam.h
r3732 r3751 52 52 int MyRank(); 53 53 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 55 57 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Params/DoubleVecParam.h
r3732 r3751 53 53 int MyRank(); 54 54 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 56 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 57 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 56 58 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Params/IntParam.h
r3732 r3751 52 52 int MyRank(); 53 53 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 55 57 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Params/PetscMatParam.h
r3732 r3751 52 52 int MyRank(); 53 53 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 55 57 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Params/PetscVecParam.h
r3732 r3751 52 52 int MyRank(); 53 53 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 55 57 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Params/StringArrayParam.h
r3732 r3751 54 54 int MyRank(); 55 55 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 56 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 57 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 56 58 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 57 59 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Params/StringParam.h
r3732 r3751 52 52 int MyRank(); 53 53 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 55 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 55 57 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Result.h
r3732 r3751 44 44 Object* copy(); 45 45 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 46 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 47 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 46 48 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 47 49 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/SolPar.h
r3732 r3751 40 40 Object* copy(); 41 41 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 42 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 43 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 42 44 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 43 45 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/objects/Vertex.h
r3732 r3751 51 51 void UpdatePosition(double* thickness,double* bed); 52 52 void UpdateInputsFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");} 53 void UpdateInputsFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");} 54 void UpdateInputsFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");} 53 55 void UpdateInputsFromConstant(double constant, int name){ISSMERROR("Not implemented yet!");} 54 56 void UpdateInputsFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");} -
issm/trunk/src/c/parallel/ControlInitialization.cpp
r3732 r3751 29 29 Vec slopex=NULL; 30 30 Vec slopey=NULL; 31 double* vx=NULL; 32 double* vy=NULL; 33 double* vz=NULL; 34 double* pressure=NULL; 31 35 32 36 /*flags: */ … … 87 91 88 92 //Add in inputs 89 inputs->Add("bedslopex",slopex,numberofdofspernode_sl,numberofnodes);90 inputs->Add("bedslopey",slopey,numberofdofspernode_sl,numberofnodes);93 model->UpdateInputsFromVector(slopex,BedSlopexEnum,VertexEnum); 94 model->UpdateInputsFromVector(slopey,BedSlopeyEnum,VertexEnum); 91 95 VecFree(&slopex); VecFree(&slopey); 92 96 … … 99 103 VecDuplicatePatch(&ug_horiz,ug); FieldExtrudex( ug_horiz,fem_dh->elements,fem_dh->nodes, fem_dh->vertices,fem_dh->loads,fem_dh-> materials,fem_dh->parameters,"velocity",1); 100 104 105 //Add to inputs: 106 SplitSolutionVector(ug_horiz,numberofnodes,numberofdofspernode_dh,&vx,&vy); 107 model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 108 model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 109 110 101 111 //vertical velocity 102 112 if(verbose)_printf_("%s\n"," computing vertical velocities..."); 103 inputs->Add("velocity",ug_horiz,numberofdofspernode_dh,numberofnodes);104 113 diagnostic_core_linear(&ug_vert,fem_dv,DiagnosticAnalysisEnum,VertAnalysisEnum); 105 114 … … 120 129 121 130 //Add in inputs 122 inputs->Add("velocity",ug_stokes,numberofdofspernode_ds,numberofnodes); 131 SplitSolutionVector(ug_stokes,numberofnodes,numberofdofspernode_ds,&vx,&vy,&vz,&pressure); 132 model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 133 model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 134 model->UpdateInputsFromVector(vz,VzEnum,VertexEnum); 135 model->UpdateInputsFromVector(pressure,PressureEnum,VertexEnum); 123 136 VecFree(&ug_stokes); 124 137 … … 136 149 137 150 //Add in inputs 138 inputs->Add("velocity",ug,numberofdofspernode_ds,numberofnodes); 151 xfree((void**)&vx); xfree((void**)&vy); xfree((void**)&vz); xfree((void**)&pressure); 152 SplitSolutionVector(ug,numberofnodes,numberofdofspernode_ds,&vx,&vy,&vz,&pressure); 153 model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 154 model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 155 model->UpdateInputsFromVector(vz,VzEnum,VertexEnum); 156 model->UpdateInputsFromVector(pressure,PressureEnum,VertexEnum); 139 157 140 158 /*Assign output*/ … … 143 161 /*Free ressources:*/ 144 162 xfree((void**)&dofset); 163 xfree((void**)&vx); 164 xfree((void**)&vy); 165 xfree((void**)&vz); 166 xfree((void**)&pressure); 145 167 VecFree(&ug); 146 168 VecFree(&ug_horiz); -
issm/trunk/src/c/parallel/ControlRestart.cpp
r3717 r3751 6 6 #include "./parallel.h" 7 7 #include "../modules.h" 8 #include "../EnumDefinitions/EnumDefinitions.h" 8 9 9 10 void ControlRestart(Model* model,double* param_g){ -
issm/trunk/src/c/parallel/balancedthickness.cpp
r3732 r3751 2 2 * \brief: balancedthickness solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 8 4 #ifdef HAVE_CONFIG_H 9 5 #include "config.h" … … 12 8 #endif 13 9 10 #include "../objects/objects.h" 11 #include "../shared/shared.h" 12 #include "../DataSet/DataSet.h" 13 #include "../EnumDefinitions/EnumDefinitions.h" 14 #include "../include/globals.h" 15 #include "./parallel.h" 14 16 15 17 int main(int argc,char* *argv){ -
issm/trunk/src/c/parallel/balancedthickness2.cpp
r3732 r3751 2 2 * \brief: balancedthickness2 solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 4 8 5 #ifdef HAVE_CONFIG_H … … 12 9 #endif 13 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 14 17 15 18 int main(int argc,char* *argv){ -
issm/trunk/src/c/parallel/balancedthickness2_core.cpp
r3732 r3751 45 45 46 46 _printf_("depth averaging velocity...\n"); 47 vx_g=inputs->Get("vx",&dofs[0],1);48 vy_g=inputs->Get("vy",&dofs[0],1);47 //vx_g=inputs->Get("vx",&dofs[0],1); 48 //vy_g=inputs->Get("vy",&dofs[0],1); 49 49 /* NOT WORKING YET.... 50 50 FieldDepthAveragex(vx_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"vx"); 51 51 FieldDepthAveragex(vy_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"vy"); 52 52 */ 53 inputs->Add("vx_average",vx_g,1,numberofvertices); 54 inputs->Add("vy_average",vy_g,1,numberofvertices); 53 //inputs->Add("vx_average",vx_g,1,numberofvertices); 54 //inputs->Add("vy_average",vy_g,1,numberofvertices); 55 ISSMERROR("not supported yet!"); 55 56 56 57 _printf_("call computational core:\n"); -
issm/trunk/src/c/parallel/balancedthickness_core.cpp
r3732 r3751 43 43 44 44 _printf_("depth averaging velocity...\n"); 45 u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity 46 FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity"); 47 inputs->Add("velocity_average",u_g,2,numberofnodes); 45 //u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity 46 //FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity"); 47 //inputs->Add("velocity_average",u_g,2,numberofnodes); 48 ISSMERROR("not supported yet!"); 48 49 49 50 _printf_("call computational core:\n"); -
issm/trunk/src/c/parallel/balancedvelocities.cpp
r3732 r3751 2 2 * \brief: balancedvelocities solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 4 8 5 #ifdef HAVE_CONFIG_H … … 12 9 #endif 13 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 14 17 15 18 int main(int argc,char* *argv){ -
issm/trunk/src/c/parallel/balancedvelocities_core.cpp
r3732 r3751 42 42 43 43 _printf_("depth averaging velocity...\n"); 44 u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity 45 FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity"); 46 inputs->Add("velocity_average",u_g,2,numberofnodes); 44 //u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity 45 //FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity"); 46 //inputs->Add("velocity_average",u_g,2,numberofnodes); 47 ISSMERROR(" not supported yet!"); 47 48 48 49 _printf_("call computational core:\n"); -
issm/trunk/src/c/parallel/control_core.cpp
r3732 r3751 25 25 Vec m_g=NULL; 26 26 double search_scalar; 27 int control_type =NULL;27 int control_type; 28 28 double* fit=NULL; 29 29 double* optscal=NULL; … … 52 52 int control_steady; 53 53 int verbose=0; 54 int converge nce=0;54 int converged=0; 55 55 int numberofnodes; 56 56 … … 86 86 _printf_("\n%s%i%s%i\n"," control method step ",n+1,"/",nsteps); 87 87 model->UpdateInputsFromVector(param_g,control_type,VertexEnum); 88 model->UpdateInputsFrom Vector(&fit[n],FitEnum,ConstantEnum);88 model->UpdateInputsFromConstant(fit[n],FitEnum); 89 89 90 90 /*In case we are running a steady state control method, compute new temperature field using new parameter … … 169 169 if ((J[i]-J[n])/J[n] <= eps_cm){ 170 170 //convergence if convergence criteria fullfilled 171 converge nce=1;171 converged=1; 172 172 _printf_("%s%g%s%g\n"," Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],"<",eps_cm); 173 173 } … … 181 181 } 182 182 //stop if convergence has been reached 183 if(converge nce) break;183 if(converged) break; 184 184 185 185 //some temporary saving … … 206 206 } 207 207 else{ 208 inputs->Add(control_type,param_g,1,numberofnodes);208 model->UpdateInputsFromVector(param_g,control_type,VertexEnum); 209 209 diagnostic_results=new DataSet(ResultsEnum); 210 210 diagnostic_core(diagnostic_results,model); -
issm/trunk/src/c/parallel/convergence.cpp
r3732 r3751 7 7 #include "../EnumDefinitions/EnumDefinitions.h" 8 8 9 void convergence( double* pconverged, Mat Kff,Vec pf,Vec uf,Vec old_uf,Parameters* parameters){9 void convergence(int* pconverged, Mat Kff,Vec pf,Vec uf,Vec old_uf,Parameters* parameters){ 10 10 11 11 /*output*/ -
issm/trunk/src/c/parallel/diagnostic.cpp
r3722 r3751 2 2 * \brief: diagnostic solution 3 3 */ 4 5 #include "../objects/objects.h"6 #include "../shared/shared.h"7 #include "../DataSet/DataSet.h"8 #include "./parallel.h"9 4 10 5 #ifdef HAVE_CONFIG_H … … 14 9 #endif 15 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 16 17 17 18 int main(int argc,char* *argv){ -
issm/trunk/src/c/parallel/diagnostic_core.cpp
r3732 r3751 31 31 Vec ug_stokes=NULL; 32 32 Vec pg=NULL; 33 Vec slopex=NULL;34 Vec slopey=NULL;35 33 Vec riftproperties=NULL; 36 34 double* u_g_initial=NULL; … … 52 50 int numrifts=0; 53 51 52 /*slopes: */ 53 Vec surfaceslopex=NULL; 54 Vec surfaceslopey=NULL; 55 Vec bedslopex=NULL; 56 Vec bedslopey=NULL; 57 54 58 double stokesreconditioning; 55 59 … … 87 91 //for qmu analysis, be sure the velocity input we are starting from is the one in the parameters: */ 88 92 if(qmu_analysis){ 89 model->FindParam (&vx,&dummy,VxEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vx,VxEnum,VertexEnum);90 model->FindParam (&vy,&dummy,VyEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vy,VyEnum,VertexEnum);91 model->FindParam (&vz,&dummy,VzEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vz,VzEnum,VertexEnum);93 model->FindParamByAnalysisAndSub(&vx,&dummy,VxEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 94 model->FindParamByAnalysisAndSub(&vy,&dummy,VyEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 95 model->FindParamByAnalysisAndSub(&vz,&dummy,VzEnum,DiagnosticAnalysisEnum,HorizAnalysisEnum); model->UpdateInputsFromVector(vz,VzEnum,VertexEnum); 92 96 } 93 97 94 98 /*Compute slopes: */ 95 slope_core(&surfaceslopex,&surfaceslopey, model,SurfaceAnalysisEnum);96 slope_core(&bedslopex,&bedslopey, model,BedAnalysisEnum);99 slope_core(&surfaceslopex,&surfaceslopey,fem_sl,SurfaceAnalysisEnum); 100 slope_core(&bedslopex,&bedslopey,fem_sl,BedAnalysisEnum); 97 101 98 102 /*Update: */ … … 102 106 model->UpdateInputsFromVector(bedslopey,BedSlopeyEnum,VertexEnum); 103 107 108 104 109 if(ishutter){ 105 110 … … 189 194 xfree((void**)&dofset); 190 195 xfree((void**)&u_g_initial); 196 197 VecFree(&surfaceslopex); 198 VecFree(&surfaceslopey); 199 VecFree(&bedslopex); 200 VecFree(&bedslopey); 201 191 202 192 203 } -
issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp
r3732 r3751 110 110 111 111 /*add converged to inputs: */ 112 fem->UpdateInputsFrom Vector(&converged,ConvergedEnum,ConstantEnum);112 fem->UpdateInputsFromConstant(converged,ConvergedEnum); 113 113 114 114 //rift convergence -
issm/trunk/src/c/parallel/gradjcompute_core.cpp
r3732 r3751 13 13 #endif 14 14 15 void gradjcompute_core(DataSet* results,Model* model , ParameterInputs* inputs){15 void gradjcompute_core(DataSet* results,Model* model){ 16 16 17 17 … … 28 28 29 29 Vec u_g=NULL; 30 double* u_g_double=NULL;31 30 32 31 Vec du_g=NULL; … … 36 35 Vec lambda_f=NULL; 37 36 Vec lambda_g=NULL; 38 double* lambda_g_double=NULL; 37 double* lambdax=NULL; 38 double* lambday=NULL; 39 double* vx=NULL; 40 double* vy=NULL; 41 double* vz=NULL; 39 42 40 43 Mat K_ff0=NULL; … … 63 66 64 67 _printf_("%s\n"," recover solution for this stiffness and right hand side:"); 65 diagnostic_core_nonlinear(&u_g,&K_ff0,&K_fs0,NULL, femmodel,inputs,DiagnosticAnalysisEnum,sub_analysis_type); 66 VecToMPISerial(&u_g_double,u_g); VecFree(&u_g); 67 inputs->Add("velocity",u_g_double,numberofdofspernode,numberofnodes); 68 diagnostic_core_nonlinear(&u_g,&K_ff0,&K_fs0,NULL, femmodel,DiagnosticAnalysisEnum,sub_analysis_type); 68 69 69 70 _printf_("%s\n"," buid Du, difference between observed velocity and model velocity:"); 70 Dux( &du_g, femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters, inputs,analysis_type,sub_analysis_type);71 Dux( &du_g, femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,analysis_type,sub_analysis_type); 71 72 72 73 _printf_("%s\n"," reduce adjoint load from g-set to f-set:"); … … 82 83 VecFree(&lambda_f); 83 84 85 /*add to inputs: */ 86 SplitSolutionVector(lambda_g,numberofnodes,numberofdofspernode,&lambdax,&lambday); 87 model->UpdateInputsFromVector(lambdax,AdjointxEnum,VertexEnum); 88 model->UpdateInputsFromVector(lambday,AdjointyEnum,VertexEnum); 89 VecFree(&lambda_g); 90 84 91 _printf_("%s\n"," compute gradJ:"); 85 VecToMPISerial(&lambda_g_double,lambda_g);VecFree(&lambda_g);86 inputs->Add("adjoint",lambda_g_double,numberofdofspernode,numberofnodes);87 88 92 Gradjx( &grad_g, numberofnodes,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters, 89 inputs,analysis_type,sub_analysis_type,control_type);93 analysis_type,sub_analysis_type,control_type); 90 94 91 95 if (dim==3 && extrude_param){ … … 97 101 if(control_steady){ 98 102 diagnostic_results=new DataSet(ResultsEnum); 99 diagnostic_core(diagnostic_results,model , inputs);103 diagnostic_core(diagnostic_results,model); 100 104 101 105 //extract u_g and add it to input (3d velocity needed by thermal_core) 102 106 diagnostic_results->FindResult(&u_g,"u_g"); 103 inputs->Add("velocity",u_g,3,numberofnodes); 107 108 SplitSolutionVector(u_g,numberofnodes,3,&vx,&vy,&vz); 109 model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 110 model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 111 model->UpdateInputsFromVector(vz,VzEnum,VertexEnum); 112 104 113 delete diagnostic_results; 105 114 } … … 114 123 xfree((void**)&solverstring); 115 124 xfree((void**)&control_type); 116 xfree((void**)&u_g_double); 117 xfree((void**)&lambda_g_double); 125 xfree((void**)&lambdax); 126 xfree((void**)&lambday); 127 xfree((void**)&vx); 128 xfree((void**)&vy); 129 xfree((void**)&vz); 118 130 119 131 } -
issm/trunk/src/c/parallel/objectivefunctionC.cpp
r3717 r3751 5 5 #include "../modules.h" 6 6 #include "./parallel.h" 7 #include "../EnumDefinitions/EnumDefinitions.h" 7 8 8 9 #ifdef HAVE_CONFIG_H … … 25 26 double* param_g=NULL; 26 27 double* grad_g=NULL; 27 ParameterInputs* inputs=NULL;28 28 int numberofdofspernode; 29 29 int n; … … 35 35 double cm_min; 36 36 double cm_max; 37 char* control_type=NULL;37 int control_type; 38 38 double* param_g_copy=NULL; 39 39 int analysis_type; … … 43 43 Vec u_g_full=NULL; 44 44 double* u_g_double=NULL; 45 double* vx=NULL; 46 double* vy=NULL; 47 double* vz=NULL; 45 48 int numberofnodes; 46 49 … … 59 62 param_g=optargs->param_g; 60 63 grad_g=optargs->grad_g; 61 inputs=optargs->inputs;62 64 n=optargs->n; 63 65 64 66 gsize=femmodel->nodesets->GetGSize(); 65 67 femmodel->parameters->FindParam(&optscal,NULL,NULL,OptScalEnum); 66 femmodel->parameters->FindParam(&control_type,ControlTypeEnum);67 68 femmodel->parameters->FindParam(&fit,NULL,NULL,FitEnum); 68 69 femmodel->parameters->FindParam(&cm_min,CmMinEnum); … … 87 88 88 89 /*Add new parameter to inputs: */ 89 inputs->Add(control_type,param_g_copy,1,numberofnodes);90 femmodel->UpdateInputsFromVector(param_g_copy,control_type,VertexEnum); 90 91 91 92 /*Run diagnostic with updated parameters.*/ 92 93 if(!control_steady){ 93 diagnostic_core_nonlinear(&u_g,NULL,NULL,NULL,femmodel, inputs,DiagnosticAnalysisEnum,sub_analysis_type);94 VecToMPISerial(&u_g_double,u_g); VecFree(&u_g);95 inputs->Add("velocity",u_g_double,numberofdofspernode,numberofnodes);94 diagnostic_core_nonlinear(&u_g,NULL,NULL,NULL,femmodel,DiagnosticAnalysisEnum,sub_analysis_type); 95 femmodel->UpdateInputsFromSolution(u_g,DiagnosticAnalysisEnum,sub_analysis_type); 96 VecFree(&u_g); 96 97 } 97 98 else{ 98 99 //We need a 3D velocity!! (vz is required for the next thermal run) 99 100 diagnostic_results=new DataSet(ResultsEnum); 100 diagnostic_core(diagnostic_results,model , inputs);101 diagnostic_core(diagnostic_results,model); 101 102 102 103 //extract u_g and add it to input (3d velocity needed by thermal_core) 103 104 diagnostic_results->FindResult(&u_g,"u_g"); 104 inputs->Add("velocity",u_g,3,numberofnodes); 105 106 SplitSolutionVector(u_g,numberofnodes,3,&vx,&vy,&vz); 107 femmodel->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 108 femmodel->UpdateInputsFromVector(vy,VxEnum,VertexEnum); 109 femmodel->UpdateInputsFromVector(vz,VxEnum,VertexEnum); 110 105 111 delete diagnostic_results; 106 112 } 107 113 108 114 /*Compute misfit for this velocity field.*/ 109 inputs->Add("fit",fit[n]);110 CostFunctionx( &J, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters, inputs,analysis_type,sub_analysis_type);115 femmodel->UpdateInputsFromConstant(fit[n],FitEnum); 116 CostFunctionx( &J, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters,analysis_type,sub_analysis_type); 111 117 112 118 /*Free ressources:*/ 113 119 xfree((void**)&fit); 114 120 xfree((void**)&optscal); 115 xfree((void**)&control_type);116 121 xfree((void**)¶m_g_copy); 117 xfree((void**)&u_g_double);118 122 xfree((void**)&dofset); 123 xfree((void**)&vx); 124 xfree((void**)&vy); 125 xfree((void**)&vz); 119 126 120 127 return J; -
issm/trunk/src/c/parallel/prognostic.cpp
r3717 r3751 2 2 * \brief: prognostic solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 4 8 5 #ifdef HAVE_CONFIG_H … … 12 9 #endif 13 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 14 17 15 18 int main(int argc,char* *argv){ … … 32 35 Result* result=NULL; 33 36 34 ParameterInputs* inputs=NULL;35 37 Param* param=NULL; 36 38 … … 83 85 _printf_("call computational core:\n"); 84 86 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 85 prognostic_core(results,model ,inputs);87 prognostic_core(results,model); 86 88 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 87 89 … … 94 96 #ifdef _HAVE_DAKOTA_ 95 97 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 96 Qmux(model, inputs,PrognosticAnalysisEnum,NoneAnalysisEnum);98 Qmux(model,PrognosticAnalysisEnum,NoneAnalysisEnum); 97 99 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 98 100 #else … … 120 122 delete results; 121 123 delete model; 122 delete inputs;123 124 124 125 /*Get finish time and close*/ -
issm/trunk/src/c/parallel/prognostic2.cpp
r3717 r3751 2 2 * \brief: prognostic2 solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 4 8 5 #ifdef HAVE_CONFIG_H … … 12 9 #endif 13 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 14 17 15 18 int main(int argc,char* *argv){ … … 32 35 Result* result=NULL; 33 36 34 ParameterInputs* inputs=NULL;35 37 Param* param=NULL; 36 38 … … 84 86 _printf_("call computational core:\n"); 85 87 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 86 prognostic2_core(results,model ,inputs);88 prognostic2_core(results,model); 87 89 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 88 90 … … 95 97 #ifdef _HAVE_DAKOTA_ 96 98 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 97 Qmux(model, inputs,Prognostic2AnalysisEnum,NoneAnalysisEnum);99 Qmux(model,Prognostic2AnalysisEnum,NoneAnalysisEnum); 98 100 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 99 101 #else … … 121 123 delete results; 122 124 delete model; 123 delete inputs;124 125 125 126 /*Get finish time and close*/ -
issm/trunk/src/c/parallel/prognostic2_core.cpp
r3717 r3751 10 10 #include "../modules.h" 11 11 12 void prognostic2_core(DataSet* results,Model* model ,ParameterInputs* inputs){12 void prognostic2_core(DataSet* results,Model* model){ 13 13 14 14 extern int my_rank; … … 47 47 48 48 _printf_("call computational core:\n"); 49 diagnostic_core_linear(&h_g,fem_p, inputs,Prognostic2AnalysisEnum,NoneAnalysisEnum);49 diagnostic_core_linear(&h_g,fem_p,Prognostic2AnalysisEnum,NoneAnalysisEnum); 50 50 51 51 _printf_("Averaging over vertices:\n"); -
issm/trunk/src/c/parallel/prognostic_core.cpp
r3717 r3751 10 10 #include "../modules.h" 11 11 12 void prognostic_core(DataSet* results,Model* model ,ParameterInputs* inputs){12 void prognostic_core(DataSet* results,Model* model){ 13 13 14 14 extern int my_rank; … … 42 42 43 43 _printf_("depth averaging velocity...\n"); 44 u_g=inputs->Get("velocity",&dofs[0],2); //take (vx,vy) from inputs velocity 44 //u_g=inputs->Get("velocity",&dofs[0],2); 45 ISSMERROR("not supported yet!"); 45 46 FieldDepthAveragex( u_g, fem_p->elements,fem_p->nodes, fem_p->vertices,fem_p->loads, fem_p->materials,fem_p->parameters,"velocity"); 46 inputs->Add("velocity_average",u_g,2,numberofnodes);47 //inputs->Add("velocity_average",u_g,2,numberofnodes); 47 48 48 49 _printf_("call computational core:\n"); 49 diagnostic_core_linear(&h_g,fem_p, inputs,PrognosticAnalysisEnum,NoneAnalysisEnum);50 diagnostic_core_linear(&h_g,fem_p,PrognosticAnalysisEnum,NoneAnalysisEnum); 50 51 51 52 _printf_("extrude computed thickness on all layers:\n"); -
issm/trunk/src/c/parallel/slope_core.cpp
r3732 r3751 3 3 */ 4 4 5 #include "./parallel.h" 5 6 #include "../toolkits/toolkits.h" 6 7 #include "../objects/objects.h" … … 8 9 #include "../modules.h" 9 10 10 void slope_core(Vec* pslopex,Vec* pslopey, Model* model,int AnalysisEnum){11 void slope_core(Vec* pslopex,Vec* pslopey,FemModel* fem, int AnalysisEnum){ 11 12 12 13 /*parameters: */ 13 14 int verbose; 14 15 int dim; 16 bool isstokes; 17 bool ishutter; 15 18 int xanalysis; 16 19 int yanalysis; … … 20 23 Vec slopey=NULL; 21 24 22 /*femmodel used to compute slopes: */23 FemModel* fem=NULL;24 25 /*Recover fem model: */26 fem=model->fem_sl;27 28 29 25 /*Recover some parameters: */ 30 model->parameters->FindParam(&verbose,VerboseEnum);31 model->parameters->FindParam(&dim,DimEnum);32 model->parameters->FindParam(&isstokes,DimEnum);33 model->parameters->FindParam(&ishutter,DimEnum);26 fem->parameters->FindParam(&verbose,VerboseEnum); 27 fem->parameters->FindParam(&dim,DimEnum); 28 fem->parameters->FindParam(&isstokes,DimEnum); 29 fem->parameters->FindParam(&ishutter,DimEnum); 34 30 35 31 if(verbose)_printf_("%s\n","computing surface slope (x and y derivatives)..."); -
issm/trunk/src/c/parallel/slopecompute.cpp
r3717 r3751 2 2 * \brief: slopecompute solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 4 8 5 #ifdef HAVE_CONFIG_H … … 11 8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 12 9 #endif 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 13 17 14 18 … … 30 34 Result* result=NULL; 31 35 32 ParameterInputs* inputs=NULL;33 36 Param* param=NULL; 34 37 … … 80 83 _printf_("call computational core:\n"); 81 84 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 82 slopecompute_core(results,model ,inputs);85 slopecompute_core(results,model); 83 86 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 84 87 … … 102 105 delete results; 103 106 delete model; 104 delete inputs;105 107 106 108 /*Get finish time and close*/ -
issm/trunk/src/c/parallel/slopecompute_core.cpp
r3717 r3751 10 10 #include "../modules.h" 11 11 12 void slopecompute_core(DataSet* results,Model* model ,ParameterInputs* inputs){12 void slopecompute_core(DataSet* results,Model* model){ 13 13 14 14 extern int my_rank; … … 39 39 40 40 _printf_("call computational core:\n"); 41 diagnostic_core_linear(&sx_g,fem_sl, inputs,SlopecomputeAnalysisEnum,SurfaceXAnalysisEnum);42 diagnostic_core_linear(&sy_g,fem_sl, inputs,SlopecomputeAnalysisEnum,SurfaceYAnalysisEnum);41 diagnostic_core_linear(&sx_g,fem_sl,SlopecomputeAnalysisEnum,SurfaceXAnalysisEnum); 42 diagnostic_core_linear(&sy_g,fem_sl,SlopecomputeAnalysisEnum,SurfaceYAnalysisEnum); 43 43 44 44 _printf_("extrude computed slope on all layers:\n"); -
issm/trunk/src/c/parallel/steadystate.cpp
r3717 r3751 2 2 * \brief: steadystate solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 4 8 5 #ifdef HAVE_CONFIG_H … … 12 9 #endif 13 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 14 17 15 18 int main(int argc,char* *argv){ … … 35 38 Result* result=NULL; 36 39 37 ParameterInputs* inputs=NULL;38 40 double waitonlock=0; 39 41 … … 43 45 double* weights=NULL; 44 46 double dt; 45 Param* param=NULL;47 BoolParam* param=NULL; 46 48 47 49 /*time*/ … … 114 116 _printf_("call computational core:\n"); 115 117 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 116 steadystate_core(results,model ,inputs);118 steadystate_core(results,model); 117 119 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 118 120 … … 128 130 fem_dh=model->GetFormulation(DiagnosticAnalysisEnum,HorizAnalysisEnum); 129 131 fem_ds=model->GetFormulation(DiagnosticAnalysisEnum,StokesAnalysisEnum); 130 param=(Param*)fem_dh->parameters->FindParamObject(ControlSteadyEnum); 131 param ->SetDouble(1);132 param=( Param*)fem_ds->parameters->FindParamObject(ControlSteadyEnum);133 param->SetDouble(1); 132 133 param=(BoolParam*)fem_dh->parameters->FindParamObject(ControlSteadyEnum); param->value=true; 134 param=(BoolParam*)fem_ds->parameters->FindParamObject(ControlSteadyEnum); param->value=true; 135 134 136 /*run control analysis: */ 135 137 _printf_("call computational core:\n"); 136 138 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 137 control_core(results,model ,inputs);139 control_core(results,model); 138 140 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 139 141 … … 159 161 #ifdef _HAVE_DAKOTA_ 160 162 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 161 Qmux(model, inputs,SteadystateAnalysisEnum,NoneAnalysisEnum);163 Qmux(model,SteadystateAnalysisEnum,NoneAnalysisEnum); 162 164 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 163 165 #else … … 178 180 delete results; 179 181 delete processed_results; 180 delete inputs;181 182 182 183 /*Get finish time and close*/ -
issm/trunk/src/c/parallel/steadystate_core.cpp
r3717 r3751 10 10 #include "../modules.h" 11 11 12 void steadystate_core(DataSet* results,Model* model , ParameterInputs* inputs){12 void steadystate_core(DataSet* results,Model* model){ 13 13 14 14 extern int my_rank; … … 78 78 79 79 //first compute temperature at steady state. 80 if (step>1){81 inputs->Add("velocity",u_g,ndof,numberofnodes);82 }83 80 results_thermal=new DataSet(ResultsEnum); 84 thermal_core(results_thermal,model ,inputs);81 thermal_core(results_thermal,model); 85 82 86 83 //get t_g and m_g; … … 93 90 VecDuplicatePatch(&t_g_average,t_g); 94 91 FieldDepthAveragex( t_g_average, fem_t->elements,fem_t->nodes, fem_t->vertices,fem_t->loads, fem_t->materials,fem_t->parameters,"temperature"); 95 inputs->Add("temperature_average",t_g_average,1,numberofnodes);96 inputs->Add("temperature",t_g,1,numberofnodes);92 model->UpdateInputsFromVector(t_g_average,TemperatureAverageEnum,VertexEnum); 93 model->UpdateInputsFromVector(t_g,TemperatureEnum,VertexEnum); 97 94 VecFree(&t_g_average); //not needed anymore 98 95 99 96 //now compute diagnostic velocity using the steady state temperature. 100 97 results_diagnostic=new DataSet(ResultsEnum); 101 diagnostic_core(results_diagnostic,model , inputs);98 diagnostic_core(results_diagnostic,model); 102 99 103 100 //get p_g and u_g -
issm/trunk/src/c/parallel/thermal.cpp
r3717 r3751 2 2 * \brief: thermal solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 4 8 5 #ifdef HAVE_CONFIG_H … … 11 8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 12 9 #endif 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 13 17 14 18 int main(int argc,char* *argv){ … … 33 37 Result* result=NULL; 34 38 35 ParameterInputs* inputs=NULL;36 39 Param* param=NULL; 37 40 double dt; … … 87 90 _printf_("call computational core:\n"); 88 91 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 89 thermal_core(results,model ,inputs);92 thermal_core(results,model); 90 93 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 91 94 … … 106 109 #ifdef _HAVE_DAKOTA_ 107 110 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 108 Qmux(model, inputs,ThermalAnalysisEnum,NoneAnalysisEnum);111 Qmux(model,ThermalAnalysisEnum,NoneAnalysisEnum); 109 112 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 110 113 #else … … 122 125 delete results; 123 126 delete processed_results; 124 delete inputs;125 127 126 128 /*Get finish time and close*/ -
issm/trunk/src/c/parallel/thermal_core.cpp
r3717 r3751 10 10 #include "../modules.h" 11 11 12 void thermal_core(DataSet* results,Model* model , ParameterInputs* inputs){12 void thermal_core(DataSet* results,Model* model){ 13 13 14 14 extern int my_rank; … … 65 65 66 66 if(verbose)_printf_("computing temperatures:\n"); 67 thermal_core_nonlinear(&t_g[0],&melting_offset,fem_t, inputs,ThermalAnalysisEnum,NoneAnalysisEnum);68 inputs->Add("temperature",t_g[0],1,numberofnodes);69 inputs->Add("melting_offset",melting_offset);67 thermal_core_nonlinear(&t_g[0],&melting_offset,fem_t,ThermalAnalysisEnum,NoneAnalysisEnum); 68 model->UpdateInputsFromVector(t_g[0],TemperatureEnum,VertexEnum); 69 model->UpdateInputsFromConstant(melting_offset,MeltingOffsetEnum); 70 70 71 71 if(verbose)_printf_("computing melting:\n"); 72 diagnostic_core_linear(&m_g[0],fem_m, inputs,MeltingAnalysisEnum,NoneAnalysisEnum);72 diagnostic_core_linear(&m_g[0],fem_m,MeltingAnalysisEnum,NoneAnalysisEnum); 73 73 } 74 74 else{ … … 86 86 t_g[0]=SerialToVec(t_g_serial,numberofnodes); 87 87 xfree((void**)&t_g_serial); 88 fem_m->FindParam(&m_g_serial,NULL,NULL,Melting Enum);88 fem_m->FindParam(&m_g_serial,NULL,NULL,MeltingRateEnum); 89 89 m_g[0]=SerialToVec(m_g_serial,numberofnodes); 90 90 xfree((void**)&m_g_serial); … … 95 95 96 96 if(verbose)_printf_("computing temperatures:\n"); 97 inputs->Add("temperature",t_g[i],1,numberofnodes);98 thermal_core_nonlinear(&t_g[i+1],&melting_offset,fem_t, inputs,ThermalAnalysisEnum,NoneAnalysisEnum);97 model->UpdateInputsFromVector(t_g[i],TemperatureEnum,VertexEnum); 98 thermal_core_nonlinear(&t_g[i+1],&melting_offset,fem_t,ThermalAnalysisEnum,NoneAnalysisEnum); 99 99 100 100 if(verbose)_printf_("computing melting:\n"); 101 inputs->Add("temperature",t_g[i+1],1,numberofnodes);102 inputs->Add("melting_offset",melting_offset);103 diagnostic_core_linear(&m_g[i+1],fem_m, inputs,MeltingAnalysisEnum,NoneAnalysisEnum);101 model->UpdateInputsFromVector(t_g[i+1],TemperatureEnum,VertexEnum); 102 model->UpdateInputsFromConstant(melting_offset,MeltingOffsetEnum); 103 diagnostic_core_linear(&m_g[i+1],fem_m,MeltingAnalysisEnum,NoneAnalysisEnum); 104 104 } 105 105 } -
issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp
r3732 r3751 31 31 int numberofnodes; 32 32 int min_thermal_constraints; 33 bool reset_penalties; 33 34 34 35 /*parameters:*/ … … 57 58 58 59 if(count==1) reset_penalties=1; else reset_penalties=0; 59 fem->UpdateInputsFrom Vector(&reset_penalties,ResetPenaltiesEnum,ConstantEnum);60 fem->UpdateInputsFromConstant(reset_penalties,ResetPenaltiesEnum); 60 61 61 62 //*Generate system matrices … … 109 110 //Deal with penalty loads 110 111 if (verbose) _printf_(" penalty constraints\n"); 111 PenaltyConstraintsx(&constraints_converged, &num_unstable_constraints, fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters, inputs,analysis_type,sub_analysis_type);112 PenaltyConstraintsx(&constraints_converged, &num_unstable_constraints, fem->elements,fem->nodes,fem->vertices,fem->loads,fem->materials,fem->parameters,analysis_type,sub_analysis_type); 112 113 113 inputs->Add("temperature",tg,numberofdofspernode,numberofnodes);114 fem->UpdateInputsFromVector(tg,TemperatureEnum,VertexEnum); 114 115 115 116 if (!converged){ -
issm/trunk/src/c/parallel/transient.cpp
r3717 r3751 2 2 * \brief: transient solution 3 3 */ 4 5 #include "../modules.h"6 #include "./parallel.h"7 4 8 5 #ifdef HAVE_CONFIG_H … … 12 9 #endif 13 10 11 #include "../objects/objects.h" 12 #include "../shared/shared.h" 13 #include "../DataSet/DataSet.h" 14 #include "../EnumDefinitions/EnumDefinitions.h" 15 #include "../include/globals.h" 16 #include "./parallel.h" 14 17 15 18 int main(int argc,char* *argv){ … … 33 36 Result* result=NULL; 34 37 35 ParameterInputs* inputs=NULL;36 37 /*inputs: */38 38 Param* param=NULL; 39 39 … … 111 111 _printf_("call computational core:\n"); 112 112 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 113 transient_core(results,model ,inputs);113 transient_core(results,model); 114 114 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 115 115 … … 130 130 #ifdef _HAVE_DAKOTA_ 131 131 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 132 Qmux(model, inputs,TransientAnalysisEnum,NoneAnalysisEnum);132 Qmux(model,TransientAnalysisEnum,NoneAnalysisEnum); 133 133 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 134 134 #else … … 146 146 delete processed_results; 147 147 delete model; 148 delete inputs;149 148 150 149 /*Get finish time and close*/ -
issm/trunk/src/c/parallel/transient_core.cpp
r3717 r3751 10 10 #include "../modules.h" 11 11 12 void transient_core(DataSet* results,Model* model , ParameterInputs* inputs){12 void transient_core(DataSet* results,Model* model){ 13 13 14 14 extern int my_rank; … … 21 21 //branch out 22 22 if(dim==2){ 23 transient_core_2d(results,model ,inputs);23 transient_core_2d(results,model); 24 24 } 25 25 else if(dim==3){ 26 transient_core_3d(results,model ,inputs);26 transient_core_3d(results,model); 27 27 } 28 28 else ISSMERROR("%s%i%s"," dimension ",dim," not supported yet!"); -
issm/trunk/src/c/parallel/transient_core_2d.cpp
r3717 r3751 10 10 #include "../modules.h" 11 11 12 void transient_core_2d(DataSet* results,Model* model , ParameterInputs* inputs){12 void transient_core_2d(DataSet* results,Model* model){ 13 13 14 14 extern int my_rank; … … 38 38 Vec b_g=NULL; 39 39 Vec new_b_g=NULL; 40 double* vx=NULL; 41 double* vy=NULL; 40 42 41 43 /*intermediary: */ … … 85 87 _printf_("%s\n","computing new velocity"); 86 88 diagnostic_results=new DataSet(ResultsEnum); 87 diagnostic_core(diagnostic_results,model , inputs);89 diagnostic_core(diagnostic_results,model); 88 90 89 91 //extract u_g and p_g from diagnostic_results, and erase diagnostic_results; … … 95 97 _printf_("%s\n","computing new thickness"); 96 98 97 inputs->Add("velocity",u_g,2,numberofnodes); 99 SplitSolutionVector(u_g,numberofnodes,2,&vx,&vy); 100 model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 101 model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 102 xfree((void**)&vx); xfree((void**)&vy); 103 98 104 prognostic_results=new DataSet(ResultsEnum); 99 prognostic_core(prognostic_results,model , inputs);105 prognostic_core(prognostic_results,model); 100 106 101 107 //extract h_g prognostic_results, and erase prognostic_results; … … 120 126 121 127 //update inputs 122 inputs->Add("thickness",h_g,1,numberofnodes); 123 inputs->Add("surface",s_g,1,numberofnodes); 124 inputs->Add("bed",b_g,1,numberofnodes); 125 inputs->Add("velocity",u_g,2,numberofnodes); 128 model->UpdateInputsFromVector(h_g,ThicknessEnum,VertexEnum); 129 model->UpdateInputsFromVector(s_g,SurfaceEnum,VertexEnum); 130 model->UpdateInputsFromVector(b_g,BedEnum,VertexEnum); 131 132 SplitSolutionVector(u_g,numberofnodes,2,&vx,&vy); 133 model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 134 model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 126 135 127 136 } … … 133 142 VecFree(&s_g); 134 143 VecFree(&b_g); 144 xfree((void**)&vx); 145 xfree((void**)&vy); 135 146 } -
issm/trunk/src/c/parallel/transient_core_3d.cpp
r3717 r3751 10 10 #include "../modules.h" 11 11 12 void transient_core_3d(DataSet* results,Model* model , ParameterInputs* inputs){12 void transient_core_3d(DataSet* results,Model* model){ 13 13 14 14 extern int my_rank; … … 30 30 int step; 31 31 double time; 32 33 double* vx=NULL; 34 double* vy=NULL; 35 double* vz=NULL; 32 36 33 37 Vec u_g=NULL; … … 89 93 //Deal with temperature first 90 94 if(verbose)_printf_("%s\n","computing temperature"); 91 thermal_core_nonlinear(&t_g,&melting_offset,fem_t, inputs,ThermalAnalysisEnum,TransientAnalysisEnum);95 thermal_core_nonlinear(&t_g,&melting_offset,fem_t,ThermalAnalysisEnum,TransientAnalysisEnum); 92 96 if(verbose)_printf_("%s\n","computing melting"); 93 inputs->Add("temperature",t_g,1,numberofnodes);94 inputs->Add("melting_offset",melting_offset);95 diagnostic_core_linear(&m_g,fem_m, inputs,MeltingAnalysisEnum,TransientAnalysisEnum);97 model->UpdateInputsFromVector(t_g,TemperatureEnum,VertexEnum); 98 model->UpdateInputsFromConstant(melting_offset,MeltingOffsetEnum); 99 diagnostic_core_linear(&m_g,fem_m,MeltingAnalysisEnum,TransientAnalysisEnum); 96 100 97 101 //Compute depth averaged temperature and add to inputs … … 99 103 VecDuplicatePatch(&t_g_average,t_g); 100 104 FieldDepthAveragex( t_g_average, fem_t->elements,fem_t->nodes, fem_t->vertices,fem_t->loads, fem_t->materials,fem_t->parameters,"temperature"); 101 inputs->Add("temperature_average",t_g_average,1,numberofnodes);105 model->UpdateInputsFromVector(t_g_average,TemperatureAverageEnum,VertexEnum); 102 106 VecFree(&t_g_average); //not needed anymore 103 107 104 108 //Deal with velocities. 105 109 diagnostic_results=new DataSet(ResultsEnum); 106 diagnostic_core(diagnostic_results,model , inputs);110 diagnostic_core(diagnostic_results,model); 107 111 108 112 //extract u_g and p_g from diagnostic_results, and erase diagnostic_results; … … 113 117 //compute new thickness 114 118 if(verbose)_printf_("%s\n","computing new thickness"); 115 116 inputs->Add("velocity",u_g,3,numberofnodes); 117 prognostic_results=new DataSet(ResultsEnum); prognostic_core(prognostic_results,model, inputs); 119 120 SplitSolutionVector(u_g,numberofnodes,3,&vx,&vy,&vz); 121 model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 122 model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 123 model->UpdateInputsFromVector(vz,VzEnum,VertexEnum); 124 xfree((void**)&vx); xfree((void**)&vy); xfree((void**)&vz); 125 126 prognostic_results=new DataSet(ResultsEnum); prognostic_core(prognostic_results,model); 118 127 119 128 //extract h_g prognostic_results, and erase prognostic_results; … … 146 155 147 156 //update inputs 148 inputs->Add("thickness",h_g,1,numberofnodes); 149 inputs->Add("surface",s_g,1,numberofnodes); 150 inputs->Add("bed",b_g,1,numberofnodes); 151 inputs->Add("velocity",u_g,3,numberofnodes); 152 inputs->Add("pressure",p_g,1,numberofnodes); 153 inputs->Add("temperature",t_g,1,numberofnodes); 157 model->UpdateInputsFromVector(h_g,ThicknessEnum,VertexEnum); 158 model->UpdateInputsFromVector(s_g,SurfaceEnum,VertexEnum); 159 model->UpdateInputsFromVector(b_g,BedEnum,VertexEnum); 160 161 SplitSolutionVector(u_g,numberofnodes,3,&vx,&vy,&vz); 162 model->UpdateInputsFromVector(vx,VxEnum,VertexEnum); 163 model->UpdateInputsFromVector(vy,VyEnum,VertexEnum); 164 model->UpdateInputsFromVector(vz,VzEnum,VertexEnum); 165 xfree((void**)&vx); xfree((void**)&vy); xfree((void**)&vz); 166 167 model->UpdateInputsFromVector(p_g,PressureEnum,VertexEnum); 168 model->UpdateInputsFromVector(t_g,TemperatureEnum,VertexEnum); 154 169 155 170 //Save temporary results every 5 steps … … 179 194 VecFree(&t_g); 180 195 VecFree(&m_g); 196 xfree((void**)&vx); 197 xfree((void**)&vy); 198 xfree((void**)&vz); 181 199 } -
issm/trunk/src/mex/ControlConstrain/ControlConstrain.cpp
r3712 r3751 14 14 double cm_min; 15 15 double cm_max; 16 char*control_type=NULL;16 int control_type=NULL; 17 17 int gsize; 18 18 Parameters* parameters=NULL; … … 39 39 40 40 /*Free ressources: */ 41 xfree((void**)&control_type);42 41 delete parameters; 43 42
Note:
See TracChangeset
for help on using the changeset viewer.