[17802] | 1 | Index: ../trunk-jpl/src/c/classes/Elements/Element.h
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/classes/Elements/Element.h (revision 16912)
|
---|
| 4 | +++ ../trunk-jpl/src/c/classes/Elements/Element.h (revision 16913)
|
---|
| 5 | @@ -50,15 +50,17 @@
|
---|
| 6 | ~Element();
|
---|
| 7 |
|
---|
| 8 | /*Functions*/
|
---|
| 9 | - void AddInput(Input* input_in);
|
---|
| 10 | - bool AllActive(void);
|
---|
| 11 | - bool AnyActive(void);
|
---|
| 12 | - void DeleteMaterials(void);
|
---|
| 13 | - void FindParam(bool* pvalue,int paramenum);
|
---|
| 14 | - void FindParam(int* pvalue,int paramenum);
|
---|
| 15 | - void FindParam(IssmDouble* pvalue,int paramenum);
|
---|
| 16 | - void FindParam(int** pvalues,int* psize,int paramenum);
|
---|
| 17 | - Input* GetInput(int inputenum);
|
---|
| 18 | + void AddInput(Input* input_in);
|
---|
| 19 | + bool AllActive(void);
|
---|
| 20 | + bool AnyActive(void);
|
---|
| 21 | + void DeleteMaterials(void);
|
---|
| 22 | + void FindParam(bool* pvalue,int paramenum);
|
---|
| 23 | + void FindParam(int* pvalue,int paramenum);
|
---|
| 24 | + void FindParam(IssmDouble* pvalue,int paramenum);
|
---|
| 25 | + void FindParam(int** pvalues,int* psize,int paramenum);
|
---|
| 26 | + Input* GetInput(int inputenum);
|
---|
| 27 | + IssmDouble GetMaterialParameter(int enum_in);
|
---|
| 28 | + bool IsFloating();
|
---|
| 29 |
|
---|
| 30 | /*Virtual functions*/
|
---|
| 31 | virtual void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;
|
---|
| 32 | @@ -69,16 +71,14 @@
|
---|
| 33 | virtual void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters)=0;
|
---|
| 34 | virtual void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum)=0;
|
---|
| 35 | virtual ElementMatrix* CreateKMatrix(void)=0;
|
---|
| 36 | - virtual void CreateDVector(Vector<IssmDouble>* df)=0;
|
---|
| 37 | virtual ElementVector* CreatePVector(void)=0;
|
---|
| 38 | + virtual void CreateDVector(Vector<IssmDouble>* df)=0;
|
---|
| 39 | virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0;
|
---|
| 40 | virtual void ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0;
|
---|
| 41 | virtual void EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure)=0;
|
---|
| 42 | virtual IssmDouble EnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure)=0;
|
---|
| 43 | virtual IssmDouble EnthalpyDiffusionParameterVolume(int numvertices,IssmDouble* enthalpy,IssmDouble* pressure)=0;
|
---|
| 44 | -
|
---|
| 45 | virtual int FiniteElement(void)=0;
|
---|
| 46 | - virtual IssmDouble GetMaterialParameter(int enum_in)=0;
|
---|
| 47 | virtual IssmDouble MinEdgeLength(IssmDouble* xyz_list)=0;
|
---|
| 48 | virtual void NodalFunctions(IssmDouble* basis,Gauss* gauss)=0;
|
---|
| 49 | virtual void NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss)=0;
|
---|
| 50 | @@ -121,7 +121,6 @@
|
---|
| 51 | virtual void GetNodesLidList(int* sidlist)=0;
|
---|
| 52 |
|
---|
| 53 | virtual int Sid()=0;
|
---|
| 54 | - virtual bool IsFloating()=0;
|
---|
| 55 | virtual bool IsNodeOnShelfFromFlags(IssmDouble* flags)=0;
|
---|
| 56 | virtual bool IsOnBed()=0;
|
---|
| 57 | virtual bool IsOnSurface()=0;
|
---|
| 58 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp
|
---|
| 59 | ===================================================================
|
---|
| 60 | --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 16912)
|
---|
| 61 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 16913)
|
---|
| 62 | @@ -1122,22 +1122,6 @@
|
---|
| 63 | return phi;
|
---|
| 64 | }
|
---|
| 65 | /*}}}*/
|
---|
| 66 | -/*FUNCTION Tria::GetMaterialParameter{{{*/
|
---|
| 67 | -IssmDouble Tria::GetMaterialParameter(int enum_in){
|
---|
| 68 | -
|
---|
| 69 | - _assert_(this->matpar);
|
---|
| 70 | - switch(enum_in){ // FIXME: change this to material
|
---|
| 71 | - case MaterialsRheologyNEnum:
|
---|
| 72 | - return this->material->GetN();
|
---|
| 73 | - case MaterialsRheologyBEnum:
|
---|
| 74 | - return this->material->GetB();
|
---|
| 75 | - case MaterialsRheologyBbarEnum:
|
---|
| 76 | - return this->material->GetBbar();
|
---|
| 77 | - default:
|
---|
| 78 | - return this->matpar->GetMaterialParameter(enum_in);
|
---|
| 79 | - }
|
---|
| 80 | -}
|
---|
| 81 | -/*}}}*/
|
---|
| 82 | /*FUNCTION Tria::GetVerticesCoordinates(IssmDouble** pxyz_list){{{*/
|
---|
| 83 | void Tria::GetVerticesCoordinates(IssmDouble** pxyz_list){
|
---|
| 84 |
|
---|
| 85 | @@ -2210,26 +2194,6 @@
|
---|
| 86 | _error_("Could not find 2 vertices on surface");
|
---|
| 87 | }
|
---|
| 88 | /*}}}*/
|
---|
| 89 | -/*FUNCTION Tria::IsFloating {{{*/
|
---|
| 90 | -bool Tria::IsFloating(){
|
---|
| 91 | -
|
---|
| 92 | - bool shelf;
|
---|
| 93 | - int migration_style;
|
---|
| 94 | - parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
|
---|
| 95 | -
|
---|
| 96 | - if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating
|
---|
| 97 | - if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true;
|
---|
| 98 | - else shelf=false;
|
---|
| 99 | - }
|
---|
| 100 | - else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating
|
---|
| 101 | - if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false;
|
---|
| 102 | - else shelf=true;
|
---|
| 103 | - }
|
---|
| 104 | - else _error_("migration_style not implemented yet");
|
---|
| 105 | -
|
---|
| 106 | - return shelf;
|
---|
| 107 | -}
|
---|
| 108 | -/*}}}*/
|
---|
| 109 | /*FUNCTION Tria::IsNodeOnShelfFromFlags {{{*/
|
---|
| 110 | bool Tria::IsNodeOnShelfFromFlags(IssmDouble* flags){
|
---|
| 111 |
|
---|
| 112 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.h
|
---|
| 113 | ===================================================================
|
---|
| 114 | --- ../trunk-jpl/src/c/classes/Elements/Tria.h (revision 16912)
|
---|
| 115 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.h (revision 16913)
|
---|
| 116 | @@ -96,7 +96,6 @@
|
---|
| 117 | void EdgeOnBedIndices(int* pindex1,int* pindex);
|
---|
| 118 | int EdgeOnBedIndex();
|
---|
| 119 | int EdgeOnSurfaceIndex();
|
---|
| 120 | - bool IsFloating();
|
---|
| 121 | bool IsNodeOnShelfFromFlags(IssmDouble* flags);
|
---|
| 122 | int NumberofNodesVelocity(void);
|
---|
| 123 | int NumberofNodesPressure(void);
|
---|
| 124 | @@ -255,7 +254,6 @@
|
---|
| 125 | void NormalSection(IssmDouble* normal,IssmDouble* xyz_list);
|
---|
| 126 | void NormalTop(IssmDouble* normal,IssmDouble* xyz_list);
|
---|
| 127 | void NormalBase(IssmDouble* normal,IssmDouble* xyz_list);
|
---|
| 128 | - IssmDouble GetMaterialParameter(int enum_in);
|
---|
| 129 | Input* GetMaterialInput(int inputenum);
|
---|
| 130 | void GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
|
---|
| 131 | void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
|
---|
| 132 | Index: ../trunk-jpl/src/c/classes/Elements/Penta.cpp
|
---|
| 133 | ===================================================================
|
---|
| 134 | --- ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 16912)
|
---|
| 135 | +++ ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 16913)
|
---|
| 136 | @@ -989,20 +989,6 @@
|
---|
| 137 | *pdoflist=doflist;
|
---|
| 138 | }
|
---|
| 139 | /*}}}*/
|
---|
| 140 | -/*FUNCTION Penta::GetMaterialParameter{{{*/
|
---|
| 141 | -IssmDouble Penta::GetMaterialParameter(int enum_in){
|
---|
| 142 | -
|
---|
| 143 | - _assert_(this->matpar);
|
---|
| 144 | - switch(enum_in){ // FIXME: change this to material
|
---|
| 145 | - case MaterialsRheologyNEnum:
|
---|
| 146 | - return this->material->GetN();
|
---|
| 147 | - case MaterialsRheologyBEnum:
|
---|
| 148 | - return this->material->GetB();
|
---|
| 149 | - default:
|
---|
| 150 | - return this->matpar->GetMaterialParameter(enum_in);
|
---|
| 151 | - }
|
---|
| 152 | -}
|
---|
| 153 | -/*}}}*/
|
---|
| 154 | /*FUNCTION Penta::GetGroundedPart{{{*/
|
---|
| 155 | void Penta::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating){
|
---|
| 156 | /*Computeportion of the element that is grounded*/
|
---|
| 157 | @@ -2343,26 +2329,6 @@
|
---|
| 158 | else return false;
|
---|
| 159 | }
|
---|
| 160 | /*}}}*/
|
---|
| 161 | -/*FUNCTION Penta::IsFloating{{{*/
|
---|
| 162 | -bool Penta::IsFloating(){
|
---|
| 163 | -
|
---|
| 164 | - bool shelf;
|
---|
| 165 | - int migration_style;
|
---|
| 166 | - parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
|
---|
| 167 | -
|
---|
| 168 | - if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating
|
---|
| 169 | - if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true;
|
---|
| 170 | - else shelf=false;
|
---|
| 171 | - }
|
---|
| 172 | - else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating
|
---|
| 173 | - if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false;
|
---|
| 174 | - else shelf=true;
|
---|
| 175 | - }
|
---|
| 176 | - else _error_("migration_style not implemented yet");
|
---|
| 177 | -
|
---|
| 178 | - return shelf;
|
---|
| 179 | -}
|
---|
| 180 | -/*}}}*/
|
---|
| 181 | /*FUNCTION Penta::IsNodeOnShelfFromFlags {{{*/
|
---|
| 182 | bool Penta::IsNodeOnShelfFromFlags(IssmDouble* flags){
|
---|
| 183 |
|
---|
| 184 | Index: ../trunk-jpl/src/c/classes/Elements/Penta.h
|
---|
| 185 | ===================================================================
|
---|
| 186 | --- ../trunk-jpl/src/c/classes/Elements/Penta.h (revision 16912)
|
---|
| 187 | +++ ../trunk-jpl/src/c/classes/Elements/Penta.h (revision 16913)
|
---|
| 188 | @@ -87,7 +87,6 @@
|
---|
| 189 | int GetNumberOfNodesPressure(void);
|
---|
| 190 | int GetNumberOfNodesVelocity(void);
|
---|
| 191 | int GetNumberOfVertices(void);
|
---|
| 192 | - IssmDouble GetMaterialParameter(int enum_in);
|
---|
| 193 | void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type);
|
---|
| 194 | IssmDouble GetZcoord(Gauss* gauss);
|
---|
| 195 | IssmDouble GetYcoord(Gauss* gauss){_error_("Not implemented");};
|
---|
| 196 | @@ -240,7 +239,6 @@
|
---|
| 197 | bool IsInput(int name);
|
---|
| 198 | bool IsOnSurface(void);
|
---|
| 199 | bool IsOnBed(void);
|
---|
| 200 | - bool IsFloating(void);
|
---|
| 201 | bool IsNodeOnShelfFromFlags(IssmDouble* flags);
|
---|
| 202 | void JacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss);
|
---|
| 203 | void JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss);
|
---|
| 204 | Index: ../trunk-jpl/src/c/classes/Elements/Seg.cpp
|
---|
| 205 | ===================================================================
|
---|
| 206 | --- ../trunk-jpl/src/c/classes/Elements/Seg.cpp (revision 16912)
|
---|
| 207 | +++ ../trunk-jpl/src/c/classes/Elements/Seg.cpp (revision 16913)
|
---|
| 208 | @@ -123,13 +123,6 @@
|
---|
| 209 | }
|
---|
| 210 | /*}}}*/
|
---|
| 211 |
|
---|
| 212 | -/*FUNCTION Seg::GetMaterialParameter{{{*/
|
---|
| 213 | -IssmDouble Seg::GetMaterialParameter(int enum_in){
|
---|
| 214 | -
|
---|
| 215 | - _assert_(this->matpar);
|
---|
| 216 | - return this->matpar->GetMaterialParameter(enum_in);
|
---|
| 217 | -}
|
---|
| 218 | -/*}}}*/
|
---|
| 219 | /*FUNCTION Seg::GetSize{{{*/
|
---|
| 220 | IssmDouble Seg::GetSize(void){
|
---|
| 221 |
|
---|
| 222 | Index: ../trunk-jpl/src/c/classes/Elements/Seg.h
|
---|
| 223 | ===================================================================
|
---|
| 224 | --- ../trunk-jpl/src/c/classes/Elements/Seg.h (revision 16912)
|
---|
| 225 | +++ ../trunk-jpl/src/c/classes/Elements/Seg.h (revision 16913)
|
---|
| 226 | @@ -85,7 +85,6 @@
|
---|
| 227 | void GetDofListPressure(int** pdoflist,int setenum){_error_("not implemented yet");};
|
---|
| 228 | void GetInputListOnNodes(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");};
|
---|
| 229 | void GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){_error_("not implemented yet");};
|
---|
| 230 | - IssmDouble GetMaterialParameter(int enum_in);
|
---|
| 231 | int GetNodeIndex(Node* node){_error_("not implemented yet");};
|
---|
| 232 | void GetNodesSidList(int* sidlist){_error_("not implemented yet");};
|
---|
| 233 | void GetNodesLidList(int* lidlist){_error_("not implemented yet");};
|
---|
| 234 | @@ -100,7 +99,6 @@
|
---|
| 235 | void InputChangeName(int input_enum, int enum_type_old){_error_("not implemented yet");};
|
---|
| 236 | bool IsOnBed(){_error_("not implemented yet");};
|
---|
| 237 | bool IsOnSurface(){_error_("not implemented yet");};
|
---|
| 238 | - bool IsFloating(){_error_("not implemented yet");};
|
---|
| 239 | bool IsNodeOnShelfFromFlags(IssmDouble* flags){_error_("not implemented yet");};
|
---|
| 240 | void JacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss);
|
---|
| 241 | void JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
|
---|
| 242 | Index: ../trunk-jpl/src/c/classes/Elements/Element.cpp
|
---|
| 243 | ===================================================================
|
---|
| 244 | --- ../trunk-jpl/src/c/classes/Elements/Element.cpp (revision 16912)
|
---|
| 245 | +++ ../trunk-jpl/src/c/classes/Elements/Element.cpp (revision 16913)
|
---|
| 246 | @@ -67,6 +67,39 @@
|
---|
| 247 | void Element::FindParam(int** pvalues,int* psize,int paramenum){/*{{{*/
|
---|
| 248 | this->parameters->FindParam(pvalues,psize,paramenum);
|
---|
| 249 | }/*}}}*/
|
---|
| 250 | +IssmDouble Element::GetMaterialParameter(int enum_in){/*{{{*/
|
---|
| 251 | +
|
---|
| 252 | + _assert_(this->matpar);
|
---|
| 253 | + switch(enum_in){ // FIXME: change this to material
|
---|
| 254 | + case MaterialsRheologyNEnum:
|
---|
| 255 | + return this->material->GetN();
|
---|
| 256 | + case MaterialsRheologyBEnum:
|
---|
| 257 | + return this->material->GetB();
|
---|
| 258 | + case MaterialsRheologyBbarEnum:
|
---|
| 259 | + return this->material->GetBbar();
|
---|
| 260 | + default:
|
---|
| 261 | + return this->matpar->GetMaterialParameter(enum_in);
|
---|
| 262 | + }
|
---|
| 263 | +}
|
---|
| 264 | +/*}}}*/
|
---|
| 265 | Input* Element::GetInput(int inputenum){/*{{{*/
|
---|
| 266 | return inputs->GetInput(inputenum);
|
---|
| 267 | }/*}}}*/
|
---|
| 268 | +bool Element::IsFloating(){/*{{{*/
|
---|
| 269 | +
|
---|
| 270 | + bool shelf;
|
---|
| 271 | + int migration_style;
|
---|
| 272 | + parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
|
---|
| 273 | +
|
---|
| 274 | + if(migration_style==SubelementMigrationEnum || migration_style==SubelementMigration2Enum){ //Floating if all nodes are floating
|
---|
| 275 | + if(this->inputs->Max(MaskGroundediceLevelsetEnum) <= 0.) shelf=true;
|
---|
| 276 | + else shelf=false;
|
---|
| 277 | + }
|
---|
| 278 | + else if(migration_style==NoneEnum || migration_style==AgressiveMigrationEnum || migration_style==SoftMigrationEnum){ //Floating if all nodes are floating
|
---|
| 279 | + if(this->inputs->Min(MaskGroundediceLevelsetEnum) > 0.) shelf=false;
|
---|
| 280 | + else shelf=true;
|
---|
| 281 | + }
|
---|
| 282 | + else _error_("migration_style not implemented yet");
|
---|
| 283 | +
|
---|
| 284 | + return shelf;
|
---|
| 285 | +}/*}}}*/
|
---|