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