| 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 "../../io/io.h"
|
|---|
| 14 | #include "../../Container/Container.h"
|
|---|
| 15 | #include "../../EnumDefinitions/EnumDefinitions.h"
|
|---|
| 16 | #include "../../include/include.h"
|
|---|
| 17 | #include "../../modules/modules.h"
|
|---|
| 18 |
|
|---|
| 19 | void 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){
|
|---|
| 20 |
|
|---|
| 21 | int i;
|
|---|
| 22 | int analysis_type;
|
|---|
| 23 | int dim;
|
|---|
| 24 | int verbose;
|
|---|
| 25 |
|
|---|
| 26 | /*output: */
|
|---|
| 27 | Elements *elements = NULL;
|
|---|
| 28 | Nodes *nodes = NULL;
|
|---|
| 29 | Vertices *vertices = NULL;
|
|---|
| 30 | Materials *materials = NULL;
|
|---|
| 31 | Constraints *constraints = NULL;
|
|---|
| 32 | Loads *loads = NULL;
|
|---|
| 33 | Parameters *parameters = NULL;
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | /*Initialize IoModel from input file*/
|
|---|
| 37 | IoModel* iomodel = new IoModel(IOMODEL);
|
|---|
| 38 |
|
|---|
| 39 | /*Fetch parameters: */
|
|---|
| 40 | iomodel->Constant(&dim,MeshDimensionEnum);
|
|---|
| 41 | iomodel->Constant(&verbose,VerboseEnum);
|
|---|
| 42 |
|
|---|
| 43 | SetVerbosityLevel(verbose);
|
|---|
| 44 |
|
|---|
| 45 | for(i=0;i<nummodels;i++){
|
|---|
| 46 |
|
|---|
| 47 | analysis_type=analysis_type_list[i];
|
|---|
| 48 |
|
|---|
| 49 | /*Hack for trasient runs (to be improved)*/
|
|---|
| 50 | if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && dim==2) continue;
|
|---|
| 51 | if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && dim==2) continue;
|
|---|
| 52 |
|
|---|
| 53 | _printf_(VerboseMProcessor()," create datasets for analysis %s\n",EnumToStringx(analysis_type));
|
|---|
| 54 | CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,¶meters,iomodel,solution_type,analysis_type,nummodels,i);
|
|---|
| 55 | }
|
|---|
| 56 |
|
|---|
| 57 | /*Free ressources:*/
|
|---|
| 58 | delete iomodel;
|
|---|
| 59 |
|
|---|
| 60 | /*Assign output pointers:*/
|
|---|
| 61 | *pelements=elements;
|
|---|
| 62 | *pnodes=nodes;
|
|---|
| 63 | *pvertices=vertices;
|
|---|
| 64 | *pmaterials=materials;
|
|---|
| 65 | *pconstraints=constraints;
|
|---|
| 66 | *ploads=loads;
|
|---|
| 67 | *pparameters=parameters;
|
|---|
| 68 |
|
|---|
| 69 | }
|
|---|