Changeset 17579
- Timestamp:
- 03/27/14 15:59:05 (11 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.h
r17536 r17579 295 295 296 296 virtual void MigrateGroundingLine(IssmDouble* sheet_ungrounding)=0; 297 virtual void FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating)=0; 297 298 virtual void PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding)=0; 298 299 virtual int UpdatePotentialUngrounding(IssmDouble* potential_sheet_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r17536 r17579 60 60 void ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz); 61 61 int FiniteElement(void); 62 void FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating){_error_("not implemented yet");}; 62 63 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters); 63 64 void Delta18oParameterization(void); -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r17536 r17579 60 60 void Delta18oParameterization(void){_error_("not implemented yet");}; 61 61 void ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){_error_("not implemented yet");}; 62 void FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating){_error_("not implemented yet");}; 62 63 int FiniteElement(void); 63 64 Element* GetUpperElement(void){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tetra.h
r17536 r17579 63 63 void FaceOnBedIndices(int* pindex1,int* pindex2,int* pindex3); 64 64 void FaceOnSurfaceIndices(int* pindex1,int* pindex2,int* pindex3); 65 void FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating){_error_("not implemented yet");}; 65 66 int FiniteElement(void); 66 67 Element* GetUpperElement(void){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r17536 r17579 59 59 void Delta18oParameterization(void); 60 60 void ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz); 61 void FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating){_error_("not implemented yet");}; 61 62 int FiniteElement(void); 62 63 Element* GetUpperElement(void){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
r16510 r17579 23 23 if(migration_style==NoneEnum) return; 24 24 25 if(migration_style!=AgressiveMigrationEnum &&26 migration_style!=SoftMigrationEnum &&27 migration_style!=SubelementMigrationEnum &&28 migration_style!=SubelementMigration2Enum)29 _error_("Grounding line migration "<<EnumToStringx(migration_style) << " not supported yet!");30 31 25 /*Set toolkit to default*/ 32 26 ToolkitsOptionsFromAnalysis(parameters,DefaultAnalysisEnum); 33 27 34 if(migration_style==SoftMigrationEnum){ 35 /*Create flag for grounded vertices above the hydrostatic equilibrium: */ 36 vertices_potentially_ungrounding=PotentialUngrounding(elements,vertices,parameters); 37 38 /*propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */ 39 phi_ungrounding=PropagateFloatingiceToGroundedNeighbors(elements,nodes,vertices,parameters,vertices_potentially_ungrounding); 28 switch(migration_style){ 29 case SoftMigrationEnum: 30 /*Create flag for grounded vertices above the hydrostatic equilibrium: */ 31 vertices_potentially_ungrounding=PotentialUngrounding(elements,vertices,parameters); 32 /*propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */ 33 phi_ungrounding=PropagateFloatingiceToGroundedNeighbors(elements,nodes,vertices,parameters,vertices_potentially_ungrounding); 34 break; 35 case ContactEnum: 36 phi_ungrounding=ContactFSLevelset(elements,vertices); 37 break; 38 case AgressiveMigrationEnum: 39 case SubelementMigrationEnum: 40 case SubelementMigration2Enum: 41 /*Nothing additional to do here, MigrateGroundingLine takes care of everything*/ 42 break; 43 default: 44 _error_("Grounding line migration "<<EnumToStringx(migration_style) << " not supported yet!"); 40 45 } 41 46 … … 51 56 } 52 57 58 /*FUNCTION ContactFSLevelset{{{*/ 59 IssmDouble* ContactFSLevelset(Elements* elements,Vertices* vertices){ 60 61 Vector<IssmDouble>* vertexgrounded = NULL; 62 Vector<IssmDouble>* vertexfloating = NULL; 63 IssmDouble* serial_vertexgrounded = NULL; 64 IssmDouble* serial_vertexfloating = NULL; 65 IssmDouble* phi = NULL; 66 67 /*Initialize vector with number of vertices*/ 68 int numberofvertices=vertices->NumberOfVertices(); 69 vertexgrounded=new Vector<IssmDouble>(numberofvertices); 70 vertexfloating=new Vector<IssmDouble>(numberofvertices); 71 phi =xNew<IssmDouble>(numberofvertices); 72 73 /*Fill vector vertices_potentially_floating: */ 74 for(int i=0;i<elements->Size();i++){ 75 Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 76 element->FSContactMigration(vertexgrounded,vertexfloating); 77 } 78 79 /*Assemble vector and serialize */ 80 vertexgrounded->Assemble(); 81 vertexfloating->Assemble(); 82 serial_vertexgrounded=vertexgrounded->ToMPISerial(); 83 serial_vertexfloating=vertexfloating->ToMPISerial(); 84 85 for(int i=0;i<numberofvertices;i++){ 86 if(serial_vertexgrounded[i]==1. && serial_vertexfloating[i]==1.){ 87 phi[i]=0.; 88 } 89 else if(serial_vertexgrounded[i]==1.){ 90 phi[i]=1.; 91 } 92 else if(serial_vertexfloating[i]==1.){ 93 phi[i]=-1.; 94 } 95 else{ 96 _error_("not supported"); 97 } 98 } 99 100 /*free ressouces and return: */ 101 delete vertexgrounded; 102 delete vertexfloating; 103 xDelete<IssmDouble>(serial_vertexgrounded); 104 xDelete<IssmDouble>(serial_vertexfloating); 105 106 return phi; 107 } 108 /*}}}*/ 53 109 /*FUNCTION PotentialUngrounding {{{*/ 54 110 IssmDouble* PotentialUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){ -
issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.h
r15965 r17579 13 13 /* local prototypes: */ 14 14 void GroundinglineMigrationx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters); 15 IssmDouble* ContactFSLevelset(Elements* elements,Vertices* vertices); 15 16 IssmDouble* PotentialUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters); 16 17 IssmDouble* PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,IssmDouble* vertices_potentially_ungrounding); -
issm/trunk-jpl/src/m/classes/groundingline.m
r17037 r17579 29 29 function md = checkconsistency(obj,md,solution,analyses) % {{{ 30 30 31 md = checkfield(md,'fieldname','groundingline.migration','values',{'None' 'AgressiveMigration' 'SoftMigration' 'SubelementMigration','SubelementMigration2' });31 md = checkfield(md,'fieldname','groundingline.migration','values',{'None' 'AgressiveMigration' 'SoftMigration' 'SubelementMigration','SubelementMigration2' 'Contact'}); 32 32 33 33 if ~strcmp(obj.migration,'None'), -
issm/trunk-jpl/src/m/classes/groundingline.py
r17480 r17579 42 42 def checkconsistency(self,md,solution,analyses): # {{{ 43 43 44 md = checkfield(md,'fieldname','groundingline.migration','values',['None','AgressiveMigration','SoftMigration','SubelementMigration','SubelementMigration2' ])44 md = checkfield(md,'fieldname','groundingline.migration','values',['None','AgressiveMigration','SoftMigration','SubelementMigration','SubelementMigration2' 'Contact']) 45 45 46 46 if not m.strcmp(self.migration,'None'):
Note:
See TracChangeset
for help on using the changeset viewer.