Changeset 5114
- Timestamp:
- 08/10/10 09:46:18 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 1 added
- 2 deleted
- 49 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Container/Nodes.cpp
r5057 r5114 44 44 /*Numerics*/ 45 45 /*FUNCTION Nodes::DistributeDofs{{{1*/ 46 void Nodes::DistributeDofs(int numberofobjects,int numberofdofsperobject,intanalysis_type){46 void Nodes::DistributeDofs(int analysis_type){ 47 47 48 48 extern int num_procs; … … 52 52 53 53 int dofcount=0; 54 int maxdofspernode=0; 54 55 int* alldofcount=NULL; 55 56 int* truedofs=NULL; 56 57 int* alltruedofs=NULL; 57 58 /*Go through objects, and distribute dofs locally, from 0 to numberofdofsperobject: */ 58 int numnodes=0; 59 60 /*Go through objects, and distribute dofs locally, from 0 to numberofdofs: */ 59 61 for (i=0;i<this->Size();i++){ 60 62 Node* node=(Node*)this->GetObjectByOffset(i); … … 65 67 } 66 68 } 69 70 67 71 68 72 /*Ok, now every object has distributed dofs, but locally, and with a dof count starting from … … 86 90 } 87 91 88 89 92 /*Ok, now every cpu knows where his dofs should start. Update the dof count: */ 90 93 for (i=0;i<this->Size();i++){ … … 101 104 * object that is not a clone, tell them to show their dofs, so that later on, they can get picked 102 105 * up by their clones: */ 103 truedofs=(int*)xcalloc(numberofobjects*numberofdofsperobject,sizeof(int)); 104 alltruedofs=(int*)xcalloc(numberofobjects*numberofdofsperobject,sizeof(int)); 106 maxdofspernode=this->MaxNumDofs(analysis_type); 107 numnodes=this->NumberOfNodes(analysis_type); 108 109 truedofs=(int*)xcalloc(numnodes*maxdofspernode,sizeof(int)); //initialize to 0, so that we can pick up the max 110 alltruedofs=(int*)xcalloc(numnodes*maxdofspernode,sizeof(int)); 105 111 106 112 for (i=0;i<this->Size();i++){ … … 108 114 Node* node=(Node*)this->GetObjectByOffset(i); 109 115 if (node->InAnalysis(analysis_type)){ 110 node->ShowTrueDofs(truedofs );111 } 112 } 113 114 MPI_Allreduce ( (void*)truedofs,(void*)alltruedofs,num berofobjects*numberofdofsperobject,MPI_INT,MPI_MAX,MPI_COMM_WORLD);116 node->ShowTrueDofs(truedofs,maxdofspernode);//give maxdofspernode, column size, so that nodes can index into truedofs 117 } 118 } 119 120 MPI_Allreduce ( (void*)truedofs,(void*)alltruedofs,numnodes*maxdofspernode,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 115 121 116 122 /*Ok, now every cpu knows the true dofs of everyone else that is not a clone. Let the clones recover those true dofs: */ … … 119 125 Node* node=(Node*)this->GetObjectByOffset(i); 120 126 if (node->InAnalysis(analysis_type)){ 121 node->UpdateCloneDofs(alltruedofs );127 node->UpdateCloneDofs(alltruedofs,maxdofspernode); //give maxdofspernode, column size, so that nodes can index into alltruedofs 122 128 } 123 129 } … … 128 134 xfree((void**)&alltruedofs); 129 135 136 130 137 } 131 138 /*}}}*/ 132 139 /*FUNCTION Nodes::FlagClones{{{1*/ 133 void Nodes::FlagClones(int numberofobjects,intanalysis_type){140 void Nodes::FlagClones(int analysis_type){ 134 141 135 142 int i; … … 138 145 int* ranks=NULL; 139 146 int* minranks=NULL; 147 int numnodes; 148 149 150 /*Figure out number of nodes for this analysis: */ 151 numnodes=this->NumberOfNodes(analysis_type); 140 152 141 153 /*Allocate ranks: */ 142 ranks=(int*)xmalloc(num berofobjects*sizeof(int));143 minranks=(int*)xmalloc(num berofobjects*sizeof(int));144 145 for(i=0;i<num berofobjects;i++)ranks[i]=num_procs; //no cpu can have rank num_procs. This is the maximum limit.154 ranks=(int*)xmalloc(numnodes*sizeof(int)); 155 minranks=(int*)xmalloc(numnodes*sizeof(int)); 156 157 for(i=0;i<numnodes;i++)ranks[i]=num_procs; //no cpu can have rank num_procs. This is the maximum limit. 146 158 147 159 /*Now go through all our objects and ask them to report to who they belong (which rank): */ … … 152 164 * dealt with by another cpu. We take the minimum because we are going to manage dof assignment in increasing 153 165 * order of cpu rank. This is also why we initialized this array to num_procs.*/ 154 MPI_Allreduce ( (void*)ranks,(void*)minranks,num berofobjects,MPI_INT,MPI_MIN,MPI_COMM_WORLD);166 MPI_Allreduce ( (void*)ranks,(void*)minranks,numnodes,MPI_INT,MPI_MIN,MPI_COMM_WORLD); 155 167 156 168 /*Now go through all objects, and use minranks to flag which objects are cloned: */ … … 236 248 int Nodes::NumberOfNodes(void){ 237 249 250 /*Careful! only use once all clones have been setup for all nodes!: */ 251 238 252 int i; 239 253 … … 260 274 int i; 261 275 262 int max_sid= 0;276 int max_sid=-1; 263 277 int sid; 264 278 int node_max_sid; … … 276 290 } 277 291 278 #ifdef _PARALLEL_ 279 MPI_Reduce (&max_sid,&node_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD ); 280 MPI_Bcast(&node_max_sid,1,MPI_INT,0,MPI_COMM_WORLD); 281 max_sid=node_max_sid; 282 #endif 283 284 /*sid starts at 0*/ 285 max_sid++; 286 287 /*return*/ 288 return max_sid; 292 #ifdef _PARALLEL_ 293 MPI_Reduce (&max_sid,&node_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD ); 294 MPI_Bcast(&node_max_sid,1,MPI_INT,0,MPI_COMM_WORLD); 295 max_sid=node_max_sid; 296 #endif 297 298 if(max_sid==1){ 299 return 0; 300 } 301 else{ 302 /*sid starts at 0*/ 303 max_sid++; 304 305 /*return*/ 306 return max_sid; 307 } 289 308 } 290 309 /*}}}*/ … … 315 334 } 316 335 /*}}}*/ 336 /*FUNCTION Nodes::MaxNumDofs{{{1*/ 337 int Nodes::MaxNumDofs(int analysis_type){ 338 339 int i; 340 int max=0; 341 int allmax; 342 int numdofs=0; 343 344 /*Now go through all nodes, and get how many dofs they own, unless they are clone nodes: */ 345 for(i=0;i<this->Size();i++){ 346 347 Node* node=(Node*)this->GetObjectByOffset(i); 348 349 /*Check that this node corresponds to our analysis currently being carried out: */ 350 if (node->InAnalysis(analysis_type)){ 351 352 numdofs=node->GetNumberOfDofs(); 353 if (numdofs>max)max=numdofs; 354 } 355 } 356 357 #ifdef _PARALLEL_ 358 /*Grab max of all cpus: */ 359 MPI_Allreduce ( (void*)&max,(void*)&allmax,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 360 max=allmax; 361 #endif 362 363 return max; 364 } 365 /*}}}*/ -
issm/trunk/src/c/Container/Nodes.h
r5057 r5114 19 19 /*}}}*/ 20 20 /*numerics: {{{1*/ 21 void DistributeDofs(int numberofnodes,int numdofspernode,intanalysis_type);22 void FlagClones(int numberofnodes,intanalysis_type);21 void DistributeDofs(int analysis_type); 22 void FlagClones(int analysis_type); 23 23 void FlagNodeSets(Vec pv_g, Vec pv_f, Vec pv_s,int analysis_type); 24 24 int NumberOfDofs(int analysis_type); … … 26 26 int NumberOfNodes(void); 27 27 void Ranks(int* ranks,int analysis_type); 28 int MaxNumDofs(int analysis_type); 28 29 /*}}}*/ 29 30 -
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r5103 r5114 321 321 NumOutputEnum, 322 322 NumRiftsEnum, 323 NumberOfDofsPerNodeEnum,324 323 NumberOfElementsEnum, 325 324 NumberOfNodesEnum, -
issm/trunk/src/c/EnumDefinitions/EnumToString.cpp
r5103 r5114 284 284 case NumOutputEnum : return "NumOutput"; 285 285 case NumRiftsEnum : return "NumRifts"; 286 case NumberOfDofsPerNodeEnum : return "NumberOfDofsPerNode";287 286 case NumberOfElementsEnum : return "NumberOfElements"; 288 287 case NumberOfNodesEnum : return "NumberOfNodes"; -
issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp
r5103 r5114 282 282 else if (strcmp(name,"NumOutput")==0) return NumOutputEnum; 283 283 else if (strcmp(name,"NumRifts")==0) return NumRiftsEnum; 284 else if (strcmp(name,"NumberOfDofsPerNode")==0) return NumberOfDofsPerNodeEnum;285 284 else if (strcmp(name,"NumberOfElements")==0) return NumberOfElementsEnum; 286 285 else if (strcmp(name,"NumberOfNodes")==0) return NumberOfNodesEnum; -
issm/trunk/src/c/Makefile.am
r5103 r5114 233 233 ./shared/Dofs/dofs.h\ 234 234 ./shared/Dofs/dofsetgen.cpp\ 235 ./shared/Dofs/DistributeNumDofs.cpp\236 235 ./shared/Numerics/numerics.h\ 237 236 ./shared/Numerics/isnan.h\ … … 340 339 ./modules/ModelProcessorx/ModelProcessorx.h\ 341 340 ./modules/ModelProcessorx/ModelProcessorx.cpp\ 341 ./modules/ModelProcessorx/DistributeNumDofs.cpp\ 342 342 ./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp\ 343 343 ./modules/ModelProcessorx/NodesPartitioning.cpp\ … … 768 768 ./shared/Dofs/dofs.h\ 769 769 ./shared/Dofs/dofsetgen.cpp\ 770 ./shared/Dofs/DistributeNumDofs.cpp\771 770 ./shared/Numerics/numerics.h\ 772 771 ./shared/Numerics/IsInputConverged.cpp\ … … 872 871 ./modules/ModelProcessorx/ModelProcessorx.h\ 873 872 ./modules/ModelProcessorx/ModelProcessorx.cpp\ 873 ./modules/ModelProcessorx/DistributeNumDofs.cpp\ 874 874 ./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp\ 875 875 ./modules/ModelProcessorx/NodesPartitioning.cpp\ -
issm/trunk/src/c/modules/ModelProcessorx/Balancedthickness/CreateNodesBalancedthickness.cpp
r4983 r5114 47 47 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 48 48 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 49 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 49 50 50 51 if(continuous_galerkin){ … … 92 93 xfree((void**)&iomodel->gridonicesheet); 93 94 xfree((void**)&iomodel->gridoniceshelf); 95 xfree((void**)&iomodel->vertices_type); 94 96 95 97 /*Assign output pointer: */ -
issm/trunk/src/c/modules/ModelProcessorx/Balancedvelocities/CreateNodesBalancedvelocities.cpp
r4983 r5114 39 39 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 40 40 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 41 41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 42 42 for (i=0;i<iomodel->numberofvertices;i++){ 43 43 … … 56 56 xfree((void**)&iomodel->gridonicesheet); 57 57 xfree((void**)&iomodel->gridoniceshelf); 58 58 xfree((void**)&iomodel->vertices_type); 59 59 60 /*Assign output pointer: */ 60 61 *pnodes=nodes; -
issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp
r4983 r5114 39 39 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 40 40 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 41 42 42 43 for (i=0;i<iomodel->numberofvertices;i++){ … … 56 57 xfree((void**)&iomodel->gridonicesheet); 57 58 xfree((void**)&iomodel->gridoniceshelf); 59 xfree((void**)&iomodel->vertices_type); 58 60 59 61 /*Assign output pointer: */ -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r5043 r5114 17 17 18 18 Parameters* parameters = NULL; 19 int numberofdofspernode;20 19 char** parameteroutput=NULL; 21 20 char* descriptor=NULL; … … 67 66 68 67 /*Deal with more complex parameters*/ 69 DistributeNumDofs(&numberofdofspernode,analysis_type);70 parameters->AddObject(new IntParam(NumberOfDofsPerNodeEnum,numberofdofspernode));71 72 68 IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,"riftinfo"); 73 69 parameters->AddObject(new IntParam(NumRiftsEnum,iomodel->numrifts)); -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp
r4983 r5114 40 40 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 41 41 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 42 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 42 43 if (iomodel->dim==3){ 43 44 IoModelFetchData(&iomodel->deadgrids,NULL,NULL,iomodel_handle,"deadgrids"); … … 60 61 xfree((void**)&iomodel->gridoniceshelf); 61 62 xfree((void**)&iomodel->deadgrids); 63 xfree((void**)&iomodel->vertices_type); 62 64 63 65 cleanup_and_return: -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp
r4983 r5114 44 44 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 45 45 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements"); 46 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 47 46 48 CreateNumberNodeToElementConnectivity(iomodel); 47 49 … … 65 67 xfree((void**)&iomodel->elements); 66 68 xfree((void**)&iomodel->numbernodetoelementconnectivity); 69 xfree((void**)&iomodel->vertices_type); 67 70 68 71 cleanup_and_return: -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticStokes/CreateNodesDiagnosticStokes.cpp
r4983 r5114 43 43 IoModelFetchData(&iomodel->gridonstokes,NULL,NULL,iomodel_handle,"gridonstokes"); 44 44 IoModelFetchData(&iomodel->borderstokes,NULL,NULL,iomodel_handle,"borderstokes"); 45 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 45 46 46 47 for (i=0;i<iomodel->numberofvertices;i++){ … … 62 63 xfree((void**)&iomodel->gridonicesheet); 63 64 xfree((void**)&iomodel->gridoniceshelf); 65 xfree((void**)&iomodel->vertices_type); 64 66 65 67 cleanup_and_return: -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp
r4983 r5114 40 40 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 41 41 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 42 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 42 43 43 44 for (i=0;i<iomodel->numberofvertices;i++){ … … 57 58 xfree((void**)&iomodel->gridonicesheet); 58 59 xfree((void**)&iomodel->gridoniceshelf); 60 xfree((void**)&iomodel->vertices_type); 59 61 60 62 cleanup_and_return: -
issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp
r4983 r5114 39 39 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 40 40 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 41 42 42 43 for (i=0;i<iomodel->numberofvertices;i++){ … … 56 57 xfree((void**)&iomodel->gridonicesheet); 57 58 xfree((void**)&iomodel->gridoniceshelf); 59 xfree((void**)&iomodel->vertices_type); 58 60 59 61 /*Assign output pointer: */ -
issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.h
r5043 r5114 102 102 void UpdateCounters(IoModel* iomodel,Nodes** pnodes,Loads** ploads, Constraints** pconstraints); 103 103 104 105 /*Distribution of dofs: */ 106 void DistributeNumDofs(int* pnumdofs,int analysis_type,double* vertices_type); 107 104 108 #endif -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
r4983 r5114 47 47 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 48 48 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 49 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 49 50 50 51 if(continuous_galerkin){ … … 92 93 xfree((void**)&iomodel->gridoniceshelf); 93 94 xfree((void**)&iomodel->elements); 95 xfree((void**)&iomodel->vertices_type); 94 96 95 97 /*Assign output pointer: */ -
issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp
r4983 r5114 39 39 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 40 40 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 41 42 42 43 for (i=0;i<iomodel->numberofvertices;i++){ … … 56 57 xfree((void**)&iomodel->gridonicesheet); 57 58 xfree((void**)&iomodel->gridoniceshelf); 59 xfree((void**)&iomodel->vertices_type); 58 60 59 61 /*Assign output pointer: */ -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp
r4983 r5114 39 39 IoModelFetchData(&iomodel->gridonicesheet,NULL,NULL,iomodel_handle,"gridonicesheet"); 40 40 IoModelFetchData(&iomodel->gridoniceshelf,NULL,NULL,iomodel_handle,"gridoniceshelf"); 41 IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type"); 41 42 42 43 for (i=0;i<iomodel->numberofvertices;i++){ … … 56 57 xfree((void**)&iomodel->gridonicesheet); 57 58 xfree((void**)&iomodel->gridoniceshelf); 59 xfree((void**)&iomodel->vertices_type); 58 60 59 61 /*Assign output pointer: */ -
issm/trunk/src/c/modules/NodesDofx/NodesDofx.cpp
r4387 r5114 16 16 int i; 17 17 18 /*intermediary: */ 19 int numberofnodes; 20 int numberofdofspernode; 18 /*Do we have any nodes for this analysis type? :*/ 19 if(nodes->NumberOfNodes(analysis_type)){ 21 20 22 /*First, recover number nodes associated th this analysis: */ 23 numberofnodes=nodes->NumberOfNodes(analysis_type); 21 /*Ensure that only for each cpu, the partition border nodes only will be taken into account once 22 * across the cluster. To do so, we flag all the clone nodes: */ 23 nodes->FlagClones(analysis_type); 24 24 25 /*Recover number of dofs per node: */ 26 found=parameters->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum); 27 if(!found)ISSMERROR("could not find numberofdofspernode in parameters"); 28 /*WARNING: THERE IS A BUG HERE TO BE FIXED (see wiki)*/ 29 DistributeNumDofs(&numberofdofspernode,analysis_type); 25 /*Go through all nodes, and build degree of freedom lists. Each node gets a fixed number of dofs. When 26 *a node has already been distributed dofs on one cpu, all other cpus with the same node cannot distribute it 27 *anymore. Use clone field to be sure of that: */ 28 nodes->DistributeDofs(analysis_type); 30 29 31 /*Ensure that only for each cpu, the partition border nodes only will be taken into account once 32 * across the cluster. To do so, we flag all the clone nodes: */ 33 nodes->FlagClones(numberofnodes,analysis_type); 34 35 /*Go through all nodes, and build degree of freedom lists. Each node gets a fixed number of dofs. When 36 *a node has already been distributed dofs on one cpu, all other cpus with the same node cannot distribute it 37 *anymore. Use clone field to be sure of that: */ 38 nodes->DistributeDofs(numberofnodes,numberofdofspernode,analysis_type); 30 } 39 31 40 32 } -
issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
r4573 r5114 33 33 /*Recover parameters: */ 34 34 parameters->FindParam(&connectivity,ConnectivityEnum); 35 parameters->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum);36 35 37 36 /*Get size of matrix: */ 38 37 gsize=nodes->NumberOfDofs(configuration_type); 38 39 /*Get numberofdofspernode: */ 40 numberofdofspernode=nodes->MaxNumDofs(analysis_type); 39 41 40 42 /*Compute stiffness matrix*/ … … 84 86 VecAssemblyEnd(pg); 85 87 } 88 86 89 87 90 /*Assign output pointers: */ -
issm/trunk/src/c/objects/DofIndexing.cpp
r5109 r5114 53 53 /*}}}*/ 54 54 /*FUNCTION DofIndexing::~DofIndexing() {{{1*/ 55 DofIndexing::~DofIndexing(){ 56 57 xfree((void**)&f_set); 58 xfree((void**)&s_set); 59 xfree((void**)&doflist); 55 DofIndexing::~DofIndexing(){ //destructor 60 56 } 61 57 /*}}}*/ -
issm/trunk/src/c/objects/Node.cpp
r5103 r5114 17 17 #include "../shared/shared.h" 18 18 #include "../include/include.h" 19 #include "../modules/modules.h" 19 20 /*}}}*/ 20 21 … … 70 71 71 72 /*indexing:*/ 72 DistributeNumDofs(&numdofs,analysis_type ); //number of dofs per node73 DistributeNumDofs(&numdofs,analysis_type,iomodel->vertices_type+2*io_index); //number of dofs per node 73 74 this->indexing.Init(numdofs); 74 75 … … 190 191 hvertex->DeepEcho(); 191 192 printf(" inputs\n"); 192 inputs->DeepEcho(); 193 193 194 194 195 } … … 630 631 /*}}}*/ 631 632 /*FUNCTION Node::ShowTrueDofs{{{1*/ 632 void Node::ShowTrueDofs(int* truedofs ){633 void Node::ShowTrueDofs(int* truedofs, int ncols){ 633 634 634 635 int j; … … 640 641 /*Ok, we are not a clone, just plug our dofs into truedofs: */ 641 642 for(j=0;j<this->indexing.numberofdofs;j++){ 642 *(truedofs+this->indexing.numberofdofs*sid+j)=indexing.doflist[j]; 643 } 644 643 *(truedofs+ncols*sid+j)=indexing.doflist[j]; 644 } 645 645 } 646 646 /*}}}*/ 647 647 /*FUNCTION Node::UpdateCloneDofs{{{1*/ 648 void Node::UpdateCloneDofs(int* alltruedofs ){648 void Node::UpdateCloneDofs(int* alltruedofs,int ncols){ 649 649 650 650 int j; … … 654 654 if(indexing.clone==0)return; 655 655 656 /*Ok, we are a clone node, but we did not create the dofs for this node. 657 * Therefore, our doflist is garbage right now. Go pick it up in the alltruedofs: */ 656 657 /*Ok, we are a clone node, but we did not create the dofs for this node. 658 * * Therefore, our doflist is garbage right now. Go pick it up in the alltruedofs: */ 658 659 for(j=0;j<this->indexing.numberofdofs;j++){ 659 indexing.doflist[j]=*(alltruedofs+this->indexing.numberofdofs*sid+j); 660 } 660 indexing.doflist[j]=*(alltruedofs+ncols*sid+j); 661 } 662 661 663 } 662 664 /*}}}*/ -
issm/trunk/src/c/objects/Node.h
r5096 r5114 90 90 void DistributeDofs(int* pdofcount); 91 91 void OffsetDofs(int dofcount); 92 void ShowTrueDofs(int* borderdofs);93 void UpdateCloneDofs(int* all borderdofs);92 void ShowTrueDofs(int* truerows,int ncols); 93 void UpdateCloneDofs(int* alltruerows,int ncols); 94 94 void SetClone(int* minranks); 95 95 void CreatePartition(Vec partition); -
issm/trunk/src/c/shared/Dofs/dofs.h
r4021 r5114 7 7 8 8 double* dofsetgen(int numdofs,int* doflist,int dofspernode,int totaldofs); 9 int DistributeNumDofs(int *pnumdofs,int analysis_type);10 9 11 10 -
issm/trunk/src/m/enum/EnumToString.m
r5103 r5114 279 279 case NumOutputEnum(), string='NumOutput'; return 280 280 case NumRiftsEnum(), string='NumRifts'; return 281 case NumberOfDofsPerNodeEnum(), string='NumberOfDofsPerNode'; return282 281 case NumberOfElementsEnum(), string='NumberOfElements'; return 283 282 case NumberOfNodesEnum(), string='NumberOfNodes'; return -
issm/trunk/src/m/enum/NumberOfElementsEnum.m
r5066 r5114 9 9 % macro=NumberOfElementsEnum() 10 10 11 macro=26 9;11 macro=268; -
issm/trunk/src/m/enum/NumberOfNodesEnum.m
r5066 r5114 9 9 % macro=NumberOfNodesEnum() 10 10 11 macro=2 70;11 macro=269; -
issm/trunk/src/m/enum/NumberOfVerticesEnum.m
r5066 r5114 9 9 % macro=NumberOfVerticesEnum() 10 10 11 macro=27 1;11 macro=270; -
issm/trunk/src/m/enum/OptScalEnum.m
r5066 r5114 9 9 % macro=OptScalEnum() 10 10 11 macro=27 2;11 macro=271; -
issm/trunk/src/m/enum/OutputFilePointerEnum.m
r5066 r5114 9 9 % macro=OutputFilePointerEnum() 10 10 11 macro=27 3;11 macro=272; -
issm/trunk/src/m/enum/ParameterOutputEnum.m
r5066 r5114 9 9 % macro=ParameterOutputEnum() 10 10 11 macro=27 4;11 macro=273; -
issm/trunk/src/m/enum/PenaltyMeltingEnum.m
r5066 r5114 9 9 % macro=PenaltyMeltingEnum() 10 10 11 macro=27 5;11 macro=274; -
issm/trunk/src/m/enum/QmuAnalysisEnum.m
r5066 r5114 9 9 % macro=QmuAnalysisEnum() 10 10 11 macro=27 6;11 macro=275; -
issm/trunk/src/m/enum/QmuErrNameEnum.m
r5066 r5114 9 9 % macro=QmuErrNameEnum() 10 10 11 macro=27 7;11 macro=276; -
issm/trunk/src/m/enum/QmuInNameEnum.m
r5066 r5114 9 9 % macro=QmuInNameEnum() 10 10 11 macro=27 8;11 macro=277; -
issm/trunk/src/m/enum/QmuMassFluxSegmentsEnum.m
r5066 r5114 9 9 % macro=QmuMassFluxSegmentsEnum() 10 10 11 macro=27 9;11 macro=278; -
issm/trunk/src/m/enum/QmuNPartEnum.m
r5066 r5114 9 9 % macro=QmuNPartEnum() 10 10 11 macro=2 80;11 macro=279; -
issm/trunk/src/m/enum/QmuOutNameEnum.m
r5066 r5114 9 9 % macro=QmuOutNameEnum() 10 10 11 macro=28 1;11 macro=280; -
issm/trunk/src/m/enum/QmuPartEnum.m
r5066 r5114 9 9 % macro=QmuPartEnum() 10 10 11 macro=28 2;11 macro=281; -
issm/trunk/src/m/enum/ResponseDescriptorsEnum.m
r5066 r5114 9 9 % macro=ResponseDescriptorsEnum() 10 10 11 macro=28 3;11 macro=282; -
issm/trunk/src/m/enum/SolverStringEnum.m
r5066 r5114 9 9 % macro=SolverStringEnum() 10 10 11 macro=28 4;11 macro=283; -
issm/trunk/src/m/enum/SparsityEnum.m
r5066 r5114 9 9 % macro=SparsityEnum() 10 10 11 macro=28 5;11 macro=284; -
issm/trunk/src/m/enum/StringToEnum.m
r5103 r5114 277 277 elseif (strcmpi(name,'NumOutput')), enum=NumOutputEnum(); return 278 278 elseif (strcmpi(name,'NumRifts')), enum=NumRiftsEnum(); return 279 elseif (strcmpi(name,'NumberOfDofsPerNode')), enum=NumberOfDofsPerNodeEnum(); return280 279 elseif (strcmpi(name,'NumberOfElements')), enum=NumberOfElementsEnum(); return 281 280 elseif (strcmpi(name,'NumberOfNodes')), enum=NumberOfNodesEnum(); return -
issm/trunk/src/m/enum/TolXEnum.m
r5066 r5114 9 9 % macro=TolXEnum() 10 10 11 macro=28 6;11 macro=285; -
issm/trunk/src/m/enum/VariableDescriptorsEnum.m
r5066 r5114 9 9 % macro=VariableDescriptorsEnum() 10 10 11 macro=28 7;11 macro=286; -
issm/trunk/src/m/enum/VerboseEnum.m
r5066 r5114 9 9 % macro=VerboseEnum() 10 10 11 macro=28 8;11 macro=287; -
issm/trunk/src/m/enum/WaitOnLockEnum.m
r5066 r5114 9 9 % macro=WaitOnLockEnum() 10 10 11 macro=28 9;11 macro=288; -
issm/trunk/src/m/enum/YtsEnum.m
r5066 r5114 9 9 % macro=YtsEnum() 10 10 11 macro=2 90;11 macro=289;
Note:
See TracChangeset
for help on using the changeset viewer.