source:
issm/oecreview/Archive/16554-17801/ISSM-16912-16913.diff@
17802
Last change on this file since 17802 was 17802, checked in by , 11 years ago | |
---|---|
File size: 12.0 KB |
-
../trunk-jpl/src/c/classes/Elements/Element.h
50 50 ~Element(); 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*/ 64 66 virtual void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum)=0; … … 69 71 virtual void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters)=0; 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; 72 virtual void CreateDVector(Vector<IssmDouble>* df)=0;73 74 virtual ElementVector* CreatePVector(void)=0; 75 virtual void CreateDVector(Vector<IssmDouble>* df)=0; 74 76 virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0; 75 77 virtual void ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0; 76 78 virtual void EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure)=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; 84 84 virtual void NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss)=0; … … 121 121 virtual void GetNodesLidList(int* sidlist)=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; 127 126 virtual bool IsOnSurface()=0; -
../trunk-jpl/src/c/classes/Elements/Tria.cpp
1122 1122 return phi; 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){ 1143 1127 … … 2210 2194 _error_("Could not find 2 vertices on surface"); 2211 2195 } 2212 2196 /*}}}*/ 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 }2232 /*}}}*/2233 2197 /*FUNCTION Tria::IsNodeOnShelfFromFlags {{{*/ 2234 2198 bool Tria::IsNodeOnShelfFromFlags(IssmDouble* flags){ 2235 2199 -
../trunk-jpl/src/c/classes/Elements/Tria.h
96 96 void EdgeOnBedIndices(int* pindex1,int* pindex); 97 97 int EdgeOnBedIndex(); 98 98 int EdgeOnSurfaceIndex(); 99 bool IsFloating();100 99 bool IsNodeOnShelfFromFlags(IssmDouble* flags); 101 100 int NumberofNodesVelocity(void); 102 101 int NumberofNodesPressure(void); … … 255 254 void NormalSection(IssmDouble* normal,IssmDouble* xyz_list); 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); 261 259 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue); -
../trunk-jpl/src/c/classes/Elements/Penta.cpp
989 989 *pdoflist=doflist; 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){ 1008 994 /*Computeportion of the element that is grounded*/ … … 2343 2329 else return false; 2344 2330 } 2345 2331 /*}}}*/ 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 }2365 /*}}}*/2366 2332 /*FUNCTION Penta::IsNodeOnShelfFromFlags {{{*/ 2367 2333 bool Penta::IsNodeOnShelfFromFlags(IssmDouble* flags){ 2368 2334 -
../trunk-jpl/src/c/classes/Elements/Penta.h
87 87 int GetNumberOfNodesPressure(void); 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); 93 92 IssmDouble GetYcoord(Gauss* gauss){_error_("Not implemented");}; … … 240 239 bool IsInput(int name); 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); 246 244 void JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss); -
../trunk-jpl/src/c/classes/Elements/Seg.cpp
123 123 } 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){ 135 128 -
../trunk-jpl/src/c/classes/Elements/Seg.h
85 85 void GetDofListPressure(int** pdoflist,int setenum){_error_("not implemented yet");}; 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");}; 91 90 void GetNodesLidList(int* lidlist){_error_("not implemented yet");}; … … 100 99 void InputChangeName(int input_enum, int enum_type_old){_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); 106 104 void JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");}; -
../trunk-jpl/src/c/classes/Elements/Element.cpp
67 67 void Element::FindParam(int** pvalues,int* psize,int paramenum){/*{{{*/ 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 }/*}}}*/
Note:
See TracBrowser
for help on using the repository browser.