Changeset 6231
- Timestamp:
- 10/11/10 10:30:18 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Container/Vertices.cpp
r4221 r6231 43 43 44 44 /*Numerics management*/ 45 /*FUNCTION Vertices::CreatePartitioningVector{{{1*/46 void Vertices::CreatePartitioningVector(Vec* ppartition,int numberofobjects){47 48 int i;49 50 /*output: */51 Vec partition=NULL;52 53 /*Create partition vector: */54 partition=NewVec(numberofobjects);55 56 /*Go through all objects, and ask each object to plug its doflist in57 * partition: */58 59 for(i=0;i<this->Size();i++){60 Vertex* vertex=(Vertex*)this->GetObjectByOffset(i);61 vertex->CreatePartition(partition);62 }63 64 /*Assemble the petsc vector: */65 VecAssemblyBegin(partition);66 VecAssemblyEnd(partition);67 68 /*Assign output pointers: */69 *ppartition=partition;70 }71 /*}}}*/72 45 /*FUNCTION Vertices::DistributeDofs{{{1*/ 73 46 void Vertices::DistributeDofs(int numberofobjects,int numberofdofsperobject){ -
issm/trunk/src/c/Container/Vertices.h
r4236 r6231 26 26 /*}}}*/ 27 27 /*numerics: {{{1*/ 28 void CreatePartitioningVector(Vec* ppartition,int numobjects);29 28 void DistributeDofs(int numberofnodes,int numdofspernode); 30 29 void FlagClones(int numberofnodes); -
issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
r5518 r6231 19 19 20 20 21 void AverageOntoPartitionx(double** paverage, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response ,Vec vertex_cluster_partition){21 void AverageOntoPartitionx(double** paverage, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response){ 22 22 23 23 int i,j,k; … … 25 25 26 26 int qmu_npart; 27 double *qmu_part_nocluster = NULL;28 27 double *qmu_part = NULL; 29 double* partition=NULL; //serial version of vertex_cluster_partition30 28 int numberofvertices; 31 29 … … 36 34 double* average=NULL; 37 35 38 /*First, recover qmu partition of vertices. Careful, do not confuse with vertex_cluster_partition, which is just used to distribute vertices 39 * onto cpus in a cluter: */ 40 if(!parameters->FindParam(&qmu_part_nocluster,&dummy,QmuPartEnum))ISSMERROR(" could not find qmu partition vector"); 36 /*First, recover qmu partition of vertices: */ 37 if(!parameters->FindParam(&qmu_part,&dummy,QmuPartEnum))ISSMERROR(" could not find qmu partition vector"); 41 38 42 39 /*Some parameters: */ … … 44 41 parameters->FindParam(&qmu_npart,QmuNPartEnum); 45 42 46 /*serialize vertex_cluster_partition: */ 47 VecToMPISerial(&partition,vertex_cluster_partition); 48 49 /*Use partition vector to repartition qmu_part_nocluster, which is ordered for use on a serial machine, not a cluster: */ 50 qmu_part=(double*)xmalloc(numberofvertices*sizeof(double)); 51 for(k=0;k<numberofvertices;k++) qmu_part[(int)(partition[k])]=qmu_part_nocluster[k]; 52 53 /*Ok, now we have a qmu partition (into separate areas) that takes into account the parallelism of the cluster. 54 *We want to use this vector, and the vector of responses, to average onto the separate areas. The result will 55 be a npart sized vector. */ 43 /*average onto the separate areas. The result will be a npart sized vector. */ 56 44 57 45 /*allocate: */ … … 80 68 81 69 /*Free ressources:*/ 82 xfree((void**)&partition);83 xfree((void**)&qmu_part_nocluster);84 70 xfree((void**)&qmu_part); 85 71 VecFree(&partition_contributions); -
issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.h
r5518 r6231 9 9 #include "../../Container/Container.h" 10 10 11 void AverageOntoPartitionx(double** average, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response ,Vec vertex_cluster_partition);11 void AverageOntoPartitionx(double** average, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response); 12 12 13 13 #endif /* _AVERAGEONTOPARTITIONXX_H */ -
issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
r5518 r6231 18 18 19 19 20 void DakotaResponsesx(double* d_responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters, Vec vertex_cluster_partition,char** responses_descriptors,int numresponsedescriptors,int d_numresponses){20 void DakotaResponsesx(double* d_responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,char** responses_descriptors,int numresponsedescriptors,int d_numresponses){ 21 21 22 22 int i,j,k; … … 54 54 55 55 /*Now, average it onto the partition grids: */ 56 AverageOntoPartitionx(&qmu_response,elements,nodes,vertices,loads,materials,parameters,vertex_response ,vertex_cluster_partition);56 AverageOntoPartitionx(&qmu_response,elements,nodes,vertices,loads,materials,parameters,vertex_response); 57 57 58 58 /*Copy onto our dakota responses: */ -
issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.h
r5518 r6231 9 9 #include "../../Container/Container.h" 10 10 11 void DakotaResponsesx(double* d_responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters, Vec vertex_cluster_partition,char** responses_descriptors,int numresponsedescriptors,int d_numresponses);11 void DakotaResponsesx(double* d_responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,char** responses_descriptors,int numresponsedescriptors,int d_numresponses); 12 12 13 13 #endif /* _DAKOTARESPONSESXX_H */ -
issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
r5817 r6231 10 10 #include "../modules.h" 11 11 12 void InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters, Vec vec_partition,double* variables,char* *variables_descriptors,int numvariables){12 void InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,double* variables,char* *variables_descriptors,int numvariables){ 13 13 14 14 int i,j,k; … … 18 18 int numberofvertices; 19 19 int qmu_npart; 20 double *qmu_part_serial = NULL;21 20 double *qmu_part = NULL; 22 21 23 22 double* distributed_values=NULL; 24 23 double* parameter=NULL; 25 double* parameter_serial=NULL;26 24 char* descriptor=NULL; 27 25 char root[50]; //root name of variable, ex: DragCoefficent, RhoIce, etc ... 28 double* partition=NULL; //serial version of vec_partition29 26 30 27 /*retrieve parameters: */ 31 28 parameters->FindParam(&verbose,VerboseEnum); 32 29 parameters->FindParam(&qmu_npart,QmuNPartEnum); 33 parameters->FindParam(&qmu_part _serial,&dummy,QmuPartEnum);30 parameters->FindParam(&qmu_part,&dummy,QmuPartEnum); 34 31 numberofvertices=vertices->NumberOfVertices(); 35 36 /*serialize partition vector: */37 VecToMPISerial(&partition,vec_partition);38 39 /*Use partition vector to repartition qmu_part, which is ordered in a serial way: */40 qmu_part=(double*)xmalloc(numberofvertices*sizeof(double));41 for(k=0;k<numberofvertices;k++) qmu_part[(int)(partition[k])]=qmu_part_serial[k];42 32 43 33 /*Go through all dakota descriptors, ex: "rho_ice","thermal_conductivity","thickness1","thickness2", etc ..., and … … 62 52 63 53 /*Now, pick up the parameter corresponding to root: */ 64 if(!parameters->FindParam(¶meter _serial,NULL,StringToEnum(root))){54 if(!parameters->FindParam(¶meter,NULL,StringToEnum(root))){ 65 55 ISSMERROR("%s%s"," could not find Qmu parameter: ",root); 66 56 } 67 57 68 /*repartition parameter: */69 parameter=(double*)xmalloc(numberofvertices*sizeof(double));70 for(k=0;k<numberofvertices;k++) parameter[(int)(partition[k])]=parameter_serial[k];71 72 58 /*We've got the parameter, we need to update it using qmu_part (a partitioning vector), and the distributed_values: */ 73 59 for(k=0;k<numberofvertices;k++){ … … 95 81 /*Free allocations: */ 96 82 xfree((void**)¶meter); 97 xfree((void**)¶meter_serial);98 83 xfree((void**)&distributed_values); 99 84 } … … 111 96 112 97 /*Free ressources:*/ 113 xfree((void**)&partition);114 98 xfree((void**)&qmu_part); 115 xfree((void**)&qmu_part_serial);116 99 117 100 } -
issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h
r4454 r6231 9 9 #include "../../Container/Container.h" 10 10 11 void InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters, Vec partition,double* variables,char* *variables_descriptors,int numvariables);11 void InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,double* variables,char* *variables_descriptors,int numvariables); 12 12 13 13 #endif /* _INPUTUPDATEFROMDAKOTAXX_H */ -
issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp
r5479 r6231 65 65 66 66 /*Modify core inputs in objects contained in femmodel, to reflect the dakota variables inputs: */ 67 InputUpdateFromDakotax(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters, femmodel->partition,d_variables,d_variables_descriptors,d_numvariables);67 InputUpdateFromDakotax(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,d_variables,d_variables_descriptors,d_numvariables); 68 68 69 69 /*Determine solution sequence: */ … … 77 77 /*compute responses: */ 78 78 if(verbose)_printf_("compute dakota responses:\n"); 79 DakotaResponsesx(d_responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters, femmodel->partition,responses_descriptors,numresponsedescriptors,d_numresponses);79 DakotaResponsesx(d_responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponsedescriptors,d_numresponses); 80 80 81 81 /*Free ressources:*/ -
issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.cpp
r4213 r6231 1 1 /*!\file VerticesDofx 2 * \brief: establish degrees of freedom for all vertices , and return partitioning vector. Do only once.2 * \brief: establish degrees of freedom for all vertices: */ 3 3 */ 4 4 … … 10 10 #include "../../EnumDefinitions/EnumDefinitions.h" 11 11 12 void VerticesDofx( Ve c* ppartition, Vec* ptpartition, Vertices* vertices, Parameters* parameters) {12 void VerticesDofx( Vertices* vertices, Parameters* parameters) { 13 13 14 14 int i; … … 20 20 /*intermediary: */ 21 21 int numberofvertices; 22 23 /*output: */24 Vec partition=NULL;25 Vec tpartition=NULL;26 27 if(*ppartition) return; //do not create partition vector twice! we only have on set of vertices28 22 29 23 /*figure out how many vertices we have: */ … … 38 32 vertices->DistributeDofs(numberofvertices,1); //only 1 dof per vertex. 39 33 40 /*Now that dofs have been distributed, create partitioning vector and its transpose: */41 vertices->CreatePartitioningVector(&partition,numberofvertices);42 43 /*Transpose partition into tpartition: */44 VecTranspose(&tpartition,partition);45 46 /*Assign output pointers: */47 *ppartition=partition;48 *ptpartition=tpartition;49 50 34 } -
issm/trunk/src/c/modules/VerticesDofx/VerticesDofx.h
r4236 r6231 10 10 11 11 /* local prototypes: */ 12 void VerticesDofx( Ve c* partition, Vec* ptpartition,Vertices* vertices, Parameters* parameters);12 void VerticesDofx( Vertices* vertices, Parameters* parameters); 13 13 14 14 #endif /* _VERTICESDOFX_H */ -
issm/trunk/src/c/objects/Elements/Penta.cpp
r6230 r6231 3961 3961 } 3962 3962 /*}}}*/ 3963 /*FUNCTION Penta::GetSidList{{{1*/ 3964 void Penta::GetSidList(int* sidlist){ 3965 3966 int i; 3967 for(i=0;i<NUMVERTICES;i++) doflist[i]=nodes[i]->GetSidList(); 3968 3969 } 3970 /*}}}*/ 3963 3971 /*FUNCTION Penta::GetElementType {{{1*/ 3964 3972 int Penta::GetElementType(){ -
issm/trunk/src/c/objects/Elements/Penta.h
r6216 r6231 184 184 void GetDofList(int** pdoflist,int approximation_enum,int setenum); 185 185 void GetDofList1(int* doflist); 186 void GetSidList(int* sidlist); 186 187 int GetElementType(void); 187 188 void GetParameterListOnVertices(double* pvalue,int enumtype); -
issm/trunk/src/c/objects/Elements/Tria.cpp
r6230 r6231 470 470 /*Get values on the 3 vertices*/ 471 471 for (i=0;i<3;i++){ 472 values[i]=vector[this->nodes[i]->Get VertexDof()];472 values[i]=vector[this->nodes[i]->GetSidList()]; //careful, vector of values here is not parallel distributed, but serial distributed (from a serial Dakota core!) 473 473 } 474 474 … … 696 696 697 697 /*Figure out the average for this element: */ 698 this->Get DofList1(&offset[0]);698 this->GetSidList(&offset[0]); 699 699 mean=0; 700 700 for(i=0;i<NUMVERTICES;i++){ … … 4561 4561 } 4562 4562 /*}}}*/ 4563 /*FUNCTION Tria::GetSidList {{{1*/ 4564 void Tria::GetSidList(int* sidlist){ 4565 4566 int i; 4567 for(i=0;i<NUMVERTICES;i++) doflist[i]=nodes[i]->GetSidList(); 4568 4569 } 4570 /*}}}*/ 4563 4571 /*FUNCTION Tria::GetParameterListOnVertices(double* pvalue,int enumtype) {{{1*/ 4564 4572 void Tria::GetParameterListOnVertices(double* pvalue,int enumtype){ -
issm/trunk/src/c/objects/Elements/Tria.h
r6216 r6231 165 165 void GetDofList(int** pdoflist,int approximation_enum,int setenum); 166 166 void GetDofList1(int* doflist); 167 void GetSidList(int* sidlist); 167 168 void GetParameterListOnVertices(double* pvalue,int enumtype); 168 169 void GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue); -
issm/trunk/src/c/objects/FemModel.cpp
r6020 r6231 32 32 this->analysis_counter=nummodels-1; //point to last analysis_type carried out. 33 33 this->results=new DataSet(); //not initialized by CreateDataSets 34 this->partition=NULL;35 this->tpartition=NULL;36 34 37 35 /*Dynamically allocate whatever is a list of length nummodels: */ … … 55 53 this->SetCurrentConfiguration(analysis_type); 56 54 57 _printf_(" create vertex degrees of freedom\n"); 58 VerticesDofx(&partition,&tpartition,vertices,parameters); 55 if(i==0){ 56 _printf_(" create vertex degrees of freedom\n"); 57 VerticesDofx(vertices,parameters); //only call once, we only have one set of vertices 58 } 59 59 60 60 _printf_(" resolve node constraints\n"); … … 91 91 delete parameters; 92 92 delete results; 93 VecFree(&partition);94 VecFree(&tpartition);95 93 96 94 for(i=0;i<nummodels;i++){ -
issm/trunk/src/c/objects/FemModel.h
r5772 r6231 36 36 DataSet* results; //results that cannot be fit into the elements (such as one time constants, arrays, strings, etc ...) 37 37 38 Vec partition; //one partitioning for all elements39 Vec tpartition;40 41 38 //multiple sets of matrices/vectors for each analysis_type. m stands for multiple 42 39 NodeSets** m_nodesets; //boundary conditions dof sets -
issm/trunk/src/c/objects/Materials/Matice.cpp
r6216 r6231 626 626 case TriaEnum: 627 627 double values[3]; 628 for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->Get VertexDof()];628 for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetSidList()]; //use sid list, to index into serial oriented vector 629 629 this->inputs->AddInput(new TriaVertexInput(name,values)); 630 630 return; -
issm/trunk/src/c/objects/Node.cpp
r6141 r6231 395 395 } 396 396 /*}}}*/ 397 /*FUNCTION Node::GetSidList{{{1*/ 398 int Node::GetSidList(void){ 399 400 Vertex* vertex=NULL; 401 402 vertex=(Vertex*)this->hvertex->delivers(); 403 404 return vertex->sid; 405 } 406 /*}}}*/ 397 407 /*FUNCTION Node::GetLocalDofList{{{1*/ 398 408 void Node::GetLocalDofList(int* outdoflist,int approximation_enum,int setenum){ … … 946 956 } 947 957 /*}}}*/ 948 /*FUNCTION Node::CreatePartition{{{1*/949 void Node::CreatePartition(Vec partition){950 951 ISSMERROR(" not supported yet!");952 return;953 }954 /*}}}*/ -
issm/trunk/src/c/objects/Node.h
r6216 r6231 84 84 void GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum); 85 85 int GetDofList1(void); 86 int GetSidList(void); 86 87 double GetX(); 87 88 double GetY(); … … 100 101 void UpdateCloneDofs(int* alltruerows,int ncols,int setenum); 101 102 void SetClone(int* minranks); 102 void CreatePartition(Vec partition);103 103 /*}}}*/ 104 104 }; -
issm/trunk/src/c/objects/Vertex.cpp
r5016 r6231 255 255 } 256 256 /*}}}*/ 257 /*FUNCTION Vertex::CreatePartition{{{1*/258 void Vertex::CreatePartition(Vec partition){259 260 double value;261 262 value=(double)this->dof;263 ISSMASSERT(value>=0);264 265 VecSetValues(partition,1,&sid,&value,INSERT_VALUES);266 267 return;268 }269 /*}}}*/270 257 271 258 /*Vertex management: */ -
issm/trunk/src/c/objects/Vertex.h
r4492 r6231 56 56 void UpdateCloneDofs(int* allborderdofs); 57 57 void SetClone(int* minranks); 58 void CreatePartition(Vec partition);59 58 /*}}}*/ 60 59 /*Vertex management: {{{1*/ -
issm/trunk/src/m/solutions/NewFemModel.m
r5776 r6231 31 31 femmodel=SetCurrentConfiguration(femmodel,analysis_type); 32 32 33 displaystring(md.verbose,'%s',' generating vertices degrees of freedom');34 if ~isfield(femmodel,'part'),35 [femmodel.vertices,femmodel.part,femmodel.tpart]=VerticesDof(femmodel.vertices, femmodel.parameters); %do not create partition vector twice! we only have one set of vertices!33 if i==1, %only create vertices dofs once! 34 displaystring(md.verbose,'%s',' generating vertices degrees of freedom'); 35 femmodel.vertices=VerticesDof(femmodel.vertices, femmodel.parameters); 36 36 end 37 37 -
issm/trunk/src/m/solutions/SpawnCore.m
r5488 r6231 15 15 16 16 %first update the inputs to the femmodel using the variables provided to us by dakota. 17 [femmodel.elements femmodel.loads femmodel.materials]=InputUpdateFromDakota(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters, femmodel.part,variables,variabledescriptors);17 [femmodel.elements femmodel.loads femmodel.materials]=InputUpdateFromDakota(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,variables,variabledescriptors); 18 18 19 19 %now run the core solution … … 23 23 24 24 %now process the results to get response function values 25 responses=DakotaResponses(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters, femmodel.part,responsedescriptors);25 responses=DakotaResponses(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,responsedescriptors); -
issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp
r5528 r6231 16 16 Materials* materials=NULL; 17 17 Parameters* parameters=NULL; 18 Vec node_partition=NULL;19 18 double* responses=NULL; 20 19 char** responses_descriptors=NULL; … … 38 37 FetchData((DataSet**)&materials,MATERIALSIN); 39 38 FetchParams(¶meters,PARAMETERSIN); 40 FetchData(&node_partition,NODEPARTITION);41 42 /*shit partition by 1 (matlab to c indexing): */43 VecShift(node_partition,-1.0);44 39 45 40 /*number of responses: */ … … 66 61 67 62 /*!Generate internal degree of freedom numbers: */ 68 DakotaResponsesx(responses,elements,nodes, vertices,loads,materials, parameters, node_partition,responses_descriptors,numresponsedescriptors,numresponses);63 DakotaResponsesx(responses,elements,nodes, vertices,loads,materials, parameters, responses_descriptors,numresponsedescriptors,numresponses); 69 64 70 65 /*write output datasets: */ -
issm/trunk/src/mex/DakotaResponses/DakotaResponses.h
r5482 r6231 24 24 #define MATERIALSIN (mxArray*)prhs[4] 25 25 #define PARAMETERSIN (mxArray*)prhs[5] 26 #define NODEPARTITION (mxArray*)prhs[6] 27 #define RESPONSESDESCRIPTORS (mxArray*)prhs[7] 26 #define RESPONSESDESCRIPTORS (mxArray*)prhs[6] 28 27 29 28 /* serial output macros: */ … … 34 33 #define NLHS 1 35 34 #undef NRHS 36 #define NRHS 835 #define NRHS 7 37 36 38 37 #endif /* _DAKOTARESPONSES_H */ -
issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp
r5326 r6231 22 22 int numvariables; 23 23 mxArray* pfield=NULL; 24 Vec partition=NULL;25 24 26 25 /*Boot module: */ … … 37 36 FetchData((DataSet**)&materials,MATERIALSIN); 38 37 FetchParams(¶meters,PARAMETERSIN); 39 FetchData(&partition,PARTITION);40 VecShift(partition,-1.0); //get partition onto "c" indexing41 38 /*dakota input: */ 42 39 FetchData(&variables,&numvariables,VARIABLES); … … 60 57 61 58 /*!Generate internal degree of freedom numbers: */ 62 InputUpdateFromDakotax(elements,nodes,vertices,loads, materials,parameters, partition,variables,variables_descriptors,numvariables);59 InputUpdateFromDakotax(elements,nodes,vertices,loads, materials,parameters,variables,variables_descriptors,numvariables); 63 60 64 61 /*write output datasets: */ … … 74 71 delete materials; 75 72 delete parameters; 76 VecFree(&partition);77 73 78 74 xfree((void**)&variables); -
issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.h
r4532 r6231 24 24 #define MATERIALSIN (mxArray*)prhs[4] 25 25 #define PARAMETERSIN (mxArray*)prhs[5] 26 #define PARTITION (mxArray*)prhs[6] 27 #define VARIABLES (mxArray*)prhs[7] 28 #define VARIABLESDESCRIPTORS (mxArray*)prhs[8] 26 #define VARIABLES (mxArray*)prhs[6] 27 #define VARIABLESDESCRIPTORS (mxArray*)prhs[7] 29 28 30 29 /* serial output macros: */ … … 37 36 #define NLHS 3 38 37 #undef NRHS 39 #define NRHS 938 #define NRHS 8 40 39 41 40 #endif /* _UPDATEINPUTSFROMDAKOTA_H */ -
issm/trunk/src/mex/VerticesDof/VerticesDof.cpp
r4453 r6231 11 11 Parameters* parameters=NULL; 12 12 13 /* output datasets: */14 Vec partition=NULL;15 Vec tpartition=NULL;16 17 13 /*Boot module: */ 18 14 MODULEBOOT(); … … 26 22 27 23 /*!Generate internal degree of freedom numbers: */ 28 VerticesDofx(&partition, &tpartition, vertices, parameters); 29 30 /*partition and tpartition should be incremented by 1: */ 31 VecShift(partition,1.0); //matlab indexing starts at 1. 32 VecShift(tpartition,1.0); 24 VerticesDofx(vertices, parameters); 33 25 34 26 /*write output datasets: */ 35 27 WriteData(VERTICES,vertices); 36 WriteData(PARTITION,partition);37 WriteData(TPARTITION,tpartition);38 28 39 29 /*Free ressources: */ 40 30 delete vertices; 41 31 delete parameters; 42 VecFree(&partition);43 VecFree(&tpartition);44 32 45 33 /*end module: */ … … 50 38 { 51 39 _printf_("\n"); 52 _printf_(" usage: [vertices ,part,tpart] = %s(vertices,parameters);\n",__FUNCT__);40 _printf_(" usage: [vertices] = %s(vertices,parameters);\n",__FUNCT__); 53 41 _printf_("\n"); 54 42 } -
issm/trunk/src/mex/VerticesDof/VerticesDof.h
r4236 r6231 22 22 /* serial output macros: */ 23 23 #define VERTICES (mxArray**)&plhs[0] 24 #define PARTITION (mxArray**)&plhs[1]25 #define TPARTITION (mxArray**)&plhs[2]26 24 27 25 /* serial arg counts: */ 28 26 #undef NLHS 29 #define NLHS 327 #define NLHS 1 30 28 #undef NRHS 31 29 #define NRHS 2
Note:
See TracChangeset
for help on using the changeset viewer.