Changeset 3451
- Timestamp:
- 04/08/10 08:03:47 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Node.cpp
r3446 r3451 67 67 /*indexing:*/ 68 68 DistributeNumDofs(&numdofs,iomodel->analysis_type,iomodel->sub_analysis_type); //number of dofs per node 69 if(iomodel->my_bordervertices[i]) partitionborder=1; else partitionborder=0;//is this node on a partition border?69 if(iomodel->my_bordervertices[i]) partitionborder=1; else partitionborder=0;//is this node on a partition border? 70 70 71 71 this->indexing.Init(numdofs,partitionborder); 72 72 73 73 /*properties: */ 74 this->properties.Init( 75 (int)iomodel->gridonbed[i], 76 (int)iomodel->gridonsurface[i], 77 (int)iomodel->gridoniceshelf[i], 78 (int)iomodel->gridonicesheet[i]); 74 this->properties.Init(i,iomodel); 79 75 80 76 /*hooks: */ … … 97 93 this->hupper_node.Init(&upper_node_id,1); 98 94 99 /*set single point constraints.: */ 100 /*FROM DIAGNOSTICHORIZ*/ 101 if (strcmp(iomodel->meshtype,"3d")==0){ 102 /*We have a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */ 103 if (iomodel->deadgrids[i]){ 95 /*set single point constraints: */ 96 97 /*Diagnostic Horiz*/ 98 if (iomodel->analysis_type==DiagnosticAnalysisEnum() && iomodel->sub_analysis_type==HorizAnalysisEnum()){ 99 if (strcmp(iomodel->meshtype,"3d")==0){ 100 /*We have a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */ 101 if (!iomodel->deadgrids) ISSMERROR("iomodel->deadgrids is NULL"); 102 if (iomodel->deadgrids[i]){ 103 for(k=1;k<=numdofs;k++){ 104 this->FreezeDof(k); 105 } 106 } 107 } 108 /*spc all nodes on hutter*/ 109 if (!iomodel->gridonhutter) ISSMERROR("iomodel->gridonhutter is NULL"); 110 if (iomodel->gridonhutter[i]){ 104 111 for(k=1;k<=numdofs;k++){ 105 112 this->FreezeDof(k); … … 107 114 } 108 115 } 109 if (iomodel->gridonhutter[i]){ 110 for(k=1;k<=numdofs;k++){ 111 this->FreezeDof(k); 112 } 113 } 114 /*FROM DIAGNOSTICSTOKES*/ 115 /*On a 3d mesh, in stokes formualtions, only stokes grids are free, the others are frozen: */ 116 if (iomodel->borderstokes[i]){ 117 //freeze everything except pressure 118 this->FreezeDof(1); 119 this->FreezeDof(2); 120 this->FreezeDof(3); 121 } 122 else if (iomodel->gridonstokes[i]==0){ 123 for(k=1;k<=numdofs;k++){ 124 this->FreezeDof(k); 125 } 126 } 127 /*FROM DIAGNOSTICHUTTER*/ 128 if (!iomodel->gridonhutter[i]){ 129 for(k=1;k<=numdofs;k++){ 130 this->FreezeDof(k); 131 } 132 } 133 /*FROM PROGNOSTIC/BALANCESVEL/BALANCEDTHICK*/ 134 if (strcmp(iomodel->meshtype,"3d")==0){ 135 /*On a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */ 136 if (!iomodel->gridonbed[i]){ 116 117 /*Diagnostic Stokes*/ 118 if (iomodel->analysis_type==DiagnosticAnalysisEnum() && iomodel->sub_analysis_type==StokesAnalysisEnum()){ 119 /*On a 3d mesh, in stokes formualtions, only stokes grids are free, the others are frozen: */ 120 if (!iomodel->borderstokes) ISSMERROR("iomodel->borderstokes is NULL"); 121 if (iomodel->borderstokes[i]){ 122 //freeze everything except pressure 123 this->FreezeDof(1); 124 this->FreezeDof(2); 125 this->FreezeDof(3); 126 } 127 else if (iomodel->gridonstokes[i]==0){ 137 128 for(k=1;k<=numdofs;k++){ 138 129 this->FreezeDof(k); 130 } 131 } 132 } 133 134 /*Diagnostic Hutter*/ 135 if (iomodel->analysis_type==DiagnosticAnalysisEnum() && iomodel->sub_analysis_type==HutterAnalysisEnum()){ 136 /*Spc all nodes that are not Hutter*/ 137 if (!iomodel->gridonhutter) ISSMERROR("iomodel->gridonhutter is NULL"); 138 if (!iomodel->gridonhutter[i]){ 139 for(k=1;k<=numdofs;k++){ 140 this->FreezeDof(k); 141 } 142 } 143 } 144 145 /*Prognostic/ Balancedvelocities/ Balancedthickness*/ 146 if (iomodel->analysis_type==PrognosticAnalysisEnum() || iomodel->analysis_type==BalancedvelocitiesAnalysisEnum() || iomodel->analysis_type==BalancedthicknessAnalysisEnum()){ 147 if (strcmp(iomodel->meshtype,"3d")==0){ 148 /*On a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */ 149 if (!iomodel->gridonbed) ISSMERROR("iomodel->gridonbed is NULL"); 150 if (!iomodel->gridonbed[i]){ 151 for(k=1;k<=numdofs;k++){ 152 this->FreezeDof(k); 153 } 139 154 } 140 155 } -
issm/trunk/src/c/objects/Node.h
r3446 r3451 5 5 #ifndef _NODE_H_ 6 6 #define _NODE_H_ 7 8 7 9 8 /*indefinitions: */ -
issm/trunk/src/c/objects/NodeProperties.cpp
r3420 r3451 35 35 } 36 36 /*}}}*/ 37 /*FUNCTION NodeProperties init: used by constructor {{{1*/37 /*FUNCTION NodeProperties Init: used by constructor {{{1*/ 38 38 void NodeProperties::Init(int nodeproperties_onbed, int nodeproperties_onsurface, int nodeproperties_onshelf, int nodeproperties_onsheet){ 39 39 … … 42 42 this->onshelf=nodeproperties_onshelf; 43 43 this->onsheet=nodeproperties_onsheet; 44 45 } 46 /*}}}*/ 47 /*FUNCTION NodeProperties Init from iomodel: used by constructor {{{1*/ 48 void NodeProperties::Init(int i, IoModel* iomodel){ //i is the node index 49 50 if (iomodel->gridonbed) this->onbed=(int)iomodel->gridonbed[i]; 51 if (iomodel->gridonsurface) this->onsurface=(int)iomodel->gridonsurface[i]; 52 if (iomodel->gridoniceshelf) this->onshelf=(int)iomodel->gridoniceshelf[i]; 53 if (iomodel->gridonicesheet) this->onsheet=(int)iomodel->gridonicesheet[i]; 44 54 45 55 } -
issm/trunk/src/c/objects/NodeProperties.h
r3420 r3451 5 5 #ifndef _NODEPROPERTIES_H_ 6 6 #define _NODEPROPERTIES_H_ 7 8 /*indefinitions: */ 9 struct IoModel; 7 10 8 11 class NodeProperties{ … … 18 21 NodeProperties(int onbed, int onsurface, int onshelf, int onsheet); 19 22 void Init(int onbed, int onsurface, int onshelf, int onsheet); 23 void Init(int i, IoModel* iomodel); 20 24 NodeProperties(NodeProperties* properties); 21 25 ~NodeProperties();
Note:
See TracChangeset
for help on using the changeset viewer.