Changeset 14361
- Timestamp:
- 02/21/13 12:15:07 (12 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
r12832 r14361 15 15 16 16 void UpdateElementsTransient(Elements* elements, Parameters* parameters,IoModel* iomodel,int analysis_counter,int analysis_type){ 17 18 int isgl,migration_style; 19 int i,numberofvertices; 20 IssmDouble rho_ice,rho_water; 21 IssmDouble *phi = NULL; 22 23 /*Fetch data needed*/ 24 iomodel->Constant(&isgl,TransientIsgroundinglineEnum); 25 iomodel->Constant(&migration_style,GroundinglineMigrationEnum); 26 27 if(isgl==1 && migration_style==SubelementMigrationEnum){ 28 29 /*get parameters and constants: */ 30 parameters->FindParam(&rho_ice,MaterialsRhoIceEnum); 31 parameters->FindParam(&rho_water,MaterialsRhoWaterEnum); 32 iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum); 33 iomodel->FetchData(2,ThicknessEnum,BathymetryEnum); 34 35 /*Create phi vector */ 36 phi=xNew<IssmDouble>(numberofvertices); 37 for (i=0;i<numberofvertices;i++){ 38 if(iomodel->my_vertices[i]){ 39 phi[i] = iomodel->Data(ThicknessEnum)[i] + rho_water/rho_ice * iomodel->Data(BathymetryEnum)[i]; 40 } 41 } 42 43 /*Update elements: */ 44 for(i=0;i<elements->Size();i++){ 45 Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 46 element->InputUpdateFromVector(phi,GLlevelsetEnum,VertexEnum); 47 } 48 49 /*Free ressources:*/ 50 xDelete<IssmDouble>(phi); 51 } 17 52 } -
issm/trunk-jpl/src/m/classes/groundingline.m
r13646 r14361 29 29 function md = checkconsistency(obj,md,solution,analyses) % {{{ 30 30 31 md = checkfield(md,'groundingline.migration','values',{'None' 'AgressiveMigration' 'SoftMigration'}); 31 md = checkfield(md,'groundingline.migration','values',{'None' 'AgressiveMigration' 'SoftMigration' 'SubelementMigration'}); 32 32 33 33 34 if ~strcmp(obj.migration,'None'), … … 42 43 if any(md.geometry.bathymetry(pos)-md.geometry.bed(pos)>10^-9), 43 44 md = checkmessage(md,['bathymetry superior to bed on floating ice!']); 45 end 46 if strcmp(obj.migration,'SubelementMigration') & md.mesh.dimension==3, 47 md = checkmessage(md,['SubelementMigration only implemented in 2d!']); 44 48 end 45 49 end -
issm/trunk-jpl/src/m/classes/groundingline.py
r14141 r14361 48 48 def checkconsistency(self,md,solution,analyses): # {{{ 49 49 50 md = checkfield(md,'groundingline.migration','values',['None','AgressiveMigration','SoftMigration' ])50 md = checkfield(md,'groundingline.migration','values',['None','AgressiveMigration','SoftMigration','SubelementMigration']) 51 51 52 52 if not strcmp(self.migration,'None'): … … 59 59 if any(md.geometry.bathymetry[pos]-md.geometry.bed[pos]>10**-9): 60 60 md.checkmessage("bathymetry superior to bed on floating ice!") 61 if strcmp(self.migration,'SubelementMigration'): 62 if md.mesh.dimension==3: 63 md.checkmessage("SubelementMigration only implemented in 2d!") 61 64 62 65 return md
Note:
See TracChangeset
for help on using the changeset viewer.