Changeset 15749
- Timestamp:
- 08/08/13 09:07:34 (12 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 2 deleted
- 53 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r15747 r15749 395 395 396 396 /*Skip if water element*/ 397 if( IsOnWater()) return;397 if(NoIceInElement()) return; 398 398 399 399 /*Create element stiffness matrix*/ … … 446 446 447 447 /*Skip if water element*/ 448 if( IsOnWater()) return NULL;448 if(NoIceInElement()) return NULL; 449 449 450 450 /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */ … … 568 568 569 569 /*Skip if water element*/ 570 if( IsOnWater()) return;570 if(NoIceInElement()) return; 571 571 572 572 /*Create element load vector*/ … … 629 629 630 630 /*Skip if water element*/ 631 if( IsOnWater()) return NULL;631 if(NoIceInElement()) return NULL; 632 632 633 633 /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */ … … 736 736 737 737 /*Skip if water element*/ 738 if( IsOnWater()) return;738 if(NoIceInElement()) return; 739 739 740 740 /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */ … … 2621 2621 } 2622 2622 /*}}}*/ 2623 /*FUNCTION Penta::IsOnWater {{{*/ 2624 bool Penta::IsOnWater(){ 2625 2626 bool onwater; 2627 inputs->GetInputValue(&onwater,MaskElementonwaterEnum); 2628 return onwater; 2623 /*FUNCTION Penta::NoIceInElement {{{*/ 2624 bool Penta::NoIceInElement(){ 2625 2626 /*Get levelset*/ 2627 IssmDouble ls[NUMVERTICES]; 2628 GetInputListOnVertices(&ls[0],MaskIcelevelsetEnum); 2629 2630 /*If the level set is >0, ice is present in this element*/ 2631 if(ls[0]>0. || ls[1]>0. || ls[2]>0.) return false; 2632 2633 /*If the level set is awlays <=0, there is no ice here*/ 2634 return true; 2629 2635 } 2630 2636 /*}}}*/ … … 3169 3175 3170 3176 /*If on water, return 0: */ 3171 if( IsOnWater())return 0;3177 if(NoIceInElement())return 0; 3172 3178 3173 3179 /*Bail out if this element if: … … 3609 3615 IssmDouble xyz_list[NUMVERTICES][3]; 3610 3616 3611 if( IsOnWater())return 0;3617 if(NoIceInElement())return 0; 3612 3618 3613 3619 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); … … 3801 3807 rho_ice=matpar->GetRhoIce(); 3802 3808 3803 if( IsOnWater() || !IsOnSurface()) return 0.;3809 if(NoIceInElement() || !IsOnSurface()) return 0.; 3804 3810 3805 3811 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); … … 5704 5710 5705 5711 /*If on water, skip grad (=0): */ 5706 if( IsOnWater())return;5712 if(NoIceInElement())return; 5707 5713 5708 5714 /*First deal with ∂/∂alpha(KU-F)*/ … … 6172 6178 6173 6179 /*If on water, return 0: */ 6174 if( IsOnWater())return 0;6180 if(NoIceInElement())return 0; 6175 6181 6176 6182 /*Bail out if this element if: … … 6209 6215 6210 6216 /*If on water, return 0: */ 6211 if( IsOnWater())return 0;6217 if(NoIceInElement())return 0; 6212 6218 6213 6219 /*Bail out if this element if: … … 6246 6252 6247 6253 /*If on water, return 0: */ 6248 if( IsOnWater())return 0;6254 if(NoIceInElement())return 0; 6249 6255 6250 6256 /*Bail out if this element if: … … 6285 6291 6286 6292 /*If on water, return 0: */ 6287 if( IsOnWater())return 0;6293 if(NoIceInElement())return 0; 6288 6294 6289 6295 /*Bail out if this element if: … … 6322 6328 6323 6329 /*If on water, return 0: */ 6324 if( IsOnWater())return 0;6330 if(NoIceInElement())return 0; 6325 6331 6326 6332 /*Bail out if this element if: … … 6365 6371 6366 6372 /*If on water, return 0: */ 6367 if( IsOnWater())return 0;6373 if(NoIceInElement())return 0; 6368 6374 _error_("Not implemented yet"); 6369 6375 … … 6381 6387 6382 6388 /*If on water, on shelf or not on bed, skip: */ 6383 if( IsOnWater()|| IsFloating() || !IsOnBed()) return 0;6389 if(NoIceInElement()|| IsFloating() || !IsOnBed()) return 0; 6384 6390 6385 6391 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1 … … 6396 6402 6397 6403 /*If on water, on shelf or not on bed, skip: */ 6398 if( IsOnWater() || !IsOnBed()) return 0;6404 if(NoIceInElement() || !IsOnBed()) return 0; 6399 6405 6400 6406 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1 -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r15737 r15749 177 177 /*}}}*/ 178 178 /*Penta specific routines:{{{*/ 179 void BedNormal(IssmDouble* bed_normal, IssmDouble xyz_list[3][3]);179 void BedNormal(IssmDouble* bed_normal, IssmDouble xyz_list[3][3]); 180 180 ElementMatrix* CreateBasalMassMatrix(void); 181 181 ElementMatrix* CreateKMatrix(void); … … 203 203 void GetSolutionFromInputsEnthalpy(Vector<IssmDouble>* solutiong); 204 204 IssmDouble GetStabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa); 205 void GetStrainRate3dHO(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input);206 void GetStrainRate3d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input);207 Penta* GetUpperElement(void);208 void GetZeroLevelsetCoordinates(IssmDouble* xyz_zero,IssmDouble xyz_list[6][3],int levelsetenum);209 Penta* GetLowerElement(void);210 Penta* GetBasalElement(void);211 void InputExtrude(int enum_type,int object_type);212 void InputUpdateFromSolutionPrognostic(IssmDouble* solutiong);213 void InputUpdateFromSolutionOneDof(IssmDouble* solutiong,int enum_type);214 void InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solutiong,int enum_type);215 bool IsInput(int name);216 bool IsOnSurface(void);217 bool IsOnBed(void);218 bool IsFloating(void);219 bool IsNodeOnShelf();220 bool IsNodeOnShelfFromFlags(IssmDouble* flags);221 bool IsOnWater(void);222 IssmDouble MinEdgeLength(IssmDouble xyz_list[6][3]);223 void ReduceMatrixFS(IssmDouble* Ke_reduced, IssmDouble* Ke_temp);224 void ReduceVectorFS(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp);225 void SetClone(int* minranks);226 Tria* SpawnTria(int location);227 void SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]);228 void UpdateConstraints(void);205 void GetStrainRate3dHO(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input); 206 void GetStrainRate3d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input); 207 Penta* GetUpperElement(void); 208 void GetZeroLevelsetCoordinates(IssmDouble* xyz_zero,IssmDouble xyz_list[6][3],int levelsetenum); 209 Penta* GetLowerElement(void); 210 Penta* GetBasalElement(void); 211 void InputExtrude(int enum_type,int object_type); 212 void InputUpdateFromSolutionPrognostic(IssmDouble* solutiong); 213 void InputUpdateFromSolutionOneDof(IssmDouble* solutiong,int enum_type); 214 void InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solutiong,int enum_type); 215 bool IsInput(int name); 216 bool IsOnSurface(void); 217 bool IsOnBed(void); 218 bool IsFloating(void); 219 bool IsNodeOnShelf(); 220 bool IsNodeOnShelfFromFlags(IssmDouble* flags); 221 bool NoIceInElement(void); 222 IssmDouble MinEdgeLength(IssmDouble xyz_list[6][3]); 223 void ReduceMatrixFS(IssmDouble* Ke_reduced, IssmDouble* Ke_temp); 224 void ReduceVectorFS(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp); 225 void SetClone(int* minranks); 226 Tria* SpawnTria(int location); 227 void SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]); 228 void UpdateConstraints(void); 229 229 230 230 #ifdef _HAVE_DIAGNOSTIC_ … … 303 303 ElementVector* CreatePVectorDiagnosticVertVolume(void); 304 304 ElementVector* CreatePVectorDiagnosticVertBase(void); 305 void GetL1L2Viscosity(IssmDouble*, IssmDouble*, GaussPenta*, Input*, Input*, Input*);305 void GetL1L2Viscosity(IssmDouble*, IssmDouble*, GaussPenta*, Input*, Input*, Input*); 306 306 #endif 307 307 … … 314 314 ElementVector* CreatePVectorAdjointHO(void); 315 315 ElementVector* CreatePVectorAdjointFS(void); 316 void InputUpdateFromSolutionAdjointHoriz( IssmDouble* solutiong);317 void InputUpdateFromSolutionAdjointFS( IssmDouble* solutiong);316 void InputUpdateFromSolutionAdjointHoriz( IssmDouble* solutiong); 317 void InputUpdateFromSolutionAdjointFS( IssmDouble* solutiong); 318 318 #endif 319 319 320 320 #ifdef _HAVE_HYDROLOGY_ 321 322 321 ElementMatrix* CreateKMatrixHydrologyDCInefficient(void); 323 322 ElementMatrix* CreateKMatrixHydrologyDCEfficient(void); 324 323 ElementVector* CreatePVectorHydrologyDCInefficient(void); 325 324 ElementVector* CreatePVectorHydrologyDCEfficient(void); 326 327 325 void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode); 328 326 void GetHydrologyTransfer(Vector<IssmDouble>* transfer); … … 332 330 void InputUpdateFromSolutionHydrologyDCInefficient(IssmDouble* solution); 333 331 #endif 332 334 333 #ifdef _HAVE_THERMAL_ 335 334 ElementMatrix* CreateKMatrixEnthalpy(void); … … 349 348 ElementVector* CreatePVectorThermalShelf(void); 350 349 ElementVector* CreatePVectorThermalSheet(void); 351 void GetSolutionFromInputsThermal(Vector<IssmDouble>* solutiong);350 void GetSolutionFromInputsThermal(Vector<IssmDouble>* solutiong); 352 351 void InputUpdateFromSolutionThermal( IssmDouble* solutiong); 353 352 void InputUpdateFromSolutionEnthalpy( IssmDouble* solutiong); 354 353 #endif 354 355 355 #ifdef _HAVE_BALANCED_ 356 356 ElementMatrix* CreateKMatrixBalancethickness(void); -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r15741 r15749 176 176 177 177 /*Skip if water element*/ 178 if( IsOnWater()) return;178 if(NoIceInElement()) return; 179 179 180 180 /*Create element stiffness matrix*/ … … 211 211 212 212 /*Skip if water element*/ 213 if( IsOnWater()) return NULL;213 if(NoIceInElement()) return NULL; 214 214 215 215 /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */ … … 310 310 311 311 /*Skip if water element*/ 312 if( IsOnWater()) return;312 if(NoIceInElement()) return; 313 313 314 314 /*Create element load vector*/ … … 353 353 354 354 /*Skip if water element*/ 355 if( IsOnWater()) return NULL;355 if(NoIceInElement()) return NULL; 356 356 357 357 /*Just branch to the correct load generator, according to the type of analysis we are carrying out: */ … … 468 468 469 469 /*Skip if water element*/ 470 if( IsOnWater()) return;470 if(NoIceInElement()) return; 471 471 472 472 /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */ … … 1989 1989 } 1990 1990 /*}}}*/ 1991 /*FUNCTION Tria::IsOnWater {{{*/ 1992 bool Tria::IsOnWater(){ 1993 1994 bool water; 1995 inputs->GetInputValue(&water,MaskElementonwaterEnum); 1996 return water; 1991 /*FUNCTION Tria::NoIceInElement {{{*/ 1992 bool Tria::NoIceInElement(){ 1993 1994 /*Get levelset*/ 1995 IssmDouble ls[NUMVERTICES]; 1996 GetInputListOnVertices(&ls[0],MaskIcelevelsetEnum); 1997 1998 /*If the level set is >0, ice is present in this element*/ 1999 if(ls[0]>0. || ls[1]>0. || ls[2]>0.) return false; 2000 2001 /*If the level set is awlays <=0, there is no ice here*/ 2002 return true; 1997 2003 } 1998 2004 /*}}}*/ … … 2287 2293 2288 2294 /*If on water, return 0: */ 2289 if( IsOnWater())return 0;2295 if(NoIceInElement())return 0; 2290 2296 2291 2297 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); … … 2501 2507 2502 2508 /*Skip if water element*/ 2503 if( IsOnWater()) return;2509 if(NoIceInElement()) return; 2504 2510 2505 2511 } … … 2553 2559 IssmDouble xyz_list[NUMVERTICES][3]; 2554 2560 2555 if( IsOnWater())return 0;2561 if(NoIceInElement())return 0; 2556 2562 2557 2563 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); … … 2789 2795 rho_ice=matpar->GetRhoIce(); 2790 2796 2791 if( IsOnWater())return 0;2797 if(NoIceInElement())return 0; 2792 2798 2793 2799 GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); … … 3639 3645 3640 3646 /*If on water, return 0: */ 3641 if( IsOnWater()) return 0;3647 if(NoIceInElement()) return 0; 3642 3648 3643 3649 /*Retrieve all inputs we will be needing: */ … … 3781 3787 3782 3788 /*If on water, grad = 0: */ 3783 if( IsOnWater()) return;3789 if(NoIceInElement()) return; 3784 3790 3785 3791 /*First deal with ∂/∂alpha(KU-F)*/ … … 4408 4414 4409 4415 /*If on water, return 0: */ 4410 if( IsOnWater()) return 0;4416 if(NoIceInElement()) return 0; 4411 4417 4412 4418 /*Retrieve all inputs we will be needing: */ … … 4447 4453 4448 4454 /*If on water, return 0: */ 4449 if( IsOnWater())return 0;4455 if(NoIceInElement())return 0; 4450 4456 4451 4457 /* Get node coordinates and dof list: */ … … 4506 4512 4507 4513 /*If on water, return 0: */ 4508 if( IsOnWater())return 0;4514 if(NoIceInElement())return 0; 4509 4515 4510 4516 /* Get node coordinates and dof list: */ … … 4566 4572 4567 4573 /*If on water, return 0: */ 4568 if( IsOnWater())return 0;4574 if(NoIceInElement())return 0; 4569 4575 4570 4576 /* Get node coordinates and dof list: */ … … 4624 4630 4625 4631 /*If on water, return 0: */ 4626 if( IsOnWater())return 0;4632 if(NoIceInElement())return 0; 4627 4633 4628 4634 /* Get node coordinates and dof list: */ … … 4683 4689 4684 4690 /*If on water, return 0: */ 4685 if( IsOnWater())return 0;4691 if(NoIceInElement())return 0; 4686 4692 4687 4693 /* Get node coordinates and dof list: */ … … 4745 4751 4746 4752 /*If on water, return 0: */ 4747 if( IsOnWater()) return 0;4753 if(NoIceInElement()) return 0; 4748 4754 4749 4755 /*Retrieve all inputs we will be needing: */ … … 4789 4795 4790 4796 /*If on water, return 0: */ 4791 if( IsOnWater()) return 0;4797 if(NoIceInElement()) return 0; 4792 4798 4793 4799 /*Retrieve all inputs we will be needing: */ … … 4840 4846 4841 4847 /*If on water, return 0: */ 4842 if( IsOnWater()) return 0;4848 if(NoIceInElement()) return 0; 4843 4849 4844 4850 /*Retrieve all inputs we will be needing: */ … … 4888 4894 4889 4895 /*If on water, return 0: */ 4890 if( IsOnWater())return 0;4896 if(NoIceInElement())return 0; 4891 4897 4892 4898 /*Retrieve all inputs we will be needing: */ … … 5207 5213 5208 5214 /*If on water, return 0: */ 5209 if( IsOnWater()) return 0;5215 if(NoIceInElement()) return 0; 5210 5216 5211 5217 /*Retrieve all inputs we will be needing: */ … … 5574 5580 5575 5581 /*Skip if water or ice shelf element*/ 5576 if( IsOnWater() | IsFloating()) return NULL;5582 if(NoIceInElement() | IsFloating()) return NULL; 5577 5583 5578 5584 /*Fetch number of nodes and dof for this finite element*/ … … 5799 5805 5800 5806 /*Skip if water or ice shelf element*/ 5801 if( IsOnWater() | IsFloating()) return NULL;5807 if(NoIceInElement() | IsFloating()) return NULL; 5802 5808 5803 5809 /*Fetch number of nodes and dof for this finite element*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r15731 r15749 71 71 /*}}}*/ 72 72 /*Element virtual functions definitions: {{{*/ 73 void ComputeBasalStress(Vector<IssmDouble>* sigma_b);74 void ComputeStrainRate(Vector<IssmDouble>* eps);75 void ComputeStressTensor();76 void Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters);77 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters);78 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int set1_enum,int set2_enum);79 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs);80 void CreateDVector(Vector<IssmDouble>* df);81 void CreatePVector(Vector<IssmDouble>* pf);82 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff);83 void Delta18oParameterization(void);84 int GetNodeIndex(Node* node);85 void GetNodesSidList(int* sidlist);86 int GetNumberOfNodes(void);87 int Sid();88 bool IsOnBed();89 bool IsFloating();90 bool IsNodeOnShelf();91 bool IsNodeOnShelfFromFlags(IssmDouble* flags);92 bool IsOnWater();93 void GetSolutionFromInputs(Vector<IssmDouble>* solution);94 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum);95 void GetVectorFromResults(Vector<IssmDouble>* vector,int offset,int enum_in,int interp);96 void InputArtificialNoise(int enum_type,IssmDouble min, IssmDouble max);97 void InputCreate(IssmDouble scalar,int name,int code);98 void InputCreate(IssmDouble* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code);99 void InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum=MeshElementsEnum);100 void InputDuplicate(int original_enum,int new_enum);101 void InputScale(int enum_type,IssmDouble scale_factor);102 void InputToResult(int enum_type,int step,IssmDouble time);103 void DeleteResults(void);104 void MaterialUpdateFromTemperature(void){_error_("not implemented yet");};105 int NodalValue(IssmDouble* pvalue, int index, int natureofdataenum);106 void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm);107 void RequestedOutput(int output_enum,int step,IssmDouble time);108 void ListResultsInfo(int** results_enums,int** results_size,IssmDouble** results_times,int** results_steps,int* num_results);109 void PatchFill(int* pcount, Patch* patch);110 void PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);111 void ResetCoordinateSystem(void){_error_("not implemented yet");};112 void SmbGradients();113 IssmDouble SurfaceArea(void);114 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finitelement);115 IssmDouble TimeAdapt();73 void ComputeBasalStress(Vector<IssmDouble>* sigma_b); 74 void ComputeStrainRate(Vector<IssmDouble>* eps); 75 void ComputeStressTensor(); 76 void Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters); 77 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters); 78 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int set1_enum,int set2_enum); 79 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs); 80 void CreateDVector(Vector<IssmDouble>* df); 81 void CreatePVector(Vector<IssmDouble>* pf); 82 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff); 83 void Delta18oParameterization(void); 84 int GetNodeIndex(Node* node); 85 void GetNodesSidList(int* sidlist); 86 int GetNumberOfNodes(void); 87 int Sid(); 88 bool IsOnBed(); 89 bool IsFloating(); 90 bool IsNodeOnShelf(); 91 bool IsNodeOnShelfFromFlags(IssmDouble* flags); 92 bool NoIceInElement(); 93 void GetSolutionFromInputs(Vector<IssmDouble>* solution); 94 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum); 95 void GetVectorFromResults(Vector<IssmDouble>* vector,int offset,int enum_in,int interp); 96 void InputArtificialNoise(int enum_type,IssmDouble min, IssmDouble max); 97 void InputCreate(IssmDouble scalar,int name,int code); 98 void InputCreate(IssmDouble* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code); 99 void InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum=MeshElementsEnum); 100 void InputDuplicate(int original_enum,int new_enum); 101 void InputScale(int enum_type,IssmDouble scale_factor); 102 void InputToResult(int enum_type,int step,IssmDouble time); 103 void DeleteResults(void); 104 void MaterialUpdateFromTemperature(void){_error_("not implemented yet");}; 105 int NodalValue(IssmDouble* pvalue, int index, int natureofdataenum); 106 void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm); 107 void RequestedOutput(int output_enum,int step,IssmDouble time); 108 void ListResultsInfo(int** results_enums,int** results_size,IssmDouble** results_times,int** results_steps,int* num_results); 109 void PatchFill(int* pcount, Patch* patch); 110 void PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes); 111 void ResetCoordinateSystem(void){_error_("not implemented yet");}; 112 void SmbGradients(); 113 IssmDouble SurfaceArea(void); 114 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finitelement); 115 IssmDouble TimeAdapt(); 116 116 117 117 #ifdef _HAVE_RESPONSES_ 118 void AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);118 void AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part); 119 119 IssmDouble IceVolume(void); 120 120 IssmDouble TotalSmb(void); 121 void MinVel(IssmDouble* pminvel);122 void MinVx(IssmDouble* pminvx);123 void MinVy(IssmDouble* pminvy);124 void MinVz(IssmDouble* pminvz);121 void MinVel(IssmDouble* pminvel); 122 void MinVx(IssmDouble* pminvx); 123 void MinVy(IssmDouble* pminvy); 124 void MinVz(IssmDouble* pminvz); 125 125 IssmDouble MassFlux(IssmDouble* segment); 126 void MaxAbsVx(IssmDouble* pmaxabsvx);127 void MaxAbsVy(IssmDouble* pmaxabsvy);128 void MaxAbsVz(IssmDouble* pmaxabsvz);129 void ElementResponse(IssmDouble* presponse,int response_enum);130 void MaxVel(IssmDouble* pmaxvel);131 void MaxVx(IssmDouble* pmaxvx);132 void MaxVy(IssmDouble* pmaxvy);133 void MaxVz(IssmDouble* pmaxvz);126 void MaxAbsVx(IssmDouble* pmaxabsvx); 127 void MaxAbsVy(IssmDouble* pmaxabsvy); 128 void MaxAbsVz(IssmDouble* pmaxabsvz); 129 void ElementResponse(IssmDouble* presponse,int response_enum); 130 void MaxVel(IssmDouble* pmaxvel); 131 void MaxVx(IssmDouble* pmaxvx); 132 void MaxVy(IssmDouble* pmaxvy); 133 void MaxVz(IssmDouble* pmaxvz); 134 134 #endif 135 135 … … 140 140 #ifdef _HAVE_CONTROL_ 141 141 IssmDouble DragCoefficientAbsGradient(int weight_index); 142 void GradientIndexing(int* indexing,int control_index);143 void Gradj(Vector<IssmDouble>* gradient,int control_type,int control_index);144 void GradjBGradient(Vector<IssmDouble>* gradient,int weight_index,int control_index);145 void GradjZGradient(Vector<IssmDouble>* gradient,int weight_index,int control_index);146 void GradjBSSA(Vector<IssmDouble>* gradient,int control_index);147 void GradjZSSA(Vector<IssmDouble>* gradient,int control_index);148 void GradjDragSSA(Vector<IssmDouble>* gradient,int control_index);149 void GradjDragFS(Vector<IssmDouble>* gradient,int control_index);150 void GradjDragGradient(Vector<IssmDouble>* gradient,int weight_index,int control_index);151 void GradjDhDtBalancedthickness(Vector<IssmDouble>* gradient,int control_index);152 void GradjVxBalancedthickness(Vector<IssmDouble>* gradient,int control_index);153 void GradjVyBalancedthickness(Vector<IssmDouble>* gradient,int control_index);154 void GradjThicknessBalancethicknessSoft(Vector<IssmDouble>* gradient,int control_index);155 void GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data);156 void SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index);157 void ControlInputGetGradient(Vector<IssmDouble>* gradient,int enum_type,int control_index);158 void ControlInputScaleGradient(int enum_type,IssmDouble scale);159 void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index);142 void GradientIndexing(int* indexing,int control_index); 143 void Gradj(Vector<IssmDouble>* gradient,int control_type,int control_index); 144 void GradjBGradient(Vector<IssmDouble>* gradient,int weight_index,int control_index); 145 void GradjZGradient(Vector<IssmDouble>* gradient,int weight_index,int control_index); 146 void GradjBSSA(Vector<IssmDouble>* gradient,int control_index); 147 void GradjZSSA(Vector<IssmDouble>* gradient,int control_index); 148 void GradjDragSSA(Vector<IssmDouble>* gradient,int control_index); 149 void GradjDragFS(Vector<IssmDouble>* gradient,int control_index); 150 void GradjDragGradient(Vector<IssmDouble>* gradient,int weight_index,int control_index); 151 void GradjDhDtBalancedthickness(Vector<IssmDouble>* gradient,int control_index); 152 void GradjVxBalancedthickness(Vector<IssmDouble>* gradient,int control_index); 153 void GradjVyBalancedthickness(Vector<IssmDouble>* gradient,int control_index); 154 void GradjThicknessBalancethicknessSoft(Vector<IssmDouble>* gradient,int control_index); 155 void GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data); 156 void SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index); 157 void ControlInputGetGradient(Vector<IssmDouble>* gradient,int enum_type,int control_index); 158 void ControlInputScaleGradient(int enum_type,IssmDouble scale); 159 void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index); 160 160 IssmDouble RheologyBbarAbsGradient(int weight_index); 161 161 IssmDouble ThicknessAbsMisfit( int weight_index); … … 169 169 IssmDouble SurfaceLogVxVyMisfit( int weight_index); 170 170 IssmDouble SurfaceAverageVelMisfit(int weight_index); 171 void InputControlUpdate(IssmDouble scalar,bool save_parameter); 172 #endif 171 void InputControlUpdate(IssmDouble scalar,bool save_parameter); 172 #endif 173 173 174 #ifdef _HAVE_GROUNDINGLINE_ 174 175 void PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding); -
issm/trunk-jpl/src/c/classes/IoModel.cpp
r15689 r15749 1044 1044 void IoModel::FetchData(int num,...){ 1045 1045 1046 va_list ap;1047 int dataenum;1048 IssmDouble * matrix=NULL;1049 int M,N;1050 int i;1046 va_list ap; 1047 int dataenum; 1048 IssmDouble *matrix = NULL; 1049 int M,N; 1050 int i; 1051 1051 1052 1052 /*Go through the entire list of enums and fetch the corresponding data. Add it to the iomodel->data dataset. Everything … … 1057 1057 1058 1058 dataenum=va_arg(ap, int); 1059 _assert_(dataenum<MaximumNumberOfDefinitionsEnum); 1060 _assert_(dataenum>=0); 1059 1061 1060 1062 if (this->independents[dataenum]){ -
issm/trunk-jpl/src/c/classes/Loads/Numericalflux.cpp
r15611 r15749 457 457 /*Initialize Element matrix and return if necessary*/ 458 458 Tria* tria=(Tria*)element; 459 if(tria-> IsOnWater()) return NULL;459 if(tria->NoIceInElement()) return NULL; 460 460 ElementMatrix* Ke=new ElementMatrix(nodes,NUMNODES_INTERNAL,this->parameters); 461 461 … … 521 521 ElementMatrix* Ke = NULL; 522 522 Tria* tria=(Tria*)element; 523 if(tria-> IsOnWater()) return NULL;523 if(tria->NoIceInElement()) return NULL; 524 524 525 525 /*Retrieve all inputs and parameters*/ … … 610 610 /*Initialize Element matrix and return if necessary*/ 611 611 Tria* tria=(Tria*)element; 612 if(tria-> IsOnWater()) return NULL;612 if(tria->NoIceInElement()) return NULL; 613 613 ElementMatrix* Ke=new ElementMatrix(nodes,NUMNODES_INTERNAL,this->parameters); 614 614 … … 673 673 ElementMatrix* Ke = NULL; 674 674 Tria* tria=(Tria*)element; 675 if(tria-> IsOnWater()) return NULL;675 if(tria->NoIceInElement()) return NULL; 676 676 677 677 /*Retrieve all inputs and parameters*/ … … 799 799 ElementVector* pe = NULL; 800 800 Tria* tria=(Tria*)element; 801 if(tria-> IsOnWater()) return NULL;801 if(tria->NoIceInElement()) return NULL; 802 802 803 803 /*Retrieve all inputs and parameters*/ … … 893 893 ElementVector* pe = NULL; 894 894 Tria* tria=(Tria*)element; 895 if(tria-> IsOnWater()) return NULL;895 if(tria->NoIceInElement()) return NULL; 896 896 897 897 /*Retrieve all inputs and parameters*/ -
issm/trunk-jpl/src/c/classes/Node.cpp
r15654 r15749 53 53 if(iomodel->Data(MaskVertexongroundediceEnum)) 54 54 this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,reCast<bool>(iomodel->Data(MaskVertexongroundediceEnum)[io_index]))); 55 /*set single point constraints: */56 57 /*spc all nodes on water*/58 if(!iomodel->Data(MaskVertexonwaterEnum)) _error_("iomodel->nodeonwater is NULL");59 if(reCast<bool>(iomodel->Data(MaskVertexonwaterEnum)[io_index])){60 this->Deactivate();61 }62 55 63 56 /*Diagnostic Horiz*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp
r15464 r15749 19 19 20 20 /*First fetch data: */ 21 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);21 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 22 22 if(stabilization!=3){ 23 23 CreateNodes(pnodes,iomodel,BalancethicknessAnalysisEnum,P1Enum); … … 26 26 CreateNodes(pnodes,iomodel,BalancethicknessAnalysisEnum,P1DGEnum); 27 27 } 28 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);28 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 29 29 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp
r15613 r15749 36 36 iomodel->FetchDataToInput(elements,BedEnum); 37 37 iomodel->FetchDataToInput(elements,MaskElementonfloatingiceEnum); 38 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);39 38 iomodel->FetchDataToInput(elements,VxEnum); 40 39 iomodel->FetchDataToInput(elements,VyEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp
r15464 r15749 11 11 void CreateNodesBedSlope(Nodes** pnodes, IoModel* iomodel){ 12 12 13 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);13 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 14 14 CreateNodes(pnodes,iomodel,BedSlopeAnalysisEnum,P1Enum); 15 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);15 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 16 16 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp
r15613 r15749 23 23 iomodel->FetchDataToInput(elements,SurfaceEnum); 24 24 iomodel->FetchDataToInput(elements,BedEnum); 25 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);26 25 if(iomodel->dim==3){ 27 26 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp
r15747 r15749 74 74 } 75 75 } 76 iomodel->FetchData( 9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,77 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum, MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);76 iomodel->FetchData(8,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, 77 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum); 78 78 CreateNodes(pnodes,iomodel,DiagnosticHorizAnalysisEnum,finiteelement,approximation); 79 iomodel->DeleteData( 9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,80 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum, MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);79 iomodel->DeleteData(8,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, 80 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum); 81 81 } 82 82 else{ … … 88 88 if(!nodes) nodes = new Nodes(); 89 89 90 iomodel->FetchData( 9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,91 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum, MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);90 iomodel->FetchData(8,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, 91 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum); 92 92 if(isFS){ 93 93 /*P1+ velocity*/ … … 125 125 } 126 126 } 127 iomodel->DeleteData( 9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,128 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum, MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);127 iomodel->DeleteData(8,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, 128 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum); 129 129 130 130 /*Assign output pointer: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
r15734 r15749 90 90 else{ 91 91 if(isFS){ 92 _error_("COupling under development");93 92 for(int i=0;i<iomodel->numberofelements;i++){ 94 93 approximation=reCast<int>(iomodel->Data(FlowequationElementEquationEnum)[i]); … … 128 127 iomodel->FetchDataToInput(elements,FrictionQEnum); 129 128 iomodel->FetchDataToInput(elements,MaskElementonfloatingiceEnum); 130 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);131 129 iomodel->FetchDataToInput(elements,MaskIcelevelsetEnum); 132 130 iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp
r15594 r15749 25 25 if(!nodes) nodes = new Nodes(); 26 26 27 iomodel->FetchData( 9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,28 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum, MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);27 iomodel->FetchData(8,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, 28 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum); 29 29 30 30 for(int i=0;i<iomodel->numberofvertices;i++){ … … 44 44 } 45 45 46 iomodel->DeleteData( 9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,47 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum, MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);46 iomodel->DeleteData(8,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum, 47 MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum); 48 48 49 49 /*Assign output pointer: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp
r15564 r15749 14 14 if(iomodel->dim==2) return; 15 15 16 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);16 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 17 17 CreateNodes(pnodes,iomodel,DiagnosticVertAnalysisEnum,P1Enum); 18 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);18 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 19 19 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp
r15613 r15749 31 31 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 32 32 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); 33 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);34 33 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum); 35 34 iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp
r15464 r15749 11 11 void CreateNodesEnthalpy(Nodes** pnodes, IoModel* iomodel){ 12 12 13 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);13 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 14 14 CreateNodes(pnodes,iomodel,EnthalpyAnalysisEnum,P1Enum); 15 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);15 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 16 16 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp
r15613 r15749 36 36 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 37 37 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); 38 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);39 38 iomodel->FetchDataToInput(elements,FlowequationElementEquationEnum); 40 39 iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Gia/CreateNodesGia.cpp
r15464 r15749 10 10 11 11 void CreateNodesGia(Nodes** pnodes, IoModel* iomodel){ 12 13 iomodel->FetchData(1,MaskVertexonwaterEnum);14 12 CreateNodes(pnodes,iomodel,GiaAnalysisEnum,P1Enum); 15 iomodel->DeleteData(1,MaskVertexonwaterEnum);16 13 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCEfficient/CreateNodesHydrologyDCEfficient.cpp
r15464 r15749 21 21 if(!isefficientlayer) return; 22 22 23 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);23 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 24 24 CreateNodes(pnodes,iomodel,HydrologyDCEfficientAnalysisEnum,P1Enum); 25 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);25 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 26 26 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCEfficient/UpdateElementsHydrologyDCEfficient.cpp
r15613 r15749 38 38 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 39 39 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); 40 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);41 40 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum); 42 41 iomodel->FetchDataToInput(elements,EplHeadEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/CreateNodesHydrologyDCInefficient.cpp
r15464 r15749 18 18 if(hydrology_model!=HydrologydcEnum) return; 19 19 20 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);20 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 21 21 CreateNodes(pnodes,iomodel,HydrologyDCInefficientAnalysisEnum,P1Enum); 22 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);22 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 23 23 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/UpdateElementsHydrologyDCInefficient.cpp
r15613 r15749 39 39 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 40 40 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); 41 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);42 41 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum); 43 42 iomodel->FetchDataToInput(elements,SedimentHeadEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyShreve/CreateNodesHydrologyShreve.cpp
r15464 r15749 18 18 if(hydrology_model!=HydrologyshreveEnum) return; 19 19 20 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);20 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 21 21 CreateNodes(pnodes,iomodel,HydrologyShreveAnalysisEnum,P1Enum); 22 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);22 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 23 23 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyShreve/UpdateElementsHydrologyShreve.cpp
r15613 r15749 32 32 iomodel->FetchDataToInput(elements,SurfaceEnum); 33 33 iomodel->FetchDataToInput(elements,BedEnum); 34 iomodel->FetchDataToInput(elements,MaskElementonfloatingiceEnum);35 34 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 36 35 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); 37 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);38 36 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum); 39 37 iomodel->FetchDataToInput(elements,WatercolumnEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp
r15464 r15749 11 11 void CreateNodesMelting(Nodes** pnodes, IoModel* iomodel){ 12 12 13 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);13 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 14 14 CreateNodes(pnodes,iomodel,MeltingAnalysisEnum,P1Enum); 15 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);15 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 16 16 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp
r15613 r15749 34 34 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 35 35 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); 36 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);37 36 iomodel->FetchDataToInput(elements,FlowequationElementEquationEnum); 38 37 iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
r15464 r15749 19 19 20 20 /*Create Nodes either DG or CG depending on stabilization*/ 21 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);21 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 22 22 if(stabilization!=3){ 23 23 CreateNodes(pnodes,iomodel,PrognosticAnalysisEnum,P1Enum); … … 26 26 CreateNodes(pnodes,iomodel,PrognosticAnalysisEnum,P1DGEnum); 27 27 } 28 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);28 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 29 29 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
r15613 r15749 45 45 iomodel->FetchDataToInput(elements,BathymetryEnum); 46 46 iomodel->FetchDataToInput(elements,MaskElementonfloatingiceEnum); 47 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);48 47 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum); 49 48 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateCorrectionEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp
r15464 r15749 11 11 void CreateNodesSurfaceSlope(Nodes** pnodes, IoModel* iomodel){ 12 12 13 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);13 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 14 14 CreateNodes(pnodes,iomodel,SurfaceSlopeAnalysisEnum,P1Enum); 15 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);15 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 16 16 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp
r15613 r15749 23 23 iomodel->FetchDataToInput(elements,SurfaceEnum); 24 24 iomodel->FetchDataToInput(elements,BedEnum); 25 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);26 27 25 if(iomodel->dim==3){ 28 26 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp
r15464 r15749 11 11 void CreateNodesThermal(Nodes** pnodes, IoModel* iomodel){ 12 12 13 iomodel->FetchData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);13 iomodel->FetchData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 14 14 CreateNodes(pnodes,iomodel,ThermalAnalysisEnum,P1Enum); 15 iomodel->DeleteData( 6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);15 iomodel->DeleteData(5,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum); 16 16 } -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp
r15613 r15749 33 33 iomodel->FetchDataToInput(elements,MeshElementonbedEnum); 34 34 iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum); 35 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);36 35 iomodel->FetchDataToInput(elements,FlowequationElementEquationEnum); 37 36 iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum); -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r15689 r15749 144 144 MaskElementonfloatingiceEnum, 145 145 MaskElementongroundediceEnum, 146 MaskElementonwaterEnum,147 146 MaskVertexonfloatingiceEnum, 148 147 MaskVertexongroundediceEnum, 149 MaskVertexonwaterEnum,150 148 MaskIcelevelsetEnum, 151 149 MaterialsBetaEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r15689 r15749 152 152 case MaskElementonfloatingiceEnum : return "MaskElementonfloatingice"; 153 153 case MaskElementongroundediceEnum : return "MaskElementongroundedice"; 154 case MaskElementonwaterEnum : return "MaskElementonwater";155 154 case MaskVertexonfloatingiceEnum : return "MaskVertexonfloatingice"; 156 155 case MaskVertexongroundediceEnum : return "MaskVertexongroundedice"; 157 case MaskVertexonwaterEnum : return "MaskVertexonwater";158 156 case MaskIcelevelsetEnum : return "MaskIcelevelset"; 159 157 case MaterialsBetaEnum : return "MaterialsBeta"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r15689 r15749 155 155 else if (strcmp(name,"MaskElementonfloatingice")==0) return MaskElementonfloatingiceEnum; 156 156 else if (strcmp(name,"MaskElementongroundedice")==0) return MaskElementongroundediceEnum; 157 else if (strcmp(name,"MaskElementonwater")==0) return MaskElementonwaterEnum;158 157 else if (strcmp(name,"MaskVertexonfloatingice")==0) return MaskVertexonfloatingiceEnum; 159 158 else if (strcmp(name,"MaskVertexongroundedice")==0) return MaskVertexongroundediceEnum; 160 else if (strcmp(name,"MaskVertexonwater")==0) return MaskVertexonwaterEnum;161 159 else if (strcmp(name,"MaskIcelevelset")==0) return MaskIcelevelsetEnum; 162 160 else if (strcmp(name,"MaterialsBeta")==0) return MaterialsBetaEnum; … … 260 258 else if (strcmp(name,"ThermalIsenthalpy")==0) return ThermalIsenthalpyEnum; 261 259 else if (strcmp(name,"GiaMantleViscosity")==0) return GiaMantleViscosityEnum; 260 else if (strcmp(name,"GiaLithosphereThickness")==0) return GiaLithosphereThicknessEnum; 261 else if (strcmp(name,"Thickness")==0) return ThicknessEnum; 262 262 else stage=3; 263 263 } 264 264 if(stage==3){ 265 if (strcmp(name,"GiaLithosphereThickness")==0) return GiaLithosphereThicknessEnum; 266 else if (strcmp(name,"Thickness")==0) return ThicknessEnum; 267 else if (strcmp(name,"TimesteppingStartTime")==0) return TimesteppingStartTimeEnum; 265 if (strcmp(name,"TimesteppingStartTime")==0) return TimesteppingStartTimeEnum; 268 266 else if (strcmp(name,"TimesteppingFinalTime")==0) return TimesteppingFinalTimeEnum; 269 267 else if (strcmp(name,"TimesteppingCflCoefficient")==0) return TimesteppingCflCoefficientEnum; … … 383 381 else if (strcmp(name,"MatrixParam")==0) return MatrixParamEnum; 384 382 else if (strcmp(name,"NodeSId")==0) return NodeSIdEnum; 383 else if (strcmp(name,"VectorParam")==0) return VectorParamEnum; 384 else if (strcmp(name,"Riftfront")==0) return RiftfrontEnum; 385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"VectorParam")==0) return VectorParamEnum; 389 else if (strcmp(name,"Riftfront")==0) return RiftfrontEnum; 390 else if (strcmp(name,"RiftfrontType")==0) return RiftfrontTypeEnum; 388 if (strcmp(name,"RiftfrontType")==0) return RiftfrontTypeEnum; 391 389 else if (strcmp(name,"Segment")==0) return SegmentEnum; 392 390 else if (strcmp(name,"SegmentRiftfront")==0) return SegmentRiftfrontEnum; … … 506 504 else if (strcmp(name,"P1bubblecondensed")==0) return P1bubblecondensedEnum; 507 505 else if (strcmp(name,"P2")==0) return P2Enum; 506 else if (strcmp(name,"P2xP1")==0) return P2xP1Enum; 507 else if (strcmp(name,"P1xP2")==0) return P1xP2Enum; 508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"P2xP1")==0) return P2xP1Enum; 512 else if (strcmp(name,"P1xP2")==0) return P1xP2Enum; 513 else if (strcmp(name,"P1P1")==0) return P1P1Enum; 511 if (strcmp(name,"P1P1")==0) return P1P1Enum; 514 512 else if (strcmp(name,"P1P1GLS")==0) return P1P1GLSEnum; 515 513 else if (strcmp(name,"MINI")==0) return MINIEnum; -
issm/trunk-jpl/src/m/classes/mask.m
r15596 r15749 8 8 elementonfloatingice = NaN; 9 9 elementongroundedice = NaN; 10 elementonwater = NaN;11 10 vertexonfloatingice = NaN; 12 11 vertexongroundedice = NaN; 13 vertexonwater = NaN;14 12 vertexonrock = NaN; 15 13 icelevelset = NaN; … … 31 29 md = checkfield(md,'mask.elementonfloatingice','size',[md.mesh.numberofelements 1],'values',[0 1]); 32 30 md = checkfield(md,'mask.elementongroundedice','size',[md.mesh.numberofelements 1],'values',[0 1]); 33 md = checkfield(md,'mask.elementonwater' ,'size',[md.mesh.numberofelements 1],'values',[0 1]);34 31 md = checkfield(md,'mask.vertexonfloatingice','size',[md.mesh.numberofvertices 1],'values',[0 1]); 35 32 md = checkfield(md,'mask.vertexongroundedice','size',[md.mesh.numberofvertices 1],'values',[0 1]); 36 md = checkfield(md,'mask.vertexonwater' ,'size',[md.mesh.numberofvertices 1],'values',[0 1]);37 33 md = checkfield(md,'mask.icelevelset' ,'size',[md.mesh.numberofvertices 1]); 38 34 isice=(md.mask.icelevelset>0); … … 49 45 fielddisplay(obj,'elementongroundedice','element on grounded ice list'); 50 46 fielddisplay(obj,'vertexongroundedice','vertex on grounded ice flags list'); 51 fielddisplay(obj,'elementonwater','element on rock flags list');52 fielddisplay(obj,'vertexonwater','vertex on water flags list');53 47 fielddisplay(obj,'vertexonrock','vertex on rock flags list'); 54 48 fielddisplay(obj,'icelevelset','presence of ice if > 0, icefront position if = 0, no ice if < 0'); … … 57 51 WriteData(fid,'object',obj,'fieldname','elementonfloatingice','format','BooleanMat','mattype',2); 58 52 WriteData(fid,'object',obj,'fieldname','elementongroundedice','format','BooleanMat','mattype',2); 59 WriteData(fid,'object',obj,'fieldname','elementonwater','format','BooleanMat','mattype',2);60 53 WriteData(fid,'object',obj,'fieldname','vertexonfloatingice','format','DoubleMat','mattype',1); 61 54 WriteData(fid,'object',obj,'fieldname','vertexongroundedice','format','DoubleMat','mattype',1); 62 WriteData(fid,'object',obj,'fieldname','vertexonwater','format','DoubleMat','mattype',1);63 55 WriteData(fid,'object',obj,'fieldname','icelevelset','format','DoubleMat','mattype',1); 64 56 end % }}} -
issm/trunk-jpl/src/m/classes/mask.py
r15604 r15749 15 15 self.elementonfloatingice = float('NaN') 16 16 self.elementongroundedice = float('NaN') 17 self.elementonwater = float('NaN')18 17 self.vertexonfloatingice = float('NaN') 19 18 self.vertexongroundedice = float('NaN') 20 self.vertexonwater = float('NaN')21 19 self.icelevelset = float('NaN') 22 20 … … 32 30 string="%s\n%s"%(string,fielddisplay(self,"elementongroundedice","element on grounded ice list")) 33 31 string="%s\n%s"%(string,fielddisplay(self,"vertexongroundedice","vertex on grounded ice flags list")) 34 string="%s\n%s"%(string,fielddisplay(self,"elementonwater","element on water flags list"))35 string="%s\n%s"%(string,fielddisplay(self,"vertexonwater","vertex on water flags list"))36 32 string="%s\n%s"%(string,fielddisplay(self,"icelevelset","presence of ice if > 0, icefront position if = 0, no ice if < 0")) 37 33 return string … … 44 40 md = checkfield(md,'mask.elementonfloatingice','size',[md.mesh.numberofelements],'values',[0,1]) 45 41 md = checkfield(md,'mask.elementongroundedice','size',[md.mesh.numberofelements],'values',[0,1]) 46 md = checkfield(md,'mask.elementonwater' ,'size',[md.mesh.numberofelements],'values',[0,1])47 42 md = checkfield(md,'mask.vertexonfloatingice' ,'size',[md.mesh.numberofvertices],'values',[0,1]) 48 43 md = checkfield(md,'mask.vertexongroundedice' ,'size',[md.mesh.numberofvertices],'values',[0,1]) 49 md = checkfield(md,'mask.vertexonwater' ,'size',[md.mesh.numberofvertices],'values',[0,1])50 44 md = checkfield(md,'mask.icelevelset' ,'size',[md.mesh.numberofvertices]) 51 45 isice=numpy.array(md.mask.icelevelset>0,int) … … 59 53 WriteData(fid,'object',self,'fieldname','elementonfloatingice','format','BooleanMat','mattype',2) 60 54 WriteData(fid,'object',self,'fieldname','elementongroundedice','format','BooleanMat','mattype',2) 61 WriteData(fid,'object',self,'fieldname','elementonwater','format','BooleanMat','mattype',2)62 55 WriteData(fid,'object',self,'fieldname','vertexonfloatingice','format','DoubleMat','mattype',1) 63 56 WriteData(fid,'object',self,'fieldname','vertexongroundedice','format','DoubleMat','mattype',1) 64 WriteData(fid,'object',self,'fieldname','vertexonwater','format','DoubleMat','mattype',1)65 57 WriteData(fid,'object',self,'fieldname','icelevelset','format','DoubleMat','mattype',1) 66 58 # }}} -
issm/trunk-jpl/src/m/classes/model/model.m
r15643 r15749 224 224 md.mask.elementongroundedice=project2d(md,md.mask.elementongroundedice,1); 225 225 md.mask.vertexongroundedice=project2d(md,md.mask.vertexongroundedice,1); 226 md.mask.elementonwater=project2d(md,md.mask.elementonwater,1);227 md.mask.vertexonwater=project2d(md,md.mask.vertexonwater,1);228 226 if ~isnan(md.mask.vertexonrock) 229 227 md.mask.vertexonrock=project2d(md,md.mask.vertexonrock,1); … … 754 752 md.mask.elementongroundedice=project3d(md,'vector',md.mask.elementongroundedice,'type','element'); 755 753 md.mask.vertexongroundedice=project3d(md,'vector',md.mask.vertexongroundedice,'type','node'); 756 md.mask.elementonwater=project3d(md,'vector',md.mask.elementonwater,'type','element');757 md.mask.vertexonwater=project3d(md,'vector',md.mask.vertexonwater,'type','node');758 754 md.mask.vertexonrock=project3d(md,'vector',md.mask.vertexonrock,'type','node'); 759 755 md.mask.icelevelset=project3d(md,'vector',md.mask.icelevelset,'type','node'); … … 809 805 if isfield(structmd,'gridoniceshelf'), md.mask.vertexonfloatingice=structmd.gridoniceshelf; end 810 806 if isfield(structmd,'gridonicesheet'), md.mask.vertexongroundedice=structmd.gridonicesheet; end 811 if isfield(structmd,'gridonwater'), md.mask.vertexonwater=structmd.gridonwater; end812 807 if isfield(structmd,'gridonboundary'), md.mesh.vertexonboundary=structmd.gridonboundary; end 813 808 if isfield(structmd,'petscoptions') & ~isempty(structmd.petscoptions), md.toolkits=structmd.petscoptions; end … … 861 856 if isfield(structmd,'elementoniceshelf'), md.mask.elementonfloatingice=structmd.elementoniceshelf; end 862 857 if isfield(structmd,'elementonicesheet'), md.mask.elementongroundedice=structmd.elementonicesheet; end 863 if isfield(structmd,'elementonwater'), md.mask.elementonwater=structmd.elementonwater; end864 858 if isfield(structmd,'nodeoniceshelf'), md.mask.vertexonfloatingice=structmd.nodeoniceshelf; end 865 859 if isfield(structmd,'nodeonicesheet'), md.mask.vertexongroundedice=structmd.nodeonicesheet; end 866 if isfield(structmd,'nodeonwater'), md.mask.vertexonwater=structmd.nodeonwater; end867 860 if isfield(structmd,'spcthickness'), md.balancethickness.spcthickness=structmd.spcthickness; end 868 861 if isfield(structmd,'artificial_diffusivity'), md.balancethickness.stabilization=structmd.artificial_diffusivity; end -
issm/trunk-jpl/src/m/classes/model/model.py
r15615 r15749 642 642 md.mask.elementongroundedice=project3d(md,'vector',md.mask.elementongroundedice,'type','element') 643 643 md.mask.vertexongroundedice=project3d(md,'vector',md.mask.vertexongroundedice,'type','node') 644 md.mask.elementonwater=project3d(md,'vector',md.mask.elementonwater,'type','element')645 md.mask.vertexonwater=project3d(md,'vector',md.mask.vertexonwater,'type','node')646 644 md.mask.icelevelset=project3d(md,'vector',md.mask.icelevelset,'type','node') 647 645 if not numpy.any(numpy.isnan(md.inversion.cost_functions_coefficients)): -
issm/trunk-jpl/src/m/contrib/bamg/BamgCall.m
r13012 r15749 25 25 %Compute metric 26 26 t1=clock; fprintf('%s',' computing metric...'); 27 if length(md.nodeonwater)==md.mesh.numberofvertices, 28 pos=find(md.nodeonwater); 29 else 30 pos=[]; 31 end 32 metric=ComputeMetric(hessian,scale,epsilon,hmin,hmax,pos); 27 metric=ComputeMetric(hessian,scale,epsilon,hmin,hmax,[]); 33 28 t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']); 34 29 -
issm/trunk-jpl/src/m/contrib/bamg/YamsCall.m
r14094 r15749 25 25 %Compute metric 26 26 t1=clock; fprintf('%s',' computing metric...'); 27 if length(md.mask.vertexonwater)==md.mesh.numberofvertices, 28 pos=find(md.mask.vertexonwater); 29 else 30 pos=[]; 31 end 32 metric=ComputeMetric(hessian,scale,epsilon,hmin,hmax,pos); 27 metric=ComputeMetric(hessian,scale,epsilon,hmin,hmax,[]); 33 28 t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']); 34 29 -
issm/trunk-jpl/src/m/contrib/bamg/YamsCall.py
r14094 r15749 38 38 t1=time.time() 39 39 print "%s" % ' computing metric...' 40 if numpy.size(md.mask.vertexonwater)==md.mesh.numberofvertices: 41 pos=numpy.nonzero(md.mask.vertexonwater)[0] 42 else: 43 pos=numpy.empty(0,int) 44 metric=ComputeMetric(hessian,scale,epsilon,hmin,hmax,pos) 40 metric=ComputeMetric(hessian,scale,epsilon,hmin,hmax,numpy.empty(0,int)) 45 41 t2=time.time() 46 42 print "%s%d%s\n" % (' done (',t2-t1,' seconds)') -
issm/trunk-jpl/src/m/contrib/bamg/yams.m
r13730 r15749 79 79 field=sqrt(vx_obs.^2+vy_obs.^2); 80 80 81 %set mask.vertexonwater field82 if ~strcmp(groundeddomain,'N/A'),83 nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);84 md.mask.vertexonwater=ones(md.mesh.numberofvertices,1);85 md.mask.vertexonwater(find(nodeground))=0;86 else87 md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);88 end89 90 81 %adapt according to velocities 91 82 disp(' adapting...'); … … 119 110 md.mesh.elementonbed=ones(md.mesh.numberofelements,1); 120 111 md.mesh.elementonsurface=ones(md.mesh.numberofelements,1); 121 if ~strcmp(groundeddomain,'N/A'),122 nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);123 md.mask.vertexonwater=ones(md.mesh.numberofvertices,1);124 md.mask.vertexonwater(find(nodeground))=0;125 else126 md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);127 end128 112 if strcmpi(Names.interp,'node'), 129 113 md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0); -
issm/trunk-jpl/src/m/enum/EnumDefinitions.py
r15690 r15749 144 144 def MaskElementonfloatingiceEnum(): return StringToEnum("MaskElementonfloatingice")[0] 145 145 def MaskElementongroundediceEnum(): return StringToEnum("MaskElementongroundedice")[0] 146 def MaskElementonwaterEnum(): return StringToEnum("MaskElementonwater")[0]147 146 def MaskVertexonfloatingiceEnum(): return StringToEnum("MaskVertexonfloatingice")[0] 148 147 def MaskVertexongroundediceEnum(): return StringToEnum("MaskVertexongroundedice")[0] 149 def MaskVertexonwaterEnum(): return StringToEnum("MaskVertexonwater")[0]150 148 def MaskIcelevelsetEnum(): return StringToEnum("MaskIcelevelset")[0] 151 149 def MaterialsBetaEnum(): return StringToEnum("MaterialsBeta")[0] -
issm/trunk-jpl/src/m/mesh/ComputeMetric.m
r14098 r15749 7 7 % 8 8 % Example: 9 % metric=ComputeMetric(hessian,2/9,10^-1,100,10^5, find(md.nodeonwater)9 % metric=ComputeMetric(hessian,2/9,10^-1,100,10^5,[]) 10 10 11 11 %first, find the eigen values of each line of H=[hessian(i,1) hessian(i,2); hessian(i,2) hessian(i,3)] -
issm/trunk-jpl/src/m/mesh/ComputeMetric.py
r14098 r15749 10 10 11 11 Example: 12 metric=ComputeMetric(hessian,2/9,10^-1,100,10^5, find(md.nodeonwater)12 metric=ComputeMetric(hessian,2/9,10^-1,100,10^5,[]) 13 13 """ 14 14 -
issm/trunk-jpl/src/m/mesh/MeshQuality.m
r13730 r15749 17 17 18 18 %Compute metric 19 if length(md.nodeonwater)==md.mesh.numberofvertices, 20 pos=find(md.nodeonwater); 21 else 22 pos=[]; 23 end 24 metric=ComputeMetric(hessian,scale,epsilon,hmin,hmax,pos); 19 metric=ComputeMetric(hessian,scale,epsilon,hmin,hmax,[]); 25 20 26 21 %Get Areas -
issm/trunk-jpl/src/m/mesh/bamg.m
r15220 r15749 325 325 md.mesh.z=zeros(md.mesh.numberofvertices,1); 326 326 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1); 327 md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);328 327 md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1); 329 328 md.mesh.elementonbed=ones(md.mesh.numberofelements,1); -
issm/trunk-jpl/src/m/mesh/bamg.py
r14098 r15749 332 332 md.mesh.z=numpy.zeros(md.mesh.numberofvertices) 333 333 md.mesh.vertexonbed=numpy.ones(md.mesh.numberofvertices,bool) 334 md.mask.vertexonwater=numpy.zeros(md.mesh.numberofvertices,bool)335 334 md.mesh.vertexonsurface=numpy.ones(md.mesh.numberofvertices,bool) 336 335 md.mesh.elementonbed=numpy.ones(md.mesh.numberofelements,bool) -
issm/trunk-jpl/src/m/mesh/meshconvert.m
r13009 r15749 42 42 md.mesh.z=zeros(md.mesh.numberofvertices,1); 43 43 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1); 44 md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);45 44 md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1); 46 45 md.mesh.elementonbed=ones(md.mesh.numberofelements,1); -
issm/trunk-jpl/src/m/parameterization/setmask.m
r15595 r15749 46 46 md.mask.elementongroundedice=elementongroundedice; 47 47 md.mask.vertexongroundedice=vertexongroundedice; 48 md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);49 md.mask.elementonwater=zeros(md.mesh.numberofelements,1);50 48 md.mask.icelevelset=ones(md.mesh.numberofvertices,1); -
issm/trunk-jpl/src/m/parameterization/setmask.py
r15602 r15749 46 46 md.mask.elementongroundedice = elementongroundedice 47 47 md.mask.vertexongroundedice = vertexongroundedice 48 md.mask.vertexonwater = numpy.zeros(md.mesh.numberofvertices,bool)49 md.mask.elementonwater = numpy.zeros(md.mesh.numberofelements,bool)50 48 md.mask.icelevelset = numpy.ones(md.mesh.numberofvertices,bool) 51 49
Note:
See TracChangeset
for help on using the changeset viewer.