Changeset 5909


Ignore:
Timestamp:
09/20/10 13:55:46 (14 years ago)
Author:
Mathieu Morlighem
Message:

Removed old methods not needed anymore (in shared)

Location:
issm/trunk/src/c/objects
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r5908 r5909  
    39793979}
    39803980/*}}}*/
    3981 /*FUNCTION Penta::GetLocalDofList {{{1*/
    3982 int*  Penta::GetLocalDofList(int approximation_enum,int setenum){
    3983 
    3984         int  i,j,count,numdof,numgdof;
    3985         int  ndof_list[NUMVERTICES];
    3986         int  ngdof_list_cumulative[NUMVERTICES];
    3987         int *doflist = NULL;
    3988 
    3989         /*Get number of dofs per node, and total for this given set*/
    3990         numdof=0;
    3991         numgdof=0;
    3992         for(i=0;i<NUMVERTICES;i++){
    3993 
    3994                 /*Cumulative list= number of dofs before node i*/
    3995                 ngdof_list_cumulative[i]=numgdof;
    3996 
    3997                 /*Number of dofs for node i for given set and for the g set*/
    3998                 ndof_list[i]=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    3999                 numgdof    +=nodes[i]->GetNumberOfDofs(approximation_enum,GsetEnum);
    4000                 numdof     +=ndof_list[i];
    4001         }
    4002 
    4003         if(numdof){
    4004                 /*Allocate: */
    4005                 doflist=(int*)xmalloc(numdof*sizeof(int));
    4006 
    4007                 /*Populate: */
    4008                 count=0;
    4009                 for(i=0;i<NUMVERTICES;i++){
    4010                         nodes[i]->GetLocalDofList(&doflist[count],approximation_enum,setenum);
    4011                         count+=ndof_list[i];
    4012                 }
    4013 
    4014                 /*We now have something like: [0 1 0 2 1 2]. Offset by gsize, to get something like: [0 1 2 4 6 7]:*/
    4015                 count=0;
    4016                 for(i=0;i<NUMVERTICES;i++){
    4017                         for(j=0;j<ndof_list[i];j++){
    4018                                 doflist[count+j]+=ngdof_list_cumulative[i];
    4019                         }
    4020                         count+=ndof_list[i];
    4021                 }
    4022         }
    4023         else doflist=NULL;
    4024 
    4025         return doflist;
    4026 }
    4027 /*}}}*/
    4028 /*FUNCTION Penta::GetGlobalDofList {{{1*/
    4029 int* Penta::GetGlobalDofList(int approximation_enum,int setenum){
    4030 
    4031         int  i,numdof,count;
    4032         int  ndof_list[NUMVERTICES];
    4033         int *doflist = NULL;
    4034 
    4035         /*First, figure out size of doflist: */
    4036         numdof=0;
    4037         for(i=0;i<NUMVERTICES;i++){
    4038                 ndof_list[i]=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    4039                 numdof+=ndof_list[i];
    4040         }
    4041 
    4042         if(numdof){
    4043                 /*Allocate: */
    4044                 doflist=(int*)xmalloc(numdof*sizeof(int));
    4045 
    4046                 /*Populate: */
    4047                 count=0;
    4048                 for(i=0;i<NUMVERTICES;i++){
    4049                         nodes[i]->GetDofList(&doflist[count],approximation_enum,setenum);
    4050                         count+=ndof_list[i];
    4051                 }
    4052         }
    4053         else doflist=NULL;
    4054 
    4055         return doflist;
    4056 }
    4057 /*}}}*/
    4058 /*FUNCTION Penta::GetNumberOfDofs {{{1*/
    4059 int Penta::GetNumberOfDofs(int approximation_enum,int setenum){
    4060 
    4061         /*output: */
    4062         int numberofdofs=0;
    4063 
    4064         for(int i=0;i<NUMVERTICES;i++){
    4065                 numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    4066         }
    4067 
    4068         return numberofdofs;
    4069 }
    4070 /*}}}*/
    40713981/*FUNCTION Penta::GetParameterListOnVertices(double* pvalue,int enumtype) {{{1*/
    40723982void Penta::GetParameterListOnVertices(double* pvalue,int enumtype){
  • issm/trunk/src/c/objects/Elements/Penta.h

    r5908 r5909  
    167167                void      GetDofList(int** pdoflist,int approximation_enum,int setenum);
    168168                void      GetDofList1(int* doflist);
    169                 int*    GetLocalDofList(int approximation_enum,int setenum);
    170                 int*    GetGlobalDofList(int approximation_enum,int setenum);
    171                 int GetNumberOfDofs(int approximation_enum,int setenum);
    172169                int     GetElementType(void);
    173170                void    GetParameterListOnVertices(double* pvalue,int enumtype);
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r5908 r5909  
    47934793}
    47944794/*}}}*/
    4795 /*FUNCTION Tria::GetLocalDofList {{{1*/
    4796 int*  Tria::GetLocalDofList(int approximation_enum,int setenum){
    4797 
    4798         int  i,j,count,numdof,numgdof;
    4799         int  ndof_list[NUMVERTICES];
    4800         int  ngdof_list_cumulative[NUMVERTICES];
    4801         int *doflist = NULL;
    4802 
    4803         /*Get number of dofs per node, and total for this given set*/
    4804         numdof=0;
    4805         numgdof=0;
    4806         for(i=0;i<NUMVERTICES;i++){
    4807 
    4808                 /*Cumulative list= number of dofs before node i*/
    4809                 ngdof_list_cumulative[i]=numgdof;
    4810 
    4811                 /*Number of dofs for node i for given set and for the g set*/
    4812                 ndof_list[i]=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    4813                 numgdof    +=nodes[i]->GetNumberOfDofs(approximation_enum,GsetEnum);
    4814                 numdof     +=ndof_list[i];
    4815         }
    4816 
    4817         if(numdof){
    4818                 /*Allocate: */
    4819                 doflist=(int*)xmalloc(numdof*sizeof(int));
    4820 
    4821                 /*Populate: */
    4822                 count=0;
    4823                 for(i=0;i<NUMVERTICES;i++){
    4824                         nodes[i]->GetLocalDofList(&doflist[count],approximation_enum,setenum);
    4825                         count+=ndof_list[i];
    4826                 }
    4827                
    4828                 /*We now have something like: [0 1 0 2 1 2]. Offset by gsize, to get something like: [0 1 2 4 6 7]:*/
    4829                 count=0;
    4830                 for(i=0;i<NUMVERTICES;i++){
    4831                         for(j=0;j<ndof_list[i];j++){
    4832                                 doflist[count+j]+=ngdof_list_cumulative[i];
    4833                         }
    4834                         count+=ndof_list[i];
    4835                 }
    4836         }
    4837         else doflist=NULL;
    4838 
    4839         return doflist;
    4840 }
    4841 /*}}}*/
    4842 /*FUNCTION Tria::GetGlobalDofList {{{1*/
    4843 int* Tria::GetGlobalDofList(int approximation_enum,int setenum){
    4844 
    4845         int  i,numdof,count;
    4846         int  ndof_list[NUMVERTICES];
    4847         int *doflist = NULL;
    4848 
    4849         /*First, figure out size of doflist: */
    4850         numdof=0;
    4851         for(i=0;i<NUMVERTICES;i++){
    4852                 ndof_list[i]=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    4853                 numdof+=ndof_list[i];
    4854         }
    4855 
    4856         if(numdof){
    4857                 /*Allocate: */
    4858                 doflist=(int*)xmalloc(numdof*sizeof(int));
    4859 
    4860                 /*Populate: */
    4861                 count=0;
    4862                 for(i=0;i<NUMVERTICES;i++){
    4863                         nodes[i]->GetDofList(&doflist[count],approximation_enum,setenum);
    4864                         count+=ndof_list[i];
    4865                 }
    4866         }
    4867         else doflist=NULL;
    4868 
    4869         return doflist;
    4870 }
    4871 /*}}}*/
    4872 /*FUNCTION Tria::GetNumberOfDofs {{{1*/
    4873 int Tria::GetNumberOfDofs(int approximation_enum,int setenum){
    4874        
    4875         /*output: */
    4876         int numberofdofs=0;
    4877 
    4878         for(int i=0;i<NUMVERTICES;i++){
    4879                 numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    4880         }
    4881 
    4882         return numberofdofs;
    4883 }
    4884 /*}}}*/
    48854795/*FUNCTION Tria::GetDofList1 {{{1*/
    48864796void  Tria::GetDofList1(int* doflist){
  • issm/trunk/src/c/objects/Elements/Tria.h

    r5908 r5909  
    156156                void      GetDofList(int** pdoflist,int approximation_enum,int setenum);
    157157                void      GetDofList1(int* doflist);
    158                 int*    GetLocalDofList(int approximation_enum,int setenum);
    159                 int*    GetGlobalDofList(int approximation_enum,int setenum);
    160                 int     GetNumberOfDofs(int approximation_enum,int setenum);
    161158                void    GetParameterListOnVertices(double* pvalue,int enumtype);
    162159                void    GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue);
  • issm/trunk/src/c/objects/Loads/Icefront.cpp

    r5908 r5909  
    742742}
    743743/*}}}*/
    744 /*FUNCTION Icefront::GetInternalDofList {{{1*/
    745 int* Icefront::GetInternalDofList(int approximation_enum,int setenum){
    746 
    747         int i,j;
    748         int numberofdofs=0;
    749         int count=0;
    750         int count2=0;
    751         int type;
    752         int numberofnodes=2;
    753         int ndof;
    754 
    755         /*output: */
    756         int* doflist=NULL;
    757 
    758         /*recover type: */
    759         inputs->GetParameterValue(&type,TypeEnum);
    760 
    761         /*Some checks for debugging*/
    762         ISSMASSERT(nodes);
    763                
    764         /*How many nodes? :*/
    765         if(type==MacAyeal2dIceFrontEnum || type==MacAyeal3dIceFrontEnum)
    766          numberofnodes=2;
    767         else
    768          numberofnodes=4;
    769        
    770         /*Figure out size of doflist: */
    771         for(i=0;i<numberofnodes;i++){
    772                 numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    773         }
    774 
    775         if(numberofdofs){
    776                 /*Allocate: */
    777                 doflist=(int*)xmalloc(numberofdofs*sizeof(int));
    778 
    779                 /*Populate: */
    780                 count=0;
    781                 for(i=0;i<numberofnodes;i++){
    782                         nodes[i]->GetDofList(doflist+count,approximation_enum,setenum);
    783                         count+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    784                 }
    785                
    786                 /*We now have something like: [0 1 0 1]. Offset by gsize, to get something like:
    787                  * [0 1 2 3]: */
    788                 count=0;
    789                 count2=0;
    790                 for(i=0;i<numberofnodes;i++){
    791                         ndof=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    792                         for(j=count;j<count+ndof;j++)doflist[j]+=count2;
    793                         count+=ndof;
    794                         count2+=nodes[i]->GetNumberOfDofs(approximation_enum,GsetEnum);
    795                 }
    796         }
    797 
    798         return doflist;
    799 }
    800 /*}}}*/
    801 /*FUNCTION Icefront::GetExternalDofList{{{1*/
    802 int*  Icefront::GetExternalDofList(int approximation_enum,int setenum){
    803 
    804         int i,j;
    805         int numberofdofs=0;
    806         int count=0;
    807         int type;
    808         int numberofnodes=2;
    809 
    810         /*output: */
    811         int* doflist=NULL;
    812 
    813         /*recover type: */
    814         inputs->GetParameterValue(&type,TypeEnum);
    815 
    816         /*Some checks for debugging*/
    817         ISSMASSERT(nodes);
    818                
    819         /*How many nodes? :*/
    820         if(type==MacAyeal2dIceFrontEnum || type==MacAyeal3dIceFrontEnum)
    821          numberofnodes=2;
    822         else
    823          numberofnodes=4;
    824        
    825         /*Figure out size of doflist: */
    826         for(i=0;i<numberofnodes;i++){
    827                 numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    828         }
    829 
    830         if(numberofdofs){
    831                 /*Allocate: */
    832                 doflist=(int*)xmalloc(numberofdofs*sizeof(int));
    833 
    834                 /*Populate: */
    835                 count=0;
    836                 for(i=0;i<numberofnodes;i++){
    837                         nodes[i]->GetDofList(doflist+count,approximation_enum,setenum);
    838                         count+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    839                 }
    840         }
    841 
    842         return doflist;
    843 }
    844 /*}}}*/
    845 /*FUNCTION Icefront::GetNumberOfDofs {{{1*/
    846 int Icefront::GetNumberOfDofs(int approximation_enum,int setenum){
    847        
    848        
    849         int i;
    850         int numberofdofs=0;
    851         int type;
    852         int numberofnodes=2;
    853 
    854         /*recover type: */
    855         inputs->GetParameterValue(&type,TypeEnum);
    856 
    857         /*Some checks for debugging*/
    858         ISSMASSERT(nodes);
    859                
    860         /*How many nodes? :*/
    861         if(type==MacAyeal2dIceFrontEnum || type==MacAyeal3dIceFrontEnum)
    862          numberofnodes=2;
    863         else
    864          numberofnodes=4;
    865        
    866         /*Figure out size of doflist: */
    867         for(i=0;i<numberofnodes;i++){
    868                 numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
    869         }
    870 
    871         return numberofdofs;
    872 }
    873 /*}}}*/
    874744/*FUNCTION Icefront::GetSegmentNormal {{{1*/
    875745void Icefront:: GetSegmentNormal(double* normal,double xyz_list[4][3]){
  • issm/trunk/src/c/objects/Loads/Icefront.h

    r5908 r5909  
    8282                void  CreatePVectorDiagnosticStokes(Vec pg);
    8383                void  GetDofList(int** pdoflist,int approximation_enum,int setenum);
    84                 int*  GetInternalDofList(int approximation_enum,int setenum);
    85                 int*  GetExternalDofList(int approximation_enum,int setenum);
    86                 int   GetNumberOfDofs(int approximation_enum,int setenum);
    8784                void GetSegmentNormal(double* normal,double xyz_list[2][3]);
    8885                void GetQuadNormal(double* normal,double xyz_list[4][3]);
Note: See TracChangeset for help on using the changeset viewer.