Changeset 5255 for issm/trunk


Ignore:
Timestamp:
08/13/10 15:51:01 (15 years ago)
Author:
seroussi
Message:

DistributeNumDofs now initialize the indexing

Location:
issm/trunk/src/c/modules/ModelProcessorx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp

    r5234 r5255  
    77#include "../../EnumDefinitions/EnumDefinitions.h"
    88       
    9 void DistributeNumDofs(int* pnumdofs,int analysis_type,double* vertices_type){
     9void DistributeNumDofs(DofIndexing* index,int analysis_type,double* vertices_type){
    1010
    1111        /*For now, we distribute by analysis_type, later, we will distribute using the analysis_type,
     
    1414        int numdofs=2; //default numdofs
    1515        int i;
     16        int* doftype=NULL;
    1617
    1718        /*ok, according to analysis type: */
    1819        if (analysis_type==DiagnosticHorizAnalysisEnum){
    19                 if ((int)*vertices_type==MacAyealApproximationEnum){
     20                if (vertices_type[0]==MacAyealApproximationEnum){
    2021                        numdofs=2;
    2122                }
    22                 else if ((int)*vertices_type==PattynApproximationEnum){
     23                else if (vertices_type[0]==PattynApproximationEnum){
    2324                        numdofs=2;
    2425                }
    25                 else if ((int)*vertices_type==HutterApproximationEnum){
     26                else if (vertices_type[0]==HutterApproximationEnum){
    2627                        numdofs=2;
    2728                }
    28                 else if ((int)*vertices_type==MacAyealPattynApproximationEnum){
     29                else if (vertices_type[0]==MacAyealPattynApproximationEnum){
    2930                        numdofs=4;
     31                        doftype=(int*)xmalloc(numdofs*sizeof(int));
     32                        doftype[0]=MacAyealApproximationEnum;
     33                        doftype[1]=MacAyealApproximationEnum;
     34                        doftype[2]=PattynApproximationEnum;
     35                        doftype[3]=PattynApproximationEnum;
    3036                }
    3137                else ISSMERROR("Approximationtype %i (%s) not implemented yet for DiagnosticHoriz",(int)*vertices_type,EnumToString((int)*vertices_type));
     
    6066        else ISSMERROR("analysis type: %i (%s) not implemented yet",analysis_type,EnumToString(analysis_type));
    6167
    62         /*Assign output pointers:*/
    63         *pnumdofs=numdofs;;
     68        /*Now initialize the index*/
     69        index->Init(numdofs,doftype);
     70
     71        /*Clean up*/
     72         xfree((void**)&doftype);
    6473}
  • issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.h

    r5114 r5255  
    104104
    105105/*Distribution of dofs: */
    106 void DistributeNumDofs(int* pnumdofs,int analysis_type,double* vertices_type);
     106void DistributeNumDofs(DofIndexing* index,int analysis_type,double* vertices_type);
    107107
    108108#endif
Note: See TracChangeset for help on using the changeset viewer.