Changeset 4002
- Timestamp:
- 06/02/10 17:42:51 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 14 added
- 2 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/DataSet/DataSet.cpp
r3971 r4002 872 872 } 873 873 /*}}}*/ 874 /*FUNCTION DataSet::NumberOfDofs {{{1*/875 int DataSet::NumberOfDofs( ){874 /*FUNCTION DataSet::NumberOfDofs(int analysis_type){{{1*/ 875 int DataSet::NumberOfDofs(int analysis_type){ 876 876 877 877 … … 889 889 node=(Node*)(*object); 890 890 891 /*Ok, this object is a node, ask it to plug values into partition: */ 892 if (!node->IsClone()){ 893 894 numdofs+=node->GetNumberOfDofs(); 895 891 if (node->InAnalysis(analysis_type)){ 892 893 /*Ok, this object is a node, ask it to plug values into partition: */ 894 if (!node->IsClone()){ 895 896 numdofs+=node->GetNumberOfDofs(); 897 898 } 896 899 } 897 900 } … … 1040 1043 /*}}}*/ 1041 1044 /*FUNCTION DataSet::SetupSpcs{{{1*/ 1042 void DataSet::SetupSpcs(DataSet* nodes,Vec yg ){1045 void DataSet::SetupSpcs(DataSet* nodes,Vec yg,int analysis_type){ 1043 1046 1044 1047 vector<Object*>::iterator object; -
issm/trunk/src/c/DataSet/DataSet.h
r3971 r4002 57 57 void DistributeNumDofs(int** pnumdofspernode,int numberofnodes,int analysis_type,int sub_analysis_type); 58 58 void FlagClones(int numberofnodes); 59 int NumberOfDofs( );59 int NumberOfDofs(int analysis_type); 60 60 int NumberOfRgbs(); 61 void SetupSpcs(DataSet* nodes,Vec yg );61 void SetupSpcs(DataSet* nodes,Vec yg,int analysis_type); 62 62 void SetupMpcs(Mat Rmg,DataSet* nodes); 63 63 void FlagNodeSets(Vec pv_g, Vec pv_m, Vec pv_n, Vec pv_f, Vec pv_s); -
issm/trunk/src/c/Makefile.am
r3985 r4002 300 300 ./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp 301 301 ./modules/ModelProcessorx/NodesPartitioning.cpp 302 ./modules/ModelProcessorx/SortDataSets.cpp\ 303 ./modules/ModelProcessorx/UpdateCounter.cpp\ 302 304 ./modules/ModelProcessorx/CreateDataSets.cpp\ 303 305 ./modules/ModelProcessorx/CreateParameters.cpp\ … … 355 357 ./modules/ModelProcessorx/Balancedvelocities/CreateLoadsBalancedvelocities.cpp\ 356 358 ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\ 357 ./modules/Dofx/Dofx.h\ 358 ./modules/Dofx/Dofx.cpp\ 359 ./modules/VerticesDofx/VerticesDofx.h\ 360 ./modules/VerticesDofx/VerticesDofx.cpp\ 361 ./modules/NodesDofx/NodesDofx.h\ 362 ./modules/NodesDofx/NodesDofx.cpp\ 359 363 ./modules/Dux/Dux.h\ 360 364 ./modules/Dux/Dux.cpp\ … … 765 769 ./modules/ModelProcessorx/NodesPartitioning.cpp 766 770 ./modules/ModelProcessorx/Partitioning.cpp\ 771 ./modules/ModelProcessorx/SortDataSets.cpp\ 772 ./modules/ModelProcessorx/UpdateCounter.cpp\ 767 773 ./modules/ModelProcessorx/CreateDataSets.cpp\ 768 774 ./modules/ModelProcessorx/CreateParameters.cpp\ … … 807 813 ./modules/ModelProcessorx/Balancedvelocities/CreateLoadsBalancedvelocities.cpp\ 808 814 ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\ 809 ./modules/Dofx/Dofx.h\ 810 ./modules/Dofx/Dofx.cpp\ 815 ./modules/VerticesDofx/VerticesDofx.h\ 816 ./modules/VerticesDofx/VerticesDofx.cpp\ 817 ./modules/NodesDofx/NodesDofx.h\ 818 ./modules/NodesDofx/NodesDofx.cpp\ 811 819 ./modules/OutputResultsx/OutputResultsx.h\ 812 820 ./modules/OutputResultsx/OutputResultsx.cpp\ -
issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp
r3984 r4002 117 117 /*Generate objects that are not dependent on any analysis_type: */ 118 118 CreateParameters(pparameters,iomodel,iomodel_handle); 119 CreateParametersControl(pparameters,iomodel,iomodel_handle); 120 CreateParametersQmu(pparameters,iomodel,iomodel_handle); 119 120 /*Sort datasets: */ 121 SortDataSets(elements,nodes,vertices, loads, materials, constraints, parameters); 122 123 /*Update counters, because we have created more nodes, loads and constraints, and ids for objects created in next call to CreateDataSets 124 * will need to start at the end of the updated counters: */ 125 UpdateCounters(iomodel,pnodes,ploads,pconstraints); 126 121 127 } -
issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
r3984 r4002 88 88 xfree((void**)&iomodel->thickness); 89 89 90 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these91 * datasets, it will not be redone: */92 elements->Presort();93 vertices->Presort();94 materials->Presort();95 96 90 cleanup_and_return: 97 91 -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r3984 r4002 21 21 char* tag=NULL; 22 22 #ifdef _SERIAL_ 23 24 23 mxArray* pfield=NULL; 24 mxArray* pfield2=NULL; 25 25 #endif 26 26 27 if(*pparameters)return; //do not create parameters twice! 28 27 29 /*Initialize dataset: */ 28 30 parameters = new Parameters(ParametersEnum); … … 103 105 } 104 106 105 /*All our datasets are already ordered by ids. Set presort flag so that later on, when sorting is requested on these 106 * datasets, it will not be redone: */ 107 parameters->Presort(); 108 107 109 108 /*Free data: */ 110 109 xfree((void**)&tag); … … 115 114 xfree((void**)¶meteroutput); 116 115 116 117 /*Before returning, create parameters in case we are running Qmu or control types runs: */ 118 CreateParametersControl(¶meters,iomodel,iomodel_handle); 119 CreateParametersQmu(¶meters,iomodel,iomodel_handle); 120 117 121 /*Assign output pointer: */ 118 122 *pparameters=parameters; -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
r3913 r4002 23 23 int node1,node2; 24 24 25 /* Create constraints: */26 constraints = new DataSet(ConstraintsEnum);25 /*Recover pointer: */ 26 constraints=*pconstraints; 27 27 28 /*Create constraints if they do not exist yet*/ 29 if(!constraints) constraints = new DataSet(ConstraintsEnum); 30 28 31 /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */ 29 32 if (!iomodel->ismacayealpattyn)goto cleanup_and_return; … … 33 36 IoModelFetchData(&iomodel->gridonhutter,NULL,NULL,iomodel_handle,"gridonhutter"); 34 37 35 count=1; //matlab indexing 38 /*Initialize counter: */ 39 count=0; 40 36 41 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 37 42 for (i=0;i<iomodel->numberofvertices;i++){ … … 39 44 40 45 if ((int)iomodel->spcvelocity[6*i+0] | (int)iomodel->gridonhutter[i]) 41 constraints->AddObject(new Spc( count,i+1,1,*(iomodel->spcvelocity+6*i+3)/iomodel->yts)); //add count'th spc, on node i+1, setting dof 1 to vx.46 constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,*(iomodel->spcvelocity+6*i+3)/iomodel->yts)); //add count'th spc, on node i+1, setting dof 1 to vx. 42 47 43 48 count++; 44 49 45 50 if ((int)iomodel->spcvelocity[6*i+1] | (int)iomodel->gridonhutter[i]) 46 constraints->AddObject(new Spc( count,i+1,2,*(iomodel->spcvelocity+6*i+4)/iomodel->yts)); //add count'th spc, on node i+1, setting dof 2 to vy51 constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,*(iomodel->spcvelocity+6*i+4)/iomodel->yts)); //add count'th spc, on node i+1, setting dof 2 to vy 47 52 48 53 count++; … … 54 59 xfree((void**)&iomodel->gridonhutter); 55 60 56 57 61 /*penalty loads: */ 58 62 IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,"penalties"); … … 66 70 67 71 /*We are pairing nodes along a vertical profile.*/ 68 node1=(int)*(iomodel->penalties+iomodel->numlayers*i) ;69 node2=(int)*(iomodel->penalties+iomodel->numlayers*i+j) ;72 node1=(int)*(iomodel->penalties+iomodel->numlayers*i)+iomodel->nodecounter; 73 node2=(int)*(iomodel->penalties+iomodel->numlayers*i+j)+iomodel->nodecounter; 70 74 71 constraints->AddObject(new Rgb( count,node1,node2,1)); //add count'th Rgb on dof 1 between node1 and node275 constraints->AddObject(new Rgb(iomodel->constraintcounter+count+1,node1,node2,1)); //add count'th Rgb on dof 1 between node1 and node2 72 76 73 77 count++; 74 78 75 constraints->AddObject(new Rgb( count,node1,node2,2)); //add count'th Rgb on dof 1 between node1 and node279 constraints->AddObject(new Rgb(iomodel->constraintcounter+count+1,node1,node2,2)); //add count'th Rgb on dof 1 between node1 and node2 76 80 77 81 } … … 82 86 xfree((void**)&iomodel->penalties); 83 87 84 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these85 * datasets, it will not be redone: */86 constraints->Presort();87 88 88 cleanup_and_return: 89 89 90 /*Assign output pointer: */ 90 91 *pconstraints=constraints; -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
r3984 r4002 20 20 int element; 21 21 int i; 22 int count er=1;22 int count=0; 23 23 24 /*Create loads: */ 25 loads = new DataSet(LoadsEnum); 24 /*Recover pointer: */ 25 loads=*ploads; 26 27 /*Create loads if they do not exist yet*/ 28 if(!loads) loads = new DataSet(LoadsEnum); 26 29 27 30 /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */ … … 34 37 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness"); 35 38 IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed"); 39 40 /*Initialize counter: */ 41 count=0; 36 42 37 43 /*First load data:*/ … … 50 56 51 57 /*Create and add load: */ 52 loads->AddObject(new Icefront( counter,i,iomodel));53 count er++;58 loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel)); 59 count++; 54 60 55 61 } … … 73 79 if(iomodel->my_elements[(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+2)]){ 74 80 75 loads->AddObject(new Riftfront( counter,i,iomodel));76 count er++;81 loads->AddObject(new Riftfront(iomodel->loadcounter+count+1,i,iomodel)); 82 count++; 77 83 } 78 84 } … … 88 94 cleanup_and_return: 89 95 90 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these91 * datasets, it will not be redone: */92 loads->Presort();93 94 96 /*Assign output pointer: */ 95 97 *ploads=loads; -
issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp
r3999 r4002 17 17 /*Intermediary*/ 18 18 int i; 19 int totalnodes;20 19 bool continuous_galerkin=true; 21 20 … … 23 22 DataSet* nodes = NULL; 24 23 25 /*First create nodes*/ 26 nodes = new DataSet(NodesEnum); 24 /*Recover pointer: */ 25 nodes=*pnodes; 26 27 /*Create nodes if they do not exist yet*/ 28 if(!nodes) nodes = new DataSet(NodesEnum); 27 29 28 30 /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */ 29 31 if (!iomodel->ismacayealpattyn)goto cleanup_and_return; 30 31 /*Recover number of nodes already created in other analyses: */32 totalnodes=iomodel->nodecounter;33 32 34 33 /*Continuous Galerkin partition of nodes: */ … … 51 50 52 51 /*Add node to nodes dataset: */ 53 nodes->AddObject(new Node( totalnodes+i+1,i,iomodel,DiagnosticHorizAnalysisEnum));52 nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,iomodel,DiagnosticHorizAnalysisEnum)); 54 53 } 55 54 } 56 55 57 /*Increase nodecounter for other analyses to start their node indexing correctly: */ 58 totalnodes+=iomodel->numberofvertices; 59 iomodel->nodecounter=totalnodes; 60 56 61 57 /*Clean fetched data: */ 62 58 xfree((void**)&iomodel->gridonbed); … … 68 64 xfree((void**)&iomodel->uppernodes); 69 65 70 /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these71 * datasets, it will not be redone: */72 nodes->Presort();73 74 66 /*Assign output pointer: */ 75 67 *pnodes=nodes; 76 77 68 } -
issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.h
r3984 r4002 101 101 void CreateNumberNodeToElementConnectivity(IoModel* iomodel); 102 102 103 /*Diverse: */ 104 void SortDataSets(DataSet** pelements,DataSet** pnodes,DataSet** pvertices, DataSet** ploads, DataSet** pmaterials, DataSet** pconstraints, Parameters** pparameters); 105 void UpdateCounter(IoModel* iomodel,DataSet** pnodes,DataSet** ploads, DataSet** pconstraints); 106 107 108 103 109 #endif -
issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp
r4001 r4002 10 10 #include "../../EnumDefinitions/EnumDefinitions.h" 11 11 12 void SpcNodesx(Vec* pyg, DataSet* nodes,DataSet* constraints ){12 void SpcNodesx(Vec* pyg, DataSet* nodes,DataSet* constraints,analysis_type){ 13 13 14 14 int i; … … 20 20 21 21 /*First, recover number of dofs from nodes: */ 22 numberofdofs=nodes->NumberOfDofs( );22 numberofdofs=nodes->NumberOfDofs(analysis_type); 23 23 24 24 if(numberofdofs){ -
issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h
r4001 r4002 11 11 12 12 /* local prototypes: */ 13 void SpcNodesx(Vec* pyg, DataSet* nodesin,DataSet* constraints );13 void SpcNodesx(Vec* pyg, DataSet* nodesin,DataSet* constraints,int analysis_type); 14 14 15 15 #endif /* _SPCNODESX_H */ -
issm/trunk/src/c/modules/modules.h
r3938 r4002 8 8 /*Modules: */ 9 9 #include "./ModelProcessorx/ModelProcessorx.h" 10 #include "./Dofx/Dofx.h" 10 #include "./NodesDofx/NodesDofx.h" 11 #include "./VerticesDofx/VerticesDofx.h" 11 12 #include "./Dux/Dux.h" 12 13 #include "./SpcNodesx/SpcNodesx.h" -
issm/trunk/src/c/objects/FemModel.cpp
r4001 r4002 124 124 125 125 _printf_(" create degrees of freedom: \n"); 126 Dofx( &partition,&tpartition,elements,nodes, vertices,parameters); 126 VerticesDofx( &partition,&tpartition,vertices,parameters); 127 NodesDofx( nodes,parameters); 127 128 128 129 _printf_(" create single point constraints: \n"); 129 SpcNodesx( &yg[analysis_counter], nodes,constraints );130 SpcNodesx( &yg[analysis_counter], nodes,constraints,analysis_type); 130 131 131 132 _printf_(" create rigid body constraints:\n"); -
issm/trunk/src/c/objects/IoModel.cpp
r3985 r4002 381 381 this->numbernodetoelementconnectivity=NULL; 382 382 this->nodecounter=0; 383 this->loadcounter=0; 384 this->constraintcounter=0; 383 385 } 384 386 /*}}}*/ -
issm/trunk/src/c/objects/IoModel.h
r3985 r4002 187 187 int* numbernodetoelementconnectivity; 188 188 int nodecounter; //keep track of how many nodes are being created in each analysis type 189 int loadcounter; //keep track of how many loads are being created in each analysis type 190 int constraintcounter; //keep track of how many constraints are being created in each analysis type 189 191 /*}}}*/ 190 192 /*Methods: {{{1*/ -
issm/trunk/src/c/objects/Node.cpp
r3984 r4002 420 420 } 421 421 /*}}}*/ 422 /*FUNCTION Node::InAnalysis(int analysis_type){{{1*/ 423 bool Node::InAnalysis(int in_analysis_type){ 424 if (in_analysis_type=this->analysis_type)return true; 425 else return false; 426 } 422 427 /*}}}*/ 423 428 /*Object numerics: {{{1*/ -
issm/trunk/src/c/objects/Node.h
r3984 r4002 59 59 void UpdateInputsFromConstant(int constant, int name); 60 60 void UpdateInputsFromConstant(bool constant, int name); 61 62 61 void UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type){ISSMERROR("Not implemented yet!");} 62 bool InAnalysis(int analysis_type); 63 63 64 64 /*}}}*/ -
issm/trunk/src/m/classes/@model/model.m
r3994 r4002 102 102 md.minh=0; 103 103 md.firn_layer=NaN; 104 md.dof=NaN;105 104 106 105 %Extraction -
issm/trunk/src/m/solutions/jpl/CreateFemModel.m
r3962 r4002 6 6 %----------------------------------------------------------------------- 7 7 8 function m=CreateFEMModel(md )8 function m=CreateFEMModel(md,analyses) 9 9 10 10 displaystring(md.verbose,'\n reading data from model %s...',md.name); 11 [m.elements,m.nodes,m.vertices,m.constraints,m.loads,m.materials,m.parameters]=ModelProcessor(md );11 [m.elements,m.nodes,m.vertices,m.constraints,m.loads,m.materials,m.parameters]=ModelProcessor(md,analyses); 12 12 13 displaystring(md.verbose,'%s',' generating degrees of freedom...'); 14 [m.nodes,m.vertices,m.part,m.tpart]=Dof(m.elements,m.nodes,m.vertices, m.parameters); 13 for i=1:length(analyses), 15 14 16 displaystring(md.verbose,'%s',' generating single point constraints...'); 17 [m.nodes,m.yg]=SpcNodes(m.nodes,m.constraints); 15 displaystring(md.verbose,'%s',' generating degrees of freedom...'); 16 if ~isfield(m,'part') [m.vertices,m.part,m.tpart]=VerticesDof(vertices, m.parameters); 17 [m.nodes]=NodesDof(m.nodes,m.parameters); 18 18 19 displaystring(md.verbose,'%s',' generating rigid bodyconstraints...');20 [m.Rmg,m.nodes]=MpcNodes(m.nodes,m.constraints);19 displaystring(md.verbose,'%s',' generating single point constraints...'); 20 [m.nodes,m.yg]=SpcNodes(m.nodes,m.constraints); 21 21 22 displaystring(md.verbose,'%s',' generating node sets...');23 m.nodesets=BuildNodeSets(m.nodes);22 displaystring(md.verbose,'%s',' generating rigid body constraints...'); 23 [m.Rmg,m.nodes]=MpcNodes(m.nodes,m.constraints); 24 24 25 displaystring(md.verbose,'%s',' reducing single point constraints vector...'); 26 m.ys=Reducevectorgtos(m.yg.vector,m.nodesets); 27 28 displaystring(md.verbose,'%s',' normalizing rigid body constraints matrix...'); 29 m.Gmn = NormalizeConstraints(m.Rmg,m.nodesets); 25 displaystring(md.verbose,'%s',' generating node sets...'); 26 m.nodesets=BuildNodeSets(m.nodes); 30 27 31 displaystring(md.verbose,'%s',' configuring element and loads...'); 32 [m.elements,m.loads,m.nodes,m.parameters] = ConfigureObjects( m.elements, m.loads, m.nodes, m.vertices,m.materials,m.parameters); 28 displaystring(md.verbose,'%s',' reducing single point constraints vector...'); 29 m.ys=Reducevectorgtos(m.yg.vector,m.nodesets); 30 31 displaystring(md.verbose,'%s',' normalizing rigid body constraints matrix...'); 32 m.Gmn = NormalizeConstraints(m.Rmg,m.nodesets); 33 33 34 displaystring(md.verbose,'%s',' processing parameters...'); 35 m.parameters= ProcessParams(m.parameters,m.part.vector); 34 displaystring(md.verbose,'%s',' configuring element and loads...'); 35 [m.elements,m.loads,m.nodes,m.parameters] = ConfigureObjects( m.elements, m.loads, m.nodes, m.vertices,m.materials,m.parameters); 36 37 displaystring(md.verbose,'%s',' processing parameters...'); 38 m.parameters= ProcessParams(m.parameters,m.part.vector); 39 end 36 40 37 41 end -
issm/trunk/src/m/solutions/jpl/diagnostic.m
r3934 r4002 8 8 t1=clock; 9 9 10 %Build all models requested for diagnostic simulation 11 models.analysis_type=DiagnosticAnalysisEnum; %needed for processresults 10 analyses=[DiagnosticHorizAnalysisEnum,DiagnosticVertAnalysisEnum,DiagnosticStokesAnalysisEnum,DiagnosticHutterAnalysisEnum,SlopecomputeAnalysisEnum]; 12 11 13 displaystring(md.verbose,'%s',['reading diagnostic horiz model data']); 14 md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=HorizAnalysisEnum; models.dh=CreateFemModel(md); 15 16 displaystring(md.verbose,'\n%s',['reading diagnostic vert model data']); 17 md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=VertAnalysisEnum; models.dv=CreateFemModel(md); 18 19 displaystring(md.verbose,'\n%s',['reading diagnostic stokes model data']); 20 md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=StokesAnalysisEnum; models.ds=CreateFemModel(md); 21 22 displaystring(md.verbose,'\n%s',['reading diagnostic hutter model data']); 23 md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=HutterAnalysisEnum; models.dhu=CreateFemModel(md); 24 25 displaystring(md.verbose,'\n%s',['reading surface and bed slope computation model data']); 26 md.analysis_type=SlopecomputeAnalysisEnum; md.sub_analysis_type=NoneAnalysisEnum; models.sl=CreateFemModel(md); 27 28 % figure out number of dof: just for information purposes. 29 md.dof=modelsize(models); 12 displaystring(md.verbose,'%s',['create fem model']); 13 femmodel=CreateFemModel(md,analyses); 30 14 31 15 %compute solution 32 if ~models.dh.parameters.QmuAnalysis, 33 if md.control_analysis, 16 if ~femmodel.parameters.QmuAnalysis, 17 if femodel.parameters.control_analysis, 18 34 19 %launch core of control solution. 35 results=control_core(models);20 md.results.DiagnosticAnalysis=control_core(femmodel); 36 21 37 %process results38 if ~isstruct(md.results), md.results=struct(); end39 md.results.DiagnosticAnalysis=processresults(models,results);40 22 else, 23 41 24 %launch core of diagnostic solution. 42 results=diagnostic_core(models);25 md.results.DiagnosticAnalysis=diagnostic_core(femmodel); 43 26 44 %process results45 if ~isstruct(md.results), md.results=struct(); end46 md.results.DiagnosticAnalysis=processresults(models,results);47 27 end 48 28 else 49 29 %launch dakota driver for diagnostic core solution 50 Qmu( models,models.dh.parameters);30 Qmu(femmodel); 51 31 end 52 32 -
issm/trunk/src/mex/Makefile.am
r3883 r4002 18 18 CostFunction \ 19 19 DepthAverageInput\ 20 Dof\ 20 NodesDof\ 21 VerticesDof\ 21 22 Du\ 22 23 Echo\ … … 127 128 DepthAverageInput/DepthAverageInput.h 128 129 129 Dof_SOURCES = Dof/Dof.cpp\ 130 Dof/Dof.h 130 NodesDof_SOURCES = NodesDof/NodesDof.cpp\ 131 NodesDof/NodesDof.h 132 133 VerticesDof_SOURCES = VerticesDof/VerticesDof.cpp\ 134 VerticesDof/VerticesDof.h 131 135 132 136 Du_SOURCES = Du/Du.cpp\ -
issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp
r3715 r4002 8 8 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){ 9 9 10 /*diverse: */ 11 int noerr=1; 10 int i; 11 12 /*inputs: */ 13 double* analyses=NULL; 14 int numanalyses; 12 15 13 16 /* output datasets: */ … … 31 34 /*Fill iomodel with matlab workspace data: */ 32 35 iomodel=new IoModel(MODEL); //this routine goes through the entire MODEL matlab class, and starts filling the corresponding "c" code model object. 36 FetchData(&analyses,&numanalyses,ANALYSES); 33 37 34 /*Create elements, nodes and materials: */ 35 CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints, &loads, ¶meters, iomodel,MODEL); 38 /*Create datasets, and update for each analysis type: */ 39 for(i=0;i<numanalyses;i++){ 40 CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints, &loads, ¶meters, iomodel,MODEL,(int)analyses[i],numanalyses,i); 41 } 36 42 43 37 44 /*Write output data: */ 38 45 WriteData(ELEMENTS,elements); … … 54 61 delete materials; 55 62 delete parameters; 63 delete analyses; 56 64 57 65 /*end module: */ … … 61 69 void ModelProcessorUsage(void) { 62 70 _printf_("\n"); 63 _printf_(" usage: [elements,grids,constraints,loads,materials,parameters,part,tpart]=ModelProcessor(model )\n");64 _printf_(" where: model is an instance of the matlab @model class .\n");71 _printf_(" usage: [elements,grids,constraints,loads,materials,parameters,part,tpart]=ModelProcessor(model,analyses)\n"); 72 _printf_(" where: model is an instance of the matlab @model class and analyses is a list of analysis types being performed.\n"); 65 73 _printf_("\n"); 66 74 } -
issm/trunk/src/mex/ModelProcessor/ModelProcessor.h
r3913 r4002 24 24 /* serial input macros: */ 25 25 #define MODEL (mxArray*)prhs[0] 26 #define ANALYSES (mxArray*)prhs[1] 26 27 27 28 /* serial output macros: */ … … 38 39 #define NLHS 7 39 40 #undef NRHS 40 #define NRHS 141 #define NRHS 2 41 42 42 43 #endif /* _MEXMODELPROCESSOR_H */
Note:
See TracChangeset
for help on using the changeset viewer.