Changeset 16910
- Timestamp:
- 11/24/13 10:22:53 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.h
r16907 r16910 23 23 class Matpar; 24 24 class Input; 25 class Inputs; 25 26 class Gauss; 26 27 class ElementVector; … … 33 34 class Element: public Object,public Update{ 34 35 36 public: 37 Inputs *inputs; 38 Node **nodes; 39 35 40 public: 36 37 virtual ~Element(){}; 38 39 virtual bool AllActive(void)=0; 40 virtual bool AnyActive(void)=0; 41 /*Constructors/Destructores*/ 42 Element(); 43 ~Element(); 44 45 /*Functions*/ 46 void AddInput(Input* input_in); 47 bool AllActive(void); 48 bool AnyActive(void); 49 Input* GetInput(int inputenum); 50 51 /*Virtual functions*/ 52 virtual void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum)=0; 53 virtual void AddInput(int input_enum, IssmDouble* values, int interpolation_enum)=0; 54 virtual void AddMaterialInput(int input_enum, IssmDouble* values, int interpolation_enum)=0; 41 55 virtual IssmDouble CharacteristicLength(void)=0; 42 56 virtual void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0; 43 57 virtual void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters)=0; 44 58 virtual void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum)=0; 45 virtual void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;46 virtual void AddInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;47 virtual void AddInput(Input* input_in)=0;48 virtual void AddMaterialInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;49 59 virtual ElementMatrix* CreateKMatrix(void)=0; 50 60 virtual void CreateDVector(Vector<IssmDouble>* df)=0; … … 114 124 virtual void GetInputListOnVertices(IssmDouble* pvalue,int enumtype)=0; 115 125 virtual void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue)=0; 116 virtual Input* GetInput(int inputenum)=0;117 126 virtual Input* GetMaterialInput(int inputenum)=0; 118 127 virtual void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16908 r16910 22 22 /*FUNCTION Penta::Penta(){{{*/ 23 23 Penta::Penta(){ 24 25 this->nodes = NULL;26 24 this->vertices = NULL; 27 25 this->material = NULL; … … 34 32 /*FUNCTION Penta::~Penta(){{{*/ 35 33 Penta::~Penta(){ 36 delete inputs;37 34 this->parameters=NULL; 38 35 } … … 126 123 _assert_(this->inputs); 127 124 this->inputs->AddInput(new PentaInput(input_enum,values,interpolation_enum)); 128 }129 /*}}}*/130 /*FUNCTION Tria::AddInput{{{*/131 void Penta::AddInput(Input* input_in){132 133 /*Call inputs method*/134 _assert_(this->inputs);135 this->inputs->AddInput(input_in);136 125 } 137 126 /*}}}*/ … … 1319 1308 int Penta::GetNumberOfVertices(void){ 1320 1309 return NUMVERTICES; 1321 }1322 /*}}}*/1323 /*FUNCTION Penta::GetInput(int inputenum) {{{*/1324 Input* Penta::GetInput(int inputenum){1325 return inputs->GetInput(inputenum);1326 1310 } 1327 1311 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r16907 r16910 35 35 int sid; 36 36 37 Node **nodes; // set of nodes38 37 Vertex **vertices; // 6 vertices 39 38 Material *material; // 1 material ice … … 42 41 43 42 Parameters *parameters; //pointer to solution parameters 44 Inputs *inputs;45 43 46 44 /*Penta constructors and destructor: {{{*/ … … 68 66 /*}}}*/ 69 67 /*Element virtual functions definitions: {{{*/ 70 bool AllActive(void){_error_("not implemented yet");};71 bool AnyActive(void){_error_("not implemented yet");};72 68 void BasalFrictionCreateInput(void); 73 69 IssmDouble CharacteristicLength(void){_error_("not implemented yet");}; … … 209 205 void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum); 210 206 void AddInput(int input_enum, IssmDouble* values, int interpolation_enum); 211 void AddInput(Input* input_in);212 207 void AddMaterialInput(int input_enum, IssmDouble* values, int interpolation_enum); 213 208 void NormalBase(IssmDouble* bed_normal, IssmDouble* xyz_list); … … 232 227 void GetConnectivityList(int* connectivity); 233 228 int GetElementType(void); 234 Input* GetInput(int inputenum);235 229 Input* GetMaterialInput(int inputenum); 236 230 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype); -
issm/trunk-jpl/src/c/classes/Elements/Seg.cpp
r16876 r16910 21 21 /*FUNCTION Seg::Seg(){{{*/ 22 22 Seg::Seg(){ 23 this->nodes = NULL;24 23 this->vertices = NULL; 25 24 this->material = NULL; … … 48 47 this->material = NULL; 49 48 this->matpar = NULL; 50 51 49 } 52 50 /*}}}*/ 53 51 /*FUNCTION Seg::~Seg(){{{*/ 54 52 Seg::~Seg(){ 55 delete inputs;56 53 this->parameters=NULL; 57 54 } … … 524 521 } 525 522 /*}}}*/ 526 /*FUNCTION Seg::GetInput(int inputenum) {{{*/527 Input* Seg::GetInput(int inputenum){528 return inputs->GetInput(inputenum);529 }530 /*}}}*/531 523 /*FUNCTION Seg::GetNumberOfNodes;{{{*/ 532 524 int Seg::GetNumberOfNodes(void){ -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r16907 r16910 33 33 int sid; 34 34 35 Node **nodes; // nodes36 35 Vertex **vertices; // 3 vertices 37 36 Material *material; // 1 material ice … … 39 38 40 39 Parameters *parameters; //pointer to solution parameters 41 Inputs *inputs;42 40 43 41 /*Seg constructors, destructors {{{*/ … … 67 65 /*}}}*/ 68 66 /*Element virtual functions definitions: {{{*/ 69 bool AllActive(void){_error_("not implemented yet");};70 bool AnyActive(void){_error_("not implemented yet");};71 67 void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum){_error_("not implemented yet");}; 72 68 void AddInput(int input_enum, IssmDouble* values, int interpolation_enum){_error_("not implemented yet");}; 73 void AddInput(Input* input_in){_error_("not implemented yet");};74 69 void AddMaterialInput(int input_enum, IssmDouble* values, int interpolation_enum){_error_("not implemented yet");}; 75 70 IssmDouble CharacteristicLength(void){_error_("not implemented yet");}; … … 145 140 void GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating){_error_("not implemented yet");}; 146 141 IssmDouble GetGroundedPortion(IssmDouble* xyz_list){_error_("not implemented yet");}; 147 Input* GetInput(int inputenum);148 142 Input* GetMaterialInput(int inputenum){_error_("not implemented yet");}; 149 143 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16900 r16910 26 26 /*FUNCTION Tria::Tria(){{{*/ 27 27 Tria::Tria(){ 28 this->nodes = NULL;29 28 this->vertices = NULL; 30 29 this->material = NULL; … … 32 31 this->inputs = NULL; 33 32 this->parameters = NULL; 34 35 33 } 36 34 /*}}}*/ … … 54 52 this->material = NULL; 55 53 this->matpar = NULL; 56 57 54 } 58 55 /*}}}*/ 59 56 /*FUNCTION Tria::~Tria(){{{*/ 60 57 Tria::~Tria(){ 61 delete inputs;62 58 this->parameters=NULL; 63 59 } … … 189 185 _assert_(this->inputs); 190 186 this->inputs->AddInput(new TriaInput(input_enum,values,interpolation_enum)); 191 }192 /*}}}*/193 /*FUNCTION Tria::AddInput{{{*/194 void Tria::AddInput(Input* input_in){195 196 /*Call inputs method*/197 _assert_(this->inputs);198 this->inputs->AddInput(input_in);199 187 } 200 188 /*}}}*/ … … 1395 1383 int Tria::GetNumberOfVertices(void){ 1396 1384 return NUMVERTICES; 1397 }1398 /*}}}*/1399 /*FUNCTION Tria::GetInput(int inputenum) {{{*/1400 Input* Tria::GetInput(int inputenum){1401 return inputs->GetInput(inputenum);1402 1385 } 1403 1386 /*}}}*/ … … 6400 6383 6401 6384 #ifdef _HAVE_HYDROLOGY_ 6402 /*FUNCTION Tria::AllActive{{{*/6403 bool Tria::AllActive(void){6404 6405 /*Intermediaries*/6406 const int numnodes = NUMVERTICES;6407 6408 for(int i=0;i<numnodes;i++){6409 if(!this->nodes[i]->IsActive()) return false;6410 }6411 6412 return true;6413 }6414 /*}}}*/6415 /*FUNCTION Tria::AnyActive{{{*/6416 bool Tria::AnyActive(void){6417 6418 /*Intermediaries*/6419 const int numnodes = NUMVERTICES;6420 6421 for(int i=0;i<numnodes;i++){6422 if(this->nodes[i]->IsActive()) return true;6423 }6424 6425 return false;6426 }/*}}}*/6427 6385 /*FUNCTION Tria::CreateHydrologyWaterVelocityInput {{{*/ 6428 6386 void Tria::CreateHydrologyWaterVelocityInput(void){ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r16907 r16910 35 35 int sid; 36 36 37 Node **nodes; // nodes38 37 Vertex **vertices; // 3 vertices 39 38 Material *material; // 1 material ice … … 41 40 42 41 Parameters *parameters; //pointer to solution parameters 43 Inputs *inputs;44 42 45 43 /*Tria constructors, destructors {{{*/ … … 67 65 /*}}}*/ 68 66 /*Element virtual functions definitions: {{{*/ 69 bool AllActive(void);70 bool AnyActive(void);71 67 IssmDouble CharacteristicLength(void); 72 68 void ComputeBasalStress(Vector<IssmDouble>* sigma_b); … … 220 216 void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum); 221 217 void AddInput(int input_enum, IssmDouble* values, int interpolation_enum); 222 void AddInput(Input* input_in);223 218 void AddMaterialInput(int input_enum, IssmDouble* values, int interpolation_enum); 224 219 ElementMatrix* CreateKMatrix(void); … … 273 268 void NormalBase(IssmDouble* normal,IssmDouble* xyz_list); 274 269 IssmDouble GetMaterialParameter(int enum_in); 275 Input* GetInput(int inputenum);276 270 Input* GetMaterialInput(int inputenum); 277 271 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
Note:
See TracChangeset
for help on using the changeset viewer.