Changeset 832
- Timestamp:
- 06/05/09 18:01:19 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/BuildNodeSetsx/BuildNodeSetsx.cpp
r304 r832 53 53 nodes->FlagNodeSets(flag_pv_g,flag_pv_m,flag_pv_n,flag_pv_f,flag_pv_s); 54 54 55 55 56 /*Now, every cpu has 4 flag vectors, of size gsize. Create partition vectors (like a pos=find(flag_pv_g) in matlab*/ 56 57 PartitionSets(&vec_pv_m,&vec_pv_n,flag_pv_g,flag_pv_m,flag_pv_n,gsize); /*! split g set into m and n sets*/ 57 58 PartitionSets(&vec_pv_f,&vec_pv_s,flag_pv_n,flag_pv_f,flag_pv_s,gsize); /*! split n set into f and s sets*/ 58 59 59 60 /*Free ressources:*/ 60 61 VecFree(&flag_pv_g); -
issm/trunk/src/c/DataSet/DataSet.cpp
r823 r832 813 813 } 814 814 else{ 815 /*Ok, this cpu owns both nodes. Put dof for node1 into m set: */ 816 node1->DofInMSet(dof-1); 815 /*Ok, this cpu owns both nodes. Put dof for node1 into m set, unless it is already there, 816 * in which case node2 gets into the m set: */ 817 if(node1->DofIsInMSet(dof-1)){ 818 node2->DofInMSet(dof-1); 819 } 820 else{ 821 node1->DofInMSet(dof-1); 822 } 817 823 818 819 824 /*Plug values into Rmg. We essentially want dofs from node1 and node2 to be the 820 825 *same: */ -
issm/trunk/src/c/NormalizeConstraintsx/NormalizeConstraintsx.cpp
r304 r832 38 38 /*Build row partitioning vector for Rmm and Rmn: */ 39 39 row_m=(double*)xmalloc(msize*sizeof(double)); 40 for(i=0;i<msize;i++)row_m[i]=i+1; //matlab indexing 41 40 for(i=0;i<msize;i++)row_m[i]=i+1; //matlab indexing for nodesets 41 42 42 /*Partition Rmg into Rmm and Rmn: */ 43 43 MatPartition(&Rmm,Rmg,row_m,msize,pv_m,msize); //equivalent of Rmm=Rmg(:,mset); 44 44 MatPartition(&Rmn,Rmg,row_m,msize,pv_n,nsize); 45 46 MatView(Rmm,PETSC_VIEWER_STDOUT_WORLD); 45 47 46 48 /*Invert Rmm: */ -
issm/trunk/src/c/objects/Node.cpp
r816 r832 419 419 sset[dof]=0; 420 420 } 421 421 422 int Node::DofIsInMSet(int dof){ 423 424 if (mset[dof])return 1; 425 else return 0; 426 427 } 422 428 423 429 int Node::GetDof(int dofindex){ -
issm/trunk/src/c/objects/Node.h
r816 r832 66 66 void DofInSSet(int dof); 67 67 void DofInMSet(int dof); 68 int DofIsInMSet(int dof); 68 69 int GetDof(int dofindex); 69 70 void CreateVecSets(Vec pv_g,Vec pv_m,Vec pv_n,Vec pv_f,Vec pv_s); -
issm/trunk/src/m/solutions/cielo/CreateFemModel.m
r302 r832 25 25 displaystring(md.debug,'%s',' reducing single point constraints vector...'); 26 26 [m.ys m.ys0]=Reducevectorgtos(m.yg,m.nodesets); 27 27 28 28 displaystring(md.debug,'%s',' normalizing rigid body constraints matrix...'); 29 29 m.Gmn = NormalizeConstraints(m.Rmg,m.nodesets); 30 30 31 31 displaystring(md.debug,'%s',' configuring element and loads...'); 32 32 [m.elements,m.loads,m.nodes] = ConfigureObjects( m.elements, m.loads, m.nodes, m.materials); -
issm/trunk/src/m/solutions/ice/CreateFemModel.m
r36 r832 24 24 Rmg=MpcGrids(grids,constraints); 25 25 26 26 27 %generate grid sets and reduce yg to ys from g-set to s-set. 27 28 BuildGridSets(grids,constraints); ys=Reducevector_g(yg); 28 29 29 %buil eGmn30 %build Gmn 30 31 Gmn=Normalizeconstraints(Rmg); 32 33 spy(Gmn) 31 34 32 35 %recover dof number
Note:
See TracChangeset
for help on using the changeset viewer.