Changeset 16913
- Timestamp:
- 11/24/13 11:01:18 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r16912 r16913 68 68 this->parameters->FindParam(pvalues,psize,paramenum); 69 69 }/*}}}*/ 70 IssmDouble Element::GetMaterialParameter(int enum_in){/*{{{*/ 71 72 _assert_(this->matpar); 73 switch(enum_in){ // FIXME: change this to material 74 case MaterialsRheologyNEnum: 75 return this->material->GetN(); 76 case MaterialsRheologyBEnum: 77 return this->material->GetB(); 78 case MaterialsRheologyBbarEnum: 79 return this->material->GetBbar(); 80 default: 81 return this->matpar->GetMaterialParameter(enum_in); 82 } 83 } 84 /*}}}*/ 70 85 Input* Element::GetInput(int inputenum){/*{{{*/ 71 86 return inputs->GetInput(inputenum); 72 87 }/*}}}*/ 88 bool Element::IsFloating(){/*{{{*/ 89 90 bool shelf; 91 int migration_style; 92 parameters->FindParam(&migration_style,GroundinglineMigrationEnum); 93 94 if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating 95 if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true; 96 else shelf=false; 97 } 98 else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating 99 if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false; 100 else shelf=true; 101 } 102 else _error_("migration_style not implemented yet"); 103 104 return shelf; 105 }/*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r16912 r16913 51 51 52 52 /*Functions*/ 53 void AddInput(Input* input_in); 54 bool AllActive(void); 55 bool AnyActive(void); 56 void DeleteMaterials(void); 57 void FindParam(bool* pvalue,int paramenum); 58 void FindParam(int* pvalue,int paramenum); 59 void FindParam(IssmDouble* pvalue,int paramenum); 60 void FindParam(int** pvalues,int* psize,int paramenum); 61 Input* GetInput(int inputenum); 53 void AddInput(Input* input_in); 54 bool AllActive(void); 55 bool AnyActive(void); 56 void DeleteMaterials(void); 57 void FindParam(bool* pvalue,int paramenum); 58 void FindParam(int* pvalue,int paramenum); 59 void FindParam(IssmDouble* pvalue,int paramenum); 60 void FindParam(int** pvalues,int* psize,int paramenum); 61 Input* GetInput(int inputenum); 62 IssmDouble GetMaterialParameter(int enum_in); 63 bool IsFloating(); 62 64 63 65 /*Virtual functions*/ … … 70 72 virtual void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum)=0; 71 73 virtual ElementMatrix* CreateKMatrix(void)=0; 74 virtual ElementVector* CreatePVector(void)=0; 72 75 virtual void CreateDVector(Vector<IssmDouble>* df)=0; 73 virtual ElementVector* CreatePVector(void)=0;74 76 virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0; 75 77 virtual void ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0; … … 77 79 virtual IssmDouble EnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure)=0; 78 80 virtual IssmDouble EnthalpyDiffusionParameterVolume(int numvertices,IssmDouble* enthalpy,IssmDouble* pressure)=0; 79 80 81 virtual int FiniteElement(void)=0; 81 virtual IssmDouble GetMaterialParameter(int enum_in)=0;82 82 virtual IssmDouble MinEdgeLength(IssmDouble* xyz_list)=0; 83 83 virtual void NodalFunctions(IssmDouble* basis,Gauss* gauss)=0; … … 122 122 123 123 virtual int Sid()=0; 124 virtual bool IsFloating()=0;125 124 virtual bool IsNodeOnShelfFromFlags(IssmDouble* flags)=0; 126 125 virtual bool IsOnBed()=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16912 r16913 990 990 } 991 991 /*}}}*/ 992 /*FUNCTION Penta::GetMaterialParameter{{{*/993 IssmDouble Penta::GetMaterialParameter(int enum_in){994 995 _assert_(this->matpar);996 switch(enum_in){ // FIXME: change this to material997 case MaterialsRheologyNEnum:998 return this->material->GetN();999 case MaterialsRheologyBEnum:1000 return this->material->GetB();1001 default:1002 return this->matpar->GetMaterialParameter(enum_in);1003 }1004 }1005 /*}}}*/1006 992 /*FUNCTION Penta::GetGroundedPart{{{*/ 1007 993 void Penta::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating){ … … 2342 2328 } 2343 2329 else return false; 2344 }2345 /*}}}*/2346 /*FUNCTION Penta::IsFloating{{{*/2347 bool Penta::IsFloating(){2348 2349 bool shelf;2350 int migration_style;2351 parameters->FindParam(&migration_style,GroundinglineMigrationEnum);2352 2353 if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating2354 if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true;2355 else shelf=false;2356 }2357 else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating2358 if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false;2359 else shelf=true;2360 }2361 else _error_("migration_style not implemented yet");2362 2363 return shelf;2364 2330 } 2365 2331 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r16912 r16913 88 88 int GetNumberOfNodesVelocity(void); 89 89 int GetNumberOfVertices(void); 90 IssmDouble GetMaterialParameter(int enum_in);91 90 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type); 92 91 IssmDouble GetZcoord(Gauss* gauss); … … 241 240 bool IsOnSurface(void); 242 241 bool IsOnBed(void); 243 bool IsFloating(void);244 242 bool IsNodeOnShelfFromFlags(IssmDouble* flags); 245 243 void JacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss); -
issm/trunk-jpl/src/c/classes/Elements/Seg.cpp
r16912 r16913 124 124 /*}}}*/ 125 125 126 /*FUNCTION Seg::GetMaterialParameter{{{*/127 IssmDouble Seg::GetMaterialParameter(int enum_in){128 129 _assert_(this->matpar);130 return this->matpar->GetMaterialParameter(enum_in);131 }132 /*}}}*/133 126 /*FUNCTION Seg::GetSize{{{*/ 134 127 IssmDouble Seg::GetSize(void){ -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r16912 r16913 86 86 void GetInputListOnNodes(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");}; 87 87 void GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){_error_("not implemented yet");}; 88 IssmDouble GetMaterialParameter(int enum_in);89 88 int GetNodeIndex(Node* node){_error_("not implemented yet");}; 90 89 void GetNodesSidList(int* sidlist){_error_("not implemented yet");}; … … 101 100 bool IsOnBed(){_error_("not implemented yet");}; 102 101 bool IsOnSurface(){_error_("not implemented yet");}; 103 bool IsFloating(){_error_("not implemented yet");};104 102 bool IsNodeOnShelfFromFlags(IssmDouble* flags){_error_("not implemented yet");}; 105 103 void JacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss); -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16912 r16913 1123 1123 } 1124 1124 /*}}}*/ 1125 /*FUNCTION Tria::GetMaterialParameter{{{*/1126 IssmDouble Tria::GetMaterialParameter(int enum_in){1127 1128 _assert_(this->matpar);1129 switch(enum_in){ // FIXME: change this to material1130 case MaterialsRheologyNEnum:1131 return this->material->GetN();1132 case MaterialsRheologyBEnum:1133 return this->material->GetB();1134 case MaterialsRheologyBbarEnum:1135 return this->material->GetBbar();1136 default:1137 return this->matpar->GetMaterialParameter(enum_in);1138 }1139 }1140 /*}}}*/1141 1125 /*FUNCTION Tria::GetVerticesCoordinates(IssmDouble** pxyz_list){{{*/ 1142 1126 void Tria::GetVerticesCoordinates(IssmDouble** pxyz_list){ … … 2209 2193 _printf_("list of vertices on surface: "<<values[0]<<" "<<values[1]<<" "<<values[2]); 2210 2194 _error_("Could not find 2 vertices on surface"); 2211 }2212 /*}}}*/2213 /*FUNCTION Tria::IsFloating {{{*/2214 bool Tria::IsFloating(){2215 2216 bool shelf;2217 int migration_style;2218 parameters->FindParam(&migration_style,GroundinglineMigrationEnum);2219 2220 if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating2221 if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true;2222 else shelf=false;2223 }2224 else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating2225 if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false;2226 else shelf=true;2227 }2228 else _error_("migration_style not implemented yet");2229 2230 return shelf;2231 2195 } 2232 2196 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r16912 r16913 97 97 int EdgeOnBedIndex(); 98 98 int EdgeOnSurfaceIndex(); 99 bool IsFloating();100 99 bool IsNodeOnShelfFromFlags(IssmDouble* flags); 101 100 int NumberofNodesVelocity(void); … … 256 255 void NormalTop(IssmDouble* normal,IssmDouble* xyz_list); 257 256 void NormalBase(IssmDouble* normal,IssmDouble* xyz_list); 258 IssmDouble GetMaterialParameter(int enum_in);259 257 Input* GetMaterialInput(int inputenum); 260 258 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
Note:
See TracChangeset
for help on using the changeset viewer.