Changeset 3432
- Timestamp:
- 04/07/10 16:19:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Node.cpp
r3430 r3432 52 52 } 53 53 /*}}}*/ 54 /*FUNCTION Node constructor from iomodel{{{2*/54 /*FUNCTION Node constructor from iomodel continuous Galerkin{{{2*/ 55 55 Node::Node(int i, IoModel* iomodel){ //i is the node index 56 56 … … 98 98 99 99 /*set single point constraints.: */ 100 /*FROM DIAGNOSTICHORIZ*/ 100 101 if (strcmp(iomodel->meshtype,"3d")==0){ 101 102 /*We have a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */ … … 111 112 } 112 113 } 114 /*FROM DIAGNOSTICSTOKES*/ 113 115 /*On a 3d mesh, in stokes formualtions, only stokes grids are free, the others are frozen: */ 114 116 if (iomodel->borderstokes[i]){ … … 123 125 } 124 126 } 127 /*FROM DIAGNOSTICHUTTER*/ 128 if (!iomodel->gridonhutter[i]){ 129 for(k=1;k<=numdofs;k++){ 130 node->FreezeDof(k); 131 } 132 } 133 } 134 /*}}}*/ 135 /*FUNCTION Node constructor from iomodel discontinuous Galerkin{{{2*/ 136 Node::Node(int i,int j,IoModel* iomodel){ 137 /* i -> index of the vertex in C indexing 138 * j -> index of the node in C indexing*/ 139 140 int numdofs; 141 int partitionborder; 142 int vertex_id; 143 int upper_node_id; 144 145 /*id: */ 146 this->id=j+1; //matlab indexing 147 148 /*indexing:*/ 149 DistributeNumDofs(&numdofs,iomodel->analysis_type,iomodel->sub_analysis_type); //number of dofs per node 150 if(iomodel->my_bordervertices[i])partitionborder=1; else partitionborder=0;//is this node on a partition border? 151 152 this->indexing.Init(numdofs,partitionborder); 153 154 /*properties (come from vertex number i): */ 155 this->properties.Init( 156 (int)iomodel->gridonbed[i], 157 (int)iomodel->gridonsurface[i], 158 (int)iomodel->gridoniceshelf[i], 159 (int)iomodel->gridonicesheet[i]); 160 161 /*hooks: */ 162 vertex_id=i+1; //matlab indexing 163 164 if (strcmp(iomodel->meshtype,"3d")==0){ 165 if (isnan(iomodel->uppernodes[i])){ 166 upper_node_id=this->id; //nodes on surface do not have upper nodes, only themselves. 167 } 168 else{ 169 upper_node_id=(int)iomodel->uppernodes[i]; 170 } 171 } 172 else{ 173 /*If we are running 2d, upper_node does not mean much. Just point towards itself!:*/ 174 upper_node_id=this->id; 175 } 176 177 this->hvertex.Init(&vertex_id,1); 178 this->hupper_node.Init(&upper_node_id,1); 179 125 180 } 126 181 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.