Changeset 1886
- Timestamp:
- 08/25/09 14:07:38 (16 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Model.cpp
r1881 r1886 123 123 } 124 124 125 #undef __FUNCT__ 126 #define __FUNCT__ "Model::AddFormulation" 127 void Model::AddFormulation(ConstDataHandle MODEL, int analysis_type){ 128 129 /*FemModel: */ 130 FemModel* femmodel=NULL; 131 DataSet* elements=NULL; 132 DataSet* nodes=NULL; 133 DataSet* constraints=NULL; 134 DataSet* loads=NULL; 135 DataSet* materials=NULL; 136 DataSet* parameters=NULL; 137 Vec partition=NULL; 138 Vec tpartition=NULL; 139 Vec yg=NULL; 140 Mat Rmg=NULL; 141 Mat Gmn=NULL; 142 NodeSets* nodesets=NULL; 143 Vec ys=NULL; 144 Vec ys0=NULL; 145 146 /*intermediary: */ 147 IoModel* iomodel=NULL; 148 int sub_analysis_type; 149 150 _printf_(" fill model with matlab workspace data\n"); 151 IoModelInit(&iomodel,MODEL); 152 153 _printf_(" specifying analysis\n"); 154 if (analysis_type!=0){ 155 iomodel->analysis_type=analysis_type; 156 } 157 /*sub_analysis_type should default to none, as it was not specified: */ 158 sub_analysis_type=NoneAnalysisEnum(); 159 160 if (sub_analysis_type!=0){ 161 iomodel->sub_analysis_type=sub_analysis_type; 162 } 163 164 _printf_(" create datasets:\n"); 165 CreateDataSets(&elements,&nodes,&materials,&constraints,&loads,¶meters,iomodel,MODEL); 166 167 _printf_(" create degrees of freedom: \n"); 168 Dofx( &partition,&tpartition,elements,nodes, parameters); 169 170 _printf_(" create single point constraints: \n"); 171 SpcNodesx( &yg, nodes,constraints); 172 173 _printf_(" create rigid body constraints:\n"); 174 MpcNodesx( &Rmg, nodes,constraints); 175 176 _printf_(" create node sets:\n"); 177 BuildNodeSetsx(&nodesets, nodes); 178 179 _printf_(" reducing single point constraints vector:\n"); 180 Reducevectorgtosx(&ys,&ys0, yg,nodesets); 181 182 _printf_(" normalizing rigid body constraints matrix:\n"); 183 NormalizeConstraintsx(&Gmn, Rmg,nodesets); 184 185 _printf_(" configuring element and loads:\n"); 186 ConfigureObjectsx(elements, loads, nodes, materials); 187 188 _printf_(" process parameters:\n"); 189 ProcessParamsx( parameters, partition); 190 191 _printf_(" free ressources:\n"); 192 DeleteIoModel(&iomodel); 193 194 /*Use all the data created to create an femmodel: */ 195 femmodel=new FemModel(elements,nodes,constraints,loads,materials,parameters, 196 partition,tpartition,yg,Rmg,Gmn,nodesets,ys,ys0); 197 198 /*Add to femmodels in model: */ 199 femmodels->AddObject((Object*)femmodel); 200 201 } 125 202 126 203 #undef __FUNCT__ -
issm/trunk/src/c/objects/Model.h
r1881 r1886 30 30 31 31 void AddFormulation(ConstDataHandle MODEL, int analysis_type,int sub_analysis_type); 32 void AddFormulation(ConstDataHandle MODEL, int analysis_type); 32 33 33 34 /*all overloaded forms of the FindParam routine: */ -
issm/trunk/src/c/parallel/control.cpp
r1881 r1886 83 83 84 84 _printf_("\n reading surface and bed slope computation model data:\n"); 85 model->AddFormulation(fid,SlopeComputeAnalysisEnum() ,NoneAnalysisEnum());85 model->AddFormulation(fid,SlopeComputeAnalysisEnum()); 86 86 87 87 _printf_("initialize inputs:\n"); -
issm/trunk/src/c/parallel/diagnostic.cpp
r1881 r1886 76 76 77 77 _printf_("\n reading surface and bed slope computation model data:\n"); 78 model->AddFormulation(fid,SlopeComputeAnalysisEnum() ,NoneAnalysisEnum());78 model->AddFormulation(fid,SlopeComputeAnalysisEnum()); 79 79 80 80 _printf_("initialize inputs:\n"); 81 81 model->FindParam(&u_g_initial,"u_g",DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 82 82 model->FindParam(&numberofnodes,"numberofnodes"); 83 model->FindParam(&qmu_analysis,"qmu_analysis"); 83 84 84 85 inputs=new ParameterInputs; … … 89 90 90 91 /*are we running the solution sequence, or a qmu wrapper around it? : */ 91 model->FindParam(&qmu_analysis,"qmu_analysis");92 93 92 if(!qmu_analysis){ 94 93 -
issm/trunk/src/c/parallel/diagnostic_core.cpp
r1881 r1886 73 73 fem_ds=model->GetFormulation(DiagnosticAnalysisEnum(),StokesAnalysisEnum()); 74 74 fem_dhu=model->GetFormulation(DiagnosticAnalysisEnum(),HutterAnalysisEnum()); 75 fem_sl=model->GetFormulation(SlopeComputeAnalysisEnum() ,NoneAnalysisEnum());75 fem_sl=model->GetFormulation(SlopeComputeAnalysisEnum()); 76 76 77 77 //specific parameters for specific models -
issm/trunk/src/c/parallel/prognostic.cpp
r1881 r1886 72 72 73 73 _printf_("read and create finite element model:\n"); 74 model->AddFormulation(fid,PrognosticAnalysisEnum() ,NoneAnalysisEnum());74 model->AddFormulation(fid,PrognosticAnalysisEnum()); 75 75 76 76 //retrieve parameters used to fill inputs -
issm/trunk/src/c/parallel/steadystate.cpp
r1881 r1886 82 82 83 83 _printf_("\n reading surface and bed slope computation model data:\n"); 84 model->AddFormulation(fid,SlopeComputeAnalysisEnum() ,NoneAnalysisEnum());84 model->AddFormulation(fid,SlopeComputeAnalysisEnum()); 85 85 86 86 _printf_("\n read and create thermal finite element model:\n"); -
issm/trunk/src/c/parallel/transient.cpp
r1881 r1886 85 85 86 86 _printf_("\n reading surface and bed slope computation model data:\n"); 87 model->AddFormulation(fid,SlopeComputeAnalysisEnum() ,NoneAnalysisEnum());87 model->AddFormulation(fid,SlopeComputeAnalysisEnum()); 88 88 89 89 _printf_("\n reading prognositc model data:\n"); 90 model->AddFormulation(fid,PrognosticAnalysisEnum() ,NoneAnalysisEnum());90 model->AddFormulation(fid,PrognosticAnalysisEnum()); 91 91 92 92 /*Do we run in 3d?, in which case we need thermal and melting also:*/
Note:
See TracChangeset
for help on using the changeset viewer.