Changeset 5255 for issm/trunk
- Timestamp:
- 08/13/10 15:51:01 (15 years ago)
- Location:
- issm/trunk/src/c/modules/ModelProcessorx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
r5234 r5255 7 7 #include "../../EnumDefinitions/EnumDefinitions.h" 8 8 9 void DistributeNumDofs( int* pnumdofs,int analysis_type,double* vertices_type){9 void DistributeNumDofs(DofIndexing* index,int analysis_type,double* vertices_type){ 10 10 11 11 /*For now, we distribute by analysis_type, later, we will distribute using the analysis_type, … … 14 14 int numdofs=2; //default numdofs 15 15 int i; 16 int* doftype=NULL; 16 17 17 18 /*ok, according to analysis type: */ 18 19 if (analysis_type==DiagnosticHorizAnalysisEnum){ 19 if ( (int)*vertices_type==MacAyealApproximationEnum){20 if (vertices_type[0]==MacAyealApproximationEnum){ 20 21 numdofs=2; 21 22 } 22 else if ( (int)*vertices_type==PattynApproximationEnum){23 else if (vertices_type[0]==PattynApproximationEnum){ 23 24 numdofs=2; 24 25 } 25 else if ( (int)*vertices_type==HutterApproximationEnum){26 else if (vertices_type[0]==HutterApproximationEnum){ 26 27 numdofs=2; 27 28 } 28 else if ( (int)*vertices_type==MacAyealPattynApproximationEnum){29 else if (vertices_type[0]==MacAyealPattynApproximationEnum){ 29 30 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; 30 36 } 31 37 else ISSMERROR("Approximationtype %i (%s) not implemented yet for DiagnosticHoriz",(int)*vertices_type,EnumToString((int)*vertices_type)); … … 60 66 else ISSMERROR("analysis type: %i (%s) not implemented yet",analysis_type,EnumToString(analysis_type)); 61 67 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); 64 73 } -
issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.h
r5114 r5255 104 104 105 105 /*Distribution of dofs: */ 106 void DistributeNumDofs( int* pnumdofs,int analysis_type,double* vertices_type);106 void DistributeNumDofs(DofIndexing* index,int analysis_type,double* vertices_type); 107 107 108 108 #endif
Note:
See TracChangeset
for help on using the changeset viewer.