source: issm/trunk-jpl-damage/src/c/modules/ModelProcessorx/ModelProcessorx.cpp@ 11330

Last change on this file since 11330 was 11129, checked in by cborstad, 13 years ago

edited verbose output for verb consistency

File size: 3.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 "../../io/io.h"
14#include "../../Container/Container.h"
15#include "../../EnumDefinitions/EnumDefinitions.h"
16#include "../../include/include.h"
17#include "../../modules/modules.h"
18
19void 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,analysis_type,dim,verbose;
22 bool isthermal,isprognostic,isdiagnostic,isgroundingline;
23
24 /*output: */
25 Elements *elements = NULL;
26 Nodes *nodes = NULL;
27 Vertices *vertices = NULL;
28 Materials *materials = NULL;
29 Constraints *constraints = NULL;
30 Loads *loads = NULL;
31 Parameters *parameters = NULL;
32
33
34 /*Initialize IoModel from input file*/
35 IoModel* iomodel = new IoModel(IOMODEL);
36
37 /*Fetch parameters: */
38 iomodel->Constant(&dim,MeshDimensionEnum);
39 iomodel->Constant(&verbose,VerboseEnum);
40 iomodel->Constant(&isthermal,TransientIsthermalEnum);
41 iomodel->Constant(&isprognostic,TransientIsprognosticEnum);
42 iomodel->Constant(&isdiagnostic,TransientIsdiagnosticEnum);
43 iomodel->Constant(&isgroundingline,TransientIsgroundinglineEnum);
44
45 SetVerbosityLevel(verbose);
46
47 for(i=0;i<nummodels;i++){
48
49 analysis_type=analysis_type_list[i];
50
51 /*Hack for trasient runs (to be improved)*/
52 if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && dim==2) continue;
53 if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && dim==2) continue;
54 if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && isthermal==false) continue;
55 if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && isthermal==false) continue;
56 if(solution_type==TransientSolutionEnum && analysis_type==PrognosticAnalysisEnum && isprognostic==false && isgroundingline==false) continue;
57 if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHorizAnalysisEnum && isdiagnostic==false) continue;
58 if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticVertAnalysisEnum && isdiagnostic==false) continue;
59 if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHutterAnalysisEnum && isdiagnostic==false) continue;
60
61 _printf_(VerboseMProcessor()," creating datasets for analysis %s\n",EnumToStringx(analysis_type));
62 CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,&parameters,iomodel,solution_type,analysis_type,nummodels,i);
63 }
64
65 /*Free ressources:*/
66 delete iomodel;
67
68 /*Assign output pointers:*/
69 *pelements=elements;
70 *pnodes=nodes;
71 *pvertices=vertices;
72 *pmaterials=materials;
73 *pconstraints=constraints;
74 *ploads=loads;
75 *pparameters=parameters;
76
77}
Note: See TracBrowser for help on using the repository browser.