source: issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp@ 9719

Last change on this file since 9719 was 9719, checked in by Mathieu Morlighem, 14 years ago

Added some mesh objects

File size: 2.0 KB
Line 
1/*!\file ModelProcessorx
2 * \brief: create datasets using input binary file and a set of requested analyses
3 */
4
5#ifdef HAVE_CONFIG_H
6 #include <config.h>
7#else
8#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
9#endif
10
11#include "../../objects/objects.h"
12#include "../../shared/shared.h"
13#include "../../Container/Container.h"
14#include "../../EnumDefinitions/EnumDefinitions.h"
15#include "../../include/include.h"
16#include "../../modules/modules.h"
17
18void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, FILE* IOMODEL,const int solution_type,const int nummodels,const int* analysis_type_list){
19
20 int i;
21 int analysis_type;
22 int dim;
23 int verbose;
24
25 /*output: */
26 Elements *elements = NULL;
27 Nodes *nodes = NULL;
28 Vertices *vertices = NULL;
29 Materials *materials = NULL;
30 Constraints *constraints = NULL;
31 Loads *loads = NULL;
32 Parameters *parameters = NULL;
33
34
35 /*Initialize IoModel from input file*/
36 IoModel* iomodel = new IoModel(IOMODEL);
37
38 /*Fetch parameters: */
39 iomodel->Constant(&dim,MeshDimensionEnum);
40 iomodel->Constant(&verbose,VerboseEnum);
41
42 SetVerbosityLevel(verbose);
43
44 for(i=0;i<nummodels;i++){
45
46 analysis_type=analysis_type_list[i];
47
48 /*Hack for trasient runs (to be improved)*/
49 if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && dim==2) continue;
50 if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && dim==2) continue;
51
52 _printf_(VerboseMProcessor()," create datasets for analysis %s\n",EnumToStringx(analysis_type));
53 CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,&parameters,iomodel,solution_type,analysis_type,nummodels,i);
54 }
55
56 /*Free ressources:*/
57 delete iomodel;
58
59 /*Assign output pointers:*/
60 *pelements=elements;
61 *pnodes=nodes;
62 *pvertices=vertices;
63 *pmaterials=materials;
64 *pconstraints=constraints;
65 *ploads=loads;
66 *pparameters=parameters;
67
68}
Note: See TracBrowser for help on using the repository browser.