Changeset 4001
- Timestamp:
- 06/02/10 16:25:39 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp
r3913 r4001 10 10 #include "../../EnumDefinitions/EnumDefinitions.h" 11 11 12 void SpcNodesx( DofVec** pyg, DataSet* nodes,DataSet* constraints){12 void SpcNodesx(Vec* pyg, DataSet* nodes,DataSet* constraints){ 13 13 14 14 int i; … … 17 17 18 18 /*output: */ 19 DofVec* yg=NULL;19 Vec* yg=NULL; 20 20 21 21 /*First, recover number of dofs from nodes: */ … … 24 24 if(numberofdofs){ 25 25 26 /*Allocate dofvec: */27 yg=new DofVec("yg");28 yg->numdofs=numberofdofs;29 30 26 /*Allocate yg: */ 31 yg ->vector=NewVec(numberofdofs);27 yg=NewVec(numberofdofs); 32 28 33 29 /*Now, go through constraints, and update the nodes and the constraint vector at the same time: */ 34 constraints->SetupSpcs(nodes,yg ->vector);30 constraints->SetupSpcs(nodes,yg); 35 31 36 32 /*Specify numentries: */ 37 33 VecGetSize(yg->vector,&gsize); 38 yg->numentries=(int)gsize/yg->numdofs;39 }40 else{41 /*Allocate dofvec: */42 yg=new DofVec("yg");43 34 } 44 35 -
issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h
r3913 r4001 11 11 12 12 /* local prototypes: */ 13 void SpcNodesx( DofVec** pyg, DataSet* nodesin,DataSet* constraints);13 void SpcNodesx(Vec* pyg, DataSet* nodesin,DataSet* constraints); 14 14 15 15 #endif /* _SPCNODESX_H */ 16 -
issm/trunk/src/c/objects/Elements/Penta.h
r3984 r4001 43 43 Penta(); 44 44 Penta(int penta_id,int i, IoModel* iomodel,int nummodels); 45 Update(IoModel* iomodel,int analysis_counter,int analysis_type);46 45 ~Penta(); 47 46 /*}}}*/ 48 47 /*FUNCTION object management {{{1*/ 49 48 void Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* materials,Parameters* parameters,int analysis_counter); 49 void Update(IoModel* iomodel,int analysis_counter,int analysis_type); 50 50 Object* copy(); 51 51 void DeepEcho(); -
issm/trunk/src/c/objects/Elements/Tria.h
r3984 r4001 38 38 Tria(); 39 39 Tria(int tria_id,int i, IoModel* iomodel); 40 Update(IoModel* iomodel,int analysis_counter,int analysis_type);41 40 ~Tria(); 42 41 /*}}}*/ 43 42 /*FUNCTION object management {{{1*/ 44 43 void Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* materials,Parameters* parameters); 44 void Update(IoModel* iomodel,int analysis_counter,int analysis_type); 45 45 Object* copy(); 46 46 void DeepEcho(); -
issm/trunk/src/c/objects/FemModel.cpp
r3984 r4001 22 22 /*FUNCTION FemModel::constructor {{{1*/ 23 23 FemModel::FemModel(int in_nummodels){ 24 25 /*intermediary*/ 26 int i; 24 27 25 28 nummodels=in_nummodels; … … 50 53 FemModel::~FemModel(){ 51 54 55 /*Intermediary*/ 52 56 int i; 53 57 … … 89 93 /*Object management*/ 90 94 /*FUNCTION FemModel::Echo {{{1*/ 91 92 95 void FemModel::Echo(void){ 93 96 … … 95 98 printf(" number of fem models: %i\n",nummodels); 96 99 printf(" analysis_type_list: \n"); 97 for(i =0;i<nummodels;i++)printf(" %i: %s\n",i,EnumAsString(analysis_type_list[i]));100 for(int i=0;i<nummodels;i++)printf(" %i: %s\n",i,EnumAsString(analysis_type_list[i])); 98 101 printf(" current analysis_type: \n"); 99 printf(" %i: %s\n", i,EnumAsString(analysis_type_list[analysis_counter]));102 printf(" %i: %s\n",analysis_counter,EnumAsString(analysis_type_list[analysis_counter])); 100 103 101 104 102 105 } 103 /*}}} 1*/106 /*}}}*/ 104 107 105 108 /*Numerics: */ … … 112 115 113 116 /*intermediary: */ 114 Io FemModel* iomodel=NULL;117 IoModel* iomodel=NULL; 115 118 116 119 _printf_(" fill model with matlab workspace data\n"); 117 iomodel =new IoFemModel(IOMODEL);120 iomodel = new IoModel(IOMODEL); 118 121 119 122 _printf_(" create datasets:\n"); … … 133 136 134 137 _printf_(" reducing single point constraints vector:\n"); 135 Reducevectorgtosx(&ys[analysis_counter], yg[analysis_counter] ->vector,nodesets[analysis_counter]);138 Reducevectorgtosx(&ys[analysis_counter], yg[analysis_counter],nodesets[analysis_counter]); 136 139 137 140 _printf_(" normalizing rigid body constraints matrix:\n"); … … 149 152 /*}}}1*/ 150 153 /*FUNCTION FemModel::GetCurrentAnalysis {{{1*/ 151 FemFemModel*FemModel::GetCurrentAnalysis(){154 int FemModel::GetCurrentAnalysis(){ 152 155 return analysis_type_list[analysis_counter]; 153 156 } … … 156 159 void FemModel::SetCurrentAnalysis(int analysis_type){ 157 160 int found=-1; 158 for(i =0;i<nummodels;i++){161 for(int i=0;i<nummodels;i++){ 159 162 if (analysis_type_list[i]==analysis_type){ 160 163 found=i; … … 162 165 } 163 166 } 164 if(found )analysis_counter=i;165 else ISSMERR R("%s%s%s"," could not find analysis_type ",EnumAsString(analysis_type) " in list of FemModel analyses");167 if(found!=-1) analysis_counter=found; 168 else ISSMERROR("Could not find analysis_type %s in list of FemModel analyses",EnumAsString(analysis_type)); 166 169 } 167 170 /*}}}1*/ -
issm/trunk/src/c/objects/FemModel.h
r3984 r4001 42 42 Mat* Gmn; 43 43 NodeSets** nodesets; //boundary conditions dof sets 44 Vec* yg; //boundary conditions in global g-set44 Vec* yg; //boundary conditions in global g-set 45 45 Vec* ys; //boundary conditions, in reduced s-set 46 46 … … 50 50 51 51 /*Methods: */ 52 Echo();52 void Echo(); 53 53 54 54 /*Fem: */ 55 55 void AddAnalysis(ConstDataHandle IOMODEL, int analysis_type); 56 intSetCurrentAnalysis(int analysis_type);57 voidGetCurrentAnalysis(void);56 void SetCurrentAnalysis(int analysis_type); 57 int GetCurrentAnalysis(void); 58 58 59 59 }; 60 60 61 62 61 #endif -
issm/trunk/src/c/objects/objects.h
r3969 r4001 15 15 #include "./Node.h" 16 16 #include "./NodeSets.h" 17 #include "./Model.h"18 17 #include "./Result.h" 19 18 #include "./IoModel.h"
Note:
See TracChangeset
for help on using the changeset viewer.